Skip to content

Commit 567b664

Browse files
committed
chore: include version alignment into constraints [swc-809]
1 parent c9608e5 commit 567b664

File tree

17 files changed

+178
-59
lines changed

17 files changed

+178
-59
lines changed

.github/workflows/preview-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2828
run: |
2929
yarn changeset version --snapshot preview-${GITHUB_SHA::8}
30-
yarn lint:versions --fix
30+
yarn constraints --fix
3131
yarn update-version
3232
3333
- name: Configure NPM for changeset publish

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Spectrum Web Components is a future-looking project to develop Adobe Spectrum de
44

55
To this end, Spectrum Web Components only targets _modern_, evergreen browsers that fully implement the Custom Elements V1 specification, e.g. Chrome, Firefox, Safari. Polyfills will be avoided as much as possible but documented if necessary.
66

7-
# Requirements
7+
## Requirements
88

99
- NodeJS >= 20.0.0
1010
- Typescript
@@ -17,9 +17,9 @@ To this end, Spectrum Web Components only targets _modern_, evergreen browsers t
1717
- We support all viewport sizes across supported desktop browsers.
1818
- While our components are designed to be responsive and mobile-friendly, we do not yet fully support mobile browsers due to limited testing in mobile hardware. We advise testing updates on mobile devices before updating and are happy to address any reported issues.
1919

20-
# Getting started
20+
## Getting started
2121

22-
```bash
22+
```sh
2323
git clone https://github.com/adobe/spectrum-web-components.git
2424
cd spectrum-web-components
2525
yarn
@@ -29,11 +29,11 @@ The call to `yarn` will install and setup everything you need for developing and
2929

3030
Typical development will involve running `yarn storybook`, `yarn test`, and `yarn docs:start` if you're making documentation changes (see below for additional details).
3131

32-
## Building a new component
32+
### New components
3333

3434
Creating a new component from the command line can be done by running the following:
3535

36-
```bash
36+
```sh
3737
yarn new-package
3838
```
3939

@@ -49,31 +49,31 @@ You can find this information in the [Spectrum CSS GitHub project](https://githu
4949

5050
For additional information, please see the [generating components documentation](https://opensource.adobe.com/spectrum-web-components/guides/generating-components) and capturing the value of the package name: `"name": "@spectrum-css/accordion"`. In this example, that name is `accordion`. _Note_ that the project scope `@spectrum-css` is stripped out of the response.
5151

52-
# Storybook
52+
## Storybook
5353

5454
Testing & reviewing changes can be done using the Storybook instance. Running `yarn storybook` will spin up a local instance of Storybook, triggering the browser to open at completion. From there you can make changes to your code and the browser will automatically refresh.
5555

5656
You can run [Storybook](https://storybook.js.org) through the command:
5757

58-
```bash
58+
```sh
5959
yarn storybook
6060
```
6161

6262
By default, the resulting site will be available at [http://localhost:8000](http://localhost:8000).
6363

64-
# Documentation
64+
## Documentation
6565

6666
The Spectrum Web Components documentation site is available via the following command:
6767

68-
```bash
68+
```sh
6969
yarn docs:start
7070
```
7171

7272
By default, the resulting site will be available at [http://localhost:8080](http://localhost:8080).
7373

7474
In the case that you'd like to serve and test a static build of the documentation from the root directory (`localhost` or otherwise), use:
7575

76-
```bash
76+
```sh
7777
yarn docs:build
7878
```
7979

@@ -91,9 +91,9 @@ The project will be linted on a pre-commit hook, but you can also run the lint s
9191

9292
#### Dependency linting
9393

94-
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.
94+
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.
9595

96-
`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.
96+
`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.
9797

9898
### Testing
9999

@@ -115,7 +115,7 @@ Visual regressions are tracked via screenshot testing powered by [`@web/test-run
115115

116116
To create a local baseline for comparing your changes to later in the development cycle, use the following:
117117

118-
```bash
118+
```sh
119119
yarn test:visual:clean # start with a clean slate
120120
# yarn test:visual:clean:baseline # removes only baseline images
121121
# yarn test:visual:clean:current # removes only images updated in the most recent test pass

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +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",
25+
"changeset-snapshot-publish": "yarn prepublishOnly && yarn changeset version --snapshot snapshot && yarn constraints --fix && yarn update-version && yarn changeset publish --no-git-tag --tag snapshot",
26+
"changeset-publish": "yarn prepublishOnly && yarn changeset version && yarn install && yarn constraints --fix && yarn update-version && yarn changeset publish --no-git-tag && yarn push-to-remote && yarn create-git-tag && yarn postpublish",
2727
"update-version": "node ./tasks/update-version.js",
2828
"chromatic": "chromatic --build-script-name storybook:build # note that --project-token must be set in your env variables",
2929
"create-git-tag": "node --no-warnings tasks/create-git-tag.js",
@@ -41,7 +41,6 @@
4141
"icons:ui": "wireit",
4242
"icons:workflow": "wireit",
4343
"lint": "git status --porcelain && git add . && lint-staged --allow-empty",
44-
"lint:versions": "node ./scripts/lint-versions.js",
4544
"new-package": "cd projects/templates && plop",
4645
"postcustom-element-json": "node ./tasks/run-check-cem.js",
4746
"postinstall": "husky || true && patch-package",

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
@@ -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",

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",

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)