Skip to content

Commit

Permalink
Node 22 (#52828)
Browse files Browse the repository at this point in the history
  • Loading branch information
heiskr authored Oct 22, 2024
1 parent eaa13fa commit 2f294e4
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# To find available Node images, see https://mcr.microsoft.com/en-us/product/devcontainers/javascript-node/tags

# [Choice] Node.js version
ARG VARIANT="dev-20-bullseye"
ARG VARIANT="dev-22-bullseye"
FROM mcr.microsoft.com/devcontainers/javascript-node:${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
Expand Down
110 changes: 55 additions & 55 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,67 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/javascript-node
// -
{
"name": "docs.github.com",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version
"args": { "VARIANT": "20" }
},
"name": "docs.github.com",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version
"args": { "VARIANT": "22" }
},

// Install features. Type 'feature' in the VS Code command palette for a full list.
"features": {
"sshd": "latest"
},
// Install features. Type 'feature' in the VS Code command palette for a full list.
"features": {
"sshd": "latest"
},

"customizations": {
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"cSpell.language": ",en"
},
// Visual Studio Code extensions which help authoring for docs.github.com.
"extensions": [
"dbaeumer.vscode-eslint",
"sissel.shopify-liquid",
"davidanson.vscode-markdownlint",
"bierner.markdown-preview-github-styles",
"streetsidesoftware.code-spell-checker",
"alistairchristie.open-reusables",
"AlistairChristie.version-identifier",
"peterbe.ghdocs-goer",
"GitHub.copilot",
"GitHub.copilot-chat"
]
},
"codespaces": {
"repositories": {
// allow Codespaces to pull from separate repo when user has access
"github/docs-early-access": {
"permissions": {
"contents": "write"
}
}
}
}
"customizations": {
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"cSpell.language": ",en"
},
// Visual Studio Code extensions which help authoring for docs.github.com.
"extensions": [
"dbaeumer.vscode-eslint",
"sissel.shopify-liquid",
"davidanson.vscode-markdownlint",
"bierner.markdown-preview-github-styles",
"streetsidesoftware.code-spell-checker",
"alistairchristie.open-reusables",
"AlistairChristie.version-identifier",
"peterbe.ghdocs-goer",
"GitHub.copilot",
"GitHub.copilot-chat"
]
},
"codespaces": {
"repositories": {
// allow Codespaces to pull from separate repo when user has access
"github/docs-early-access": {
"permissions": {
"contents": "write"
}
}
}
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [4000],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [4000],

"portsAttributes": {
"4000": {
"label": "Preview"
}
},
"portsAttributes": {
"4000": {
"label": "Preview"
}
},

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm ci",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm ci",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",

"hostRequirements": {
"memory": "8gb"
}
"hostRequirements": {
"memory": "8gb"
}
}
3 changes: 1 addition & 2 deletions .github/workflows/local-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
- name: Check out repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Install dependencies
run: npm install
- uses: ./.github/actions/node-npm-setup

- uses: ./.github/actions/get-docs-early-access
if: ${{ github.repository == 'github/docs-internal' }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# --------------------------------------------------------------------------------
# To update the sha, run `docker pull node:$VERSION-alpine`
# look for something like: `Digest: sha256:0123456789abcdef`
FROM node:20-alpine@sha256:66f7f89199daea88a6b5d5aadaa6d20f7a16a90fc35274deda8e901e267d4bd7 AS base
FROM node:22-alpine@sha256:c13b26e7e602ef2f1074aef304ce6e9b7dd284c419b35d89fcf3cc8e44a8def9 AS base

# This directory is owned by the node user
ARG APP_HOME=/home/node/app
Expand Down
57 changes: 26 additions & 31 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,12 @@
"devDependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^6.0.0",
"@axe-core/playwright": "^4.9.1",
"@axe-core/playwright": "^4.10.0",
"@github/markdownlint-github": "^0.6.2",
"@graphql-inspector/core": "^6.1.0",
"@graphql-tools/load": "^8.0.0",
"@octokit/rest": "21.0.2",
"@playwright/test": "1.46.1",
"@playwright/test": "^1.48.1",
"@types/accept-language-parser": "1.5.6",
"@types/connect-datadog": "0.0.10",
"@types/connect-timeout": "0.0.39",
Expand Down Expand Up @@ -391,7 +391,7 @@
"esm": "^3.2.25"
},
"engines": {
"node": "^18 || ^20 || ^22"
"node": "^20 || ^22"
},
"cacheDirectories": [
"node_modules",
Expand Down

1 comment on commit 2f294e4

@Erinalija

This comment was marked as spam.

Please sign in to comment.