From b91d245adabf6e812349ba6ec68ebddf5411c39b Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Sat, 22 Feb 2025 00:21:43 +0000 Subject: [PATCH] node.js v22 min --- .devcontainer/devcontainer.json | 2 +- .github/workflows/anthropic.yml | 2 +- .github/workflows/azure.yml | 2 +- .github/workflows/build-genai-commit.yml_ | 2 +- .github/workflows/build-genai.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/cli-test.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/genai-azure-service-principal.yml | 2 +- .github/workflows/genai-blog-post.yml | 2 +- .github/workflows/genai-commander.yml | 2 +- .github/workflows/genai-investigator.yml | 2 +- .github/workflows/genai-issue-review.yml | 2 +- .github/workflows/genai-pr-commit-review.yml | 2 +- .github/workflows/genai-pr-docs-commit-review.yml | 2 +- .github/workflows/genai-pr-review.yml | 2 +- .github/workflows/google.yml | 2 +- .github/workflows/huggingface.yml | 2 +- .github/workflows/licenses.yml | 2 +- .github/workflows/npm-check.yml | 6 +++--- .github/workflows/npm-publish.yml | 2 +- .github/workflows/ollama.yml | 2 +- .github/workflows/openai.yml | 2 +- .github/workflows/playwright.yml | 2 +- Dockerfile | 4 ++-- docs/src/content/docs/getting-started/installation.mdx | 4 ++-- docs/src/content/docs/reference/scripts/container.md | 2 +- genaisrc/blog-generator.genai.mts | 2 +- packages/cli/.devcontainer/devcontainer.json | 2 +- packages/cli/package.json | 2 +- packages/sample/src/tla/PR.yml | 2 +- 31 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b0f49f29ea..11d303136b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "mcr.microsoft.com/devcontainers/javascript-node:20", + "image": "mcr.microsoft.com/devcontainers/javascript-node:22", "postCreateCommand": "yarn install --frozen-lockfile --prefer-offline && yarn install:playwright", "customizations": { "vscode": { diff --git a/.github/workflows/anthropic.yml b/.github/workflows/anthropic.yml index ccfe2b0369..54ec48f8e0 100644 --- a/.github/workflows/anthropic.yml +++ b/.github/workflows/anthropic.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/azure.yml b/.github/workflows/azure.yml index 2a0b4bbc9a..d93ffc2942 100644 --- a/.github/workflows/azure.yml +++ b/.github/workflows/azure.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/build-genai-commit.yml_ b/.github/workflows/build-genai-commit.yml_ index 74f88951a2..c567726862 100644 --- a/.github/workflows/build-genai-commit.yml_ +++ b/.github/workflows/build-genai-commit.yml_ @@ -23,7 +23,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/build-genai.yml b/.github/workflows/build-genai.yml index e565b5d1ea..874112f8f4 100644 --- a/.github/workflows/build-genai.yml +++ b/.github/workflows/build-genai.yml @@ -17,7 +17,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b065f635b..0053afb4c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [20, 22, 23] + node-version: [22, 23] steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/cli-test.yml b/.github/workflows/cli-test.yml index b9eb1a892d..20d8485af7 100644 --- a/.github/workflows/cli-test.yml +++ b/.github/workflows/cli-test.yml @@ -12,7 +12,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 19bbff52b6..fe13d49481 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,7 +18,7 @@ jobs: fetch-depth: 10 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - run: yarn playwright install diff --git a/.github/workflows/genai-azure-service-principal.yml b/.github/workflows/genai-azure-service-principal.yml index d24b40e69c..25d409563c 100644 --- a/.github/workflows/genai-azure-service-principal.yml +++ b/.github/workflows/genai-azure-service-principal.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/genai-blog-post.yml b/.github/workflows/genai-blog-post.yml index fa0568a023..833357544f 100644 --- a/.github/workflows/genai-blog-post.yml +++ b/.github/workflows/genai-blog-post.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 10 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/genai-commander.yml b/.github/workflows/genai-commander.yml index d0ad58b1ac..1a6605e9ce 100644 --- a/.github/workflows/genai-commander.yml +++ b/.github/workflows/genai-commander.yml @@ -61,7 +61,7 @@ jobs: # - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - name: install dependencies run: yarn install --frozen-lockfile diff --git a/.github/workflows/genai-investigator.yml b/.github/workflows/genai-investigator.yml index 0227665bef..8d3b9c54b5 100644 --- a/.github/workflows/genai-investigator.yml +++ b/.github/workflows/genai-investigator.yml @@ -30,7 +30,7 @@ jobs: fetch-depth: 10 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/genai-issue-review.yml b/.github/workflows/genai-issue-review.yml index b321c7d3ff..a76280f7dc 100644 --- a/.github/workflows/genai-issue-review.yml +++ b/.github/workflows/genai-issue-review.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 10 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/genai-pr-commit-review.yml b/.github/workflows/genai-pr-commit-review.yml index 91ad511936..83ed813aba 100644 --- a/.github/workflows/genai-pr-commit-review.yml +++ b/.github/workflows/genai-pr-commit-review.yml @@ -25,7 +25,7 @@ jobs: fetch-depth: 10 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/genai-pr-docs-commit-review.yml b/.github/workflows/genai-pr-docs-commit-review.yml index 47d5d6ed47..e01a55b644 100644 --- a/.github/workflows/genai-pr-docs-commit-review.yml +++ b/.github/workflows/genai-pr-docs-commit-review.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 10 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/genai-pr-review.yml b/.github/workflows/genai-pr-review.yml index c3859ed077..a9cc2a9608 100644 --- a/.github/workflows/genai-pr-review.yml +++ b/.github/workflows/genai-pr-review.yml @@ -30,7 +30,7 @@ jobs: fetch-depth: 10 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/google.yml b/.github/workflows/google.yml index 7a086bfe2f..aba744e380 100644 --- a/.github/workflows/google.yml +++ b/.github/workflows/google.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/huggingface.yml b/.github/workflows/huggingface.yml index 6ae8b8aef5..f8ce4de9da 100644 --- a/.github/workflows/huggingface.yml +++ b/.github/workflows/huggingface.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/licenses.yml b/.github/workflows/licenses.yml index 387ae58ec6..cad84b378a 100644 --- a/.github/workflows/licenses.yml +++ b/.github/workflows/licenses.yml @@ -23,7 +23,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - run: yarn compile diff --git a/.github/workflows/npm-check.yml b/.github/workflows/npm-check.yml index ce91e6ba16..7c3092ece9 100644 --- a/.github/workflows/npm-check.yml +++ b/.github/workflows/npm-check.yml @@ -9,19 +9,19 @@ jobs: steps: - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" - run: npx --yes genaiscript --help windows: runs-on: windows-latest steps: - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" - run: npx --yes genaiscript --help macos: runs-on: macos-latest steps: - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" - run: npx --yes genaiscript --help diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 0999962418..8ec8a7e179 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version: "22.x" registry-url: "https://npm.pkg.github.com" cache: yarn - run: yarn install diff --git a/.github/workflows/ollama.yml b/.github/workflows/ollama.yml index 6c85fd50d7..64bdd00e31 100644 --- a/.github/workflows/ollama.yml +++ b/.github/workflows/ollama.yml @@ -30,7 +30,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/openai.yml b/.github/workflows/openai.yml index b165ac15a4..c838ef910d 100644 --- a/.github/workflows/openai.yml +++ b/.github/workflows/openai.yml @@ -14,7 +14,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 3154168ac2..3248f7ede3 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -28,7 +28,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: yarn - run: yarn install --frozen-lockfile - name: compile diff --git a/Dockerfile b/Dockerfile index f010fdbfc8..a82e44d1dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build -FROM node:20-alpine as build +FROM node:22-alpine as build WORKDIR /app COPY . /app @@ -12,7 +12,7 @@ RUN apk update --no-cache && \ # Prod -FROM node:20-alpine +FROM node:22-alpine # Copy the necessary files from the build stage COPY --from=build /app/packages/cli/built /app/packages/cli/built diff --git a/docs/src/content/docs/getting-started/installation.mdx b/docs/src/content/docs/getting-started/installation.mdx index ba0e6a0eca..933da8dd08 100644 --- a/docs/src/content/docs/getting-started/installation.mdx +++ b/docs/src/content/docs/getting-started/installation.mdx @@ -48,8 +48,8 @@ npx -v You should see something similar or higher than the following versions: ```text -v20.11.1 -10.5.0 +v22.13.0 +10.9.2 ``` diff --git a/docs/src/content/docs/reference/scripts/container.md b/docs/src/content/docs/reference/scripts/container.md index 5b6d8d4453..d84f2e8c90 100644 --- a/docs/src/content/docs/reference/scripts/container.md +++ b/docs/src/content/docs/reference/scripts/container.md @@ -34,7 +34,7 @@ const container = await host.container() By default, the container uses the [python:alpine](https://hub.docker.com/_/python/) image, which provides a minimal python environment. You can change the image using the `image` option. ```js 'image: "python:3"' -const container = await host.container({ image: "node:20" }) +const container = await host.container({ image: "node:22" }) ``` ### Building images diff --git a/genaisrc/blog-generator.genai.mts b/genaisrc/blog-generator.genai.mts index bbad4b80fe..08c8e615dd 100644 --- a/genaisrc/blog-generator.genai.mts +++ b/genaisrc/blog-generator.genai.mts @@ -93,7 +93,7 @@ let snippet: string | Fenced Use these files to help you generate a topic for the blog post. - - the code will be executed in node.js v20 by the GenAIScript CLI + - the code will be executed in node.js v22 by the GenAIScript CLI - the genaiscript type definition: genaisrc/genaiscript.d.ts. Assume that all globals are ambient. Do not import or require genaiscript module. - the genaiscript samples: packages/sample/src/*.genai.* - the documentation is in markdown and has frontmatter: docs/src/content/docs/**/*.md* diff --git a/packages/cli/.devcontainer/devcontainer.json b/packages/cli/.devcontainer/devcontainer.json index 6fe836fb37..261c6dd2e8 100644 --- a/packages/cli/.devcontainer/devcontainer.json +++ b/packages/cli/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "mcr.microsoft.com/devcontainers/javascript-node:20", + "image": "mcr.microsoft.com/devcontainers/javascript-node:22", "customizations": { "vscode": { "extensions": [ diff --git a/packages/cli/package.json b/packages/cli/package.json index 6054c9cff6..768df3284a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -89,7 +89,7 @@ "web-tree-sitter": "0.22.2" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.0.0" }, "peerDependencies": { "promptfoo": "0.104.0" diff --git a/packages/sample/src/tla/PR.yml b/packages/sample/src/tla/PR.yml index abffe10b12..8ad309367e 100644 --- a/packages/sample/src/tla/PR.yml +++ b/packages/sample/src/tla/PR.yml @@ -31,7 +31,7 @@ jobs: ## https://github.com/actions/setup-node uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" - name: Run GenAIscript on the TLA+ specs that are added in this pull request. ## Identify git diff: $(git diff --name-only HEAD^ | grep '.tla')