From 2f294e40ee112cc166ee9c03ae501ff9d5077f5f Mon Sep 17 00:00:00 2001 From: Kevin Heis Date: Tue, 22 Oct 2024 11:06:43 -0700 Subject: [PATCH] Node 22 (#52828) --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 110 ++++++++++++++++---------------- .github/workflows/local-dev.yml | 3 +- Dockerfile | 2 +- package-lock.json | 57 ++++++++--------- package.json | 6 +- 6 files changed, 87 insertions(+), 93 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c035216fb2e4..4a39ced8cf21 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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. diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e9645b9ec918..021cf63593e5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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" + } } diff --git a/.github/workflows/local-dev.yml b/.github/workflows/local-dev.yml index 885c9f6ea631..360dd408201d 100644 --- a/.github/workflows/local-dev.yml +++ b/.github/workflows/local-dev.yml @@ -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' }} diff --git a/Dockerfile b/Dockerfile index 38cd737ac299..dd9033bb3752 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/package-lock.json b/package-lock.json index 1ae70a209830..b4056d6ae6a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -102,12 +102,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", @@ -169,7 +169,7 @@ "website-scraper": "^5.3.1" }, "engines": { - "node": "^18 || ^20 || ^22" + "node": "^20 || ^22" }, "optionalDependencies": { "esm": "^3.2.25" @@ -385,12 +385,13 @@ } }, "node_modules/@axe-core/playwright": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.9.1.tgz", - "integrity": "sha512-8m4WZbZq7/aq7ZY5IG8GqV+ZdvtGn/iJdom+wBg+iv/3BAOBIfNQtIu697a41438DzEEyptXWmC3Xl5Kx/o9/g==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.10.0.tgz", + "integrity": "sha512-kEr3JPEVUSnKIYp/egV2jvFj+chIjCjPp3K3zlpJMza/CB3TFw8UZNbI9agEC2uMz4YbgAOyzlbUy0QS+OofFA==", "dev": true, + "license": "MPL-2.0", "dependencies": { - "axe-core": "~4.9.1" + "axe-core": "~4.10.0" }, "peerDependencies": { "playwright-core": ">= 1.0.0" @@ -2604,12 +2605,13 @@ } }, "node_modules/@playwright/test": { - "version": "1.46.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.46.1.tgz", - "integrity": "sha512-Fq6SwLujA/DOIvNC2EL/SojJnkKf/rAwJ//APpJJHRyMi1PdKrY3Az+4XNQ51N4RTbItbIByQ0jgd1tayq1aeA==", + "version": "1.48.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.48.1.tgz", + "integrity": "sha512-s9RtWoxkOLmRJdw3oFvhFbs9OJS0BzrLUc8Hf6l2UdCNd1rqeEyD4BhCJkvzeEoD1FsK4mirsWwGerhVmYKtZg==", "devOptional": true, + "license": "Apache-2.0", "dependencies": { - "playwright": "1.46.1" + "playwright": "1.48.1" }, "bin": { "playwright": "cli.js" @@ -4113,10 +4115,11 @@ } }, "node_modules/axe-core": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.9.1.tgz", - "integrity": "sha512-QbUdXJVTpvUTHU7871ppZkdOLBeGUKBQWHkHrvN2V9IQWGMt61zf3B45BtzjxEJzYuj0JBjBZP/hmYS/R9pmAw==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.1.tgz", + "integrity": "sha512-qPC9o+kD8Tir0lzNGLeghbOrWMr3ZJpaRlCIb6Uobt/7N4FiEDvqUMnxzCHRHmg8vOg14kr5gVNyScRmbMaJ9g==", "dev": true, + "license": "MPL-2.0", "engines": { "node": ">=4" } @@ -6112,16 +6115,6 @@ "deep-equal": "^2.0.5" } }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/axe-core": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.0.tgz", - "integrity": "sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==", - "dev": true, - "license": "MPL-2.0", - "engines": { - "node": ">=4" - } - }, "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -11545,12 +11538,13 @@ } }, "node_modules/playwright": { - "version": "1.46.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.46.1.tgz", - "integrity": "sha512-oPcr1yqoXLCkgKtD5eNUPLiN40rYEM39odNpIb6VE6S7/15gJmA1NzVv6zJYusV0e7tzvkU/utBFNa/Kpxmwng==", + "version": "1.48.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.48.1.tgz", + "integrity": "sha512-j8CiHW/V6HxmbntOfyB4+T/uk08tBy6ph0MpBXwuoofkSnLmlfdYNNkFTYD6ofzzlSqLA1fwH4vwvVFvJgLN0w==", "devOptional": true, + "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.46.1" + "playwright-core": "1.48.1" }, "bin": { "playwright": "cli.js" @@ -11563,10 +11557,11 @@ } }, "node_modules/playwright-core": { - "version": "1.46.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.46.1.tgz", - "integrity": "sha512-h9LqIQaAv+CYvWzsZ+h3RsrqCStkBHlgo6/TJlFst3cOTlLghBQlJwPOZKQJTKNaD3QIB7aAVQ+gfWbN3NXB7A==", + "version": "1.48.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.48.1.tgz", + "integrity": "sha512-Yw/t4VAFX/bBr1OzwCuOMZkY1Cnb4z/doAFSwf4huqAGWmf9eMNjmK7NiOljCdLmxeRYcGPPmcDgU0zOlzP0YA==", "devOptional": true, + "license": "Apache-2.0", "bin": { "playwright-core": "cli.js" }, diff --git a/package.json b/package.json index d9ee1dcd7ebe..6fe196f906ed 100644 --- a/package.json +++ b/package.json @@ -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", @@ -391,7 +391,7 @@ "esm": "^3.2.25" }, "engines": { - "node": "^18 || ^20 || ^22" + "node": "^20 || ^22" }, "cacheDirectories": [ "node_modules",