Skip to content

Commit 386ef5b

Browse files
sararobcopybara-github
authored andcommitted
feat: Update minimum supported Node version to Node 20
FUTURE_COPYBARA_INTEGRATE_REVIEW=#596 from googleapis:release-please--branches--main--components--vertexai 489440d PiperOrigin-RevId: 899095779
1 parent 73d18da commit 386ef5b

File tree

8 files changed

+66
-6
lines changed

8 files changed

+66
-6
lines changed

.kokoro/presubmit/node22/docs.cfg

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# doc publications use a Python image.
2+
env_vars: {
3+
key: "TRAMPOLINE_IMAGE"
4+
value: "gcr.io/cloud-devrel-kokoro-resources/node:18-user"
5+
}
6+
7+
# Download trampoline resources.
8+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
9+
10+
# Use the trampoline script to run in docker.
11+
build_file: "nodejs-vertexai/.kokoro/trampoline_v2.sh"
12+
13+
env_vars: {
14+
key: "TRAMPOLINE_BUILD_FILE"
15+
value: "github/nodejs-vertexai/.kokoro/presubmit/node22/docs.sh"
16+
}

.kokoro/presubmit/node22/docs.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
# Copyright 2023 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
set -eo pipefail
19+
20+
if [[ -z "$CREDENTIALS" ]]; then
21+
# if CREDENTIALS are explicitly set, assume we're testing locally
22+
# and don't set NPM_CONFIG_PREFIX.
23+
export NPM_CONFIG_PREFIX=${HOME}/.npm-global
24+
export PATH="$PATH:${NPM_CONFIG_PREFIX}/bin"
25+
cd $(dirname $0)/../..
26+
fi
27+
28+
npm install
29+
npm install --no-save @google-cloud/cloud-rad@^0.4.0
30+
31+
# Switch to 'fail at end' to allow tar command to complete before exiting.
32+
set +e
33+
34+
# publish docs to devsite
35+
NO_UPLOAD=1 npx @google-cloud/cloud-rad . cloud-rad
36+
37+
tar cvfz docs.tar.gz yaml
38+
39+
if [[ $EXIT -ne 0 ]]; then
40+
echo -e "\n Generate docs failed: npx returned a non-zero exit code. \n"
41+
exit $EXIT
42+
fi
43+
44+
set -e

.kokoro/release/docs-devsite.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ before_action {
1111
# doc publications use a Python image.
1212
env_vars: {
1313
key: "TRAMPOLINE_IMAGE"
14-
value: "us-central1-docker.pkg.dev/cloud-sdk-release-custom-pool/release-images/node18"
14+
value: "us-central1-docker.pkg.dev/client-library-releases/release-images-prod/node22@sha256:036e3bd61ff8c9a5990695f6a8d63db9f1867e78007baf23ef53d361413123e1"
1515
}
1616

1717
# Download trampoline resources.

.kokoro/release/docs.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ before_action {
1111
# doc publications use a Python image.
1212
env_vars: {
1313
key: "TRAMPOLINE_IMAGE"
14-
value: "us-central1-docker.pkg.dev/cloud-sdk-release-custom-pool/release-images/node18"
14+
value: "us-central1-docker.pkg.dev/client-library-releases/release-images-prod/node22@sha256:036e3bd61ff8c9a5990695f6a8d63db9f1867e78007baf23ef53d361413123e1"
1515
}
1616

1717
# Download trampoline resources.

.kokoro/release/publish.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ build_file: "nodejs-vertexai/.kokoro/trampoline_v2.sh"
3030
# Configure the docker image for kokoro-trampoline.
3131
env_vars: {
3232
key: "TRAMPOLINE_IMAGE"
33-
value: "us-central1-docker.pkg.dev/cloud-sdk-release-custom-pool/release-images/node18"
33+
value: "us-central1-docker.pkg.dev/client-library-releases/release-images-prod/node22@sha256:036e3bd61ff8c9a5990695f6a8d63db9f1867e78007baf23ef53d361413123e1"
3434
}
3535

3636
env_vars: {

.kokoro/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ npm test
3939

4040
# codecov combines coverage across integration and unit tests. Include
4141
# the logic below for any environment you wish to collect coverage for:
42-
COVERAGE_NODE=14
42+
COVERAGE_NODE=22
4343
if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then
4444
NYC_BIN=./node_modules/nyc/bin/nyc.js
4545
if [ -f "$NYC_BIN" ]; then

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ page in Vertex AI documentation.
2424

2525
## Before you begin
2626

27-
1. Make sure your node.js version is 18 or above.
27+
1. Make sure your node.js version is 20 or above.
2828
1. [Select](https://console.cloud.google.com/project) or [create](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project) a Google Cloud project.
2929
1. [Enable billing for your project](https://cloud.google.com/billing/docs/how-to/modify-project).
3030
1. [Enable the Vertex AI API](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com).

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "Apache-2.0",
66
"author": "Google LLC",
77
"engines": {
8-
"node": ">=18.0.0"
8+
"node": ">=20.0.0"
99
},
1010
"homepage": "https://github.com/googleapis/nodejs-vertexai",
1111
"repository": "googleapis/nodejs-vertexai",

0 commit comments

Comments
 (0)