@adobe-commerce/elsie 2.1.0-alpha-20260902151207 → 2.1.0-alpha-20260903123647

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/.elsie.js +21 -0
  2. package/CHANGELOG.md +14 -163
  3. package/bin/builders/build/index.js +20 -0
  4. package/bin/builders/changeset/index.js +5 -0
  5. package/{tooling/cli/commands → bin/builders}/concurrently/index.js +4 -4
  6. package/{tooling/cli/commands → bin/builders}/generate/api/index.js +13 -13
  7. package/{tooling/cli/commands → bin/builders}/generate/api/templates/function.js +2 -2
  8. package/{tooling/cli/commands → bin/builders}/generate/api/templates/index.js +2 -2
  9. package/{tooling/cli/commands → bin/builders}/generate/api/templates/story.js +2 -2
  10. package/{tooling/cli/commands → bin/builders}/generate/api/templates/unit-test.js +2 -2
  11. package/{tooling/cli/commands → bin/builders}/generate/component/index.js +18 -16
  12. package/{tooling/cli/commands → bin/builders}/generate/component/templates/Component.js +3 -3
  13. package/{tooling/cli/commands → bin/builders}/generate/component/templates/css.js +3 -3
  14. package/{tooling/cli/commands/generate/container → bin/builders/generate/component}/templates/index.js +2 -2
  15. package/{tooling/cli/commands → bin/builders}/generate/component/templates/stories.js +2 -2
  16. package/{tooling/cli/commands → bin/builders}/generate/component/templates/unit-test.js +2 -2
  17. package/{tooling/cli/commands → bin/builders}/generate/config/index.js +13 -41
  18. package/bin/builders/generate/config/templates/elsie.js +38 -0
  19. package/{tooling/cli/commands → bin/builders}/generate/container/index.js +12 -14
  20. package/{tooling/cli/commands → bin/builders}/generate/container/templates/Component.js +2 -2
  21. package/{tooling/cli/commands/generate/component → bin/builders/generate/container}/templates/index.js +2 -2
  22. package/{tooling/cli/commands → bin/builders}/generate/container/templates/stories.js +2 -2
  23. package/{tooling/cli/commands → bin/builders}/generate/container/templates/unit-test.js +2 -2
  24. package/{tooling/cli/commands → bin/builders}/generate/index.js +67 -43
  25. package/{tooling/cli/commands → bin/builders}/gql/createOrClearDirectory.js +4 -4
  26. package/bin/builders/gql/getSchemaRef.js +25 -0
  27. package/{tooling/cli/commands → bin/builders}/gql/index.js +8 -9
  28. package/{tooling/cli/commands → bin/builders}/gql/validate.js +9 -16
  29. package/bin/builders/lint/index.js +5 -0
  30. package/{tooling/cli/commands → bin/builders}/serve/index.js +8 -13
  31. package/bin/builders/storybook/index.js +5 -0
  32. package/bin/builders/test/index.js +5 -0
  33. package/{tooling/cli/commands → bin/builders}/types/index.js +9 -8
  34. package/{tooling/cli/commands → bin/builders}/types/validate-tsconfig.js +4 -4
  35. package/{tooling/cli/commands → bin/builders}/wait-on/index.js +3 -3
  36. package/bin/index.js +48 -0
  37. package/bin/lib/cli.js +23 -0
  38. package/bin/lib/config.js +14 -0
  39. package/{tooling/cli → bin}/lib/log-message.js +2 -2
  40. package/{tooling/cli → bin}/lib/string.js +9 -3
  41. package/bin/lib/validate-typeof.js +28 -0
  42. package/{tooling/cli → bin}/lib/write-file.js +5 -5
  43. package/{tooling/cli → bin}/lib/write-parent-index.js +5 -5
  44. package/config/entries.mjs +43 -0
  45. package/config/eslint.mjs +191 -0
  46. package/config/jest.mjs +103 -0
  47. package/{tooling/configs/vite/plugins/dts/index.js → config/plugins/dts.mjs} +8 -50
  48. package/config/prettier.json +29 -0
  49. package/{tooling/configs → config}/storybook/addon.js +40 -69
  50. package/config/storybook/components/FileTree/index.js +10 -0
  51. package/{tooling/configs → config}/storybook/components/Flex/index.js +1 -1
  52. package/config/storybook/components/OptionsTable/index.js +10 -0
  53. package/{tooling/configs → config}/storybook/components/Panel/index.ts +1 -1
  54. package/config/storybook/components/Screenshot/index.js +10 -0
  55. package/{tooling/configs/storybook/components/Screenshot → config/storybook/components/Steps}/index.js +1 -1
  56. package/config/storybook/components/StoryWrapper/index.js +10 -0
  57. package/config/storybook/components/Summary/index.js +10 -0
  58. package/config/storybook/components/Variants/index.js +10 -0
  59. package/{tooling/configs/storybook/components/OptionsTable → config/storybook/components/Video}/index.js +1 -1
  60. package/{tooling/configs → config}/storybook/preview.jsx +32 -2
  61. package/{tooling/configs/tsconfig/base.json → config/tsconfig-base.json} +11 -18
  62. package/config/tsconfig-preact.json +15 -0
  63. package/config/vite.mjs +618 -0
  64. package/{tooling/configs/storybook/components/FileTree/index.js → eslint.config.mjs} +3 -1
  65. package/{tooling/configs/eslint/presets/storybook.js → jest.config.mjs} +10 -7
  66. package/package.json +36 -91
  67. package/src/components/Accordion/Accordion.tsx +3 -2
  68. package/src/components/ActionButton/ActionButton.tsx +1 -0
  69. package/src/components/Button/Button.mdx +1 -1
  70. package/src/components/Button/Button.tsx +1 -0
  71. package/src/components/CartItem/CartItem.tsx +1 -0
  72. package/src/components/Checkbox/Checkbox.tsx +2 -0
  73. package/src/components/Image/Image.tsx +2 -2
  74. package/src/components/Incrementer/Incrementer.tsx +2 -2
  75. package/src/components/Input/Input.tsx +2 -2
  76. package/src/components/InputFile/InputFile.tsx +2 -2
  77. package/src/components/LiveRegion/LiveRegion.mdx +1 -1
  78. package/src/components/MultiSelect/MultiSelect.tsx +3 -14
  79. package/src/components/Picker/Picker.tsx +8 -2
  80. package/src/components/TextArea/TextArea.tsx +3 -2
  81. package/src/components/ToggleButton/ToggleButton.stories.tsx +1 -1
  82. package/src/components/UIProvider/UIProvider.css +1 -1
  83. package/src/docs/Design/grid.mdx +1 -1
  84. package/src/docs/Design/overview.mdx +2 -4
  85. package/src/docs/components/overview.mdx +2 -4
  86. package/src/docs/quick-start.mdx +3 -5
  87. package/src/docs/welcome.mdx +4 -6
  88. package/src/lib/classes.ts +2 -1
  89. package/src/lib/image-params-keymap.ts +2 -1
  90. package/src/lib/slot.tsx +4 -0
  91. package/src/lib/tests.tsx +2 -2
  92. package/src/shims/importmap.js +5 -5
  93. package/storybook-stories.js +21 -0
  94. package/tests/__mocks__/fileMocks.ts +12 -0
  95. package/tests/__mocks__/styleMock.ts +0 -0
  96. package/tsconfig.build.json +23 -19
  97. package/eslint.config.js +0 -26
  98. package/src/jest-dom.d.ts +0 -37
  99. package/tooling/cli/cli.js +0 -78
  100. package/tooling/cli/commands/build/index.js +0 -27
  101. package/tooling/cli/commands/changeset/index.js +0 -5
  102. package/tooling/cli/commands/clean/index.js +0 -8
  103. package/tooling/cli/commands/format/index.js +0 -58
  104. package/tooling/cli/commands/generate/config/templates/elsie.js +0 -24
  105. package/tooling/cli/commands/gql/getSchemaRef.js +0 -29
  106. package/tooling/cli/commands/lint/index.js +0 -47
  107. package/tooling/cli/commands/storybook/index.js +0 -45
  108. package/tooling/cli/commands/test/index.js +0 -5
  109. package/tooling/cli/commands/validate-config/index.js +0 -28
  110. package/tooling/cli/lib/cli.js +0 -33
  111. package/tooling/cli/lib/config.js +0 -9
  112. package/tooling/cli/lib/create-require.cjs +0 -12
  113. package/tooling/cli/lib/resolve-bin.js +0 -12
  114. package/tooling/cli/lib/validate-config.js +0 -65
  115. package/tooling/configs/eslint/base.js +0 -26
  116. package/tooling/configs/eslint/index.js +0 -79
  117. package/tooling/configs/eslint/presets/browser.js +0 -26
  118. package/tooling/configs/eslint/presets/mdx.js +0 -24
  119. package/tooling/configs/eslint/presets/node.js +0 -25
  120. package/tooling/configs/eslint/presets/preact.js +0 -67
  121. package/tooling/configs/eslint/presets/tests.js +0 -35
  122. package/tooling/configs/eslint/presets/typescript.js +0 -50
  123. package/tooling/configs/eslint/restrictions.js +0 -88
  124. package/tooling/configs/jest/index.js +0 -197
  125. package/tooling/configs/jest/transform-ignore-patterns.js +0 -31
  126. package/tooling/configs/prettier/index.js +0 -39
  127. package/tooling/configs/prettier/prettier.ignore +0 -7
  128. package/tooling/configs/storybook/components/Steps/index.js +0 -10
  129. package/tooling/configs/storybook/components/StoryWrapper/index.js +0 -10
  130. package/tooling/configs/storybook/components/Summary/index.js +0 -10
  131. package/tooling/configs/storybook/components/Variants/index.js +0 -10
  132. package/tooling/configs/storybook/components/Video/index.js +0 -10
  133. package/tooling/configs/storybook/components/index.js +0 -19
  134. package/tooling/configs/storybook/decorators/index.jsx +0 -39
  135. package/tooling/configs/tsconfig/build.json +0 -20
  136. package/tooling/configs/tsconfig/preact.json +0 -20
  137. package/tooling/configs/vite/index.js +0 -386
  138. package/tooling/configs/vite/plugins/fragment-import-redirect.js +0 -143
  139. package/tooling/configs/vite/plugins/generate-dist-package-json.js +0 -73
  140. package/tooling/configs/vite/plugins/index.js +0 -14
  141. package/tooling/configs/vite/plugins/inject-dropin-metadata.js +0 -60
  142. package/tooling/configs/vite/plugins/rewrite-sourcemap-sources.js +0 -58
  143. package/tooling/eslint.config.js +0 -20
  144. package/tooling/jest.config.js +0 -32
  145. package/tooling/schemas/elsie-config.schema.json +0 -97
  146. package/tooling/tests/dom.ts +0 -29
  147. package/tooling/tests/index.ts +0 -43
  148. package/tooling/tsconfig.json +0 -7
  149. package/tooling/types/assets.d.ts +0 -31
  150. package/tooling/types/css.d.ts +0 -15
  151. package/tooling/types/test-globals.d.ts +0 -14
  152. package/vite.config.js +0 -249
  153. /package/{tooling/tests/__mocks__/svgMock.js → __mocks__/svg.js} +0 -0
  154. /package/{tooling/configs/vite/plugins/dts/replacers → config/plugins}/dts-elsie-replacer.cjs +0 -0
  155. /package/{tooling/configs/vite/plugins/dts/replacers → config/plugins}/dts-normalize-relative-replacer.cjs +0 -0
  156. /package/{tooling/configs/jest/setEnvVars.js → config/setEnvVars.mjs} +0 -0
  157. /package/{tooling/configs → config}/storybook/components/FileTree/FileTree.jsx +0 -0
  158. /package/{tooling/configs → config}/storybook/components/Flex/Flex.jsx +0 -0
  159. /package/{tooling/configs → config}/storybook/components/Flex/Flex.module.css +0 -0
  160. /package/{tooling/configs → config}/storybook/components/OptionsTable/OptionsTable.jsx +0 -0
  161. /package/{tooling/configs → config}/storybook/components/OptionsTable/OptionsTable.module.css +0 -0
  162. /package/{tooling/configs → config}/storybook/components/Panel/Panel.module.css +0 -0
  163. /package/{tooling/configs → config}/storybook/components/Panel/Panel.tsx +0 -0
  164. /package/{tooling/configs → config}/storybook/components/Screenshot/Screenshot.jsx +0 -0
  165. /package/{tooling/configs → config}/storybook/components/Screenshot/Screenshot.module.css +0 -0
  166. /package/{tooling/configs → config}/storybook/components/Steps/Steps.jsx +0 -0
  167. /package/{tooling/configs → config}/storybook/components/Steps/Steps.module.css +0 -0
  168. /package/{tooling/configs → config}/storybook/components/StoryWrapper/StoryWrapper.jsx +0 -0
  169. /package/{tooling/configs → config}/storybook/components/StoryWrapper/StoryWrapper.module.css +0 -0
  170. /package/{tooling/configs → config}/storybook/components/Summary/Summary.jsx +0 -0
  171. /package/{tooling/configs → config}/storybook/components/Summary/Summary.module.css +0 -0
  172. /package/{tooling/configs → config}/storybook/components/Variants/Variants.jsx +0 -0
  173. /package/{tooling/configs → config}/storybook/components/Variants/docs.css +0 -0
  174. /package/{tooling/configs → config}/storybook/components/Video/Video.jsx +0 -0
  175. /package/{tooling/configs → config}/storybook/components/Video/Video.module.css +0 -0
  176. /package/{tooling/configs → config}/storybook/manager.js +0 -0
  177. /package/{tooling/configs → config}/storybook/theming/fonts.css +0 -0
  178. /package/{tooling/configs → config}/storybook/theming/logo.svg +0 -0
  179. /package/{tooling/configs → config}/storybook/theming/manager.css +0 -0
  180. /package/{tooling/configs → config}/storybook/theming/preview.css +0 -0
  181. /package/{tooling/configs → config}/storybook/theming/theme.js +0 -0
  182. /package/{tooling/tests → tests}/__mocks__/browserMocks.ts +0 -0
  183. /package/{tooling/tests/__mocks__/styleMock.js → tests/__mocks__/cssMock.js} +0 -0
