Skip to content

Commit

Permalink
Require Node 22 (new LTS) for site infra (#6302)
Browse files Browse the repository at this point in the history
This matches the latest `flutter/website` setup.

You might need to update your Node version if you have a version before
22.10.
  • Loading branch information
parlough authored Jan 7, 2025
1 parent 283a3ac commit 20b8c31
Show file tree
Hide file tree
Showing 7 changed files with 503 additions and 434 deletions.
2 changes: 1 addition & 1 deletion .idx/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# see: https://developers.google.com/idx/guides/customize-idx-env
{ pkgs, ... }: {
# Which nixpkgs channel to use.
channel = "stable-24.05"; # or "unstable"
channel = "stable-24.11"; # or "unstable"

# Use https://search.nixos.org/packages to find packages
packages = [
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ We can stage the changes automatically in your pull request.
> follow the below instruction on cloning with its submodule.
If your change involves code samples, adds/removes pages, or affects navigation,
do consider building and test your work before submitting.
do consider building and testing your work before submitting.

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

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

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

```terminal
node --version
Expand Down Expand Up @@ -260,17 +260,16 @@ check out the [excerpt updater package documentation][].

## [Optional] Deploy to a staging site

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

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

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

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

```terminal
firebase login
Expand All @@ -289,7 +288,7 @@ you can build a full version and upload it to Firebase.
./dash_site build
```

This builds the site and copy it to your local `_site` directory.
This builds the site and copies it to your local `_site` directory.
If that directory previously existed, it will be replaced.

3. Deploy to your activated Firebase project's default hosting site:
Expand Down
4 changes: 2 additions & 2 deletions cloud_build/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ steps:
- '-c'
- |-
set -e
npm install
npm run build-site-for-production
firebase deploy --project=dart-dev --only=hosting
options:
logging: CLOUD_LOGGING_ONLY
4 changes: 2 additions & 2 deletions cloud_build/stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ steps:
- '-c'
- |-
set -e
npm install
npm run build-site-for-staging
cloud_build/scripts/stage_site_and_comment_on_github.sh
secretEnv: ['GH_PAT_TOKEN']
env:
Expand Down
6 changes: 3 additions & 3 deletions dash_site
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

REQUIRED_DART_VERSION="3.5"
REQUIRED_NODE_VERSION="20.14"
REQUIRED_PNPM_VERSION="9.4"
REQUIRED_DART_VERSION="3.6"
REQUIRED_NODE_VERSION="22.11"
REQUIRED_PNPM_VERSION="9.12"

# Check that the 'dart' command is available on the user's path.
if ! command -v dart &> /dev/null; then
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
"build-site-for-production": "PRODUCTION=true OPTIMIZE=true tsx node_modules/@11ty/eleventy/cmd.cjs --config=eleventy.config.ts"
},
"engines": {
"node": ">=20.14.0",
"pnpm": ">=9.4.0"
"node": ">=22.10.0",
"pnpm": ">=9.12.3"
},
"packageManager": "pnpm@9.12.3",
"packageManager": "pnpm@9.15.2",
"dependencies": {
"bootstrap-scss": "^4.6.2"
},
"devDependencies": {
"@11ty/eleventy": "^3.0.0",
"@types/hast": "^3.0.4",
"@types/markdown-it": "^14.1.2",
"@types/node": "^22.10.3",
"@types/node": "^22.10.5",
"firebase-tools": "^13.29.1",
"hast-util-from-html": "^2.0.3",
"hast-util-select": "^6.0.3",
Expand All @@ -37,8 +37,8 @@
"markdown-it-attrs": "^4.3.1",
"markdown-it-container": "^4.0.0",
"markdown-it-deflist": "^3.0.0",
"sass": "^1.83.0",
"shiki": "^1.25.1",
"sass": "^1.83.1",
"shiki": "^1.26.1",
"tsx": "^4.19.2"
}
}
Loading

0 comments on commit 20b8c31

Please sign in to comment.