@adobe-commerce/elsie 3.0.0-beta.0 → 3.0.1-alpha-20261103114012

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,499 @@
1
1
  # @adobe-commerce/elsie
2
2
 
3
+ ## 3.0.1-alpha-20261103114012
4
+
5
+ ### Patch Changes
6
+
7
+ - dc2c0f3: fix(elsie): render the latest context after an async slot callback
8
+ resolves
9
+
10
+ Context changes made while an async `slot` callback was pending were dropped:
11
+ once the callback resolved, `Slot` rendered with the children and context from
12
+ its first render and passed that stale context to `onRender`. It now renders
13
+ with the latest children and context.
14
+
15
+ ## 3.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - 9859213: Consolidate Tools' shared internal helpers into one chunk and combine
20
+ Preact compat, hooks, and JSX runtime exports in `preact-bundle.js` to reduce
21
+ JavaScript requests. Preact core remains a separate entry to preserve its
22
+ export semantics.
23
+
24
+ The public `@dropins/tools/preact-compat.js`,
25
+ `@dropins/tools/preact-hooks.js`, and `@dropins/tools/preact-jsx-runtime.js`
26
+ entries retain their original APIs. These compatibility entries and the
27
+ consolidated bundle share one Preact runtime.
28
+
29
+ Upgrade Tools first, then rebuild and upgrade drop-ins individually with the
30
+ updated Elsie import mappings. Old and new drop-ins can coexist with the
31
+ updated Tools; new drop-ins require a Tools version that provides
32
+ `preact-bundle.js`. Source imports and boilerplate block imports remain
33
+ unchanged. Existing preloads remain valid; update them to the consolidated
34
+ entry as drop-ins are migrated. Unused compatibility entries do not add
35
+ requests for fully migrated consumers.
36
+
37
+ - 3313516: feat(elsie)!: restructure the toolchain (Elsie 3) — breaking
38
+
39
+ The CLI, shared configs, and test-kit have been reorganized.
40
+ `@dropins/tools`'s runtime bundle (components, build tools, and the re-exposed
41
+ `event-bus` / `fetch-graphql`) is unaffected — these changes only impact repos
42
+ that consume `@adobe-commerce/elsie` as their **development toolchain** (the
43
+ drop-in package repos).
44
+
45
+ Migration checklist for consuming repos:
46
+
47
+ 1. **Config source.** Elsie no longer reads `.elsie.cjs` / `.elsie.js`. Move
48
+ your configuration into the `"elsie"` key of `package.json`.
49
+
50
+ 2. **`elsie types` removed.** Replace any `"type-check": "elsie types"` script
51
+ with a direct `tsc --noEmit` (or your project's equivalent). Note the old
52
+ command now no longer exists — audit scripts that relied on it, since a
53
+ stale reference will fail rather than silently pass.
54
+
55
+ 3. **`config/` → `configs/` (plural) relocation.** Update references:
56
+ - tsconfig `extends`: `@adobe-commerce/elsie/config/tsconfig-base.json` →
57
+ `@adobe-commerce/elsie/configs/tsconfig/base.json` (and
58
+ `tsconfig-preact.json` → `configs/tsconfig/preact.json`).
59
+ - Prettier: `@adobe-commerce/elsie/config/prettier.json` →
60
+ `@adobe-commerce/elsie/configs/prettier.js`.
61
+ - Jest / ESLint / Vite: `config/jest.mjs`, `config/eslint.mjs`,
62
+ `config/vite.mjs` → `configs/jest.js`, `configs/eslint.js`,
63
+ `configs/vite.js`.
64
+
65
+ 4. **Test-kit import path.** `@adobe-commerce/elsie/lib/tests` →
66
+ `@adobe-commerce/elsie/tests` (and `@adobe-commerce/elsie/tests/dom` for
67
+ component tests). See the test-kit changeset for the full ambient-globals
68
+ migration.
69
+
70
+ 5. **Shared tsconfig dropped ambient Jest types.** Repos extending the base
71
+ tsconfig should import the jest API from `@adobe-commerce/elsie/tests`
72
+ (backed by `@jest/globals`) and drop `@types/jest` / `types: ["jest"]`.
73
+
74
+ 6. **ESLint config factory replaced.** The `createConfig` /`browser`/`node`
75
+ exports of `@adobe-commerce/elsie/configs/eslint.js` are gone. Compose your
76
+ flat config from the building blocks instead:
77
+
78
+ ```js
79
+ import {
80
+ defineConfig,
81
+ globals,
82
+ typescript,
83
+ tests,
84
+ preact,
85
+ storybook,
86
+ } from '@adobe-commerce/elsie/configs/eslint.js';
87
+
88
+ // was: createConfig({ runtime: 'browser' })
89
+ export default defineConfig(globals('browser'), typescript(), tests());
90
+ ```
91
+
92
+ `defineConfig(...layers)` keeps the shared base first and prettier last;
93
+ `globals(env, files)` scopes environment globals; presets and
94
+ `runtime: 'agnostic'` (omit `globals`) map over directly. One config can
95
+ now scope different folders to different runtimes via each layer's `files`.
96
+
97
+ 7. **Jest config factory renamed.** `@adobe-commerce/elsie/configs/jest.js`
98
+ now exports `defineConfig` (was `createConfig`), matching the ESLint entry.
99
+ Update your `jest.config.js` imports accordingly; the options are
100
+ unchanged.
101
+
102
+ 8. **`restrictions` moved under the ESLint presets, its own export subpath
103
+ dropped.** `@adobe-commerce/elsie/configs/eslint/restrictions.js` no longer
104
+ exists; `restrictions` is now exported from
105
+ `@adobe-commerce/elsie/configs/eslint.js` like the other presets:
106
+
107
+ ```js
108
+ import {
109
+ defineConfig,
110
+ typescript,
111
+ restrictions,
112
+ } from '@adobe-commerce/elsie/configs/eslint.js';
113
+
114
+ // was: import { restrictions } from '@adobe-commerce/elsie/configs/eslint/restrictions.js';
115
+ export default defineConfig(typescript(), restrictions());
116
+ ```
117
+
118
+ ### Minor Changes
119
+
120
+ - dc26db1: Allow consumers to pass axe-playwright `checkA11y` option overrides
121
+ when creating the shared Storybook accessibility test runner config.
122
+ - 3313516: feat(elsie): add `clean` and `format` builders
123
+
124
+ - New `elsie clean [paths...]` command (wraps rimraf, defaults to `dist`).
125
+ - New `elsie format [paths...]` command (wraps Prettier; `--check` verifies
126
+ instead of writing; defaults to the current directory).
127
+
128
+ As a result, `@dropins/build-tools` drops its `rimraf` and `vite`
129
+ devDependencies, and `@adobe-commerce/storefront-design` drops `rimraf`; both
130
+ now use `elsie clean` for their cleanup step.
131
+
132
+ - 697d1bc: Allow the Cypress ESLint preset to accept a `rules` option for scoped
133
+ rule additions and overrides while retaining unspecified recommended rules.
134
+ - 3c1f65f: Add an opt-in `cypress()` ESLint preset with Cypress's recommended
135
+ rules and globals scoped to JavaScript and TypeScript files under `cypress/`,
136
+ with a customizable `files` option. Bundle `eslint-plugin-cypress` so
137
+ consumers can use the preset without installing the plugin themselves.
138
+ - 3c1f65f: Allow the ESLint `globals()` helper to accept an array of
139
+ environments sharing one optional file scope, such as
140
+ `globals(['browser', 'node'])`. Merge globals in array order while preserving
141
+ existing single-environment calls.
142
+ - c6f21c7: Provide shared MSW handler and Node server APIs through
143
+ `@adobe-commerce/elsie/msw` and `@adobe-commerce/elsie/msw/node`, and
144
+ Storybook integration through `@adobe-commerce/elsie/storybook/msw`. Add
145
+ `elsie msw init` to generate browser workers using Elsie's installed MSW
146
+ version, so consumers can remove their direct MSW and MSW Storybook addon
147
+ dependencies.
148
+ - b58cb76: Provide a shared Storybook main-config factory with the Preact/Vite
149
+ framework and common addons resolved from Elsie. Resolve Storybook preview
150
+ imports from Elsie's dependency tree so isolated consumers can run
151
+ `elsie storybook` and `elsie storybook build` without installing the Storybook
152
+ CLI themselves.
153
+ - 25ba0c5: Share the named `a11yTestRunnerConfig` Storybook configuration
154
+ through `@adobe-commerce/elsie/storybook/test-runner`. Consumers can replace
155
+ their duplicate `.storybook/test-runner.ts` hooks with an import and remove
156
+ direct `@storybook/test-runner` and `axe-playwright` dependencies when no
157
+ other files import them.
158
+ - 3313516: feat(elsie): extend `elsie storybook` with `build` and `test` modes
159
+
160
+ `elsie storybook` only ever ran `storybook dev`; building and testing
161
+ Storybook still meant calling `storybook build` and `test-storybook` bare,
162
+ which resolve their binaries via the shell's inherited `PATH` — the same class
163
+ of bug the CLI's `resolveBin()`-based dispatch (`lint`/`test`/
164
+ `changeset`/`types`) was fixed to avoid.
165
+
166
+ `elsie storybook [mode]` now accepts `dev` (default, unchanged), `build`
167
+ (`elsie storybook build`), and `test` (`elsie storybook test`, resolving
168
+ `@storybook/test-runner`'s `test-storybook` bin). All other arguments keep
169
+ flowing through untouched, so existing invocations are unaffected.
170
+
171
+ `packages/elsie`'s own `build:storybook`, `build:storybook:ci`,
172
+ `test:storybook`, and `test:storybook:ci` scripts now go through this instead
173
+ of calling `storybook build` / `test-storybook` directly.
174
+
175
+ - 25ba0c5: Add `elsie storybook --install-playwright` to install browsers with
176
+ Elsie's Playwright binary without a direct Playwright dependency in consuming
177
+ packages.
178
+ - 25ba0c5: Expose Preact story types, browser play-function helpers, actions,
179
+ and shared decorators through `@adobe-commerce/elsie/storybook/types`,
180
+ `/storybook/tests`, `/storybook/actions`, and `/storybook/decorators`.
181
+ Consumers can remove direct Storybook dependencies after migrating story
182
+ imports. Update generated stories and the migration guide to use these
183
+ subpaths and the Storybook config factory at
184
+ `@adobe-commerce/elsie/storybook/config`.
185
+ - 5bbe0b1: Extend `elsie sync-tools` to scan both `examples/` and `static/` by
186
+ default, including assets used by Storybook and CI. Add `--directories` to
187
+ scan additional directories without replacing the defaults, in both sync and
188
+ `--check` modes.
189
+ - 13776b6: Add `elsie sync-tools` to synchronize example HTML and JavaScript
190
+ `@dropins/tools` URLs with the consumer's installed Elsie version. Use
191
+ `elsie sync-tools --check` to detect version drift in CI without modifying
192
+ files. Unversioned CDN URLs are also pinned to the installed version rather
193
+ than implicitly resolving to `latest`, including for alpha and beta releases.
194
+ - 3313516: feat(elsie): explicit jest imports via an
195
+ `@adobe-commerce/elsie/tests` test-kit
196
+
197
+ Tests now import their jest API explicitly instead of relying on ambient
198
+ `@types/jest` globals, following Jest's recommendation for version-matched
199
+ types (`@jest/globals` ships with jest, `@types/jest` is third-party and can
200
+ drift):
201
+
202
+ The test-kit is split into three tiers, each a superset of the previous, so a
203
+ test imports exactly the machinery it needs:
204
+
205
+ - `@adobe-commerce/elsie/tests` — the base tier. Re-exports the jest API
206
+ surface (`jest`/`describe`/`it`/`test`/`expect` + lifecycle hooks) from
207
+ `@jest/globals` plus the `mockResolvedFn`/`mockRejectedFn` helpers. Pulls in
208
+ no DOM code, so it is safe to import from any package's jest config.
209
+ - `@adobe-commerce/elsie/tests/dom` — the "pure DOM" tier. Adds jest-dom
210
+ assertion matchers (registered against jsdom) for tests that assert on the
211
+ DOM but render no components.
212
+ - `@adobe-commerce/elsie/tests/preact` — the "DOM + preact" tier. Adds
213
+ `@testing-library/preact` and `userEvent` on top of `/tests/dom`, for
214
+ component tests (requires a jest config that resolves packages to their
215
+ node/CJS builds, e.g. via `testEnvironmentOptions.customExportConditions`).
216
+
217
+ The jest `defineConfig` factory mirrors these tiers with a `preset` option
218
+ (replacing the previous `environment: 'node' | 'jsdom'`):
219
+
220
+ - `preset: 'node'` (default) — a node environment, no DOM.
221
+ - `preset: 'dom'` — a jsdom environment with browser-API shims, without the
222
+ preact/compat module aliasing or asset mocks, so packages that only touch
223
+ the DOM no longer pull in preact machinery.
224
+ - `preset: 'preact'` — everything `dom` sets up plus the preact/compat
225
+ aliasing and css/svg asset mocks needed to render preact components.
226
+
227
+ Other notes:
228
+
229
+ - `@jest/globals` and `@testing-library/user-event` are now elsie
230
+ dependencies; the DOM tier includes jest-dom's matcher type augmentation.
231
+ - `@types/jest` is no longer required and `types: ["jest"]` has been dropped
232
+ from the shared tsconfig. Import `jest` from the test-kit in files that use
233
+ its runtime API or mock types. The shared Jest config rewrites named `jest`
234
+ imports before Babel's mock hoisting and resolves Elsie's Jest dependency.
235
+
236
+ Consumers migrating: replace ambient jest globals with imports from
237
+ `@adobe-commerce/elsie/tests` (`/tests/dom` for DOM-only tests,
238
+ `/tests/preact` for component tests), pick the matching `defineConfig`
239
+ `preset`, and drop `@types/jest`.
240
+
241
+ - 3313516: fix(elsie): declare the toolchain as real dependencies so it works
242
+ outside this monorepo
243
+
244
+ `elsie`'s CLI
245
+ (`lint`/`test`/`build`/`serve`/`format`/`clean`/`changeset`/`gql`) and its
246
+ shared configs (`configs/jest.js`, `configs/eslint.js`, `configs/vite.js`, and
247
+ the `@adobe-commerce/elsie/tests`(`/dom`) test-kit) required packages that
248
+ were classified as `devDependencies` — `eslint`, `jest` and its environments,
249
+ `babel-jest` and the Babel presets it needs, `vite` and its plugins,
250
+ `prettier`, `rimraf`, `@changesets/cli`, `@jest/globals`,
251
+ `@testing-library/preact`/`user-event`, and others. `devDependencies` are
252
+ never installed for anyone who depends on `@adobe-commerce/elsie` normally, so
253
+ none of this was actually present for an external consumer's install,
254
+ regardless of package manager or `node_modules` layout — the CLI and shared
255
+ configs only ever worked inside this monorepo (where every workspace package's
256
+ `devDependencies` are installed at the root), contradicting the "batteries
257
+ included, no separate install needed" toolchain this SDK is meant to provide.
258
+
259
+ The packages `tooling/` actually requires at runtime are now real
260
+ `dependencies` — including `graphql-codegen-typescript-mock-data`, which the
261
+ `elsie gql mocks` command loads as a codegen plugin and which is not reachable
262
+ through `@graphql-codegen/cli`'s own dependency subtree. Packages elsie only
263
+ uses to build its own `dist` bundle (the sibling SDK workspace packages,
264
+ `@types/node`, `@chromatic-com/storybook`, etc.) remain `devDependencies`.
265
+ `typescript` is a `peerDependency` instead — see
266
+ `docs/toolchain-peer-dependencies.md`.
267
+
268
+ Verified end-to-end: packed the tarball, installed it into a scratch pnpm
269
+ project with the default (isolated, non-hoisted) `nodeLinker` and zero other
270
+ dependencies, and confirmed `elsie test`/`elsie format` run successfully
271
+ against it — no `nodeLinker: hoisted` workaround needed.
272
+
273
+ - 3313516: feat(elsie): make `typescript` a peer dependency; remove the `types`
274
+ command
275
+
276
+ `typescript` is now an optional `peerDependency` of `@adobe-commerce/elsie`
277
+ instead of a bundled `dependency`. The `dts` Vite plugin (used by
278
+ `elsie build` for `.d.ts` generation) resolves `typescript` from the building
279
+ package's own install rather than elsie's, so declaration output reflects the
280
+ exact compiler version that package's `tsconfig.json`, source, and IDE
281
+ actually use. A package with no `typescript` devDependency of its own gets a
282
+ clear error instead of a silently mismatched build. See
283
+ `docs/toolchain-peer-dependencies.md` for the full rationale.
284
+
285
+ The `elsie types` command (`tsc --noEmit` plus TS6 tsconfig validation) is
286
+ removed — with `typescript` no longer bundled, elsie has no reason to own a
287
+ type-checking command. A package that wants one defines its own script (e.g.
288
+ `"types": "tsc --noEmit"`), using its own installed `typescript`.
289
+
290
+ `build-tools`, `event-bus`, `fetch-graphql`, and `recaptcha` each gain a
291
+ `typescript` devDependency of their own (pinned via `pnpm-workspace.yaml`'s
292
+ `catalog.typescript`) so `.d.ts` generation and any future type-checking
293
+ script keep working now that elsie no longer bundles it.
294
+
295
+ - cdcb0e3: Rename `createConfig()` to `defineConfig()` for the generic Vite
296
+ library base. Move the complete dropin pipeline's default export from
297
+ `configs/vite.js` to `configs/vite/dropin.config.js`. The build and serve CLI
298
+ commands load that bundled config file when `--config` is omitted.
299
+
300
+ Add `withEntries(config, entries)` to extend named bundle inputs while
301
+ preserving generated entries and the rest of the pipeline. It accepts config
302
+ objects, promises, and functions and forwards Vite's config environment.
303
+
304
+ ### Patch Changes
305
+
306
+ - e06c05f: fix(a11y): Checkbox now derives its internal label/description ids
307
+ from the unique `id` prop when provided, instead of the (often shared) `name`
308
+ prop, so two checkboxes with the same `name` no longer produce duplicate DOM
309
+ ids that cause screen readers to announce the wrong checkbox's label (WCAG
310
+ 4.1.2)
311
+ - 3313516: fix(elsie): stop importing preact's private `preact/src/jsx` in
312
+ `classes`
313
+
314
+ `src/lib/classes.ts` imported `JSXInternal` from `preact/src/jsx`, a path
315
+ preact does not expose through its package `exports`. Under modern module
316
+ resolution this fails to resolve, and the specifier leaked into the published
317
+ `@dropins/tools` declarations, breaking standalone TypeScript consumers. The
318
+ small structural signal type is now defined locally instead.
319
+
320
+ - 000433d: Include the default console reporter and `jest-junit` in the shared
321
+ Jest config, with the suite name `Unit Tests` and class name template
322
+ `UnitTests.{classname}`, writing reports to `test-results/junit.xml` under
323
+ Jest's root directory. Resolve the JUnit reporter through Elsie so consumers
324
+ do not need to install it. For multi-project configs, reporters are configured
325
+ at the root and can be overridden through the first config's `reporters`
326
+ option.
327
+ - 59b2754: Fix dropin declaration imports that resolve through `node_modules` so
328
+ they reference the published `@dropins/tools/lib` and
329
+ `@dropins/tools/components` entry points instead of relative filesystem paths.
330
+ - 00d0d9b: fix(elsie): scope TypeScript ESLint parser and rules to JS/TS files
331
+
332
+ Composing `typescript()` and `mdx()` now parses Markdown and MDX correctly in
333
+ either order. Existing TypeScript-only core-rule overrides retain their
334
+ narrower file scope.
335
+
336
+ - 3313516: fix(elsie): publish a deterministic package via a `files` allowlist
337
+
338
+ The package relied on a `.npmignore` denylist that missed `storybook-static`
339
+ (and referenced a stale `vite.config.mjs`), so a pack after a Storybook build
340
+ shipped ~24 MB unpacked and its contents depended on which local build
341
+ commands had run. It now uses a `package.json` `files` allowlist (`tooling`,
342
+ `src`, and docs, minus tests/snapshots/coverage), producing a stable ~1.5 MB
343
+ package.
344
+
345
+ - daf8d7f: fix(elsie): recognize JSX component imports in MDX linting
346
+
347
+ The MDX ESLint preset now counts JSX component tags as usages of their
348
+ imports, while still reporting genuinely unused imports.
349
+
350
+ - de1cba3: Allow an optional `lib` section in the Elsie configuration schema so
351
+ packages with library entry points pass config validation. When present, `lib`
352
+ requires string `root` and `importAliasRoot` fields and rejects unknown
353
+ properties.
354
+ - 25ba0c5: Re-export Storybook Docs blocks from
355
+ `@adobe-commerce/elsie/storybook/blocks` so consumer preview files can use
356
+ `DocsContainer`, `DocsPage`, and other blocks without installing
357
+ `@storybook/addon-docs` directly.
358
+ - 69f5386: Fix Storybook Vite dependency-optimization warnings for pnpm
359
+ consumers by resolving the React DOM shim to its installed file and removing a
360
+ prebundle entry for unpublished static assets.
361
+ - 6c5b573: Remove the ambient Jest declaration from the shared tsconfigs. All
362
+ three test tiers export runtime `jest` and its type namespace for explicit
363
+ imports such as `import { jest } from '@adobe-commerce/elsie/tests'` and
364
+ `jest.Mock<() => Promise<null>>`.
365
+
366
+ The shared Jest config rewrites named Jest imports before mock hoisting and
367
+ resolves `@jest/globals` from Elsie's own dependencies, including with pnpm's
368
+ isolated linker. Consumers must import `jest` wherever they use its runtime
369
+ API or mock types; no consumer-installed Jest dependency is required. Use
370
+ jest-dom's bundled DOM matcher types instead of Elsie's redundant local
371
+ augmentation.
372
+
373
+ Centralize provider-backed component rendering in `/tests/preact`. Its
374
+ `render` loads the consumer's `src/i18n/en_US.json`, supplies `UIProvider` and
375
+ the `.dropin-design` wrapper, and supports language/definition overrides.
376
+ Export the original Testing Library render as `renderPreact`. The legacy
377
+ `/lib/tests` entry point now re-exports this tier so tests can migrate to a
378
+ single public import.
379
+
380
+ - 3313516: fix(elsie): make downgraded import restrictions work for wildcard
381
+ patterns
382
+
383
+ `restrictions()`'s `severityOverrides` built the warning's
384
+ `no-restricted-syntax` selector from an exact `source.value=` match, so
385
+ downgrading a wildcard pattern (e.g. `@adobe-commerce/elsie/src/*`) matched
386
+ nothing. Wildcard groups now emit a regex selector. All downgraded patterns
387
+ are also emitted in a single `no-restricted-syntax` rule, so downgrading more
388
+ than one no longer drops all but the last (flat config replaces, rather than
389
+ merges, repeated rule entries).
390
+
391
+ - 3313516: fix(elsie): fix `transformIgnorePatterns` for pnpm's isolated-linker
392
+ virtual store
393
+
394
+ The shared Jest config factory (`@adobe-commerce/elsie/configs/jest.js`)
395
+ allow-lists elsie and the other `@adobe-commerce/*` packages for
396
+ transformation since they ship untranspiled TS/TSX source. The allow-list
397
+ regex only matched the outer `node_modules/` segment, so under pnpm's default
398
+ (isolated) linker — where a real dependency is nested one level deeper at
399
+ `node_modules/.pnpm/<scope>+<name>@<version>/node_modules/<scope>/<name>/…` —
400
+ the pattern no longer matched and those packages silently stopped being
401
+ transformed, failing every consumer test suite with
402
+ `SyntaxError: Cannot use import statement outside a module`.
403
+
404
+ `transformIgnorePatterns` now includes a second pattern anchored on `.pnpm/`
405
+ so both the flat/hoisted layout (Yarn, npm, `nodeLinker: hoisted`) and pnpm's
406
+ isolated virtual store are handled correctly. Consumers on pnpm's default
407
+ linker no longer need a hand-rolled `transformIgnorePatterns` override or
408
+ `nodeLinker: hoisted` to work around this.
409
+
410
+ - 3313516: fix(elsie): stop `MultiSelect`'s screen-reader announcements from
411
+ looping infinitely while the dropdown is open
412
+
413
+ `preact-i18n`'s `useText()` returns a brand-new translations object on every
414
+ render. Two of `MultiSelect`'s `useEffect`s depended on that whole object and
415
+ each called `announce()` with a different message, so while the dropdown was
416
+ open they kept re-triggering each other — one effect's announcement change
417
+ caused a re-render that fired the other effect, which changed the announcement
418
+ back, forever, synchronously. This produced an unbounded render loop that
419
+ could exhaust the JS heap (observed as Jest OOM crashes in
420
+ `MultiSelect.test.tsx`).
421
+
422
+ Both effects now depend on the specific translation strings they use instead
423
+ of the whole object, and `useAccessibilityAnnouncements` clears its pending
424
+ timeout before scheduling a new one (and on unmount) instead of leaving it
425
+ dangling.
426
+
427
+ - 3313516: fix(elsie): only announce `MultiSelect`'s open message on the open
428
+ transition
429
+
430
+ The effect that announces "Dropdown expanded. N options available" depended on
431
+ the selection and filtered-result counts, so it re-fired on every select and
432
+ search keystroke while the dropdown was open — overwriting the specific
433
+ selection and search-result announcements with the generic open message. It
434
+ now runs only on the closed-to-open transition.
435
+
436
+ - 641d4f5: fix(a11y): Picker's accessible name now prefers the human-readable
437
+ floating label or placeholder over the raw `name` attribute, so screen readers
438
+ announce the same text sighted users see instead of an internal field
439
+ identifier (WCAG 2.5.3)
440
+ - 3313516: chore: migrate build tooling from Yarn to pnpm
441
+
442
+ The monorepo now uses pnpm instead of Yarn v1. As part of this, elsie's CLI
443
+ (`lint`/`test`/`storybook`/`changeset`/`types`) no longer shells out to bare
444
+ command names — each tool is resolved and spawned directly, fixing a latent
445
+ path-with-spaces bug and command-injection surface.
446
+
447
+ `tooling/` (the CLI, and the shared
448
+ eslint/jest/prettier/vite/storybook/tsconfig configs) is now correctly
449
+ included when `@adobe-commerce/elsie` is published — an oversight from merging
450
+ the tooling package back into elsie meant `.npmignore` excluded it, which
451
+ would have shipped a package whose own `bin` and `exports` pointed at files
452
+ that didn't exist in the tarball. This is unrelated to (and does not affect)
453
+ the separate `@dropins/tools` bundle published from `dist/`.
454
+
455
+ - cd72618: Fix an intermittent `insertBefore` `NotFoundError` crash caused by
456
+ `Portal` manually grafting its rendered DOM node into `document.body` (via a
457
+ raw `appendChild` in a `useLayoutEffect`) instead of using Preact's own portal
458
+ primitive.
459
+
460
+ That manual graft moved a Preact-owned DOM node out from under its logical
461
+ parent without informing the reconciler, so the parent's internal DOM
462
+ bookkeeping became stale. Any later update that needed to remove or reposition
463
+ the portalled node relative to a sibling — for example `Modal` closing while a
464
+ sibling in the same parent re-renders, as happens in `storefront-cart`'s
465
+ `GiftOptions` when clicking "Apply" (closing the gift-wrap modal while the
466
+ accordion swaps from its editable form to the read-only summary) — could throw
467
+ `Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.`
468
+
469
+ `Portal` now renders its children with `createPortal` (from `preact/compat`)
470
+ into the same lazily-created, `document.body`-appended root element, so
471
+ Preact's reconciler tracks the split between logical parent and DOM container
472
+ itself instead of relying on an untracked DOM move. Timing is unchanged (the
473
+ root is still created during render and attached during `useLayoutEffect`), so
474
+ no consumer-visible behavior changes and no `Slot` or image-swatch code needed
475
+ to change.
476
+
477
+ - 3313516: chore: upgrade vite-tsconfig-paths 4.3.2 → 6.1.1
478
+
479
+ 6.x resolves `${configDir}`-expanded `include` entries correctly, so the
480
+ per-package relative `include` overrides that worked around the 4.x limitation
481
+ are no longer needed. Removed the redundant `["src", "tests"]` overrides (and
482
+ their duplicated comments) from `build-tools`, `event-bus`, `fetch-graphql`,
483
+ and `recaptcha`, which now inherit the base tsconfig's `${configDir}` include.
484
+ `elsie` keeps its `["src"]` include (it deliberately excludes its jest `tests`
485
+ dir); its comment was updated to reflect the real reason rather than the
486
+ obsolete workaround.
487
+
488
+ Also removed the default `@/*` → `${configDir}/src/*` mapping from the base
489
+ tsconfig. Because tsconfig `paths` is replaced wholesale (never merged) when a
490
+ config redeclares it, a base-level default is a footgun: any package that
491
+ needs an extra alias silently loses `@/*`. It is now opt-in — a package that
492
+ wants it declares its own `paths`. No base-extending package in the repo
493
+ relied on it (event-bus already uses relative imports). Preact packages are
494
+ unaffected: the preact config still declares its own `@/*` alongside the
495
+ react→preact aliases.
496
+
3
497
  ## 3.0.0-beta.0
