From 81dc99b4589fcaab33c3c5f8a6e3e127def99ca6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 02:30:27 -0800 Subject: [PATCH] chore!: upgrade to Node 14 (#245) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(nodejs): Add `system-test/fixtures` to `.eslintignore` * fix: Add `system-test/fixtures` to `.eslintignore` * refactor: Use `**` Source-Link: https://github.com/googleapis/synthtool/commit/b7858ba70e8acabc89d13558a71dd9318a57034a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:abc68a9bbf4fa808b25fa16d3b11141059dc757dbc34f024744bba36c200b40f * chore!: update to Node 14 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: Sofia Leon Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .eslintignore | 1 + .github/.OwlBot.lock.yaml | 3 ++- .github/sync-repo-settings.yaml | 3 +-- .github/workflows/ci.yaml | 2 +- .kokoro/common.cfg | 2 +- .kokoro/continuous/{node12 => node14}/common.cfg | 7 +------ .kokoro/continuous/{node12 => node14}/lint.cfg | 0 .../{node12 => node14}/samples-test.cfg | 0 .../{node12 => node14}/system-test.cfg | 0 .kokoro/continuous/{node12 => node14}/test.cfg | 0 .kokoro/pre-samples-test.sh | 4 ++-- .kokoro/pre-system-test.sh | 4 ++-- .kokoro/presubmit/{node12 => node14}/common.cfg | 7 +------ .../{node12 => node14}/samples-test.cfg | 4 ++-- .../presubmit/{node12 => node14}/system-test.cfg | 4 ++-- .kokoro/presubmit/{node12 => node14}/test.cfg | 0 .kokoro/release/docs-devsite.sh | 5 +++-- .kokoro/release/docs.cfg | 2 +- .kokoro/release/publish.cfg | 2 +- .kokoro/samples-test.sh | 2 +- .kokoro/system-test.sh | 2 +- .kokoro/test.bat | 2 +- .kokoro/test.sh | 2 +- README.md | 2 +- owlbot.py | 7 +++---- package.json | 16 ++++++++-------- samples/package.json | 2 +- 27 files changed, 38 insertions(+), 47 deletions(-) rename .kokoro/continuous/{node12 => node14}/common.cfg (77%) rename .kokoro/continuous/{node12 => node14}/lint.cfg (100%) rename .kokoro/continuous/{node12 => node14}/samples-test.cfg (100%) rename .kokoro/continuous/{node12 => node14}/system-test.cfg (100%) rename .kokoro/continuous/{node12 => node14}/test.cfg (100%) rename .kokoro/presubmit/{node12 => node14}/common.cfg (77%) rename .kokoro/presubmit/{node12 => node14}/samples-test.cfg (75%) rename .kokoro/presubmit/{node12 => node14}/system-test.cfg (75%) rename .kokoro/presubmit/{node12 => node14}/test.cfg (100%) diff --git a/.eslintignore b/.eslintignore index ea5b04a..c4a0963 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,3 +5,4 @@ build/ docs/ protos/ samples/generated/ +system-test/**/fixtures diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 0b836e1..40b49d2 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:e6d785d6de3cab027f6213d95ccedab4cab3811b0d3172b78db2216faa182e32 + digest: sha256:abc68a9bbf4fa808b25fa16d3b11141059dc757dbc34f024744bba36c200b40f +# created: 2023-10-04T20:56:40.710775365Z diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 4a30a08..b46e4c4 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -7,11 +7,10 @@ branchProtectionRules: requiredStatusCheckContexts: - "ci/kokoro: Samples test" - "ci/kokoro: System test" - - docs - lint - - test (12) - test (14) - test (16) + - test (18) - cla/google - windows - OwlBot Post Processor diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f447b84..711957b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [12, 14, 16] + node: [14, 16, 18, 20] steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg index 4f3b672..bd93c79 100644 --- a/.kokoro/common.cfg +++ b/.kokoro/common.cfg @@ -16,7 +16,7 @@ build_file: "nodejs-firestore-session/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/continuous/node12/common.cfg b/.kokoro/continuous/node14/common.cfg similarity index 77% rename from .kokoro/continuous/node12/common.cfg rename to .kokoro/continuous/node14/common.cfg index 37ee06f..bd93c79 100644 --- a/.kokoro/continuous/node12/common.cfg +++ b/.kokoro/continuous/node14/common.cfg @@ -16,14 +16,9 @@ build_file: "nodejs-firestore-session/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-firestore-session/.kokoro/test.sh" } - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-review_firestore-nodejs-it-6d41b624fec9" -} diff --git a/.kokoro/continuous/node12/lint.cfg b/.kokoro/continuous/node14/lint.cfg similarity index 100% rename from .kokoro/continuous/node12/lint.cfg rename to .kokoro/continuous/node14/lint.cfg diff --git a/.kokoro/continuous/node12/samples-test.cfg b/.kokoro/continuous/node14/samples-test.cfg similarity index 100% rename from .kokoro/continuous/node12/samples-test.cfg rename to .kokoro/continuous/node14/samples-test.cfg diff --git a/.kokoro/continuous/node12/system-test.cfg b/.kokoro/continuous/node14/system-test.cfg similarity index 100% rename from .kokoro/continuous/node12/system-test.cfg rename to .kokoro/continuous/node14/system-test.cfg diff --git a/.kokoro/continuous/node12/test.cfg b/.kokoro/continuous/node14/test.cfg similarity index 100% rename from .kokoro/continuous/node12/test.cfg rename to .kokoro/continuous/node14/test.cfg diff --git a/.kokoro/pre-samples-test.sh b/.kokoro/pre-samples-test.sh index a00d1b2..6f38373 100755 --- a/.kokoro/pre-samples-test.sh +++ b/.kokoro/pre-samples-test.sh @@ -14,5 +14,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -export GCLOUD_PROJECT=java-review -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secret_manager/java-review_firestore-nodejs-it-6d41b624fec9 +export GCLOUD_PROJECT=nodejs-firestore-ci +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secret_manager/nodejs-firestore-ci-samples-71b5f8aee66e diff --git a/.kokoro/pre-system-test.sh b/.kokoro/pre-system-test.sh index a00d1b2..6f38373 100755 --- a/.kokoro/pre-system-test.sh +++ b/.kokoro/pre-system-test.sh @@ -14,5 +14,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -export GCLOUD_PROJECT=java-review -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secret_manager/java-review_firestore-nodejs-it-6d41b624fec9 +export GCLOUD_PROJECT=nodejs-firestore-ci +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secret_manager/nodejs-firestore-ci-samples-71b5f8aee66e diff --git a/.kokoro/presubmit/node12/common.cfg b/.kokoro/presubmit/node14/common.cfg similarity index 77% rename from .kokoro/presubmit/node12/common.cfg rename to .kokoro/presubmit/node14/common.cfg index 37ee06f..bd93c79 100644 --- a/.kokoro/presubmit/node12/common.cfg +++ b/.kokoro/presubmit/node14/common.cfg @@ -16,14 +16,9 @@ build_file: "nodejs-firestore-session/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-firestore-session/.kokoro/test.sh" } - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-review_firestore-nodejs-it-6d41b624fec9" -} diff --git a/.kokoro/presubmit/node12/samples-test.cfg b/.kokoro/presubmit/node14/samples-test.cfg similarity index 75% rename from .kokoro/presubmit/node12/samples-test.cfg rename to .kokoro/presubmit/node14/samples-test.cfg index f069e51..5f49d1a 100644 --- a/.kokoro/presubmit/node12/samples-test.cfg +++ b/.kokoro/presubmit/node14/samples-test.cfg @@ -7,6 +7,6 @@ env_vars: { } env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "long-door-651-kokoro-system-test-service-account" + key: "SECRET_MANAGER_KEYS" + value: "nodejs-firestore-ci-samples-71b5f8aee66e" } \ No newline at end of file diff --git a/.kokoro/presubmit/node12/system-test.cfg b/.kokoro/presubmit/node14/system-test.cfg similarity index 75% rename from .kokoro/presubmit/node12/system-test.cfg rename to .kokoro/presubmit/node14/system-test.cfg index f2d0bb0..e1281d8 100644 --- a/.kokoro/presubmit/node12/system-test.cfg +++ b/.kokoro/presubmit/node14/system-test.cfg @@ -7,6 +7,6 @@ env_vars: { } env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "long-door-651-kokoro-system-test-service-account" + key: "SECRET_MANAGER_KEYS" + value: "nodejs-firestore-ci-samples-71b5f8aee66e" } \ No newline at end of file diff --git a/.kokoro/presubmit/node12/test.cfg b/.kokoro/presubmit/node14/test.cfg similarity index 100% rename from .kokoro/presubmit/node12/test.cfg rename to .kokoro/presubmit/node14/test.cfg diff --git a/.kokoro/release/docs-devsite.sh b/.kokoro/release/docs-devsite.sh index 2198e67..3596c1e 100755 --- a/.kokoro/release/docs-devsite.sh +++ b/.kokoro/release/docs-devsite.sh @@ -25,5 +25,6 @@ if [[ -z "$CREDENTIALS" ]]; then fi npm install -npm install --no-save @google-cloud/cloud-rad@^0.2.5 -npx @google-cloud/cloud-rad \ No newline at end of file +npm install --no-save @google-cloud/cloud-rad@^0.3.7 +# publish docs to devsite +npx @google-cloud/cloud-rad . cloud-rad diff --git a/.kokoro/release/docs.cfg b/.kokoro/release/docs.cfg index 38825c3..cf81f1e 100644 --- a/.kokoro/release/docs.cfg +++ b/.kokoro/release/docs.cfg @@ -11,7 +11,7 @@ before_action { # doc publications use a Python image. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } # Download trampoline resources. diff --git a/.kokoro/release/publish.cfg b/.kokoro/release/publish.cfg index 5f4b3a3..9c88ccd 100644 --- a/.kokoro/release/publish.cfg +++ b/.kokoro/release/publish.cfg @@ -30,7 +30,7 @@ build_file: "nodejs-firestore-session/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { diff --git a/.kokoro/samples-test.sh b/.kokoro/samples-test.sh index 806c008..8c5d108 100755 --- a/.kokoro/samples-test.sh +++ b/.kokoro/samples-test.sh @@ -56,7 +56,7 @@ fi # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/.kokoro/system-test.sh b/.kokoro/system-test.sh index 0201e9d..0b3043d 100755 --- a/.kokoro/system-test.sh +++ b/.kokoro/system-test.sh @@ -49,7 +49,7 @@ npm run system-test # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/.kokoro/test.bat b/.kokoro/test.bat index ae59e59..0bb1240 100644 --- a/.kokoro/test.bat +++ b/.kokoro/test.bat @@ -21,7 +21,7 @@ cd .. @rem we upgrade Node.js in the image: SET PATH=%PATH%;/cygdrive/c/Program Files/nodejs/npm -call nvm use v12.14.1 +call nvm use v14.17.3 call which node call npm install || goto :error diff --git a/.kokoro/test.sh b/.kokoro/test.sh index a5c7ac0..862d478 100755 --- a/.kokoro/test.sh +++ b/.kokoro/test.sh @@ -39,7 +39,7 @@ npm test # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/README.md b/README.md index 27facf9..1517c4b 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ also contains samples. ## Supported Node.js Versions -Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update diff --git a/owlbot.py b/owlbot.py index 464f654..aa3beff 100644 --- a/owlbot.py +++ b/owlbot.py @@ -13,7 +13,6 @@ # limitations under the License. import synthtool.languages.node as node -node.owlbot_main(templates_excludes=[ - ".kokoro/continuous/node12/common.cfg", - ".kokoro/presubmit/node12/common.cfg" -]) +node.owlbot_main(templates_excludes=[".kokoro/presubmit/node14/system-test.cfg", ".kokoro/presubmit/node14/samples-test.cfg", ".kokoro/continuous/node14/samples-test.cfg", ".kokoro/continous/node14/system-test.cfg"], + staging_excludes=[".kokoro/presubmit/node14/system-test.cfg", ".kokoro/presubmit/node14/samples-test.cfg", ".kokoro/continuous/node14/samples-test.cfg", ".kokoro/continous/node14/system-test.cfg"], +) diff --git a/package.json b/package.json index 73f89b5..ce933be 100644 --- a/package.json +++ b/package.json @@ -7,14 +7,14 @@ "main": "./build/src/index.js", "types": "./build/src/index.d.ts", "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "files": [ "build/src" ], "repository": "googleapis/nodejs-firestore-session", "peerDependencies": { - "@google-cloud/firestore": "^6.0.0" + "@google-cloud/firestore": "^7.1.0" }, "bugs": { "url": "https://github.com/googleapis/nodejs-firestore-session/issues" @@ -23,7 +23,7 @@ "lint": "gts check", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "presystem-test": "npm run compile", - "system-test": "mocha build/system-test -t 10000", + "system-test": "mocha build/system-test -t 100000", "docs": "compodoc src/", "test": "c8 mocha build/test", "fix": "gts fix", @@ -38,15 +38,15 @@ }, "devDependencies": { "@compodoc/compodoc": "^1.1.9", - "@google-cloud/firestore": "^6.0.0", + "@google-cloud/firestore": "^7.1.0", "@types/express-session": "^1.17.3", "@types/mocha": "^9.0.0", - "c8": "^7.0.0", + "c8": "^8.0.1", "express": "^4.16.4", "express-session": "^1.15.6", - "gts": "^3.1.0", + "gts": "^5.2.0", "linkinator": "^4.0.0", "mocha": "^9.2.2", - "typescript": "^4.6.4" + "typescript": "^5.2.2" } -} +} \ No newline at end of file diff --git a/samples/package.json b/samples/package.json index 6b98b19..770fe69 100644 --- a/samples/package.json +++ b/samples/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "chai": "^4.2.0", - "gaxios": "^4.0.0", + "gaxios": "^6.1.1", "mocha": "^8.0.0" } }