Skip to content

Cvt ilib-address to jest#152

Open
ehoogerbeets wants to merge 19 commits intofixEnsureLocalefrom
cvtAddressToJest
Open

Cvt ilib-address to jest#152
ehoogerbeets wants to merge 19 commits intofixEnsureLocalefrom
cvtAddressToJest

Conversation

@ehoogerbeets
Copy link
Copy Markdown
Contributor

  • depends on the ilib-localedata branch to convert to jest and for the one that fixes the race condition bug

- does not need to be shipped. Only the tests were updated/modernized.
- don't need this package for packages that have already been
  converted to jest
- Make sure to catch exceptions when trying
  to reference "global" which throws on some strict
  platforms
- Better default path using the ESM "globalThis" if
  everything else fails
- Reorganized the tests so that browser and node based tests are
  in different files. That way, the browser can avoid running the
  node tests and node can avoid running the browser tests.
- Browsers can specify to use the webpack loader
  automatically by putting
  `"ilib-loader": "ilib-loader/browser"` in the
  webpack.resolve.alias in the karma configuration.
- This will avoid dragging in the NodeLoader to the
  webpack bundle, and all of its dependencies making
  for a clean webpack build
- reorganized the tests for Node and Browsers in separate files
  so that they can be excluded while running the tests for the
  other platform
- converted all tests
- prevent running the web-only tests on node
- use the new ilib-loader/browser capability to avoid dragging in
NodeLoader and all its dependencies into the webpack bundle
- does not need to be published, as no customer-facing code is
modified
- remove all traces of nodeunit
- If too much data was loaded at once, ensureLocale would sometimes
have a Promise that would resolve to "true" when the data was not
yet parsed and cached, leading to a situation where code would
continue assuming the locale data was there.
- Had to call ensureLocale with many locales hundreds of times to
consistently repro the situation and show that it was fixed
@ehoogerbeets ehoogerbeets self-assigned this Jul 28, 2025
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jul 28, 2025

🦋 Changeset detected

Latest commit: 37f2f1d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
ilib-localedata Patch
ilib-address Patch
ilib-istring Patch
ilib-lint-react Patch
ilib-loctool-regex Patch
ilib-tools-common Patch
ilib-lint-apple Patch
ilib-lint-java Patch
ilib-lint-javascript Patch
ilib-lint-python-gnu Patch
ilib-lint-python Patch
ilib-lint Patch
ilib-loctool-po Patch
ilib-loctool-tap-i18n Patch
ilib-po Patch
ilib-tmx Patch
ilib-yaml Patch
loctool Patch
tmxtool Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ehoogerbeets ehoogerbeets changed the base branch from cvtLocaleDataToJest to fixEnsureLocale July 29, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant