Skip to content

Commit 9130dd9

Browse files
authored
build: update node dependency from v18 to v20 (#2671)
* build: update node dependency from v18 to v20 * chore: add changeset
1 parent 4e61eee commit 9130dd9

11 files changed

Lines changed: 28 additions & 27 deletions

File tree

.changeset/five-panthers-wonder.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@spectrum-css/preview": major
3+
"@spectrum-css/generator": major
4+
"@spectrum-tools/documentation": major
5+
---
6+
7+
Support for Node v18 dropped; upgraded to Node v20

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Validate successful build
44
# in several environments:
55
#
66
# Systems: Ubuntu, MacOS, // Windows
7-
# Node: 18
7+
# Node: 20
88
#
99
# After the build is successful, the compiled assets are uploaded as an artifact
1010
# to the workflow run. This allows us to download the compiled assets and use
@@ -21,7 +21,7 @@ on:
2121
default: "macos-latest"
2222
node-version:
2323
required: false
24-
default: "18"
24+
default: "20"
2525
experimental:
2626
required: false
2727
default: "false"
@@ -37,7 +37,7 @@ on:
3737
node-version:
3838
required: false
3939
type: string
40-
default: "18"
40+
default: "20"
4141
experimental:
4242
required: false
4343
type: boolean

.github/workflows/compare-results.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: Use Node LTS version
5353
uses: actions/setup-node@v4
5454
with:
55-
node-version: 18
55+
node-version: 20
5656
cache: yarn
5757
cache-dependency-path: yarn.lock
5858

@@ -68,7 +68,7 @@ jobs:
6868
path: |
6969
.cache/yarn
7070
node_modules
71-
key: ubuntu-latest-node18-${{ hashFiles('yarn.lock') }}
71+
key: ubuntu-latest-node20-${{ hashFiles('yarn.lock') }}
7272

7373
## --- INSTALL --- ##
7474
# note: if cache-hit isn't needed b/c yarn will leverage the cache if it exists
@@ -88,13 +88,13 @@ jobs:
8888
- name: Download build artifacts for head
8989
uses: actions/download-artifact@v4
9090
with:
91-
name: ubuntu-latest-node18-compiled-assets-${{ steps.derive-key.outputs.head-path }}
91+
name: ubuntu-latest-node20-compiled-assets-${{ steps.derive-key.outputs.head-path }}
9292
path: ${{ github.workspace }}/${{ steps.derive-key.outputs.head-path }}
9393

9494
- name: Download build artifacts for base
9595
uses: actions/download-artifact@v4
9696
with:
97-
name: ubuntu-latest-node18-compiled-assets-${{ steps.derive-key.outputs.base-path }}
97+
name: ubuntu-latest-node20-compiled-assets-${{ steps.derive-key.outputs.base-path }}
9898
path: ${{ github.workspace }}/${{ steps.derive-key.outputs.base-path }}
9999

100100
- name: Compare compiled output file size
@@ -153,7 +153,7 @@ jobs:
153153
run: |
154154
BRANCH=${{ matrix.branch }}
155155
BRANCH=${BRANCH//\//_}
156-
echo "key=ubuntu-latest-node18-compiled-assets-${BRANCH}" >> "$GITHUB_OUTPUT"
156+
echo "key=ubuntu-latest-node20-compiled-assets-${BRANCH}" >> "$GITHUB_OUTPUT"
157157
158158
- name: Check if build artifacts already exist
159159
uses: actions/download-artifact@v4
@@ -177,7 +177,7 @@ jobs:
177177
- name: Use Node LTS version
178178
uses: actions/setup-node@v4
179179
with:
180-
node-version: 18
180+
node-version: 20
181181
cache: yarn
182182

183183
- name: Enable Corepack
@@ -192,7 +192,7 @@ jobs:
192192
path: |
193193
.cache/yarn
194194
node_modules
195-
key: ubuntu-latest-node18-${{ hashFiles('yarn.lock') }}
195+
key: ubuntu-latest-node20-${{ hashFiles('yarn.lock') }}
196196

197197
## --- INSTALL --- ##
198198
# note: if cache-hit isn't needed b/c yarn will leverage the cache if it exists

.github/workflows/development.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,11 @@ jobs:
5454
- ubuntu-latest
5555
# - windows-latest # todo: debug token style-dictionary failures on windows
5656
node-version:
57-
- 18
58-
experimental:
59-
- false
60-
include:
61-
- node-version: 20
62-
experimental: true
57+
- 20
6358
uses: ./.github/workflows/build.yml
6459
with:
6560
system: ${{ matrix.system }}
6661
node-version: ${{ matrix.node-version }}
67-
experimental: ${{ matrix.experimental }}
6862
secrets: inherit
6963

7064
# -------------------------------------------------------------

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Use Node LTS version
5454
uses: actions/setup-node@v4
5555
with:
56-
node-version: 18
56+
node-version: 20
5757
cache: yarn
5858

5959
- name: Enable Corepack
@@ -68,7 +68,7 @@ jobs:
6868
path: |
6969
.cache/yarn
7070
node_modules
71-
key: ubuntu-latest-node18-${{ hashFiles('yarn.lock') }}
71+
key: ubuntu-latest-node20-${{ hashFiles('yarn.lock') }}
7272

7373
## --- INSTALL --- ##
7474
# If statement isn't needed here b/c yarn will leverage the cache if it exists

.github/workflows/production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- macos-latest
3838
- ubuntu-latest
3939
node-version:
40-
- 18
40+
- 20
4141
uses: ./.github/workflows/build.yml
4242
with:
4343
system: ${{ matrix.system }}

.github/workflows/publish-site.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: Use Node LTS version
5252
uses: actions/setup-node@v4
5353
with:
54-
node-version: 18
54+
node-version: 20
5555
cache: yarn
5656

5757
- name: Enable Corepack
@@ -66,7 +66,7 @@ jobs:
6666
path: |
6767
.cache/yarn
6868
node_modules
69-
key: ubuntu-latest-node18-${{ hashFiles('yarn.lock') }}
69+
key: ubuntu-latest-node20-${{ hashFiles('yarn.lock') }}
7070

7171
## --- INSTALL --- ##
7272
# note: if cache-hit isn't needed b/c yarn will leverage the cache if it exists

.github/workflows/vrt.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Use Node LTS version
3636
uses: actions/setup-node@v4
3737
with:
38-
node-version: 18
38+
node-version: 20
3939
cache: yarn
4040

4141
- name: Enable Corepack
@@ -50,7 +50,7 @@ jobs:
5050
path: |
5151
.cache/yarn
5252
node_modules
53-
key: ubuntu-latest-node18-${{ hashFiles('yarn.lock') }}
53+
key: ubuntu-latest-node20-${{ hashFiles('yarn.lock') }}
5454

5555
## --- INSTALL --- ##
5656
- name: Install dependencies

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.*
1+
20.*

.storybook/guides/develop.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ For more general information about how to contribute to the Spectrum CSS project
2424

2525
## Prerequisites
2626

27-
- [Node.js](https://nodejs.org/en/) (v18 or later)
27+
- [Node.js](https://nodejs.org/en/) (v20 or later)
2828
- [Yarn](https://yarnpkg.com/getting-started/install)
2929

3030
## Architecture

0 commit comments

Comments
 (0)