refactor(s2): add @spectrum-charts/core-s2 and decouple S2 from shared packages - #966
Open
c-lamoureux wants to merge 6 commits into
Open
c-lamoureux wants to merge 6 commits into
c-lamoureux wants to merge 6 commits into
Conversation
…d UMD packages
Adds an S2-only core package (constants, locales, tokens, utils subpaths)
copied from the shared packages and pruned to what S2 uses. vega-spec-builder-s2
and react-spectrum-charts-s2 now depend on core-s2 instead of
@spectrum-charts/{constants,locales,themes,utils}, so S2 can evolve and adopt
ESM independently of S1.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The word-matching regex backtracked super-linearly on user-provided mark names. Split on explicit word boundaries instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Matches the S1 fix so both copies stay identical; same output, linear time. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Main changed the S2 horizontal legend anchor to 'start' in packages/themes after core-s2 copied it; apply the same change and test to core-s2. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Contributor
|
🎨 Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-966 🎨 S2 Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-966-s2 📚 Docs -> https://opensource.adobe.com/react-spectrum-charts/PR-966-docs/ |
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
Adds
@spectrum-charts/core-s2, an S2-only package for the shared code S2 needs.vega-spec-builder-s2andreact-spectrum-charts-s2now import from it instead of the shared S1 UMD packages (@spectrum-charts/constants,locales,themes,utils). This lets S2 move to ESM independently of S1 (#952 is stacked on this PR).core-s2
Subpath exports:
@spectrum-charts/core-s2/constants: copied fromconstants, with S1-only constants removed@spectrum-charts/core-s2/locales: copied fromlocales@spectrum-charts/core-s2/tokens: copied fromthemes, withoutgetSpectrumVegaConfig, which only S1 uses@spectrum-charts/core-s2/utils: copied fromutilsVersioning: it starts at
0.9.0and is in the changesetsfixedgroup with rsc-s2 and vsb-s2, so all three release at the same version.Other changes
build:s2builds core-s2 first.getSpectrumVegaConfig. This is noted in the changeset.S1 packages are unchanged.
Validation
yarn tscis clean.yarn lintpasses.yarn build,yarn build:s2andyarn build:storybook:s2succeed.