Skip to content

Commit 737ce2c

Browse files
committed
chore: update version alignment tooling
1 parent a646ae8 commit 737ce2c

File tree

19 files changed

+174
-252
lines changed

19 files changed

+174
-252
lines changed

.github/workflows/preview-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2828
run: |
2929
yarn changeset version --snapshot preview-${GITHUB_SHA::8}
30-
yarn lint:versions --fix
31-
yarn update-version
32-
30+
yarn constraints --fix
31+
yarn version:update
32+
yarn install --refresh-lockfile
3333
- name: Configure NPM for changeset publish
3434
env:
3535
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ The project will be linted on a pre-commit hook, but you can also run the lint s
102102

103103
### Dependency linting
104104

105-
There are downstream issues that can arise from multiple packages in this mono-repo using dependencies with mismatched version strings. By default, [changesets](https://opensource.adobe.com/spectrum-web-components/guides/writing-changesets/) will bump version numbers of internal dependencies when the various packages are published and the depended version is pointing to the latest release, which can help to mitigate this issue. Running `yarn lint:versions` will check that all version strings for each dependency match across the repo.
105+
There are downstream issues that can arise from multiple packages in this mono-repo using dependencies with mismatched version strings. By default, [changesets](https://opensource.adobe.com/spectrum-web-components/guides/writing-changesets/) will bump version numbers of internal dependencies when the various packages are published and the depended version is pointing to the latest release, which can help to mitigate this issue. Running `yarn constraints` will check that all version strings for each dependency match across the repo.
106106

107-
`yarn list:versions --fix` will modify the `package.json` files, updating all dependencies to the latest version available in the library — _a potentially dangerous operation_. If this is what you want to do when `yarn lint:versions` discovers mismatched versions, this step can greatly reduce the amount of work to achieve matching version numbers.
107+
`yarn constraints --fix` will modify the `package.json` files, updating all dependencies to the latest version available in the library — _a potentially dangerous operation_. If this is what you want to do when `yarn constraints` discovers mismatched versions, this step can greatly reduce the amount of work to achieve matching version numbers.
108108

109109
## Testing
110110

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
"build:ts:watch": "wireit",
2323
"build:types": "wireit",
2424
"build:watch": "wireit",
25-
"changeset-snapshot-publish": "yarn prepublishOnly && yarn changeset version --snapshot snapshot && yarn lint:versions --fix && yarn update-version && yarn changeset publish --no-git-tag --tag snapshot",
26-
"changeset-publish": "yarn prepublishOnly && yarn changeset version && yarn install && yarn lint:versions --fix && yarn update-version && yarn changeset publish --no-git-tag && yarn push-to-remote && yarn create-git-tag && yarn postpublish",
27-
"update-version": "node ./tasks/update-version.js",
25+
"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",
26+
"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",
2827
"chromatic": "chromatic --build-script-name storybook:build # note that --project-token must be set in your env variables",
2928
"create-git-tag": "node --no-warnings tasks/create-git-tag.js",
3029
"custom-element-json": "node tasks/custom-element-json.js",
@@ -41,19 +40,18 @@
4140
"icons:ui": "wireit",
4241
"icons:workflow": "wireit",
4342
"lint": "git status --porcelain && git add . && lint-staged --allow-empty",
44-
"lint:versions": "node ./scripts/lint-versions.js",
4543
"new-package": "cd projects/templates && plop",
4644
"postcustom-element-json": "node ./tasks/run-check-cem.js",
4745
"postdocs:analyze": "node ./scripts/add-custom-properties.js --src=\"projects/documentation/custom-elements.json\"",
4846
"postinstall": "husky || true && patch-package",
47+
"postpack": "pinst --enable",
4948
"postpublish": "yarn prepublish:react && yarn publish:react && yarn postpublish:react",
5049
"postpublish:react": "git reset --hard HEAD^ && git prune && rimraf react",
5150
"precustom-element-json": "node tasks/remove-custom-elements-json.js",
5251
"preeleventy": "yarn docs:analyze",
5352
"prepack": "pinst --disable",
54-
"postpack": "pinst --enable",
55-
"prepublishOnly": "rimraf react && yarn build && yarn custom-element-json && yarn verify-build-artifacts && yarn build:confirm",
5653
"prepublish:react": "yarn build:react && sed -i \"\" \"s/react/# react/g\" .gitignore && git commit -am \"Commit React Wrappers\" --no-verify",
54+
"prepublishOnly": "rimraf react && yarn build && yarn custom-element-json && yarn verify-build-artifacts && yarn build:confirm",
5755
"prestorybook": "wireit",
5856
"prestorybook:build": "cem analyze --outdir storybook/",
5957
"pretest:bench": "yarn build:tests && test -f test/benchmark/cli.js ||:",
@@ -87,6 +85,7 @@
8785
"update:spectrum-css:cleanup": "yarn --ignore-scripts && yarn process-spectrum && yarn lint",
8886
"update:spectrum-css:nonbreaking": "node ./scripts/update-spectrum-css.js || yarn update:spectrum-css:cleanup",
8987
"verify-build-artifacts": "node ./scripts/verify-build-artifacts.js",
88+
"version:update": "genversion --verbose --semi --esm ./tools/base/src/version.js",
9089
"vrt:preview": "yarn wds --config test/visual/wds-vrt.config.js",
9190
"vrt:quick-link": "yarn netlify deploy --alias=vrt --dir=projects/vrt-quick-link"
9291
},

packages/icons-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"fast-glob": "^3.2.12",
6363
"fs": "^0.0.1-security",
6464
"path": "^0.12.7",
65-
"prettier": "^3.0.0"
65+
"prettier": "^3.5.3"
6666
},
6767
"types": "./src/index.d.ts",
6868
"customElements": "custom-elements.json",

