Skip to content

Conversation

@rubencarvalho
Copy link
Contributor

@rubencarvalho rubencarvalho commented Oct 29, 2025

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:

  1. Replaced workspace:* with explicit version numbers - Changed all references to @spectrum-web-components/core from workspace:* to explicit versions
  2. Removed the @changesets+cli+2.29.7.patch - No longer needed now that we're not using workspace protocols
  3. Added missing @spectrum-web-components/core dependencies - Ensured all 5 migrated components have the core dependency properly listed

Motivation and context

The problem

During the migration of components to use @spectrum-web-components/core, we used the workspace:* protocol for the dependency. This created a publishing challenge:

  1. The workspace:* protocol is a Yarn-specific feature
  2. Changesets under the hood uses standard npm publish, that doesn't understand workspace:* and would fail
  3. To work around this, we created a patch for Changesets to force it to use yarn npm publish instead
  4. However, yarn npm publish has different file inclusion behavior than npm publish, causing root-level files (like sp-*.js) to be excluded from published packages

The solution

By replacing workspace:* with explicit version numbers, we eliminate the root cause:

  • No special workspace protocol handling needed during publish
  • Standard npm publish works perfectly with explicit versions
  • The custom Changesets patch becomes unnecessary and can be removed
  • File inclusion works correctly using the standard files field in package.json

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

Manual testing to happen under the barebones testing umbrella, but here is a StackBlitz running a snapshot test from this branch: https://stackblitz.com/edit/vitejs-vite-tqzmbdnr?file=package.json

@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2025

⚠️ No Changeset found

Latest commit: 5da3749

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rubencarvalho rubencarvalho changed the title chore: update core dependencies chore: update core dependencies and fix publishing Oct 29, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

📚 Branch Preview

🔍 Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-5841

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@github-actions
Copy link
Contributor

Tachometer results

Currently, no packages are changed by this PR...

@rubencarvalho rubencarvalho changed the title chore: update core dependencies and fix publishing fix(build): replace workspace:* with explicit versions to enable standard publishing Oct 29, 2025
@rubencarvalho rubencarvalho marked this pull request as ready for review October 29, 2025 15:57
@rubencarvalho rubencarvalho requested a review from a team as a code owner October 29, 2025 15:57
@rubencarvalho rubencarvalho added Status: Ready for review PR ready for review or re-review. 2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. High priority PR review PR is a high priority and should be reviewed ASAP labels Oct 29, 2025
Copy link
Contributor

@caseyisonit caseyisonit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, want to skip that flaky VRT before merge?

@caseyisonit caseyisonit merged commit 69f54db into barebones Oct 29, 2025
20 of 22 checks passed
@caseyisonit caseyisonit deleted the ruben/barebones-publish-fixes branch October 29, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. High priority PR review PR is a high priority and should be reviewed ASAP Status: Ready for review PR ready for review or re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants