Skip to content

Commit

Permalink
changed: node versions to latest (#4849)
Browse files Browse the repository at this point in the history
* changed: node versions to latest

* added: empty changeset for devDep

* introduced turbo storybook build root command

* shuffled storybook commands

* fix ci

* get rid of turbo: prefix

* fix flag

* updated test-stories command

* move stats to chromatic

* fix syntax

* fix syntax

* fix syntax

* updated gha

* Update package.json

* updated pnpm lock

---------

Co-authored-by: Geoffrey Chong <gyf.chong@gmail.com>
  • Loading branch information
gyfchong and Geoffrey Chong authored Aug 2, 2024
1 parent 856fa83 commit 6d0ec55
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ steps:
agent_query_rules: ["queue=build-unrestricted-large"]
plugins:
- docker#v5.9.0:
image: node:18.19.0-bullseye
image: node:22-bullseye
propagate-environment: true
propagate-aws-auth-tokens: true
- wait
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/build-storybook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ set -e

corepack enable
pnpm install --frozen-lockfile
pnpm storybook:build:prod
pnpm turbo:storybook:build:prod
tar -czf ./storybook.tar.gz ./storybook/public
2 changes: 2 additions & 0 deletions .changeset/tall-carpets-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 1 addition & 1 deletion .github/workflows/chromatic-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fetch-depth: 0
- uses: ./.github/actions/setup
- name: Build Storybook
run: pnpm storybook:build
run: pnpm turbo:storybook:build
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-stories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm storybook:build:test
- run: pnpm turbo:storybook:build:test
- name: Upload Storybook build as artifact
uses: actions/upload-artifact@v3
with:
Expand All @@ -62,7 +62,7 @@ jobs:
with:
artifactName: ${{ env.ARTIFACT_NAME }}
- name: Storybook tests (1/3)
run: pnpm test:storybook --shard 1/3
run: pnpm storybook:test --shard 1/3

storybook-tests-2:
name: "test-storybook"
Expand All @@ -78,7 +78,7 @@ jobs:
with:
artifactName: ${{ env.ARTIFACT_NAME }}
- name: Storybook tests (2/3)
run: pnpm test:storybook --shard 2/3
run: pnpm storybook:test --shard 2/3

storybook-tests-3:
name: "test-storybook"
Expand All @@ -94,7 +94,7 @@ jobs:
with:
artifactName: ${{ env.ARTIFACT_NAME }}
- name: Storybook tests (3/3)
run: pnpm test:storybook --shard 3/3
run: pnpm storybook:test --shard 3/3

chromatic:
needs: run-check
Expand All @@ -109,7 +109,7 @@ jobs:
- uses: ./.github/actions/setup
- name: Build Storybook for Chromatic
# We want both stories and docs for the branch preview
run: pnpm storybook:build --stats-json
run: pnpm turbo:storybook:build:chromatic-turbo-snap
- id: publishChromatic
name: Publish to Chromatic
uses: chromaui/action@v11
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.19.0
22.3.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Command | Summary
`pnpm lint:fix` | Run all linters, fixing violations
`pnpm plop` | Add a new component/subcomponent
`pnpm test` | Run all [Jest](https://jestjs.io/) tests
`pnpm test:storybook` | Run tests on all Storybook stories
`pnpm storybook:test` | Run tests on all Storybook stories
`pnpm reset` | Reinstall all dependencies

## Bugs and discussions
Expand Down
2 changes: 1 addition & 1 deletion devbox.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/main/.schema/devbox.schema.json",
"packages": ["nodejs@18.19.0"],
"packages": ["nodejs@22.3.0"],
"env": {
"DEVBOX_COREPACK_ENABLED": "1",
"STORYBOOK_PORT": "6006"
Expand Down
32 changes: 16 additions & 16 deletions devbox.lock
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
{
"lockfile_version": "1",
"packages": {
"nodejs@18.19.0": {
"last_modified": "2024-02-10T18:15:24Z",
"nodejs@22.3.0": {
"last_modified": "2024-07-10T06:55:44Z",
"plugin_version": "0.0.2",
"resolved": "github:NixOS/nixpkgs/10b813040df67c4039086db0f6eaf65c536886c6#nodejs_18",
"resolved": "github:NixOS/nixpkgs/aa9461550594533c29866d42f861b6ff079a7fb6#nodejs_22",
"source": "devbox-search",
"version": "18.19.0",
"version": "22.3.0",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/10g4w66jc811y4qfl52w6an8w7yc264z-nodejs-18.19.0",
"path": "/nix/store/cpqfn567chsy7mslcfwnijsn6mq82lcq-nodejs-22.3.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/pvqg9z001qxiisfflgg29l9m8w2dxpvd-nodejs-18.19.0-libv8"
"path": "/nix/store/mfjmdqb1sxxm7r4d4px5r3p6m378kzy5-nodejs-22.3.0-libv8"
}
],
"store_path": "/nix/store/10g4w66jc811y4qfl52w6an8w7yc264z-nodejs-18.19.0"
"store_path": "/nix/store/cpqfn567chsy7mslcfwnijsn6mq82lcq-nodejs-22.3.0"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/cxd7bqzgflywrbdwk87w18g2iyvw4pgb-nodejs-18.19.0",
"path": "/nix/store/q7cgrvb6clq0pdp5hlwmq2lldzkl3fmj-nodejs-22.3.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/x255q68jmamac4p023w2436nzfsvm1j4-nodejs-18.19.0-libv8"
"path": "/nix/store/5df5695winsxzf80q6z0m35zy3p60yw1-nodejs-22.3.0-libv8"
}
],
"store_path": "/nix/store/cxd7bqzgflywrbdwk87w18g2iyvw4pgb-nodejs-18.19.0"
"store_path": "/nix/store/q7cgrvb6clq0pdp5hlwmq2lldzkl3fmj-nodejs-22.3.0"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/wh0igh0r3c1f1jmxzv8xrcbf0yyrwfd0-nodejs-18.19.0",
"path": "/nix/store/hd619h1mh6lcmv2kw6nij9xa0zf7ybmr-nodejs-22.3.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/j85nkl74mjpa4crvkrwmn260gnbs6g87-nodejs-18.19.0-libv8"
"path": "/nix/store/mipa00s8bq87h3p3allndvg43cpggz3w-nodejs-22.3.0-libv8"
}
],
"store_path": "/nix/store/wh0igh0r3c1f1jmxzv8xrcbf0yyrwfd0-nodejs-18.19.0"
"store_path": "/nix/store/hd619h1mh6lcmv2kw6nij9xa0zf7ybmr-nodejs-22.3.0"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/n06fynnjwvca37xmcj73n22hw7svp55c-nodejs-18.19.0",
"path": "/nix/store/bmvx7ww7qfksjqsckmivkg3mqvjscfh8-nodejs-22.3.0",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/d776nv39sf4dppbs9pb5il23cjwv0zk4-nodejs-18.19.0-libv8"
"path": "/nix/store/w28gijyq24mmk1676gpbxw2xrkysxx1i-nodejs-22.3.0-libv8"
}
],
"store_path": "/nix/store/n06fynnjwvca37xmcj73n22hw7svp55c-nodejs-18.19.0"
"store_path": "/nix/store/bmvx7ww7qfksjqsckmivkg3mqvjscfh8-nodejs-22.3.0"
}
}
}
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "kaizen",
"private": true,
"engines": {
"node": ">=v18.19.0"
"node": ">=v22.3.0"
},
"packageManager": "pnpm@9.5.0",
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "pnpm storybook",
"build": "pnpm turbo build",
"clean": "pnpm turbo clean && pnpm storybook:clean && rimraf node_modules",
"test": "pnpm turbo test",
Expand All @@ -15,9 +16,11 @@
"storybook:preview": "NODE_ENV=production pnpm storybook --docs",
"storybook:clean": "rm -rf storybook/public",
"storybook:build": "storybook build -c storybook -o storybook/public",
"storybook:build:test": "pnpm storybook:build --test",
"storybook:build:prod": "pnpm storybook:build --docs",
"test:storybook": "test-storybook --config-dir storybook --skipTags='skip-test' --url http://127.0.0.1:6006",
"storybook:test": "test-storybook --config-dir storybook --skipTags='skip-test' --url http://127.0.0.1:6006",
"turbo:storybook:build": "pnpm turbo storybook:build",
"turbo:storybook:build:chromatic-turbo-snap": "pnpm turbo storybook:build -- --stats-json",
"turbo:storybook:build:test": "pnpm turbo:storybook:build -- --test",
"turbo:storybook:build:prod": "pnpm turbo:storybook:build -- --docs",
"jest:debug": "node --inspect-brk node_modules/.bin/jest --runInBand --no-cache",
"lint:ts": "tsc --noEmit && pnpm turbo lint:ts",
"eslint-config": "pnpm eslint -c .eslintrc.js --max-warnings=0",
Expand Down
28 changes: 23 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
"clean": {
"cache": false
},
"//#storybook:build": {
"dependsOn": ["@kaizen/design-tokens#build", "@kaizen/tailwind#build"],
"outputs": ["storybook/public/**"],
"cache": false
},
"@kaizen/components#build": {
"dependsOn": [
"@kaizen/design-tokens#build",
Expand Down

0 comments on commit 6d0ec55

Please sign in to comment.