package/.elsie.js ADDED
@@ -0,0 +1,21 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
10
+ module.exports = {
11
+ name: 'Base',
12
+ components: [
13
+ {
14
+ id: 'Components',
15
+ root: './src/components',
16
+ importAliasRoot: '@adobe-commerce/elsie/components',
17
+ cssPrefix: 'dropin',
18
+ default: true,
19
+ },
20
+ ],
21
+ };
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @adobe-commerce/elsie
2
2
 
3
- ## 2.1.0-alpha-20260902151207
3
+ ## 2.1.0-alpha-20260903123647
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -8,98 +8,6 @@
8
8
  `<label>` element associated with the input field via `htmlFor`/`id`. This
9
9
  addresses WCAG 3.3.2 (Labels or Instructions) which requires form fields to
10
10
  have visible labels.
11
- - 53ba072: feat(elsie): add `clean` and `format` builders, and resolve `tsc`
12
- from elsie
13
-
14
- Elsie is now the single owner of the shared toolchain — packages no longer
15
- need to install their own copies of these tools:
16
-
17
- - New `elsie clean [paths...]` command (wraps rimraf, defaults to `dist`).
18
- - New `elsie format [paths...]` command (wraps Prettier; `--check` verifies
19
- instead of writing; defaults to the current directory).
20
- - The `dts` Vite plugin now resolves the TypeScript compiler from elsie's own
21
- dependency tree (like the rest of the CLI) instead of the consumer's
22
- `node_modules/.bin/tsc`. This makes `.d.ts` generation work for consumers
23
- that don't install `typescript` locally and aligns `elsie build` with
24
- `elsie types`.
25
-
26
- As a result, `@dropins/build-tools` drops its `rimraf`, `vite`, and
27
- `typescript` devDependencies, and `@adobe-commerce/storefront-design` drops
28
- `rimraf`; both now use `elsie clean` for their cleanup step.
29
-
30
- - a0a03c7: feat(elsie): extend `elsie storybook` with `build` and `test` modes
31
-
32
- `elsie storybook` only ever ran `storybook dev`; building and testing
33
- Storybook still meant calling `storybook build` and `test-storybook` bare,
34
- which resolve their binaries via the shell's inherited `PATH` — the same class
35
- of bug the CLI's `resolveBin()`-based dispatch (`lint`/`test`/
36
- `changeset`/`types`) was fixed to avoid.
37
-
38
- `elsie storybook [mode]` now accepts `dev` (default, unchanged), `build`
39
- (`elsie storybook build`), and `test` (`elsie storybook test`, resolving
40
- `@storybook/test-runner`'s `test-storybook` bin). All other arguments keep
41
- flowing through untouched, so existing invocations are unaffected.
42
-
43
- `packages/elsie`'s own `build:storybook`, `build:storybook:ci`,
44
- `test:storybook`, and `test:storybook:ci` scripts now go through this instead
45
- of calling `storybook build` / `test-storybook` directly.
46
-
47
- - 2b6e114: feat(elsie): explicit jest imports via an
48
- `@adobe-commerce/elsie/tests` test-kit
49
-
50
- Tests now import their jest API explicitly instead of relying on ambient
51
- `@types/jest` globals, following Jest's recommendation for version-matched
52
- types (`@jest/globals` ships with jest, `@types/jest` is third-party and can
53
- drift):
54
-
55
- - New `@adobe-commerce/elsie/tests` subpath re-exports the jest API surface
56
- (`describe`/`it`/`test`/`expect` + lifecycle hooks) from `@jest/globals`. It
57
- pulls in no DOM code, so it is safe to import from any package's jest
58
- config.
59
- - New `@adobe-commerce/elsie/tests/dom` additionally re-exports
60
- `@testing-library/preact`, `userEvent`, and registers jest-dom matchers —
61
- for component tests (requires a jest config that resolves packages to their
62
- node/CJS builds, e.g. via `testEnvironmentOptions.customExportConditions`).
63
- - `@jest/globals` and `@testing-library/user-event` are now elsie
64
- dependencies; a bundled type augmentation restores jest-dom matcher types on
65
- jest 30's two-parameter `expect` Matchers.
66
- - `@types/jest` is no longer required and `types: ["jest"]` has been dropped
67
- from the shared tsconfig. Import `jest` directly from `@jest/globals` in
68
- files that call `jest.mock(...)` (babel cannot hoist an imported `jest` into
69
- inner-scope mock factories — use the ambient global `jest` there instead).
70
-
71
- Consumers migrating: replace ambient jest globals with imports from
72
- `@adobe-commerce/elsie/tests` (and `/tests/dom` for component tests), and drop
73
- `@types/jest`.
74
-
75
- - 7e07cc6: fix(elsie): declare the toolchain as real dependencies so it works
76
- outside this monorepo
77
-
78
- `elsie`'s CLI
79
- (`lint`/`test`/`build`/`serve`/`types`/`format`/`clean`/`changeset`/`gql`) and
80
- its shared configs (`configs/jest.js`, `configs/eslint.js`, `configs/vite.js`,
81
- and the `@adobe-commerce/elsie/tests`(`/dom`) test-kit) required packages that
82
- were classified as `devDependencies` — `eslint`, `jest` and its environments,
83
- `babel-jest` and the Babel presets it needs, `vite` and its plugins,
84
- `typescript`, `prettier`, `rimraf`, `@changesets/cli`, `@jest/globals`,
85
- `@testing-library/preact`/`user-event`, and others. `devDependencies` are
86
- never installed for anyone who depends on `@adobe-commerce/elsie` normally, so
87
- none of this was actually present for an external consumer's install,
88
- regardless of package manager or `node_modules` layout — the CLI and shared
89
- configs only ever worked inside this monorepo (where every workspace package's
90
- `devDependencies` are installed at the root), contradicting the "batteries
91
- included, no separate install needed" toolchain this SDK is meant to provide.
92
-
93
- The ~49 packages `tooling/` actually requires at runtime are now real
94
- `dependencies`. Packages elsie only uses to build its own `dist` bundle (the
95
- sibling SDK workspace packages, `@types/node`, `@chromatic-com/storybook`,
96
- etc.) remain `devDependencies`.
97
-
98
- Verified end-to-end: packed the tarball, installed it into a scratch pnpm
99
- project with the default (isolated, non-hoisted) `nodeLinker` and zero other
100
- dependencies, and confirmed `elsie test`/`elsie format` run successfully
101
- against it — no `nodeLinker: hoisted` workaround needed.
102
-
103
11
  - d9ac070: feat(a11y): add LiveRegion component and Button loading state for
104
12
  WCAG 4.1.3
105
13
 
@@ -114,6 +22,19 @@
114
22
  the button element — live regions must not be nested inside interactive
115
23
  elements).
