Skip to content

Update the dev tooling - #21

Draft
aklkv wants to merge 8 commits into
mainmatter:mainfrom
aklkv:chore/dev-deps
Draft

aklkv wants to merge 8 commits into
mainmatter:mainfrom
aklkv:chore/dev-deps

Conversation

@aklkv

@aklkv aklkv commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Part of splitting up #16. Draft because it builds on #17, #18, #19 and #20. Only the last 2 commits are new here; I'll rebase once those land.

eslint 8 is end of life and babel-plugin-tester was on a canary. release-plan 0.20 needs Node 22+, so the release workflows move off Node 18.

aklkv added 2 commits October 20, 2026 03:45
It had no tests. These run it through
babel-plugin-ember-template-compilation v2, which is what
ember-cli-htmlbars uses, and pin down how it rewrites and which modules
it treats as the app's.
babel-plugin-ember-template-compilation v4, which Embroider uses, sets
neither env.meta.moduleName nor env.moduleName, only env.filename, so
every template threw. Check all three, keeping the old precedence for
the path that feeds the id pattern, so classic output is unchanged.

The template tests now run against v4 as well as v2.
aklkv added 6 commits October 22, 2026 01:34
The replacer assigned arguments[1] and arguments[2] by index, so a call
with no values printed as intl.t('key', ). The fixtures didn't catch it
because babel-plugin-tester runs the output through prettier, which
drops the trailing comma, so the new tests read babel's own output.
Under Embroider + Vite, ember-intl's own source goes through the app's
babel pass. Its internal intl.formatMessage(descriptor, values) was
rewritten to intl.t('[sha512:contenthash:base64:6]', values), with the
raw id pattern as the key.

The replacer now fires only when the first argument is an object
literal with defaultMessage or id. Neither transform touches files under
node_modules any more, apart from an app old Embroider stages there,
since libraries ship already compiled.
Nothing tested index.js. These stand the addon up with a stub host and
check the htmlbars registry entry, the parallel-babel descriptor
ember-cli rebuilds the plugin from in workers, option merging, and that
the babel plugin is added once.
ember-cli-htmlbars passes baseDir() to hash-for-dep to build its cache
key, and expects the plugin's own package (its own plugins use
__dirname). path.resolve('./') is the app's root, so every build hashed
the app's whole dependency graph instead.
eslint 8 is end of life and babel-plugin-tester was on a canary. eslint
10 rejects the /* eslint-env */ comment in template-plugin.js; the flat
config already gives every file node globals.
release-plan 0.20 needs Node 22 or later, so the release workflows move
off Node 18, which the engines field doesn't allow anyway.
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