packages/icons-workflow/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"fast-glob": "^3.2.12",
6464
"fs": "^0.0.1-security",
6565
"path": "^0.12.7",
66-
"prettier": "^3.0.0"
66+
"prettier": "^3.5.3"
6767
},
6868
"types": "./src/index.d.ts",
6969
"customElements": "custom-elements.json",

projects/example-project-rollup/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"concurrently": "^8.0.0",
3939
"eslint": "^8.23.0",
4040
"eslint-config-prettier": "^9.1.0",
41-
"prettier": "^3.0.0",
41+
"prettier": "^3.5.3",
4242
"rimraf": "^5.0.1",
4343
"rollup": "^4.12.0",
4444
"rollup-plugin-styles": "^4.0.0",

scripts/lint-versions.js

Lines changed: 0 additions & 156 deletions
This file was deleted.

tasks/update-version.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

tools/base/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,16 @@
107107
"!test/"
108108
],
109109
"keywords": [
110-
"spectrum css",
110+
"design-system",
111+
"spectrum",
112+
"adobe",
113+
"adobe-spectrum",
111114
"web components",
115+
"web-components",
112116
"lit-element",
113-
"lit-html"
117+
"lit-html",
118+
"component",
119+
"css"
114120
],
115121
"dependencies": {
116122
"lit": "^2.5.0 || ^3.1.3"

tools/bundle/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,16 @@
5454
"!test/"
5555
],
5656
"keywords": [
57-
"spectrum css",
57+
"design-system",
58+
"spectrum",
59+
"adobe",
60+
"adobe-spectrum",
5861
"web components",
62+
"web-components",
5963
"lit-element",
60-
"lit-html"
64+
"lit-html",
65+
"component",
66+
"css"
6167
],
6268
"dependencies": {
6369
"@spectrum-web-components/accordion": "1.6.0",

tools/grid/package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"bugs": {
1717
"url": "https://github.com/adobe/spectrum-web-components/issues"
1818
},
19-
"main": "src/index.js",
20-
"module": "src/index.js",
19+
"main": "./src/index.js",
20+
"module": "./src/index.js",
2121
"type": "module",
2222
"exports": {
2323
".": {
@@ -56,10 +56,16 @@
5656
"!test/"
5757
],
5858
"keywords": [
59-
"spectrum css",
59+
"design-system",
60+
"spectrum",
61+
"adobe",
62+
"adobe-spectrum",
6063
"web components",
64+
"web-components",
6165
"lit-element",
62-
"lit-html"
66+
"lit-html",
67+
"component",
68+
"css"
6369
],
6470
"dependencies": {
6571
"@lit-labs/observers": "^2.0.2",

tools/opacity-checkerboard/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,16 @@
3939
"!test/"
4040
],
4141
"keywords": [
42-
"spectrum css",
42+
"design-system",
43+
"spectrum",
44+
"adobe",
45+
"adobe-spectrum",
4346
"web components",
47+
"web-components",
4448
"lit-element",
45-
"lit-html"
49+
"lit-html",
50+
"component",
51+
"css"
4652
],
4753
"dependencies": {
4854
"@spectrum-web-components/base": "1.6.0"

0 commit comments

Comments
 (0)