116
24
 
25
+ - 4cecbe2: Bump `preact` from `~10.22.1` to `~10.29.7` and `@preact/signals`
26
+ from `1.3.0` to `^2.3.1`, matching the preact version most external consumers
27
+ already have installed.
28
+
29
+ Preact 10.29 narrowed its generic `HTMLAttributes<Target>` typings: `value`,
30
+ `checked`, `alt`, `width`, `height`, `loading`, `srcSet`, `required`, and
31
+ `name` moved out into per-element interfaces instead of being available on
32
+ every element generically. This restores the type declarations for the
33
+ components that were affected (`Input`, `TextArea`, `Checkbox`, `Image`,
34
+ `Incrementer`, `Button`, `ActionButton`, `Picker`, `InputFile`, `Accordion`,
35
+ `CartItem`, `Slot`) — no runtime or prop-API changes, just typings that would
36
+ otherwise break consumers' own TypeScript builds.
37
+
117
38
  - cadd9f3: feat(lib): add `sanitizeHtml` and `createSanitizedHtml` helpers
118
39
  (backed by DOMPurify) for safely rendering untrusted HTML via
119
40
  `dangerouslySetInnerHTML`. By default only basic inline formatting tags are
@@ -148,48 +69,12 @@
148
69
 
149
70
  - 089ba5c: fix(a11y): prevent dummy update when keyboard focus moves to