4
498
 
5
499
  ### Major Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe-commerce/elsie",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.1-alpha-20261103114012",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "description": "Domain Package SDK",
6
6
  "engines": {
@@ -64,10 +64,10 @@
64
64
  "./*": "./*"
65
65
  },
66
66
  "devDependencies": {
67
- "@adobe-commerce/event-bus": "~1.1.2-beta.0",
68
- "@adobe-commerce/fetch-graphql": "~1.3.2-beta.0",
69
- "@adobe-commerce/recaptcha": "1.3.1-beta.0",
70
- "@adobe-commerce/storefront-design": "~1.1.2-beta.0",
67
+ "@adobe-commerce/event-bus": "~1.1.2",
68
+ "@adobe-commerce/fetch-graphql": "~1.3.2",
69
+ "@adobe-commerce/recaptcha": "1.3.1",
70
+ "@adobe-commerce/storefront-design": "~1.1.2",
71
71
  "@chromatic-com/storybook": "^5",
72
72
  "@preact/signals": "^2.3.1",
73
73
  "@types/node": "^22.0.0",
package/src/lib/slot.tsx CHANGED
@@ -337,6 +337,9 @@ export function useSlot<K, V extends HTMLElement>(
337
337
  status.current = 'ready';
338
338
  }, [children, context, name, props, render, state]);
339
339
 
340
+ const handleLifeCycleRenderRef = useRef(handleLifeCycleRender);
341
+ handleLifeCycleRenderRef.current = handleLifeCycleRender;
342
+
340
343
  // Initialization
341
344
  const handleLifeCycleInit = useCallback(async () => {
342
345
  if (!callback) return;
@@ -355,9 +358,9 @@ export function useSlot<K, V extends HTMLElement>(
355
358
  status.current = 'ready';
356
359
 
357
360
  // first render
358
- await handleLifeCycleRender();
361
+ await handleLifeCycleRenderRef.current();
359
362
  }
360
- }, [callback, context, handleLifeCycleRender, name]);
363
+ }, [callback, context, name]);
361
364
 
362
365
  // Initialization
363
366
  useEffect(() => {