Chore/package updates - #9
Merged
Merged
Conversation
coverage.include is needed because v8 otherwise only reports files a test imports, which hid src/index.ts entirely instead of showing it at 0%. The chokidar contract tests wait on real OS file events, and macOS occasionally takes far longer than usual to deliver one, failing the suite about one run in five. Running the files one at a time helped but did not fix it, so those tests also retry twice. A genuine chokidar regression never delivers the event at all, so it still fails all three attempts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The six options were duplicated verbatim in build.ts and watch.ts, which is how the help text for --ast and --lut drifted into claiming they only work with formatjs. WatchOptions is now BuildOptions, since watch already passed --timeZone through to the build despite the type saying otherwise. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
husky 9 keeps sourcing _/husky.sh working as a deprecation shim, but running the hook prints "husky - DEPRECATED" and asks for the two lines to be removed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@formatjs/cli-lib is only reachable as `import type { CompileOpts }`, and the
built lib/ never references it, so consumers were downloading it plus fs-extra,
fast-glob and a native binary for one type. json-stable-stringify is the
opposite case: compile-formatjs-bundle.ts imports it at runtime and it shipped
in lib/, but it was only resolvable through cli-lib's own dependency tree.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
typescript 7 is the native compiler and accepts node20/nodenext. The package requires node 22.12 anyway, so target es2017 and module node16 were leaving downlevelling on for engines that no longer need it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The key order in bundle_<locale>.json and lut.ts followed the order the filesystem handed out directory entries in. That is sorted on APFS but arbitrary on ext4, so the same messages could produce different files on a laptop and in CI. sortIntlFiles orders by normalized id, so the result is also the same on Windows (\) and unix (/), and deliberately avoids localeCompare, whose ordering depends on the ICU data of the machine running the build. Verified against the 1268 message files in nybolig-nettsider: same key set, same values, and bundle_<locale>.compiled.json is bit-identical since json-stable-stringify already sorted that one. Only the order changes. A consumer that gitignores the generated output and regenerates it on predev, as nybolig-nettsider does, sees no difference at all; one that commits it gets a one-time reordering. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
memfs and node both support readdirSync(dir, { recursive: true }), so the
hand-rolled recursion is no longer needed. The lstat check stays: a folder can
be named close_nb.txt, and filtering on the name alone would let it through.
Tests cover four levels of nesting, that folders are excluded, that a folder
named like a message file is excluded, and that an empty tree yields nothing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The script format writes javascript, which the AST compiler then tried to JSON.parse, failing with "Unexpected token 'c', "const text"... is not valid JSON". --ast still works with json, jsonlut and formatjs, which the tests pin so the guard does not grow too wide. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The colour started with \x0b, a vertical tab, rather than \x1b. Terminals printed a literal "[33m" and left WARN uncoloured. The other four levels were already correct. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The format examples still used the pre-4.0.0 "/" id separator, and the option descriptions repeated the "only availble with formatjs" claim. Neither the naming convention for message files nor how to consume the generated output was written down anywhere, so the README alone was not enough to use the package. Adds the file naming rules, what each generated file is for, how to wire createIntlLUT up to createIntl, and how ICU constructs map to argument types. Drops the stale "Breaking Changes" section, which described a previous release and belongs in the changelog. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The package now requires node >= 22.12 and stops supporting node 20, which commander 15 forces and the engines field enforces. That is what makes this a major; the reordering of generated files is invisible to a consumer that gitignores them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Mortefal
force-pushed
the
chore/package-updates
branch
from
September 7, 2026 17:58
f2980b7 to
af38109
Compare
theodorSchei
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.