150
71
  Incrementer buttons and add aria-valuetext for VoiceOver
151
- - 7e07cc6: fix(elsie): fix `transformIgnorePatterns` for pnpm's isolated-linker
152
- virtual store
153
-
154
- The shared Jest config factory (`@adobe-commerce/elsie/configs/jest.js`)
155
- allow-lists elsie and the other `@adobe-commerce/*` packages for
156
- transformation since they ship untranspiled TS/TSX source. The allow-list
157
- regex only matched the outer `node_modules/` segment, so under pnpm's default
158
- (isolated) linker — where a real dependency is nested one level deeper at
159
- `node_modules/.pnpm/<scope>+<name>@<version>/node_modules/<scope>/<name>/…` —
160
- the pattern no longer matched and those packages silently stopped being
161
- transformed, failing every consumer test suite with
162
- `SyntaxError: Cannot use import statement outside a module`.
163
-
164
- `transformIgnorePatterns` now includes a second pattern anchored on `.pnpm/`
165
- so both the flat/hoisted layout (Yarn, npm, `nodeLinker: hoisted`) and pnpm's
166
- isolated virtual store are handled correctly. Consumers on pnpm's default
167
- linker no longer need a hand-rolled `transformIgnorePatterns` override or
168
- `nodeLinker: hoisted` to work around this.
169
-
170
72
  - d59c153: Fix `Modal` accessibility: while the modal is open, sibling content
