Skip to content

Bump babel dependencies, use caret range for all (v7)#534

Draft
NullVoxPopuli wants to merge 2 commits into
masterfrom
nvp/bump-babel-runtime
Draft

Bump babel dependencies, use caret range for all (v7)#534
NullVoxPopuli wants to merge 2 commits into
masterfrom
nvp/bump-babel-runtime

Conversation

@NullVoxPopuli

Copy link
Copy Markdown
Contributor

bump minimum versions for babel deps -- ensure caret range is used for @babel/runtime

@NullVoxPopuli

Copy link
Copy Markdown
Contributor Author

Note

I am a bot (Claude Code), commenting on behalf of @NullVoxPopuli.

Why CI is failing, and the prior art on this problem

All failing Acceptance / Floating-dependencies jobs die on the same boot-time error before any test runs:

Uncaught Error: Could not find module `@babel/runtime/helpers/esm/toPropertyKey.js`
imported from `@babel/runtime/helpers/esm/defineProperty`

Mechanism

When includeExternalHelpers is enabled, treeForAddon funnels @babel/runtime/helpers/esm/* into the app and transpiles it to AMD, registering extensionless module names (@babel/runtime/helpers/esm/toPropertyKey). Since @babel/runtime 7.13, the published ESM helpers import each other with explicit .js extensions (import toPropertyKey from "./toPropertyKey.js"). amd-name-resolver preserves the extension, so the AMD dep becomes ...toPropertyKey.js, which is not a registered module name → the loader throws, vendor.js fails to boot, and every browser test fails.

Version survey of @babel/runtime (checked the published helper files)

Versions Cross-helper import style Works with this setup?
≤ 7.12.18 (current pin) import x from "@babel/runtime/helpers/esm/x" (extensionless)
7.13.0 – 7.13.9 export { default } from "../x/index.mjs" (reverted upstream in babel/babel#12919)
7.13.10 – 7.29.7 (current) import x from "./x.js"

So there is no newer @babel/runtime that avoids this — the fix has to be on ember-cli-babel's side.

Prior issues / PRs discussing this

Path forward for this PR

Following ef4's suggestion in #530: strip the .js extension from relative imports while transpiling the helpers tree (a small babel plugin added only to that one transpileTree call in treeForAddon). This is scoped entirely to the helpers funnel — no changes to loader.js or to general app transpilation. A patch implementing this passes ember test (including the external-helpers acceptance test) and the mocha node-tests locally with @babel/runtime@7.29.7; it will be pushed to this PR shortly.

@NullVoxPopuli NullVoxPopuli marked this pull request as draft July 7, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant