Repository navigation
Conversation
- jest 29->30, eslint 9->10, commander 11->15, html-to-text 9->10, htmlparser2 9->12, js-yaml 4->5, markdown-it 14->15, entities 4->8, form-data 4.0.5->4.0.6 - add @eslint/js and globals as explicit devDependencies (no longer bundled with eslint 10) and fix new recommended-rule findings (no-useless-assignment, preserve-caught-error) - js-yaml 5 throws on empty input: treat empty front matter as empty - commander/htmlparser2/entities are now ESM-only: Node >=22.12 is required for require(esm); bump engines and CI matrix accordingly - jest needs --experimental-vm-modules to require() ESM-only deps inside its sandbox; enable it in the test script chalk and inquirer are intentionally left for a separate ESM PR.
commander 15, htmlparser2 12, entities 8 are ESM-only and cannot be require()'d inside jest's sandbox on Node 22 (only Node 24.9+ supports require(esm) in jest). Downgrade to last CJS versions: - commander ^15.0.0 -> ^14.0.3 - htmlparser2 ^12.0.0 -> ^9.1.0 - entities ^8.1.0 -> ^4.5.0 Also revert the now-unneeded changes: - test script back to plain 'jest' (--experimental-vm-modules no longer needed) - engines back to >=18.0.0 and CI matrix to [18.x, 20.x, 22.x] - revert mtls-errors.test.js NODE_OPTIONS stripping (no longer needed)
Owner
Author
|
Squash-merged to main as 9784e89. |
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.
Summary
Upgrades the major-version-lagging dependencies (ESM-only
chalk/inquirerintentionally excluded — separate PR).All target versions were verified against the npm registry (
/<pkg>/latest) at the time of the upgrade; they match the versions above.Breaking-change handling
require(esm), which requires Node >= 22.12.enginesbumped from>=18to>=22.12.0; CI matrix updated from 18/20/22 to 22/24 and the publish job from Node 18 to 22.require()ESM-only packages without VM modules, so the test script now runsNODE_OPTIONS=--experimental-vm-modules jest. Plainnode bin/confluence.jsneeds no flag.@eslint/js/globalsfor this config — added as explicit devDependencies (@eslint/js ^10.0.1,globals ^17.13.0). Flat-config format is unchanged. New recommended rules (no-useless-assignment,preserve-caught-error) flagged 6 pre-existing sites; fixed in code (removed dead initializers, added{ cause }to rethrown errors).undefined: empty front-matter blocks are now treated as empty before callingload().CORE_SCHEMA,load/dumpoptions used here are unchanged. Theoverridesblock still resolves correctly: top-leveljs-yamlis 5.5.0 ($js-yamlself-reference) and@istanbuljs/load-nyc-configkeeps its nested^3.15.2pin (verified withnpm ls js-yaml).entities ^8, matching the direct upgrade.Tests
npm test: 1934 passed, 1 failed (48 suites: 47 passed).tests/mtls-errors.test.jscase — it fails identically on unmodifiedmain(verified before upgrading), and was not touched.npx eslint .passes.Follow-up (not in this PR)
chalk4→6 andinquirer8→14: both are ESM-only. After this PR the runtime already requires Node >=22.12 and Jest already runs with VM modules, so the module-system hurdle is mostly paid. chalk's API surface used here (chalk.redetc.) is unchanged, so it is low-risk as its own PR. inquirer 14 has larger API changes around prompts, so it should be a separate, stepwise PR with interactive prompt testing.