-
Notifications
You must be signed in to change notification settings - Fork 235
chore(tooling): adapt publishing workflow for new monorepo structure #5845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
📚 Branch Preview🔍 Visual Regression Test ResultsWhen 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: If the changes are expected, update the |
Tachometer resultsCurrently, no packages are changed by this PR... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated Node requirement to 20.19.0, as per the new Storybook 10 requirement.
| "build": "wireit", | ||
| "prebuild": "wireit", | ||
| "build:clear-cache": "rimraf packages/*/tsconfig.tsbuildinfo && rimraf tools/*/tsconfig.tsbuildinfo", | ||
| "build:clear-cache": "rimraf .wireit && rimraf packages/*/tsconfig.tsbuildinfo && rimraf tools/*/tsconfig.tsbuildinfo", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added rimraf .wireit, as this can also be a source of caching problems.
| "@changesets/cli": "2.29.7", | ||
| "@commitlint/cli": "19.8.1", | ||
| "@commitlint/config-conventional": "^19.8.1", | ||
| "@commitlint/config-conventional": "19.8.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinned version.
| "latest-version": "9.0.0", | ||
| "lightningcss": "1.30.1", | ||
| "lint-staged": "^16.1.2", | ||
| "lint-staged": "16.2.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinned version.
| "pretty-bytes": "7.1.0", | ||
| "re-template-tag": "2.0.1", | ||
| "replace-in-file": "^8.3.0", | ||
| "replace-in-file": "8.3.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinned version.
| entries: [ | ||
| { | ||
| find: /^@swc\/core\/(.*)$/, | ||
| find: /^@spectrum-web-components\/core\/(.*)$/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More old references.
| ], | ||
| 'package.json': () => [ | ||
| 'cd 1st-gen && genversion --es6 --semi tools/base/src/version.js', | ||
| 'genversion --source ./1st-gen/tools/base/package.json --es6 --semi --force ./2nd-gen/packages/core/shared/base/version.ts', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a new path for puting the version file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaned up the commands to be more consistent with the use of npm-run-all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated constraints to support new 2nd-gen packages and requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the meat of this PR, hopefully it's self documenting! :)
ec211ef to
22de59a
Compare
Description
This PR streamlines and fixes the publishing workflow for Spectrum Web Components after the monorepo restructure.
Most relevant changes
Unified publish script (
scripts/publish.js)Fixed global changelog generator
@spectrum-web-components/corechanges (previously looked for@swc/core).changeset versionto access changeset files before deletion.Updated build configuration aliases
@swc/core → @spectrum-web-components/corein:1st-gen/web-test-runner.config.js1st-gen/test/visual/rollup.config.js1st-gen/projects/documentation/rollup.config.jsFixed Yarn constraints for new monorepo structure
Updated glob patterns:
Fixed folder name extraction for component name resolution.
Added generation-specific rules:
main/module → ./src/index.jsmain/module → ./dist/index.jsEnsured both generations set
publishConfig.access: "public".Cleaned up obsolete scripts from
1st-gen/package.jsonRemoved:
changeset-publishchangeset-snapshot-publishprepublishOnly,postpublishprepublish:react,postpublish:react,publish:reactpush-to-remoteUpdated release documentation
CONTRIBUTOR-DOCS/01_contributor-guides/06_releasing-swc.mdnightly,beta, etc.).Motivation and context
After reorganizing the repository into 1st-gen/ and 2nd-gen/ subdirectories, the publishing workflow needed to be updated.
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
To be tested under the
barebonestesting and validation steps.