Repository navigation
Conversation
Package the addon in the v2 format, built with rollup via @embroider/addon-dev: - Move addon/ to src/ and fix the imports rollup rejects (self-referential `ember-headlessui/...` imports, the `../helpers/transition` directory import and extensionless relative imports) - Replace index.js with addon-main.cjs (addonV1Shim) so classic builds keep working - Generate the app re-exports with appReexports instead of the app/ folder (same 31 modules as before) - exports map keeps `ember-headlessui/components/*` resolvable with and without the .js suffix - Drop ember-auto-import, ember-cli-babel, ember-cli-htmlbars, ember-cli-typescript and ember-set-helper from the addon's dependencies - test-app now depends on ember-set-helper and ember-truth-helpers directly - ESLint addon overrides point at src/ - CI and build:docs build the addon before running the test-app Type declarations, removal of the remaining v1 files and the ember-try matrix follow in separate PRs. R20-887 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
Converts ember-headlessui to a v2 addon, built with rollup through
@embroider/addon-dev. Consumers keep the same import paths. Classic (non-Embroider) apps keep working throughaddonV1Shim.This is the first of three PRs for the v2 conversion:
ember-sourceversionChanges
Packaging
addon/→src/(renames only, apart from the import fixes below)index.js→addon-main.cjsusingaddonV1Shimapp/folder deleted;appReexportsgenerates the same 31 re-exports (28 components,tag-name-is-component,headlessui-focus-trap,dialog-stack-provider)package.json:"ember-addon": { "version": 2 },files: ["addon-main.cjs", "dist"], and anexportsmap that resolvesember-headlessui/components/dialogandember-headlessui/components/dialog.jsthe same wayrollup.config.mjsandbabel.config.json(TypeScript,ember-concurrency/async-arrow-task-transform, template colocation,decorator-transforms)Imports rollup rejects, now fixed
ember-headlessui/utils/keyboardandember-headlessui/services/dialog-stack-providerimports are now relative../helpers/transitiondirectory import now points toindex.jsDependencies
ember-auto-import,ember-cli-babel,ember-cli-htmlbars,ember-cli-typescript,ember-set-helper@embroider/addon-shim,decorator-transforms(dependencies);@embroider/addon-dev,rollup,@rollup/plugin-babel,@babel/plugin-transform-typescript,babel-plugin-ember-template-compilation(devDependencies)test-appnow depends onember-set-helperandember-truth-helpersdirectly. It used to get them through the addon.Tooling
addon/overrides now apply tosrc/testsandtry-scenariosjobs build the addon before running testsbuild:docsbuilds the addon first, sodocs.ymlworks without changesTesting
pnpm --filter ember-headlessui buildsucceedspnpm lint:jspasses inember-headlessuiandtest-apppnpm build:docsproduces a production build of the test-apppnpm packcontainsaddon-main.cjsplusdist/, with 31_app_re-exports🤖 Generated with Claude Code