-
Notifications
You must be signed in to change notification settings - Fork 235
chore(tooling): adapt publishing workflow for new monorepo structure #5851
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
Changes from all commits
6abfbae
89cb380
f9e67bc
fe65f32
33aa554
5722ab6
f4e2ac6
87ff985
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 20.13.1 | ||
| 20.19.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,8 +18,7 @@ | |
| "scripts": { | ||
| "analyze": "lit-analyzer \"{packages,tools}/*/src/**/!(*.css).ts\"", | ||
| "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 commentThe reason will be displayed to describe this comment to others. Learn more. Cleaning |
||
| "build:confirm": "node ./scripts/confirm-build.js", | ||
| "build:css": "wireit", | ||
| "build:css:watch": "wireit", | ||
|
|
@@ -30,11 +29,10 @@ | |
| "build:types": "wireit", | ||
| "build:watch": "wireit", | ||
| "changelog:global": "node ./scripts/update-global-changelog.js", | ||
| "changeset-publish": "yarn prepublishOnly && yarn changeset version && yarn constraints --fix && yarn install --refresh-lockfile && yarn version:update && yarn changeset publish --no-git-tag && yarn push-to-remote && yarn create-git-tag && yarn postpublish", | ||
| "changeset-snapshot-publish": "yarn prepublishOnly && yarn changeset version --snapshot snapshot && yarn constraints --fix && yarn install --refresh-lockfile && yarn version:update && yarn changeset publish --no-git-tag --tag snapshot", | ||
| "chromatic": "chromatic --build-script-name storybook:build # note that --project-token must be set in your env variables", | ||
| "create-git-tag": "node --no-warnings ./scripts/create-git-tag.js", | ||
| "custom-element-json": "node ./scripts/custom-element-json.js", | ||
| "dev:core": "yarn workspace @spectrum-web-components/core dev", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not new, just got re-ordered. |
||
| "docs:analyze": "cem analyze --globs \"packages/**/*.ts\" --exclude \"**/*.d.ts\" --exclude \"**/stories/**\" --exclude \"**/icons/**\" --exclude \"**/elements/**\" --outdir projects/documentation --litelement", | ||
| "docs:build": "yarn workspace documentation build", | ||
| "docs:ci": "yarn docs:analyze && run-p docs:production storybook:build && cp projects/documentation/custom-elements.json projects/documentation/dist/storybook", | ||
|
|
@@ -50,20 +48,14 @@ | |
| "new-package": "yarn workspace swc-templates plop", | ||
| "postinstall": "husky || true", | ||
| "postpack": "pinst --enable", | ||
| "postpublish": "yarn prepublish:react && yarn publish:react && yarn postpublish:react", | ||
| "postpublish:react": "git reset --hard HEAD^ && git prune && rimraf react", | ||
| "prebuild": "wireit", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not new, just got re-ordered. |
||
| "preeleventy": "yarn docs:analyze", | ||
| "prepack": "pinst --disable", | ||
| "prepublish:react": "yarn build:react && sed -i \"\" \"s/react/# react/g\" .gitignore && git commit -am \"Commit React Wrappers\" --no-verify", | ||
| "prepublishOnly": "rimraf react && yarn build && yarn custom-element-json && yarn build:confirm && yarn changelog:global", | ||
| "prestorybook": "wireit", | ||
| "prestorybook:build": "cem analyze --outdir storybook/", | ||
| "pretest:bench": "yarn build:tests && test -f test/benchmark/cli.js ||:", | ||
| "pretest:visual": "yarn build && yarn build", | ||
| "process-icons": "wireit", | ||
| "publish:react": "yarn changeset publish --no-git-tag --tag latest --no-push", | ||
| "push-to-remote": "git add . && git commit -m \"chore: release new versions #publish\" && git push", | ||
| "dev:core": "yarn workspace @spectrum-web-components/core dev", | ||
| "start": "run-p dev:core storybook", | ||
| "storybook": "wireit", | ||
| "storybook:build": "NODE_ENV=production storybook build -o projects/documentation/dist/storybook -c storybook", | ||
|
|
@@ -85,7 +77,6 @@ | |
| "test:watch": "yarn test:watch:focus unit", | ||
| "test:watch:flags:focus": "yarn build && run-p build:watch \"test:start --watch --group {1} --config web-test-runner.config.ci-chromium-flags.js\" --", | ||
| "test:watch:focus": "yarn dev:core & yarn build && run-p build:watch \"test:start --watch --group {1}\" --", | ||
| "version:update": "genversion --verbose --semi --esm ./tools/base/src/version.js", | ||
| "vrt:preview": "yarn wds --config test/visual/wds-vrt.config.js" | ||
| }, | ||
| "workspaces": [ | ||
|
|
@@ -99,7 +90,7 @@ | |
| "@changesets/changelog-github": "0.5.1", | ||
| "@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 commentThe reason will be displayed to describe this comment to others. Learn more. Pinning versions. |
||
| "@custom-elements-manifest/analyzer": "0.10.6", | ||
| "@geometricpanda/storybook-addon-badges": "2.0.5", | ||
| "@lit/react": "1.0.8", | ||
|
|
@@ -176,7 +167,7 @@ | |
| "jsonc-eslint-parser": "2.4.1", | ||
| "latest-version": "9.0.0", | ||
| "lightningcss": "1.30.1", | ||
| "lint-staged": "^16.1.2", | ||
| "lint-staged": "16.2.6", | ||
| "lit": "^2.5.0 || ^3.1.3", | ||
| "lit-analyzer": "2.0.3", | ||
| "lit-html": "^2.4.0 || ^3.1.3", | ||
|
|
@@ -190,7 +181,7 @@ | |
| "prettier-plugin-package": "1.4.0", | ||
| "pretty-bytes": "7.1.0", | ||
| "re-template-tag": "2.0.1", | ||
| "replace-in-file": "^8.3.0", | ||
| "replace-in-file": "8.3.0", | ||
| "rimraf": "6.0.1", | ||
| "rollup": "4.52.2", | ||
| "sinon": "17.0.2", | ||
|
|
@@ -216,10 +207,6 @@ | |
| "lit-element", | ||
| "lit-html" | ||
| ], | ||
| "engines": { | ||
| "node": ">=20", | ||
| "yarn": ">=4.6.0" | ||
| }, | ||
|
Comment on lines
-219
to
-222
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason to remove this? |
||
| "wireit": { | ||
| "build": { | ||
| "dependencies": [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -774,6 +774,9 @@ custom.args = { | |
| open: true, | ||
| }; | ||
| custom.decorators = [isOverlayOpen]; | ||
| custom.swc_vrt = { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Skipping a known flaky test |
||
| skip: true, | ||
| }; | ||
|
|
||
| export const BackgroundClickTest = (): TemplateResult => { | ||
| return html` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -240,7 +240,7 @@ export default async () => { | |
| replacement: '../../packages/', | ||
| }, | ||
| { | ||
| find: /^@swc\/core\/(.*)$/, | ||
| find: /^@spectrum-web-components\/core\/(.*)$/, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix regex from old |
||
| replacement: path.resolve( | ||
| '../../../2nd-gen/packages/core/dist/$1' | ||
| ), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -143,7 +143,7 @@ async function processChangesets() { | |
| const coreChanges = extractChanges( | ||
| frontmatter, | ||
| cleanDescription, | ||
| /['"]@swc\/core['"]:\s*(major|minor|patch)/g | ||
| /['"]@spectrum-web-components\/core['"]:\s*(major|minor|patch)/g | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix regex from old @swc-core -> @spectrum-web-components/core |
||
| ); | ||
|
|
||
| // Merge results into categorized buckets | ||
|
|
@@ -299,8 +299,8 @@ function updateChangelogFile( | |
| * Reads changeset files, categorizes changes by type (major/minor/patch), | ||
| * and updates both the 1st-gen and @spectrum-web-components/core changelogs accordingly. | ||
| * | ||
| * Should be run during the release process after prepublishOnly but before | ||
| * changeset version. Automatically called by `yarn changeset-publish`. | ||
| * Should be run during the release process before changeset version. | ||
| * Automatically called by the unified publish script for regular releases. | ||
| * | ||
| * @returns {Promise<void>} | ||
| * @throws {Error} If there's an issue with git tags or file operations | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ export default { | |
| alias({ | ||
| entries: [ | ||
| { | ||
| find: /^@swc\/core\/(.*)$/, | ||
| find: /^@spectrum-web-components\/core\/(.*)$/, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix regex from old @swc-core -> @spectrum-web-components/core |
||
| replacement: path.resolve( | ||
| process.cwd(), | ||
| '../2nd-gen/packages/core/dist/$1' | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to stay!! |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,12 @@ | ||
| // Generated by genversion. | ||
| export const version = '1.9.0'; | ||
|
Comment on lines
-1
to
-2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Many consumers still uses this path to version check their packages. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-added it |
||
| /** | ||
| * Copyright 2025 Adobe. All rights reserved. | ||
| * This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. You may obtain a copy | ||
| * of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software distributed under | ||
| * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
| * OF ANY KIND, either express or implied. See the License for the specific language | ||
| * governing permissions and limitations under the License. | ||
| */ | ||
| export * from '@spectrum-web-components/core/shared/base/version.js'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -290,6 +290,7 @@ | |
| ], | ||
| "dependencies": { | ||
| "@spectrum-web-components/base": "1.9.0", | ||
| "@spectrum-web-components/core": "0.0.1", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Theme now depends on import { version } from '@spectrum-web-components/core/shared/base/version.js'; |
||
| "@spectrum-web-components/styles": "1.9.0" | ||
| }, | ||
| "types": "./src/index.d.ts", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,7 @@ export default { | |
| alias({ | ||
| entries: [ | ||
| { | ||
| find: /^@swc\/core\/(.*)$/, | ||
| find: /^@spectrum-web-components\/core\/(.*)$/, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix regex |
||
| replacement: path.resolve( | ||
| __dirname, | ||
| '../2nd-gen/packages/core/dist/$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.
Bumping minimum version for Storybook 10 compatibility.