Skip to content

Commit 20b8c31

Browse files
authored
Require Node 22 (new LTS) for site infra (#6302)
This matches the latest `flutter/website` setup. You might need to update your Node version if you have a version before 22.10.
1 parent 283a3ac commit 20b8c31

File tree

7 files changed

+503
-434
lines changed

7 files changed

+503
-434
lines changed

.idx/dev.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# see: https://developers.google.com/idx/guides/customize-idx-env
33
{ pkgs, ... }: {
44
# Which nixpkgs channel to use.
5-
channel = "stable-24.05"; # or "unstable"
5+
channel = "stable-24.11"; # or "unstable"
66

77
# Use https://search.nixos.org/packages to find packages
88
packages = [

README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ We can stage the changes automatically in your pull request.
4646
> follow the below instruction on cloning with its submodule.
4747
4848
If your change involves code samples, adds/removes pages, or affects navigation,
49-
do consider building and test your work before submitting.
49+
do consider building and testing your work before submitting.
5050

5151
If you want or need to build the site, follow the steps below.
5252

@@ -84,7 +84,7 @@ If you prefer, you can use a version manager such as [nvm][],
8484
and run `nvm install` from the repository's root directory.
8585

8686
If you already have Node installed, verify it's available on your path
87-
and already the latest stable version _(currently `20.14` or later)_:
87+
and already the latest stable version _(currently `22.12` or later)_:
8888

8989
```terminal
9090
node --version
@@ -260,17 +260,16 @@ check out the [excerpt updater package documentation][].
260260

261261
## [Optional] Deploy to a staging site
262262

263-
Submitted pull requests can be automatically staged
264-
by a site maintainer.
265-
If you'd like to stage the site yourself though,
263+
A site maintainer can automatically stage submitted pull requests.
264+
If you'd like to first stage the site yourself,
266265
you can build a full version and upload it to Firebase.
267266

268267
1. If you don't already have a Firebase project,
269268

270269
- Navigate to the [Firebase Console](https://console.firebase.google.com)
271270
and create your own Firebase project (for example, `dart-dev-staging`).
272271

273-
- Head back to your local terminal and verify that you are logged in.
272+
- Head back to your local terminal and verify that you're logged in.
274273

275274
```terminal
276275
firebase login
@@ -289,7 +288,7 @@ you can build a full version and upload it to Firebase.
289288
./dash_site build
290289
```
291290

292-
This builds the site and copy it to your local `_site` directory.
291+
This builds the site and copies it to your local `_site` directory.
293292
If that directory previously existed, it will be replaced.
294293

295294
3. Deploy to your activated Firebase project's default hosting site:

cloud_build/deploy.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ steps:
1010
- '-c'
1111
- |-
1212
set -e
13-
13+
1414
npm install
1515
npm run build-site-for-production
16-
16+
1717
firebase deploy --project=dart-dev --only=hosting
1818
options:
1919
logging: CLOUD_LOGGING_ONLY

cloud_build/stage.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ steps:
88
- '-c'
99
- |-
1010
set -e
11-
11+
1212
npm install
1313
npm run build-site-for-staging
14-
14+
1515
cloud_build/scripts/stage_site_and_comment_on_github.sh
1616
secretEnv: ['GH_PAT_TOKEN']
1717
env:

dash_site

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

3-
REQUIRED_DART_VERSION="3.5"
4-
REQUIRED_NODE_VERSION="20.14"
5-
REQUIRED_PNPM_VERSION="9.4"
3+
REQUIRED_DART_VERSION="3.6"
4+
REQUIRED_NODE_VERSION="22.11"
5+
REQUIRED_PNPM_VERSION="9.12"
66

77
# Check that the 'dart' command is available on the user's path.
88
if ! command -v dart &> /dev/null; then

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
"build-site-for-production": "PRODUCTION=true OPTIMIZE=true tsx node_modules/@11ty/eleventy/cmd.cjs --config=eleventy.config.ts"
1515
},
1616
"engines": {
17-
"node": ">=20.14.0",
18-
"pnpm": ">=9.4.0"
17+
"node": ">=22.10.0",
18+
"pnpm": ">=9.12.3"
1919
},
20-
"packageManager": "pnpm@9.12.3",
20+
"packageManager": "pnpm@9.15.2",
2121
"dependencies": {
2222
"bootstrap-scss": "^4.6.2"
2323
},
2424
"devDependencies": {
2525
"@11ty/eleventy": "^3.0.0",
2626
"@types/hast": "^3.0.4",
2727
"@types/markdown-it": "^14.1.2",
28-
"@types/node": "^22.10.3",
28+
"@types/node": "^22.10.5",
2929
"firebase-tools": "^13.29.1",
3030
"hast-util-from-html": "^2.0.3",
3131
"hast-util-select": "^6.0.3",
@@ -37,8 +37,8 @@
3737
"markdown-it-attrs": "^4.3.1",
3838
"markdown-it-container": "^4.0.0",
3939
"markdown-it-deflist": "^3.0.0",
40-
"sass": "^1.83.0",
41-
"shiki": "^1.25.1",
40+
"sass": "^1.83.1",
41+
"shiki": "^1.26.1",
4242
"tsx": "^4.19.2"
4343
}
4444
}

0 commit comments

Comments
 (0)