Skip to content

Commit a890b72

Browse files
build: remove the build task from postinstall (#5016)
* build: remove the build task from postinstall * chore: add build to circleci downstream --------- Co-authored-by: Casey Eickhoff <[email protected]>
1 parent 65d8709 commit a890b72

File tree

6 files changed

+57
-36
lines changed

6 files changed

+57
-36
lines changed

.circleci/config.yml

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ commands:
3333
command: |
3434
corepack enable
3535
yarn --immutable
36+
- run:
37+
name: Build the project
38+
command: yarn build
3639

3740
- save_cache:
3841
paths:

.github/actions/setup-job/action.yml

+4
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ runs:
1717
- name: Install dependencies
1818
shell: bash
1919
run: yarn --immutable
20+
21+
- name: Build the project
22+
shell: bash
23+
run: yarn build

.husky/pre-commit

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
STAGED_FILES_TO_LINT=$(git diff --name-only --cached --diff-filter=d -- "*.ts" "*.js")
2-
STAGED_FILES_TO_ANALYZE=$(git diff --name-only --cached --diff-filter=d -- "{packages,tools}/*/src/**/!(*.css).ts")
3-
STAGED_CSS_FILES=$(git diff --name-only --cached --diff-filter=d -- "{packages,tools}/**/*.css")
4-
VERSION_FILE=$(dirname "$0")/../tools/base/src/version.js
1+
bash << EOF
2+
STAGED_FILES_TO_LINT=$(git diff --name-only --cached --diff-filter=d -- "*.ts" "*.js")
3+
STAGED_FILES_TO_ANALYZE=$(git diff --name-only --cached --diff-filter=d -- "{packages,tools}/*/src/**/!(*.css).ts")
4+
STAGED_CSS_FILES=$(git diff --name-only --cached --diff-filter=d -- "{packages,tools}/**/*.css")
5+
VERSION_FILE=$(dirname "$0")/../tools/base/src/version.js
56

6-
[[ -z "$STAGED_FILES_TO_LINT" ]] || yarn eslint -f pretty $STAGED_FILES_TO_LINT
7-
[[ -z "$STAGED_FILES_TO_ANALYZE" ]] || yarn lit-analyzer $STAGED_FILES_TO_ANALYZE
8-
[[ -z "$STAGED_CSS_FILES" ]] || yarn stylelint $STAGED_CSS_FILES
7+
[[ -z "$STAGED_FILES_TO_LINT" ]] || yarn eslint -f pretty $STAGED_FILES_TO_LINT
8+
[[ -z "$STAGED_FILES_TO_ANALYZE" ]] || yarn lit-analyzer $STAGED_FILES_TO_ANALYZE
9+
[[ -z "$STAGED_CSS_FILES" ]] || yarn stylelint $STAGED_CSS_FILES
910

10-
yarn pretty-quick --staged
11+
yarn pretty-quick --staged
1112

12-
yarn genversion --es6 --semi $VERSION_FILE
13-
git add $VERSION_FILE
13+
yarn genversion --es6 --semi $VERSION_FILE
14+
git add $VERSION_FILE
15+
EOF

RELEASE_PROCESS.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Users with permissions in the `@spectrum-web-components` organization on NPM can
55
1. Merge all pull requests to be included in the release and wait for the `main` branch to show that it has completed the required CI jobs.
66
2. `git checkout main && git fetch && git pull && git clean -dfX`
77
3. Run `nvm use` assumes a Node Version Manager install, and confirm your on an operable version of Node.
8-
4. `yarn install`
8+
4. `yarn install && yarn build` to install all dependencies and build the pre-processed assets for publication.
99
5. `npm whoami` ensure that you are logged in with the user account for the public NPM registry
1010
6. `yarn changeset-publish`
1111
7. Scan the version summary for any unexpected changes.
@@ -25,7 +25,7 @@ The docs site will publish automatically if the `#publish` string is included in
2525

2626
If publishing fails with an error, check the [list of tags](https://github.com/adobe/spectrum-web-components/tags) to see if new tags have been released for your publishing attempt. If they were, run `yarn changeset-publish` again.
2727

28-
### Publishing the docs site manually
28+
## Publishing the docs site manually
2929

3030
Navigate to SWC's [Actions](https://github.com/adobe/spectrum-web-components/actions) and click the `Build & publish site` link under the _Workflows_ heading.
3131

package.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"build:types": "wireit",
2424
"build:watch": "wireit",
2525
"changeset-snapshot-publish": "yarn prepublishOnly && yarn changeset version --snapshot && yarn lint:versions --fix && yarn changeset publish --no-git-tag --tag snapshot && yarn create-git-tag && yarn postpublish",
26-
"changeset-publish": "yarn prepublishOnly && yarn changeset version && yarn install && yarn lint:versions --fix && yarn changeset publish --no-git-tag && yarn push-to-remote && yarn create-git-tag && yarn postpublish",
26+
"changeset-publish": "yarn changeset version && yarn install && yarn prepublishOnly && yarn lint:versions --fix && yarn changeset publish --no-git-tag && yarn push-to-remote && yarn create-git-tag && yarn postpublish",
2727
"chromatic": "chromatic --build-script-name storybook:build # note that --project-token must be set in your env variables",
2828
"create-git-tag": "node --no-warnings tasks/create-git-tag.js",
2929
"custom-element-json": "node tasks/custom-element-json.js",
@@ -35,8 +35,8 @@
3535
"docs:review": "alex packages/**/*.md",
3636
"docs:start": "yarn workspace documentation serve --watch",
3737
"find": "test -f custom-elements.json",
38+
"format:css": "yarn lint:css --fix && pretty-quick --pattern \"{packages,tools}/**/*.css\"",
3839
"gen-react-wrapper": "node ./tasks/gen-react-wrapper.js",
39-
"get-ready": "yarn build",
4040
"icons": "wireit",
4141
"icons:ui": "wireit",
4242
"icons:workflow": "wireit",
@@ -50,13 +50,14 @@
5050
"new-package": "cd projects/templates && plop",
5151
"postcustom-element-json": "node ./tasks/run-check-cem.js",
5252
"postdocs:analyze": "node ./scripts/add-custom-properties.js --src=\"projects/documentation/custom-elements.json\"",
53-
"postinstall": "husky && patch-package && yarn get-ready",
53+
"postinstall": "husky || true && patch-package",
5454
"postpublish": "yarn prepublish:react && yarn publish:react && yarn postpublish:react",
5555
"postpublish:react": "git reset --hard HEAD^ && git prune && rimraf react",
5656
"precustom-element-json": "node tasks/remove-custom-elements-json.js",
5757
"preeleventy": "yarn docs:analyze",
58-
"prepublishOnly": "rimraf react && yarn get-ready && yarn custom-element-json && yarn verify-build-artifacts && yarn build:confirm",
59-
"prepare": "husky",
58+
"prepack": "pinst --disable",
59+
"postpack": "pinst --enable",
60+
"prepublishOnly": "rimraf react && yarn build && yarn custom-element-json && yarn verify-build-artifacts && yarn build:confirm",
6061
"prepublish:react": "yarn build:react && sed -i \"\" \"s/react/# react/g\" .gitignore && git commit -am \"Commit React Wrappers\" --no-verify",
6162
"prestorybook": "wireit",
6263
"prestorybook:build": "cem analyze --outdir storybook/",
@@ -179,10 +180,11 @@
179180
"node-fetch": "^3.1.0",
180181
"npm-run-all2": "^6.0.0",
181182
"patch-package": "^8.0.0",
183+
"pinst": "^3.0.0",
182184
"prettier": "^3.0.0",
183185
"prettier-plugin-package": "^1.3.0",
184186
"pretty-bytes": "^6.1.1",
185-
"pretty-quick": "^4.0.0",
187+
"pretty-quick": "^4.1.1",
186188
"re-template-tag": "^2.0.1",
187189
"react": "^18.2.0",
188190
"react-dom": "^18.2.0",
@@ -381,7 +383,7 @@
381383
]
382384
},
383385
"process-spectrum": {
384-
"command": "node ./scripts/spectrum-vars.js && node ./tasks/process-spectrum.js && node ./scripts/generate-tokens.js && yarn lint:css --fix && pretty-quick --pattern \"{packages,tools}/**/*.css\"",
386+
"command": "node ./scripts/spectrum-vars.js && node ./tasks/process-spectrum.js && node ./scripts/generate-tokens.js && yarn format:css",
385387
"files": [
386388
"tasks/process-spectrum.js",
387389
"packages/**/spectrum-config.js",

yarn.lock

+27-17
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,11 @@ __metadata:
283283
node-fetch: "npm:^3.1.0"
284284
npm-run-all2: "npm:^6.0.0"
285285
patch-package: "npm:^8.0.0"
286+
pinst: "npm:^3.0.0"
286287
prettier: "npm:^3.0.0"
287288
prettier-plugin-package: "npm:^1.3.0"
288289
pretty-bytes: "npm:^6.1.1"
289-
pretty-quick: "npm:^4.0.0"
290+
pretty-quick: "npm:^4.1.1"
290291
re-template-tag: "npm:^2.0.1"
291292
react: "npm:^18.2.0"
292293
react-dom: "npm:^18.2.0"
@@ -20668,7 +20669,7 @@ __metadata:
2066820669
languageName: node
2066920670
linkType: hard
2067020671

20671-
"ignore@npm:^5.0.0, ignore@npm:^5.1.4, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.0, ignore@npm:^5.3.1":
20672+
"ignore@npm:^5.0.0, ignore@npm:^5.1.4, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1":
2067220673
version: 5.3.1
2067320674
resolution: "ignore@npm:5.3.1"
2067420675
checksum: 10c0/703f7f45ffb2a27fb2c5a8db0c32e7dee66b33a225d28e8db4e1be6474795f606686a6e3bcc50e1aa12f2042db4c9d4a7d60af3250511de74620fbed052ea4cd
@@ -27450,10 +27451,10 @@ __metadata:
2745027451
languageName: node
2745127452
linkType: hard
2745227453

27453-
"picomatch@npm:^3.0.1":
27454-
version: 3.0.1
27455-
resolution: "picomatch@npm:3.0.1"
27456-
checksum: 10c0/70ec738569f1864658378b7abdab8939d15dae0718c1df994eae3346fd33daf6a3c1ff4e0c1a0cd1e2c0319130985b63a2cff34d192f2f2acbb78aca76111736
27454+
"picomatch@npm:^4.0.2":
27455+
version: 4.0.2
27456+
resolution: "picomatch@npm:4.0.2"
27457+
checksum: 10c0/7c51f3ad2bb42c776f49ebf964c644958158be30d0a510efd5a395e8d49cb5acfed5b82c0c5b365523ce18e6ab85013c9ebe574f60305892ec3fa8eee8304ccc
2745727458
languageName: node
2745827459
linkType: hard
2745927460

@@ -27534,6 +27535,15 @@ __metadata:
2753427535
languageName: node
2753527536
linkType: hard
2753627537

27538+
"pinst@npm:^3.0.0":
27539+
version: 3.0.0
27540+
resolution: "pinst@npm:3.0.0"
27541+
bin:
27542+
pinst: bin.js
27543+
checksum: 10c0/abb1ed62ea2acb2207a7a860715bdb26ecbde74ede8fad5f6200194f3e22db25e2b7a49af05e5cc7fc05384709c651e0000323f0077d7239060c4b68c8acd428
27544+
languageName: node
27545+
linkType: hard
27546+
2753727547
"pirates@npm:^4.0.4, pirates@npm:^4.0.6":
2753827548
version: 4.0.6
2753927549
resolution: "pirates@npm:4.0.6"
@@ -28724,22 +28734,22 @@ __metadata:
2872428734
languageName: node
2872528735
linkType: hard
2872628736

28727-
"pretty-quick@npm:^4.0.0":
28728-
version: 4.0.0
28729-
resolution: "pretty-quick@npm:4.0.0"
28737+
"pretty-quick@npm:^4.1.1":
28738+
version: 4.1.1
28739+
resolution: "pretty-quick@npm:4.1.1"
2873028740
dependencies:
28731-
execa: "npm:^5.1.1"
2873228741
find-up: "npm:^5.0.0"
28733-
ignore: "npm:^5.3.0"
28742+
ignore: "npm:^7.0.3"
2873428743
mri: "npm:^1.2.0"
28735-
picocolors: "npm:^1.0.0"
28736-
picomatch: "npm:^3.0.1"
28737-
tslib: "npm:^2.6.2"
28744+
picocolors: "npm:^1.1.1"
28745+
picomatch: "npm:^4.0.2"
28746+
tinyexec: "npm:^0.3.2"
28747+
tslib: "npm:^2.8.1"
2873828748
peerDependencies:
2873928749
prettier: ^3.0.0
2874028750
bin:
2874128751
pretty-quick: lib/cli.mjs
28742-
checksum: 10c0/f92f5f6a4c7b8e5c87c405d09f883e49d538bbb117a8d8623102f25900fc2d4617314d30c5320c6278fa9ac2da15e74076e08319a797a5d0028b43d6c5da591b
28752+
checksum: 10c0/c0362aff7d7679f58c044891047e7bbb03d461543aa30b1c57fef9400fa8c4d1daef4aa2b146a9c9072ce050c60860a88eb64b3fd722826dc56616f7cd1d6011
2874328753
languageName: node
2874428754
linkType: hard
2874528755

@@ -32772,7 +32782,7 @@ __metadata:
3277232782
languageName: node
3277332783
linkType: hard
3277432784

32775-
"tinyexec@npm:^0.3.0":
32785+
"tinyexec@npm:^0.3.0, tinyexec@npm:^0.3.2":
3277632786
version: 0.3.2
3277732787
resolution: "tinyexec@npm:0.3.2"
3277832788
checksum: 10c0/3efbf791a911be0bf0821eab37a3445c2ba07acc1522b1fa84ae1e55f10425076f1290f680286345ed919549ad67527d07281f1c19d584df3b74326909eb1f90
@@ -33069,7 +33079,7 @@ __metadata:
3306933079
languageName: node
3307033080
linkType: hard
3307133081

33072-
"tslib@npm:2, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.6.2":
33082+
"tslib@npm:2, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.6.2, tslib@npm:^2.8.1":
3307333083
version: 2.8.1
3307433084
resolution: "tslib@npm:2.8.1"
3307533085
checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62

0 commit comments

Comments
 (0)