fix(build): replace workspace:* with explicit versions to enable standard publishing #5841
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.
Description
This PR replaces
workspace:*protocol references with explicit version numbers for@spectrum-web-components/core, aligning with how all other 1st-gen components manage their internal dependencies. This change eliminates the need for a custom Changesets patch, allowing us to go back to using the standard changesets npm publishing workflow.Changes made:
workspace:*with explicit version numbers - Changed all references to@spectrum-web-components/corefromworkspace:*to explicit versions@changesets+cli+2.29.7.patch- No longer needed now that we're not using workspace protocols@spectrum-web-components/coredependencies - Ensured all 5 migrated components have the core dependency properly listedMotivation and context
The problem
During the migration of components to use
@spectrum-web-components/core, we used theworkspace:*protocol for the dependency. This created a publishing challenge:workspace:*protocol is a Yarn-specific featurenpm publish, that doesn't understandworkspace:*and would failyarn npm publishinsteadyarn npm publishhas different file inclusion behavior thannpm publish, causing root-level files (likesp-*.js) to be excluded from published packagesThe solution
By replacing
workspace:*with explicit version numbers, we eliminate the root cause:npm publishworks perfectly with explicit versionsfilesfield in package.jsonAuthor's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Manual testing to happen under the
barebonestesting umbrella, but here is a StackBlitz running a snapshot test from this branch: https://stackblitz.com/edit/vitejs-vite-tqzmbdnr?file=package.json