171
73
  in `document.body` is now hidden from assistive technology with
172
74
  `aria-hidden="true"`, preventing screen reader users from navigating outside
173
75
  the modal with arrow keys. The attribute is removed automatically when the
174
76
  modal closes. Other portal roots (e.g. nested modals or toasts) and elements
175
77
  that already declare `aria-hidden` are left untouched.
176
- - dcf4c97: fix(elsie): stop `MultiSelect`'s screen-reader announcements from
177
- looping infinitely while the dropdown is open
178
-
179
- `preact-i18n`'s `useText()` returns a brand-new translations object on every
180
- render. Two of `MultiSelect`'s `useEffect`s depended on that whole object and
181
- each called `announce()` with a different message, so while the dropdown was
182
- open they kept re-triggering each other — one effect's announcement change
183
- caused a re-render that fired the other effect, which changed the announcement
184
- back, forever, synchronously. This produced an unbounded render loop that
185
- could exhaust the JS heap (observed as Jest OOM crashes in
186
- `MultiSelect.test.tsx`).
187
-
188
- Both effects now depend on the specific translation strings they use instead
189
- of the whole object, and `useAccessibilityAnnouncements` clears its pending
190
- timeout before scheduling a new one (and on unmount) instead of leaving it
191
- dangling.
192
-
193
78
  - c9674f9: fix(a11y): add aria-current="page" to active pagination button and
194
79
  fix active indicator contrast (WCAG 1.4.11, 4.1.2)
