chore: Yarn upgrade#9817
Merged
snowystinger merged 47 commits intomainfrom Apr 30, 2026
Merged
Conversation
# Conflicts: # packages/@react-spectrum/accordion/package.json # packages/@react-spectrum/actionbar/package.json # packages/@react-spectrum/actiongroup/package.json # packages/@react-spectrum/autocomplete/package.json # packages/@react-spectrum/avatar/package.json # packages/@react-spectrum/badge/package.json # packages/@react-spectrum/breadcrumbs/package.json # packages/@react-spectrum/button/package.json # packages/@react-spectrum/buttongroup/package.json # packages/@react-spectrum/calendar/package.json # packages/@react-spectrum/card/package.json # packages/@react-spectrum/checkbox/package.json # packages/@react-spectrum/color/package.json # packages/@react-spectrum/combobox/package.json # packages/@react-spectrum/datepicker/package.json # packages/@react-spectrum/dialog/package.json # packages/@react-spectrum/divider/package.json # packages/@react-spectrum/dnd/package.json # packages/@react-spectrum/dropzone/package.json # packages/@react-spectrum/filetrigger/package.json # packages/@react-spectrum/form/package.json # packages/@react-spectrum/icon/package.json # packages/@react-spectrum/illustratedmessage/package.json # packages/@react-spectrum/image/package.json # packages/@react-spectrum/inlinealert/package.json # packages/@react-spectrum/label/package.json # packages/@react-spectrum/labeledvalue/package.json # packages/@react-spectrum/layout/package.json # packages/@react-spectrum/link/package.json # packages/@react-spectrum/list/package.json # packages/@react-spectrum/listbox/package.json # packages/@react-spectrum/menu/package.json # packages/@react-spectrum/meter/package.json # packages/@react-spectrum/numberfield/package.json # packages/@react-spectrum/overlays/package.json # packages/@react-spectrum/picker/package.json # packages/@react-spectrum/progress/package.json # packages/@react-spectrum/provider/package.json # packages/@react-spectrum/radio/package.json # packages/@react-spectrum/searchfield/package.json # packages/@react-spectrum/slider/package.json # packages/@react-spectrum/statuslight/package.json # packages/@react-spectrum/steplist/package.json # packages/@react-spectrum/story-utils/package.json # packages/@react-spectrum/switch/package.json # packages/@react-spectrum/table/package.json # packages/@react-spectrum/tabs/package.json # packages/@react-spectrum/tag/package.json # packages/@react-spectrum/test-utils/package.json # packages/@react-spectrum/text/package.json # packages/@react-spectrum/textfield/package.json # packages/@react-spectrum/theme-dark/package.json # packages/@react-spectrum/theme-default/package.json # packages/@react-spectrum/theme-express/package.json # packages/@react-spectrum/theme-light/package.json # packages/@react-spectrum/toast/package.json # packages/@react-spectrum/tooltip/package.json # packages/@react-spectrum/tree/package.json # packages/@react-spectrum/view/package.json # packages/@react-spectrum/well/package.json # packages/dev/test-utils/package.json # yarn.lock
# Conflicts: # packages/@react-spectrum/button/package.json # packages/@react-spectrum/checkbox/package.json # packages/@react-spectrum/color/package.json # packages/@react-spectrum/dropzone/package.json # packages/@react-spectrum/filetrigger/package.json # packages/@react-spectrum/text/package.json # packages/@react-spectrum/toast/package.json # packages/dev/test-utils/package.json
5 tasks
This reverts commit d176995.
|
Build successful! 🎉 |
Member
Author
|
On hold until next release cycle |
reidbarber
previously approved these changes
Mar 25, 2026
|
Build successful! 🎉 |
# Conflicts: # packages/@adobe/react-spectrum/package.json # packages/@react-spectrum/color/package.json # packages/dev/test-utils/package.json # yarn.lock
|
Build successful! 🎉 |
|
Build successful! 🎉 |
devongovett
reviewed
Apr 23, 2026
| "typescript-eslint": "^8.38.0", | ||
| "unplugin-parcel-macros": "^0.1.1", | ||
| "verdaccio": "^6.0.0", | ||
| "vite": "^7.3.2", |
Member
There was a problem hiding this comment.
where do we depend on vite?
Member
Author
There was a problem hiding this comment.
Thanks, looks like it was resolving to multiple versions at one point. I probably meant to put it in the resolutions and then remove it, but took a long break and forgot about it.
vitest depends on it, but not as a peer, so we shouldn't need this here.
Member
Author
There was a problem hiding this comment.
Nope, found it. It's needed in the install by @vitejs/plugin-react which has it as a peer. That's a dependency in our root package.json for running real browser tests it looks like.
react-spectrum-monorepo@workspace:. doesn't provide vite (p9b69d6), requested by @vitejs/plugin-react and other dependencies.
…p crash Parcel bundles storybook/internal/preview-api and chunk-SZQXB3JV.js into a CJS bundle with a circular dependency. During initialization, the chunk's top-level highlight/preview.ts runs `(_previewApi.addons)?.ready` before the preview-api chunk's lazy getter has resolved its internal chunk reference. Result: `TypeError: Cannot read properties of undefined (reading 'addons')` fires as an unhandled promise rejection and the preview never initializes. The line is guarded by `globalThis?.FEATURES?.highlight && ...` so setting features.highlight=false short-circuits the buggy codepath. Trade-off: disables the highlight feature used by addon-a11y for accessibility-violation visualization. This is a workaround; the underlying Parcel + SB10 bundling interaction should be investigated as a follow-up.
…re FEATURES.highlight Root-cause fix replacing the previous symptom-workaround. Storybook's dist/csf/index.js has a circular dependency with dist/_browser-chunks/chunk-SZQXB3JV.js and dist/preview-api/index.js. When Parcel's CJS bundler initialises these modules, csf/index.js runs its highlight-addon preview.ts code (line 916) before the storybook/preview-api module's 'addons' export is fully resolved. The resulting getter access throws TypeError during the circular-dep init window. The fix defers the highlight initialisation one microtask tick using Promise.resolve().then(), wrapped in try/catch for belt-and-braces safety. By the time the callback fires all circular deps are resolved and 'addons' holds the live AddonStore instance. Highlights initialise correctly. Patch is applied via patch-package (already in postinstall). Restores FEATURES.highlight to its default true, preserving accessibility- violation visualisation that addon-a11y depends on. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s to globals
Match upstream Storybook 10 builders (@storybook/builder-vite,
@storybook/builder-webpack5) by externalizing every module key in
storybook/internal/preview/globals.js's globalsNameReferenceMap. For each
specifier, the resolver returns a synthetic ESM cache file at
node_modules/.cache/sb-parcel-externals/<key>.js with shape:
const { addons, PreviewWeb, ... } = globalThis.__STORYBOOK_MODULE_*;
export { addons, PreviewWeb, ... };
export default globalThis.__STORYBOOK_MODULE_*;
The runtime bundle (storybook/internal/preview/runtime) populates these
globals via its top-level setup() side effect; once Task 1.2 hoists the
runtime import, externalized modules resolve to live bindings on the
already-populated globals — eliminating the CJS circular-dep that the
node_modules patch currently masks.
This task adds the resolver only; preview-entry generator + iframe
template alignment follow in Tasks 1.2 and 1.3, after which Task 1.4
removes the patch.
…ew-api path
Move `import { setup } from 'storybook/internal/preview/runtime'` to be the
first import in the generated preview-main.js so runtime.js's top-level setup()
call populates __STORYBOOK_MODULE_* globals before setup-addons.js (or any other
externalized specifier) evaluates and tries to destructure those globals.
Also switch `from 'storybook/internal/preview-api'` to the public
`from 'storybook/preview-api'` to match the externalize map and upstream
Vite/webpack5 ordering.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… upstream After externalizing storybook runtime modules (Task 1.1) and hoisting the runtime import (Task 1.2), runtime.js's setup() populates every __STORYBOOK_MODULE_* global plus __STORYBOOK_ADDONS_PREVIEW and __STORYBOOK_ADDONS_CHANNEL__. Our hand-rolled init-addons IIFE and preview.js bootstrap entry exist only to mask the cycle that those populate-the-globals tasks now resolve at the source. - iframe.html: drop the inline init IIFE, add TAGS_OPTIONS / OTHER_GLOBALS placeholders, set window.module=undefined and window.global=window (matches upstream Vite); script tag now points at preview-main.js - gen-preview-modern.mjs: remove generatePreviewBootstrap and generateInitAddonsGlobal helpers and their exports - preset.mjs: stop emitting preview.js and init-addons-global.js to generated-entries; only setup-addons.js and preview-main.js are needed The patch (patches/storybook+10.3.5.patch) is still in place and removed in Task 1.4.
…externalize-runtime alignment) Tasks 1.1-1.3 ported the upstream Storybook 10 externalize-the-runtime pattern: storybook/preview-api and 9 sibling specifiers are now resolved to synthetic cache files reading from globalThis.__STORYBOOK_MODULE_*, populated by storybook/internal/preview/runtime's setup() side effect which runs first in the preview entry. The Parcel CJS circular-dep that motivated the patch (storybook/preview-api <-> chunk-SZQXB3JV.js through dist/csf/index.js) no longer exists in our bundle graph because storybook/preview-api is no longer bundled at all. FEATURES.highlight is restored to its default true; addon-a11y's violation visualization works again. Verified across all four config dirs (.storybook, .storybook-s2, .chromatic, .chromatic-fc) for both dev and build modes.
…ix top-level bail
The @vueless/storybook-dark-mode toolbar toggle was a no-op in the v3/rac Storybook because nothing in .storybook reacted to its DARK_MODE event. - preview.js: subscribe to DARK_MODE_EVENT_NAME on the addons channel and reflect the state on document.documentElement.dataset.colorScheme. Initial value reads from the addon's `sb-addon-themes-3` localStorage key so the first paint is correct (matches the .storybook-s2 pattern). - custom-addons/provider/index.js: consume useDarkMode() and feed isDark through to the React Spectrum Provider's `colorScheme` prop whenever the ProviderSwitcher dropdown is set to "Auto". An explicit dropdown choice still wins.
Add succinct comments at non-obvious decision points across the custom Parcel-based Storybook 10 builder, referencing the official Builder API docs (https://storybook.js.org/docs/builders/builder-api) and the upstream @storybook/builder-vite and @storybook/builder-webpack5 reference implementations. Highlights: - parcel-resolver-storybook: top-of-file block explaining the externalize-the-runtime pattern, the globalsNameReferenceMap source, the .cache layout, and the CJS-cycle issue it sidesteps; per-branch comments for externals / react-dom/client shim / story: pipeline. - storybook-builder-parcel/preset.mjs: Builder API contract summary, rationale for the 9003->3000 reverse proxy, list of the five generated files, and the bail() / module-scope watcher rationale. - gen-preview-modern.mjs: explicit ordering rationale for runtime -> setup-addons -> PreviewWeb, why processPreviewAnnotation needs toPackageExportSpecifier under Parcel, and why toImportFn uses static imports + Object.assign instead of Promise.all + spread. - gen-iframe-modern.mjs / templates/iframe.html: provenance from upstream Vite's input/iframe.html and the OTHER_GLOBALS placeholder workaround. - StoryTransformer.ts / StorybookMDXTransformer.mjs: brief headers describing what each transformer does and the IPC-based docgen optimization. No code logic changes; comments only. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This reverts commit f85c831.
|
Build successful! 🎉 |
|
Build successful! 🎉 |
LFDanLu
previously approved these changes
Apr 28, 2026
# Conflicts: # yarn.lock
|
Build successful! 🎉 |
LFDanLu
approved these changes
Apr 30, 2026
reidbarber
approved these changes
Apr 30, 2026
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.
Closes
See yarnpkg/berry#6746 for more information on why so many things needed updates. Probably easiest to look at the commits individually, one of them was automated.
The key thing is that, even though we're in a monorepo, every package is considered its own root. So each one must provide everything expected by peers.
And anything that we need to ensure there is only 1 copy of must be in resolutions, or we need to move to pnp.
One benefit is I found out and fixed a multiple copies of react issue we had.
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: