Repository navigation
nb-bond-api: Babel 8 (@babel/core 8.1.0, @babel/preset-env 8.0.7), supersedes #346 - #368
Merged
Merged
Conversation
Moves the test-transform toolchain to Babel 8. The root package.json pins @babel/core 8.1.0 as a dev dependency so babel-jest and the workspace share one Babel 8 copy; jest's own packages and eslint-plugin-react-hooks keep nested Babel 7 copies. The lockfile change is limited to Babel's own dependency tree. Replaces the deferred-upgrade note in KNOWN_ISSUES with the resulting layout.
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.
What
Moves
nb-bond-api's test-transform toolchain to Babel 8:@babel/core7.29.7 → 8.1.0 and@babel/preset-env7.29.5 → 8.0.7, withbabel-jeststaying at 30.5.2. Supersedes #346, which only bumped the preset and cannot work alone (preset-env 8 peer-requires core 8).Why the root
package.jsongains a dev dependencybabel-jest30.5.2 accepts core 7 or 8 as a peer. With only the workspace bumped, npm hoists jest's own@babel/core7 to the root,babel-jestresolves that copy, and the Babel 8 preset loads under core 7 (it happens to transform correctly here because the target is the current Node, but the pairing is unsupported). Pinning@babel/core8.1.0 in the rootdevDependenciesmakes npm hoist core 8 instead, sobabel-jestand the workspace share one Babel 8 copy.An
overridesentry onbabel-jestwas tried and rejected: it cascades into@jest/transform, which would then run on core 8 without being supported there (npm lsreports it invalid).Resulting tree
@babel/core8.1.0, shared by the workspace andbabel-jest.@babel/core7.29.13 copies stay under@jest/transform,jest-config,jest-snapshot,istanbul-lib-instrumentandeslint-plugin-react-hooks, which depend on core 7 directly. This is the unavoidable duplicate;npm lsreports the tree clean.@vitejs/plugin-react6 no longer depends on Babel, so the old reason for deferring the upgrade no longer applies.@jridgewell/gen-mappingbeta,@types/gensync,@types/jsesc,empathic,flru,import-meta-resolve,js-tokens10,verkit, and refreshedregexpu-core/regenerate/babel-plugin-polyfill-corejs31.0.0);resolve1.22.12 andbabel-plugin-polyfill-corejs2/-regeneratordrop out. The diff is large because npm moves the Babel entries; the package set is as above.Babel 8 breaking changes against this repo
^22.18.0 || >=24.11.0: the repo pins Node 26.12.1.services/nb-bond-api/babel.config.cjs(a plain preset-env entry withtargets: { node: 'current' }), which Babel 8 still loads; no removed options are used.Verification
nb-bond-api: lint,prettier --check, build, jest 39 suites / 293 tests (also with--no-cache).nb-ui: lint,prettier --check, build, vitest 27 files / 139 tests.npm cifrom the committed lockfile; license inventory, node-version, image-hash-input, hygiene and link checks pass.npm audit: 5 low before, 5 low after (all the existingdeepmerge/ jest chain).Rollout impact
Dev-only toolchain. The
nb-bond-apiandnb-uiimage content hashes include the root manifest and lockfile, so both images rebuild once under new tags on the next localstart; runtime code is unchanged.docs/KNOWN_ISSUES.md: the "Babel 8 upgrade deferred" entry is replaced by a description of the resulting layout.