195
80
  - 6957e90: Fix `PasswordStatusIndicator` requirement status changes (e.g. the
@@ -197,21 +82,6 @@
197
82
  The container now carries `role="status"` and `aria-live="polite"` so
198
83
  assistive technology announces requirement changes as they happen (WCAG
199
84
  4.1.3).
200
- - c457558: chore: migrate build tooling from Yarn to pnpm
201
-
202
- The monorepo now uses pnpm instead of Yarn v1. As part of this, elsie's CLI
203
- (`lint`/`test`/`storybook`/`changeset`/`types`) no longer shells out to bare
204
- command names — each tool is resolved and spawned directly, fixing a latent
205
- path-with-spaces bug and command-injection surface.
206
-
207
- `tooling/` (the CLI, and the shared
208
- eslint/jest/prettier/vite/storybook/tsconfig configs) is now correctly
209
- included when `@adobe-commerce/elsie` is published — an oversight from merging
210
- the tooling package back into elsie meant `.npmignore` excluded it, which
211
- would have shipped a package whose own `bin` and `exports` pointed at files
212
- that didn't exist in the tarball. This is unrelated to (and does not affect)
213
- the separate `@dropins/tools` bundle published from `dist/`.
214
-
215
85
  - 85e5b20: fix(a11y): keep RadioButton's focusable input anchored to its visible
216
86
  label when the page scrolls, preventing focus from appearing obscured or
217
87
  off-screen (WCAG 2.4.11)
@@ -221,25 +91,6 @@
221
91
  query.
222
92
  - a920177: fix(Incrementer): prevent quantity input flicker during in-progress
223
93
  typing, and prevent double onValue call when debounce fires before blur
224
- - 0d1e19d: chore: upgrade vite-tsconfig-paths 4.3.2 → 6.1.1
225
-
226
- 6.x resolves `${configDir}`-expanded `include` entries correctly, so the
227
- per-package relative `include` overrides that worked around the 4.x limitation
228
- are no longer needed. Removed the redundant `["src", "tests"]` overrides (and
229
- their duplicated comments) from `build-tools`, `event-bus`, `fetch-graphql`,
230
- and `recaptcha`, which now inherit the base tsconfig's `${configDir}` include.
231
- `elsie` keeps its `["src"]` include (it deliberately excludes its jest `tests`
232
- dir); its comment was updated to reflect the real reason rather than the
233
- obsolete workaround.
234
-
235
- Also removed the default `@/*` → `${configDir}/src/*` mapping from the base
236
- tsconfig. Because tsconfig `paths` is replaced wholesale (never merged) when a
237
- config redeclares it, a base-level default is a footgun: any package that
238
- needs an extra alias silently loses `@/*`. It is now opt-in — a package that
239
- wants it declares its own `paths`. No base-extending package in the repo
240
- relied on it (event-bus already uses relative imports). Preact packages are
241
- unaffected: the preact config still declares its own `@/*` alongside the
242
- react→preact aliases.
243
94
 
244
95
  ## 2.0.1
245
96
 
@@ -0,0 +1,20 @@
1
+ const path = require('path');
2
+
3
+ module.exports = async function generateResourceBuilder({ argv }) {
4
+ const { build } = await import('vite');
5
+
6
+ const configFile =
7
+ argv?.config ?? path.resolve(__dirname, '../../../config/vite.mjs');
8
+
9
+ const outDir = argv?.outDir ?? 'dist';
10
+
11
+ const isProd = process.env.NODE_ENV !== 'development';
12
+
13
+ await build({
14
+ mode: isProd ? 'production' : 'development',
15
+ build: { emptyOutDir: true, outDir },
16
+ clearScreen: true,
17
+ configFile,
18
+ });
19
+ process.exit(0);
20
+ };
@@ -0,0 +1,5 @@
1
+ const cli = require('../../lib/cli');
2
+
3
+ module.exports = function changesetBuilder() {
4
+ return cli('changeset');
5
+ };
@@ -1,7 +1,7 @@
1
- import { concurrently } from 'concurrently';
2
- import yargs from 'yargs/yargs';
1
+ const { concurrently } = require('concurrently');
2
+ const yargs = require('yargs/yargs');
3
3
 
4
- export default function concurrentlyBuilder() {
4
+ module.exports = function concurrentlyBuilder() {
5
5
  const argv = yargs(process.argv.slice(3))
6
6
  .option('kill-others', { alias: 'k', type: 'boolean', default: false })
7
7
  .option('success', {
@@ -37,4 +37,4 @@ export default function concurrentlyBuilder() {
37
37
  return result.catch(() => {
38
38
  process.exitCode = 1;
39
39
  });
40
- }
40
+ };
@@ -7,22 +7,22 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
 
10
- import path from 'path';
11
- import fs from 'fs';
12
- import writeFile from '../../../lib/write-file.js';
13
- import writeParentIndex from '../../../lib/write-parent-index.js';
14
- import getConfig from '../../../lib/config.js';
15
- import m from '../../../lib/log-message.js';
10
+ const path = require('path');
11
+ const fs = require('fs');
12
+ const writeFile = require('../../../lib/write-file');
13
+ const writeParentIndex = require('../../../lib/write-parent-index');
14
+ const config = require('../../../lib/config');
15
+ const m = require('../../../lib/log-message');
16
16
 
17
17
  // Templates
18
- import templateFunction from './templates/function.js';
19
- import templateStory from './templates/story.js';
20
- import templateTest from './templates/unit-test.js';
21
- import templateIndex from './templates/index.js';
18
+ const templateFunction = require('./templates/function');
19
+ const templateStory = require('./templates/story');
20
+ const templateTest = require('./templates/unit-test');
21
+ const templateIndex = require('./templates/index');
22
22
 
23
- export default async function newApiBuilder({ pathname, force }) {
23
+ module.exports = async function newApiBuilder({ pathname, force }) {
24
24
  try {
25
- const { name, api } = getConfig();
25
+ const { name, api } = config();
26
26
 
27
27
  const { root, importAliasRoot } = api;
28
28
 
@@ -71,4 +71,4 @@ export default async function newApiBuilder({ pathname, force }) {
71
71
  } catch (error) {
72
72
  console.error(m(error, 'error'));
73
73
  }
74
- }
74
+ };
@@ -1,6 +1,6 @@
1
- import { stripIndent } from 'common-tags';
1
+ const { stripIndent } = require('common-tags');
2
2
 
3
- export default ({ basename }) => {
3
+ module.exports = ({ basename }) => {
4
4
  return `/********************************************************************
5
5
  * Copyright 2025 Adobe
6
6
  * All Rights Reserved.
@@ -1,6 +1,6 @@
1
- import { source } from 'common-tags';
1
+ const { source } = require('common-tags');
2
2
 
3
- export default ({ basename, importPath = '.' }) => {
3
+ module.exports = ({ basename, importPath = '.' }) => {
4
4
  return `/********************************************************************
5
5
  * Copyright 2025 Adobe
6
6
  * All Rights Reserved.
@@ -1,6 +1,6 @@
1
- import { source } from 'common-tags';
1
+ const { source } = require('common-tags');
2
2
 
3
- export default ({ pathname, basename, importPath = '.' }) => {
3
+ module.exports = ({ pathname, basename, importPath = '.' }) => {
4
4
  return `/********************************************************************
5
5
  * Copyright 2025 Adobe
6
6
  * All Rights Reserved.
@@ -1,6 +1,6 @@
1
- import { source } from 'common-tags';
1
+ const { source } = require('common-tags');
2
2
 
3
- export default ({ name, basename, pathname, importPath = '.' }) => {
3
+ module.exports = ({ name, basename, pathname, importPath = '.' }) => {
4
4
  return `/********************************************************************
5
5
  * Copyright 2025 Adobe
6
6
  * All Rights Reserved.
@@ -7,23 +7,25 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
 
10
- import path from 'path';
11
- import fs from 'fs';
12
- import writeFile from '../../../lib/write-file.js';
13
- import writeParentIndex from '../../../lib/write-parent-index.js';
14
- import getConfig from '../../../lib/config.js';
15
- import m from '../../../lib/log-message.js';
10
+ const path = require('path');
11
+ const fs = require('fs');
12
+ const writeFile = require('../../../lib/write-file');
13
+ const writeParentIndex = require('../../../lib/write-parent-index');
14
+ const config = require('../../../lib/config')();
15
+ const m = require('../../../lib/log-message');
16
16
 
17
17
  // Templates
18
- import templateComponent from './templates/Component.js';
19
- import templateStyles from './templates/css.js';
20
- import templateStory from './templates/stories.js';
21
- import templateTest from './templates/unit-test.js';
22
- import templateIndex from './templates/index.js';
23
-
24
- const config = getConfig();
25
-
26
- export default async function newComponentBuilder({ pathname, group, force }) {
18
+ const templateComponent = require('./templates/Component');
19
+ const templateStyles = require('./templates/css');
20
+ const templateStory = require('./templates/stories');
21
+ const templateTest = require('./templates/unit-test');
22
+ const templateIndex = require('./templates/index');
23
+
24
+ module.exports = async function newComponentBuilder({
25
+ pathname,
26
+ group,
27
+ force,
28
+ }) {
27
29
  try {
28
30
  const componentGroup = config.components.find((x) => x.id === group);
29
31
 
@@ -91,4 +93,4 @@ export default async function newComponentBuilder({ pathname, group, force }) {
91
93
  } catch (error) {
92
94
  console.error(m(error, 'error'));
93
95
  }
94
- }
96
+ };
@@ -1,7 +1,7 @@
1
- import { stripIndent } from 'common-tags';
2
- import { hyphenatedName } from '../../../../lib/string.js';
1
+ const { stripIndent } = require('common-tags');
2
+ const { hyphenatedName } = require('../../../../lib/string');
3
3
 
4
- export default ({ basename, importPath = '.', skipCSS, cssPrefix }) => {
4
+ module.exports = ({ basename, importPath = '.', skipCSS, cssPrefix }) => {
5
5
  const _name = hyphenatedName(basename);
6
6
 
7
7
  if (skipCSS)
@@ -1,7 +1,7 @@
1
- import { source } from 'common-tags';
2
- import { hyphenatedName } from '../../../../lib/string.js';
1
+ const { source } = require('common-tags');
2
+ const { hyphenatedName } = require('../../../../lib/string');
3
3
 
4
- export default ({ basename, cssPrefix }) => {
4
+ module.exports = ({ basename, cssPrefix }) => {
5
5
  const _name = hyphenatedName(basename);
6
6
 
7
7
  return `/********************************************************************
@@ -1,6 +1,6 @@
1
- import { source } from 'common-tags';
1
+ const { source } = require('common-tags');
2
2
 
3
- export default ({ basename, importPath = '.' }) => {
3
+ module.exports = ({ basename, importPath = '.' }) => {
4
4
  return `/********************************************************************
5
5
  * Copyright 2025 Adobe
6
6
  * All Rights Reserved.
@@ -1,6 +1,6 @@
1
- import { source } from 'common-tags';
1
+ const { source } = require('common-tags');
2
2
 
3
- export default ({ name, pathname, basename, group, importPath = '.' }) => {
3
+ module.exports = ({ name, pathname, basename, group, importPath = '.' }) => {
4
4
  return `/********************************************************************
5
5
  * Copyright 2025 Adobe
6
6
  * All Rights Reserved.
@@ -1,6 +1,6 @@
1
- import { source } from 'common-tags';
1
+ const { source } = require('common-tags');
2
2
 
3
- export default ({ name, basename, pathname, group, importPath = '.' }) => {
3
+ module.exports = ({ name, basename, pathname, group, importPath = '.' }) => {
4
4
  return `/********************************************************************
5
5
  * Copyright 2025 Adobe
6
6
  * All Rights Reserved.
@@ -7,53 +7,25 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
 
10
- import path from 'path';
11
- import fs from 'fs/promises';
12
- import m from '../../../lib/log-message.js';
10
+ const path = require('path');
11
+ const fs = require('fs/promises');
12
+ const m = require('../../../lib/log-message');
13
+ const writeFile = require('../../../lib/write-file');
13
14
 
14
- import elsieConfig from './templates/elsie.js';
15
+ const configTemplate = require('./templates/elsie');
15
16
 
16
- export default async function newConfigBuilder({ name, force }) {
17
- const importPath = `@/${name.toLowerCase()}`;
18
- const value = `${importPath}/*`;
19
-
20
- const pkgPath = path.resolve(process.cwd(), './package.json');
21
- const pkg = JSON.parse(await fs.readFile(pkgPath, 'utf-8'));
17
+ module.exports = async function newConfigBuilder({ name, force }) {
18
+ const filename = path.resolve(process.cwd(), './.elsie.cjs');
22
19
 
23
- if (pkg.elsie && !force) {
24
- console.error(
25
- m(
26
- `\x1b[31m"elsie" \x1b[0mconfig already exists in package.json`,
27
- 'error',
28
- ),
29
- );
30
- return;
31
- }
20
+ const importPath = `@/${name.toLowerCase()}`;
32
21
 
33
- const wasPresent = Boolean(pkg.elsie);
22
+ const content = configTemplate({ name, importPath });
34
23
 
35
- await fs.writeFile(
36
- pkgPath,
37
- `${JSON.stringify(
38
- { ...pkg, elsie: elsieConfig({ name, importPath }) },
39
- null,
40
- 2,
41
- )}\n`,
42
- );
24
+ const value = `${importPath}/*`;
43
25
 
44
- console.log(
45
- m(
46
- `\x1b[33m"elsie" \x1b[0m${wasPresent ? 'updated' : 'added'} in package.json`,
47
- wasPresent ? 'updated' : 'created',
48
- ),
49
- );
26
+ const fileWritten = await writeFile(filename, content, force);
50
27
 
51
- console.log(
52
- m(
53
- `Set the \x1b[33mENDPOINT\x1b[0m environment variable (e.g. in a .env file) to configure your GraphQL schema endpoint.`,
54
- 'warning',
55
- ),
56
- );
28
+ if (!fileWritten) return;
57
29
 
58
30
  // Update tsconfig.json alias
59
31
  try {
@@ -88,4 +60,4 @@ export default async function newConfigBuilder({ name, force }) {
88
60
  ),
89
61
  );
90
62
  }
91
- }
63
+ };
@@ -0,0 +1,38 @@
1
+ const { source } = require('common-tags');
2
+
3
+ module.exports = ({ name, importPath }) =>
4
+ `/********************************************************************
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: Adobe permits you to use, modify, and distribute this
9
+ * file in accordance with the terms of the Adobe license agreement
10
+ * accompanying it.
11
+ *******************************************************************/
12
+
13
+ ${source`
14
+ module.exports = {
15
+ name: '${name}',
16
+ api: {
17
+ root: './src/api',
18
+ importAliasRoot: '${importPath}/api',
19
+ },
20
+ components: [
21
+ {
22
+ id: 'Components',
23
+ root: './src/components',
24
+ importAliasRoot: '${importPath}/components',
25
+ cssPrefix: '${name.toLowerCase()}',
26
+ default: true,
27
+ },
28
+ ],
29
+ containers: {
30
+ root: './src/containers',
31
+ importAliasRoot: '${importPath}/containers',
32
+ },
33
+ schema: {
34
+ endpoint: process.env.ENDPOINT,
35
+ headers: {}
36
+ }
37
+ };
38
+ `}\n`;
@@ -7,22 +7,20 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
 
10
- import path from 'path';
11
- import fs from 'fs';
12
- import writeFile from '../../../lib/write-file.js';
13
- import writeParentIndex from '../../../lib/write-parent-index.js';
14
- import getConfig from '../../../lib/config.js';
15
- import m from '../../../lib/log-message.js';
10
+ const path = require('path');
11
+ const fs = require('fs');
12
+ const writeFile = require('../../../lib/write-file');
13
+ const writeParentIndex = require('../../../lib/write-parent-index');
14
+ const config = require('../../../lib/config')();
15
+ const m = require('../../../lib/log-message');
16
16
 
17
17
  // Templates
18
- import templateComponent from './templates/Component.js';
19
- import templateStory from './templates/stories.js';
20
- import templateTest from './templates/unit-test.js';
21
- import templateIndex from './templates/index.js';
18
+ const templateComponent = require('./templates/Component');
19
+ const templateStory = require('./templates/stories');
20
+ const templateTest = require('./templates/unit-test');
21
+ const templateIndex = require('./templates/index');
22
22
 
23
- const config = getConfig();
24
-
25
- export default async function newContainerBuilder({ pathname, force }) {
23
+ module.exports = async function newContainerBuilder({ pathname, force }) {
26
24
  try {
27
25
  const name = config.name;
28
26
 
@@ -73,4 +71,4 @@ export default async function newContainerBuilder({ pathname, force }) {
73
71
  } catch (error) {
74
72
  console.error(m(error, 'error'));
75
73
  }
76
- }
74
+ };
@@ -1,6 +1,6 @@
1
- import { stripIndent } from 'common-tags';
1
+ const { stripIndent } = require('common-tags');
2
2
 
3
- export default ({ basename }) => {
3
+ module.exports = ({ basename }) => {
4
4
  return `/********************************************************************
5
5
  * Copyright 2025 Adobe
6
6
  * All Rights Reserved.
@@ -1,6 +1,6 @@
1
- import { source } from 'common-tags';
1
+ const { source } = require('common-tags');
2
2
 
3
- export default ({ basename, importPath = '.' }) => {
3
+ module.exports = ({ basename, importPath = '.' }) => {
4
4
  return `/********************************************************************
5
5
  * Copyright 2025 Adobe
6
6
  * All Rights Reserved.