From f335aec55beb3b1db00e9a491d5a90fe8e43b1e2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 13:40:12 +0000 Subject: [PATCH 01/20] build: add extra test for Node 20, update windows tests (#1152) * build: add extra test for Node 20, update windows tests Source-Link: https://togithub.com/googleapis/synthtool/commit/38f5d4bfd5d51116a3cf7f260b8fe5d8a0046cfa Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:ef104a520c849ffde60495342ecf099dfb6256eab0fbd173228f447bc73d1aa9 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/common.cfg | 2 +- .kokoro/continuous/node14/common.cfg | 24 ++++++++++++++++++++++ .kokoro/continuous/node14/lint.cfg | 4 ++++ .kokoro/continuous/node14/samples-test.cfg | 12 +++++++++++ .kokoro/continuous/node14/system-test.cfg | 12 +++++++++++ .kokoro/continuous/node14/test.cfg | 0 .kokoro/presubmit/node14/common.cfg | 24 ++++++++++++++++++++++ .kokoro/presubmit/node14/samples-test.cfg | 12 +++++++++++ .kokoro/presubmit/node14/system-test.cfg | 12 +++++++++++ .kokoro/presubmit/node14/test.cfg | 0 .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 +- 17 files changed, 109 insertions(+), 9 deletions(-) create mode 100644 .kokoro/continuous/node14/common.cfg create mode 100644 .kokoro/continuous/node14/lint.cfg create mode 100644 .kokoro/continuous/node14/samples-test.cfg create mode 100644 .kokoro/continuous/node14/system-test.cfg create mode 100644 .kokoro/continuous/node14/test.cfg create mode 100644 .kokoro/presubmit/node14/common.cfg create mode 100644 .kokoro/presubmit/node14/samples-test.cfg create mode 100644 .kokoro/presubmit/node14/system-test.cfg create mode 100644 .kokoro/presubmit/node14/test.cfg diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 21ad18bd..de4fa0a5 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:0527a86c10b67742c409dc726ba9a31ec4e69b0006e3d7a49b0e6686c59cdaa9 -# created: 2023-05-24T20:32:43.844586914Z + digest: sha256:ef104a520c849ffde60495342ecf099dfb6256eab0fbd173228f447bc73d1aa9 +# created: 2023-07-10T21:36:52.433664553Z diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg index f733f388..20906f23 100644 --- a/.kokoro/common.cfg +++ b/.kokoro/common.cfg @@ -16,7 +16,7 @@ build_file: "cloud-debug-nodejs/.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/node14/common.cfg b/.kokoro/continuous/node14/common.cfg new file mode 100644 index 00000000..20906f23 --- /dev/null +++ b/.kokoro/continuous/node14/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "cloud-debug-nodejs/.kokoro/trampoline_v2.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-debug-nodejs/.kokoro/test.sh" +} diff --git a/.kokoro/continuous/node14/lint.cfg b/.kokoro/continuous/node14/lint.cfg new file mode 100644 index 00000000..cdfef859 --- /dev/null +++ b/.kokoro/continuous/node14/lint.cfg @@ -0,0 +1,4 @@ +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-debug-nodejs/.kokoro/lint.sh" +} diff --git a/.kokoro/continuous/node14/samples-test.cfg b/.kokoro/continuous/node14/samples-test.cfg new file mode 100644 index 00000000..ee57ba1e --- /dev/null +++ b/.kokoro/continuous/node14/samples-test.cfg @@ -0,0 +1,12 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-debug-nodejs/.kokoro/samples-test.sh" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/.kokoro/continuous/node14/system-test.cfg b/.kokoro/continuous/node14/system-test.cfg new file mode 100644 index 00000000..ef48fe2b --- /dev/null +++ b/.kokoro/continuous/node14/system-test.cfg @@ -0,0 +1,12 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-debug-nodejs/.kokoro/system-test.sh" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/.kokoro/continuous/node14/test.cfg b/.kokoro/continuous/node14/test.cfg new file mode 100644 index 00000000..e69de29b diff --git a/.kokoro/presubmit/node14/common.cfg b/.kokoro/presubmit/node14/common.cfg new file mode 100644 index 00000000..20906f23 --- /dev/null +++ b/.kokoro/presubmit/node14/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "cloud-debug-nodejs/.kokoro/trampoline_v2.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-debug-nodejs/.kokoro/test.sh" +} diff --git a/.kokoro/presubmit/node14/samples-test.cfg b/.kokoro/presubmit/node14/samples-test.cfg new file mode 100644 index 00000000..ee57ba1e --- /dev/null +++ b/.kokoro/presubmit/node14/samples-test.cfg @@ -0,0 +1,12 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-debug-nodejs/.kokoro/samples-test.sh" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/.kokoro/presubmit/node14/system-test.cfg b/.kokoro/presubmit/node14/system-test.cfg new file mode 100644 index 00000000..ef48fe2b --- /dev/null +++ b/.kokoro/presubmit/node14/system-test.cfg @@ -0,0 +1,12 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-debug-nodejs/.kokoro/system-test.sh" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/.kokoro/presubmit/node14/test.cfg b/.kokoro/presubmit/node14/test.cfg new file mode 100644 index 00000000..e69de29b diff --git a/.kokoro/release/docs.cfg b/.kokoro/release/docs.cfg index f6755a7b..1653186a 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 609f16b1..e927bf67 100644 --- a/.kokoro/release/publish.cfg +++ b/.kokoro/release/publish.cfg @@ -30,7 +30,7 @@ build_file: "cloud-debug-nodejs/.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 806c0082..8c5d108c 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 0201e9df..0b3043d2 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 ae59e59b..0bb12405 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 a5c7ac04..862d478d 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 From 38840085699d626fbf501a369842afa55b865ab9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 19:40:14 +0000 Subject: [PATCH 02/20] docs: fix node release schedule link (#1157) Co-authored-by: Jeffrey Rennie Source-Link: https://togithub.com/googleapis/synthtool/commit/1a2431537d603e95b4b32317fb494542f75a2165 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430 --- .github/.OwlBot.lock.yaml | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index de4fa0a5..a3d003c6 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:ef104a520c849ffde60495342ecf099dfb6256eab0fbd173228f447bc73d1aa9 -# created: 2023-07-10T21:36:52.433664553Z + digest: sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430 +# created: 2023-08-03T18:46:14.719706948Z diff --git a/README.md b/README.md index 9983ea4f..8109ca55 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,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 From f8815fce6b64c73e0357873cdf1b4b752887acb1 Mon Sep 17 00:00:00 2001 From: James McTavish Date: Mon, 21 Aug 2023 16:02:04 -0400 Subject: [PATCH 03/20] fix: remove unused second parameter (#1161) --- test/test-fat-arrow.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-fat-arrow.ts b/test/test-fat-arrow.ts index c8786406..f2496322 100644 --- a/test/test-fat-arrow.ts +++ b/test/test-fat-arrow.ts @@ -101,7 +101,7 @@ describe(__filename, () => { done(); }); }); - process.nextTick(foo.bind(null, 'test')); + process.nextTick(foo.bind(null)); }); }); it('Should process the argument value change of the fat arrow', done => { @@ -126,7 +126,7 @@ describe(__filename, () => { done(); }); }); - process.nextTick(foo.bind(null, 'test')); + process.nextTick(foo.bind(null)); }); }); }); From bd45473bda6d9f87adcbc4752f773e99a3fbcf89 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Tue, 22 Aug 2023 12:46:57 -0700 Subject: [PATCH 04/20] chore!: upgrade to node 14 (#1160) * chore!: upgrade to node 14 --------- Co-authored-by: James McTavish --- .github/sync-repo-settings.yaml | 2 +- .github/workflows/ci.yaml | 2 +- .kokoro/continuous/node12/common.cfg | 24 ---------------------- .kokoro/continuous/node12/lint.cfg | 4 ---- .kokoro/continuous/node12/samples-test.cfg | 12 ----------- .kokoro/continuous/node12/system-test.cfg | 12 ----------- .kokoro/continuous/node12/test.cfg | 0 .kokoro/presubmit/node12/common.cfg | 24 ---------------------- .kokoro/presubmit/node12/samples-test.cfg | 12 ----------- .kokoro/presubmit/node12/system-test.cfg | 12 ----------- .kokoro/presubmit/node12/test.cfg | 0 package.json | 10 ++++----- src/agent/debuglet.ts | 21 +++++++++++-------- 13 files changed, 19 insertions(+), 116 deletions(-) delete mode 100644 .kokoro/continuous/node12/common.cfg delete mode 100644 .kokoro/continuous/node12/lint.cfg delete mode 100644 .kokoro/continuous/node12/samples-test.cfg delete mode 100644 .kokoro/continuous/node12/system-test.cfg delete mode 100644 .kokoro/continuous/node12/test.cfg delete mode 100644 .kokoro/presubmit/node12/common.cfg delete mode 100644 .kokoro/presubmit/node12/samples-test.cfg delete mode 100644 .kokoro/presubmit/node12/system-test.cfg delete mode 100644 .kokoro/presubmit/node12/test.cfg diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 4a30a08e..1350faef 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -9,9 +9,9 @@ branchProtectionRules: - "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 943af26a..10278702 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/continuous/node12/common.cfg b/.kokoro/continuous/node12/common.cfg deleted file mode 100644 index f733f388..00000000 --- a/.kokoro/continuous/node12/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "cloud-debug-nodejs/.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" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-debug-nodejs/.kokoro/test.sh" -} diff --git a/.kokoro/continuous/node12/lint.cfg b/.kokoro/continuous/node12/lint.cfg deleted file mode 100644 index cdfef859..00000000 --- a/.kokoro/continuous/node12/lint.cfg +++ /dev/null @@ -1,4 +0,0 @@ -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-debug-nodejs/.kokoro/lint.sh" -} diff --git a/.kokoro/continuous/node12/samples-test.cfg b/.kokoro/continuous/node12/samples-test.cfg deleted file mode 100644 index ee57ba1e..00000000 --- a/.kokoro/continuous/node12/samples-test.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-debug-nodejs/.kokoro/samples-test.sh" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "long-door-651-kokoro-system-test-service-account" -} \ No newline at end of file diff --git a/.kokoro/continuous/node12/system-test.cfg b/.kokoro/continuous/node12/system-test.cfg deleted file mode 100644 index ef48fe2b..00000000 --- a/.kokoro/continuous/node12/system-test.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-debug-nodejs/.kokoro/system-test.sh" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "long-door-651-kokoro-system-test-service-account" -} \ No newline at end of file diff --git a/.kokoro/continuous/node12/test.cfg b/.kokoro/continuous/node12/test.cfg deleted file mode 100644 index e69de29b..00000000 diff --git a/.kokoro/presubmit/node12/common.cfg b/.kokoro/presubmit/node12/common.cfg deleted file mode 100644 index f733f388..00000000 --- a/.kokoro/presubmit/node12/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "cloud-debug-nodejs/.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" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-debug-nodejs/.kokoro/test.sh" -} diff --git a/.kokoro/presubmit/node12/samples-test.cfg b/.kokoro/presubmit/node12/samples-test.cfg deleted file mode 100644 index ee57ba1e..00000000 --- a/.kokoro/presubmit/node12/samples-test.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-debug-nodejs/.kokoro/samples-test.sh" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "long-door-651-kokoro-system-test-service-account" -} \ No newline at end of file diff --git a/.kokoro/presubmit/node12/system-test.cfg b/.kokoro/presubmit/node12/system-test.cfg deleted file mode 100644 index ef48fe2b..00000000 --- a/.kokoro/presubmit/node12/system-test.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-debug-nodejs/.kokoro/system-test.sh" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "long-door-651-kokoro-system-test-service-account" -} \ No newline at end of file diff --git a/.kokoro/presubmit/node12/test.cfg b/.kokoro/presubmit/node12/test.cfg deleted file mode 100644 index e69de29b..00000000 diff --git a/package.json b/package.json index e390f99c..324fcb60 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ ], "license": "Apache-2.0", "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "files": [ "build/src" @@ -44,7 +44,7 @@ "precompile": "gts clean" }, "dependencies": { - "@google-cloud/common": "^4.0.0", + "@google-cloud/common": "^5.0.0", "@fastify/busboy": "1.1.0", "acorn": "^8.0.0", "coffeescript": "^2.0.0", @@ -52,7 +52,7 @@ "extend": "^3.0.2", "findit2": "^2.2.3", "firebase-admin": "^10.0.0", - "gcp-metadata": "^5.0.0", + "gcp-metadata": "^6.0.0", "p-limit": "^3.0.1", "semver": "^7.0.0", "source-map": "^0.8.0-beta.0", @@ -81,7 +81,7 @@ "cpy-cli": "^4.0.0", "cross-env": "^7.0.0", "execa": "^5.0.0", - "gts": "^3.1.0", + "gts": "^5.0.0", "linkinator": "^4.0.0", "mocha": "^9.2.2", "mv": "^2.1.1", @@ -91,7 +91,7 @@ "proxyquire": "^2.0.0", "teeny-request": "^8.0.0", "tmp-promise": "^3.0.0", - "typescript": "^4.6.4", + "typescript": "5.1.6", "uuid": "^9.0.0" } } diff --git a/src/agent/debuglet.ts b/src/agent/debuglet.ts index 856a57c6..6048cd7d 100644 --- a/src/agent/debuglet.ts +++ b/src/agent/debuglet.ts @@ -1049,15 +1049,18 @@ export class Debuglet extends EventEmitter { : now; const expiryTime = createdTime + this.config.breakpointExpirationSec; - setTimeout(() => { - this.logger.info('Expiring breakpoint ' + breakpoint.id); - breakpoint.status = { - description: {format: 'The snapshot has expired'}, - isError: true, - refersTo: StatusMessage.BREAKPOINT_AGE, - }; - this.completeBreakpoint_(breakpoint); - }, (expiryTime - now) * 1000).unref(); + setTimeout( + () => { + this.logger.info('Expiring breakpoint ' + breakpoint.id); + breakpoint.status = { + description: {format: 'The snapshot has expired'}, + isError: true, + refersTo: StatusMessage.BREAKPOINT_AGE, + }; + this.completeBreakpoint_(breakpoint); + }, + (expiryTime - now) * 1000 + ).unref(); } /** From 4c1e4532dad0b0ed87a7a31237b8a318a09c11ed Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 5 Sep 2023 18:46:14 +0200 Subject: [PATCH 05/20] chore(deps): update actions/checkout action to v4 (#1165) --- .github/workflows/ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 10278702..62555f76 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ jobs: matrix: node: [14, 16, 18, 20] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} @@ -32,7 +32,7 @@ jobs: windows: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: node-version: 14 @@ -46,7 +46,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: node-version: 14 @@ -55,7 +55,7 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 with: node-version: 14 From 65ba82f0cc0086e2b142b456e6d50ccea8528f13 Mon Sep 17 00:00:00 2001 From: James McTavish Date: Thu, 7 Sep 2023 13:52:46 -0400 Subject: [PATCH 06/20] chore: Clean up dead code and linter errors (#1166) --- src/agent/firebase-controller.ts | 9 +- src/agent/state/legacy-state.ts | 628 ----------- test/debugger.ts | 87 -- test/test-debuglet.ts | 1781 +----------------------------- test/test-module.ts | 71 -- test/test-options-credentials.ts | 152 --- test/test-state.ts | 53 - 7 files changed, 9 insertions(+), 2772 deletions(-) delete mode 100644 src/agent/state/legacy-state.ts delete mode 100644 test/debugger.ts delete mode 100644 test/test-module.ts delete mode 100644 test/test-options-credentials.ts delete mode 100644 test/test-state.ts diff --git a/src/agent/firebase-controller.ts b/src/agent/firebase-controller.ts index a03d49fd..1a99255d 100644 --- a/src/agent/firebase-controller.ts +++ b/src/agent/firebase-controller.ts @@ -25,6 +25,7 @@ import * as crypto from 'crypto'; import * as firebase from 'firebase-admin'; import * as gcpMetadata from 'gcp-metadata'; +import {DataSnapshot} from 'firebase-admin/database'; import * as util from 'util'; const debuglog = util.debuglog('cdbg.firebase'); @@ -37,7 +38,11 @@ const FIREBASE_APP_NAME = 'cdbg'; * @param promise * @returns Promise wrapped in a timeout. */ -const withTimeout = (ms: number, promise: Promise) => { +const withTimeout = ( + ms: number, + promise: Promise +): Promise => { + // Note that the type above is constrained to make the linter happy. const timeout = new Promise((_, reject) => setTimeout(() => reject(`Timed out after ${ms} ms.`), ms) ); @@ -126,7 +131,7 @@ export class FirebaseController implements Controller { db.ref('cdbg/schema_version').get() ); if (version_snapshot) { - const version = version_snapshot.val(); + const version = (version_snapshot as DataSnapshot).val(); debuglog( `Firebase app initialized. Connected to ${databaseUrl}` + ` with schema version ${version}` diff --git a/src/agent/state/legacy-state.ts b/src/agent/state/legacy-state.ts deleted file mode 100644 index 2a5994e5..00000000 --- a/src/agent/state/legacy-state.ts +++ /dev/null @@ -1,628 +0,0 @@ -// Copyright 2014 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import * as util from 'util'; -import * as vm from 'vm'; -import * as acorn from 'acorn'; - -import {StatusMessage} from '../../client/stackdriver/status-message'; -import * as stackdriver from '../../types/stackdriver'; -import * as v8 from '../../types/v8'; -import {ResolvedDebugAgentConfig} from '../config'; -import {debugAssert} from '../util/debug-assert'; - -const assert = debugAssert(!!process.env.CLOUD_DEBUG_ASSERTIONS); - -// Error message indices into the resolved variable table. -const BUFFER_FULL_MESSAGE_INDEX = 0; -const NATIVE_PROPERTY_MESSAGE_INDEX = 1; -const GETTER_MESSAGE_INDEX = 2; -const ARG_LOCAL_LIMIT_MESSAGE_INDEX = 3; - -/** - * Checks that the provided expressions will not have side effects and - * then evaluates the expression in the current execution context. - * - * @return an object with error and mirror fields. - */ -export function evaluate( - expression: string, - frame: v8.FrameMirror -): {error: string | null; mirror?: v8.ValueMirror} { - // First validate the expression to make sure it doesn't mutate state. - // Using ecmaVersion 6 for consistency with legacy-debugapi. - try { - const ast = acorn.parse(expression, {sourceType: 'script', ecmaVersion: 6}); - // eslint-disable-next-line @typescript-eslint/no-var-requires - const validator = require('../util/validator'); - if (!validator.isValid(ast)) { - return {error: 'Expression not allowed'}; - } - } catch (err) { - return {error: (err as Error).message}; - } - - // Now actually ask V8 to evaluate the expression - try { - const mirror = frame.evaluate(expression); - return {error: null, mirror}; - } catch (error) { - return {error: error as string}; - } -} - -interface ScopeType { - Global: {}; - Script: {}; - Closure: {}; - Local: {}; -} - -interface LegacyVm { - runInDebugContext: (context: string) => ScopeType; -} - -class StateResolver { - private state: v8.ExecutionState; - private expressions: string[]; - private config: ResolvedDebugAgentConfig; - private ctx: v8.Debug; - private evaluatedExpressions: stackdriver.Variable[]; - private totalSize: number; - private messageTable: stackdriver.Variable[]; - private resolvedVariableTable: stackdriver.Variable[]; - private rawVariableTable: Array; - private scopeType: ScopeType; - /** - * @param {!Object} execState - * @param {Array} expressions - * @param {!Object} config - * @constructor - */ - constructor( - execState: v8.ExecutionState, - expressions: string[], - config: ResolvedDebugAgentConfig, - v8debug: v8.Debug - ) { - this.state = execState; - this.expressions = expressions; - this.config = config; - this.ctx = v8debug; - - this.evaluatedExpressions = []; - this.totalSize = 0; - - this.messageTable = []; - this.messageTable[BUFFER_FULL_MESSAGE_INDEX] = { - status: new StatusMessage( - StatusMessage.VARIABLE_VALUE, - 'Max data size reached', - true - ), - }; - this.messageTable[NATIVE_PROPERTY_MESSAGE_INDEX] = { - status: new StatusMessage( - StatusMessage.VARIABLE_VALUE, - 'Native properties are not available', - true - ), - }; - this.messageTable[GETTER_MESSAGE_INDEX] = { - status: new StatusMessage( - StatusMessage.VARIABLE_VALUE, - 'Properties with getters are not available', - true - ), - }; - this.messageTable[ARG_LOCAL_LIMIT_MESSAGE_INDEX] = { - status: new StatusMessage( - StatusMessage.VARIABLE_VALUE, - 'Locals and arguments are only displayed for the ' + - 'top `config.capture.maxExpandFrames=' + - config.capture.maxExpandFrames + - '` stack frames.', - true - ), - }; - - // TODO: Determine why _extend is used here - this.resolvedVariableTable = (util as {} as {_extend: Function})._extend( - [], - this.messageTable - ); - this.rawVariableTable = this.messageTable.map(() => { - return null; - }); - - // This constructor is only used in situations where the legacy vm - // interface is used that has the `runInDebugContext` method. - this.scopeType = (vm as {} as LegacyVm).runInDebugContext('ScopeType'); - } - - /** - * Captures the stack and current execution state. - * - * @return an object with stackFrames, variableTable, and - * evaluatedExpressions fields - */ - capture_(): stackdriver.Breakpoint { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const that = this; - - // Evaluate the watch expressions - const evalIndexSet = new Set(); - if (that.expressions) { - that.expressions.forEach((expression, index2) => { - const result = evaluate(expression, that.state.frame(0)); - let evaluated; - - if (result.error) { - evaluated = { - name: expression, - status: new StatusMessage( - StatusMessage.VARIABLE_VALUE, - result.error, - true - ), - }; - } else { - // TODO: Determine how to not downcast this to v8.ValueMirror - // TODO: Handle the case where `result.mirror` is `undefined`. - evaluated = that.resolveVariable_( - expression, - result.mirror as v8.ValueMirror, - true - ); - const varTableIdx = evaluated.varTableIndex; - if (typeof varTableIdx !== 'undefined') { - evalIndexSet.add(varTableIdx); - } - } - that.evaluatedExpressions[index2] = evaluated; - }); - } - - // The frames are resolved after the evaluated expressions so that - // evaluated expressions can be evaluated as much as possible within - // the max data size limits - const frames = that.resolveFrames_(); - // Now resolve the variables - let index = this.messageTable.length; // skip the sentinel values - const noLimit = that.config.capture.maxDataSize === 0; - while ( - index < that.rawVariableTable.length && // NOTE: length changes in loop - (that.totalSize < that.config.capture.maxDataSize || noLimit) - ) { - assert.ok(!that.resolvedVariableTable[index]); // shouldn't have it - // resolved yet - const isEvaluated = evalIndexSet.has(index); - // TODO: This code suggests that an ObjectMirror and Stutus are the - // same. Resolve this. - that.resolvedVariableTable[index] = that.resolveMirror_( - that.rawVariableTable[index] as v8.ObjectMirror, - isEvaluated - ); - index++; - } - - // If we filled up the buffer already, we need to trim the remainder - if (index < that.rawVariableTable.length) { - that.trimVariableTable_(index, frames); - } - return { - // TODO (fgao): Add path attribute to avoid explicit cast to - // stackdriver.SourceLocation once breakpoint is passed in this class. - id: 'dummy-id', - location: { - line: this.state.frame(0).sourceLine() + 1, - } as stackdriver.SourceLocation, - stackFrames: frames, - variableTable: that.resolvedVariableTable, - evaluatedExpressions: that.evaluatedExpressions, - }; - } - - /** - * Limits the size of the variable table to `fromIndex` elements. It marks - * all variables with entries beyond `fromIndex` with a message indicating - * that the table filled. - * - * @param {Number} fromIndex The desired size of the variable table. - * @param {Object} frames Frames associated with the current execution - * environment. - */ - trimVariableTable_( - fromIndex: number, - frames: stackdriver.StackFrame[] - ): void { - this.resolvedVariableTable.splice(fromIndex); // remove the remaining entries - - // eslint-disable-next-line @typescript-eslint/no-this-alias - const that = this; - const processBufferFull = (variables: stackdriver.Variable[]) => { - variables.forEach(variable => { - if (variable.varTableIndex && variable.varTableIndex >= fromIndex) { - // make it point to the sentinel 'buffer full' value - variable.varTableIndex = BUFFER_FULL_MESSAGE_INDEX; - variable.status = that.messageTable[BUFFER_FULL_MESSAGE_INDEX].status; - } - if (variable.members) { - processBufferFull(variable.members); - } - }); - }; - - frames.forEach(frame => { - processBufferFull(frame.arguments); - processBufferFull(frame.locals); - }); - processBufferFull(this.evaluatedExpressions); - processBufferFull(this.resolvedVariableTable); - } - - resolveFrames_(): stackdriver.StackFrame[] { - const frames: stackdriver.StackFrame[] = []; - const frameCount = Math.min( - this.state.frameCount(), - this.config.capture.maxFrames - ); - - for (let i = 0; i < frameCount; i++) { - const frame = this.state.frame(i); - if (this.shouldFrameBeResolved_(frame)) { - frames.push( - this.resolveFrame_(frame, i < this.config.capture.maxExpandFrames) - ); - } - } - return frames; - } - - shouldFrameBeResolved_(frame: v8.FrameMirror): boolean { - // Only capture data from the frames for which we can link the data back - // to the source files. - - const fullPath = this.resolveFullPath_(frame); - - if (!this.isPathInCurrentWorkingDirectory_(fullPath)) { - return false; - } - - const relativePath = this.resolveRelativePath_(frame); - if ( - !this.config.capture.includeNodeModules && - this.isPathInNodeModulesDirectory_(relativePath) - ) { - return false; - } - - return true; - } - - resolveFullPath_(frame: v8.FrameMirror): string { - const func = frame.func(); - if (!func.resolved()) { - return ''; - } - - const script = func.script(); - if (!script) { - return ''; - } - - return script.name(); - } - - resolveRelativePath_(frame: v8.FrameMirror): string { - const fullPath = this.resolveFullPath_(frame); - return this.stripCurrentWorkingDirectory_(fullPath); - } - - stripCurrentWorkingDirectory_(path: string): string { - // Strip 1 extra character to remove the slash. - return path.substr(this.config.workingDirectory.length + 1); - } - - isPathInCurrentWorkingDirectory_(path: string): boolean { - // return true; - return path.indexOf(this.config.workingDirectory) === 0; - } - - isPathInNodeModulesDirectory_(path: string): boolean { - return path.indexOf('node_modules') === 0; - } - - resolveFrame_( - frame: v8.FrameMirror, - underFrameCap: boolean - ): stackdriver.StackFrame { - const args: stackdriver.Variable[] = []; - // TODO: `locals` should be of type v8.ScopeMirror[] - // Resolve conflicts so that it can be specified of that type. - let locals: Array<{}> = []; - // Locals and arguments are safe to collect even when - // `config.allowExpressions=false` since we properly avoid inspecting - // interceptors and getters by default. - if (!underFrameCap) { - args.push({ - name: 'arguments_not_available', - varTableIndex: ARG_LOCAL_LIMIT_MESSAGE_INDEX, - }); - locals.push({ - name: 'locals_not_available', - varTableIndex: ARG_LOCAL_LIMIT_MESSAGE_INDEX, - }); - } else { - // We will use the values aggregated from the ScopeMirror traversal stored - // in locals which will include any applicable arguments from the - // invocation. - locals = this.resolveLocalsList_(frame); - if (Array.isArray(locals) && locals.length === 0) { - locals = []; - } - } - return { - function: this.resolveFunctionName_(frame.func()), - location: this.resolveLocation_(frame), - arguments: args, - locals, - }; - } - - resolveFunctionName_(func: v8.FunctionMirror): string { - if (!func || !func.isFunction()) { - return ''; - } - return func.name() || func.inferredName() || '(anonymous function)'; - } - - resolveLocation_(frame: v8.FrameMirror): stackdriver.SourceLocation { - return { - path: this.resolveRelativePath_(frame), - // V8 uses 0-based line numbers but Debuglet API uses 1-based numbers. - line: frame.sourceLine() + 1, - }; - } - - /** - * Iterates and returns variable information for all scopes (excluding global) - * in a given frame. FrameMirrors should return their scope object list with - * most deeply nested scope first so variables initially encountered will take - * precedence over subsequent instance with the same name - this is tracked in - * the usedNames map. The argument list given to this function may be - * manipulated if variables with a deeper scope occur which have the same - * name. - * @function resolveLocalsList_ - * @memberof StateResolver - * @param {FrameMirror} frame - A instance of FrameMirror - * @param {Array} args - An array of objects representing any function - * arguments the frame may list - * @returns {Array} - returns an array containing data about selected - * variables - */ - resolveLocalsList_(frame: v8.FrameMirror): stackdriver.Variable[] { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const self = this; - const usedNames: {[name: string]: boolean} = {}; - const makeMirror = this.ctx.MakeMirror; - const allScopes = frame.allScopes(); - const count = allScopes.length; - - // There will always be at least 3 scopes. - // For top-level breakpoints: [local, script, global] - // Other: [..., closure (module IIFE), script, global] - assert.ok(count >= 3); - assert.strictEqual(allScopes[count - 1].scopeType(), self.scopeType.Global); - assert.strictEqual(allScopes[count - 2].scopeType(), self.scopeType.Script); - - // We find the top-level (module global) variable pollute the local - // variables we omit them by default, unless the breakpoint itself is - // top-level. The last two scopes are always omitted. - let scopes: v8.ScopeMirror[]; - if (allScopes[count - 3].scopeType() === self.scopeType.Closure) { - scopes = allScopes.slice(0, -3); - } else { - assert.ok(allScopes[count - 3].scopeType() === self.scopeType.Local); - scopes = allScopes.slice(0, -2); - } - - const fromScopes = scopes.map((scope: v8.ScopeMirror) => { - const obj = scope.details().object(); - return Object.keys(obj).reduce((acc, name) => { - const value = obj[name]; - const trg = makeMirror(value); - if (!usedNames[name]) { - // It's a valid variable that belongs in the locals list - // and wasn't discovered at a lower-scope - usedNames[name] = true; - // TODO: Determine how to not have an explicit down cast to - // ValueMirror - acc.push(self.resolveVariable_(name, trg as v8.ValueMirror, false)); - } - return acc; - }, [] as stackdriver.Variable[]); - }); - - function resolveFromReceiver(): stackdriver.Variable[] { - // The frame receiver is the 'this' context that is present during - // invocation. Check to see whether a receiver context is substantive, - // (invocations may be bound to null) if so: store in the locals list - // under the name 'context' which is used by the Chrome DevTools. - const ctx = frame.details().receiver(); - if (ctx) { - // TODO: Determine how to not have an explicit down cast to - // ValueMirror - return [ - self.resolveVariable_( - 'context', - makeMirror(ctx) as v8.ValueMirror, - false - ), - ]; - } - return []; - } - - return ([] as stackdriver.Variable[]) - .concat(...fromScopes) - .concat(resolveFromReceiver()); - } - - /** - * Computes a text representation of the provided value based on its type. - * If the value is a recursive data type, it will be represented as an index - * into the variable table. - * - * @param {String} name The name of the variable. - * @param {Object} value A v8 debugger representation of a variable value. - * @param {boolean} isEvaluated Specifies if the variable is from a watched - * expression. - */ - resolveVariable_( - name: string, - value: v8.ValueMirror, - isEvaluated: boolean - ): stackdriver.Variable { - let size = name.length; - - const data: stackdriver.Variable = {name}; - - if (value.isPrimitive() || value.isRegExp()) { - // primitives: undefined, null, boolean, number, string, symbol - data.value = value.toText(); - const maxLength = this.config.capture.maxStringLength; - if (!isEvaluated && maxLength && maxLength < data.value.length) { - data.status = new StatusMessage( - StatusMessage.VARIABLE_VALUE, - 'Only first `config.capture.maxStringLength=' + - this.config.capture.maxStringLength + - '` chars were captured for string of length ' + - data.value.length + - '. Use in an expression to see the full string.', - false - ); - data.value = data.value.substring(0, maxLength) + '...'; - } - } else if (value.isFunction()) { - // TODO: Determine how to resolve this so that a ValueMirror doesn't need - // to be cast to a FunctionMirror. - data.value = - 'function ' + - this.resolveFunctionName_(value as v8.FunctionMirror) + - '()'; - } else if (value.isObject()) { - data.varTableIndex = this.getVariableIndex_(value); - } else { - // PropertyMirror, InternalPropertyMirror, FrameMirror, ScriptMirror - data.value = 'unknown mirror type'; - } - - if (data.value) { - size += data.value.length; - } else { - size += 8; // fudge-it - } - - this.totalSize += size; - - return data; - } - - getVariableIndex_(valueMirror: v8.ValueMirror): number { - let idx = this.rawVariableTable.findIndex( - rawVar => !!rawVar && rawVar.value() === valueMirror.value() - ); - if (idx === -1) { - idx = this.storeObjectToVariableTable_(valueMirror); - } - return idx; - } - - storeObjectToVariableTable_(obj: v8.ValueMirror): number { - const idx = this.rawVariableTable.length; - this.rawVariableTable[idx] = obj; - return idx; - } - - /** - * Responsible for recursively resolving the properties on a - * provided object mirror. - */ - resolveMirror_( - mirror: v8.ObjectMirror, - isEvaluated: boolean - ): stackdriver.Variable { - let properties = mirror.properties(); - const maxProps = this.config.capture.maxProperties; - const truncate = maxProps && properties.length > maxProps; - if (!isEvaluated && truncate) { - properties = properties.slice(0, maxProps); - } - // TODO: It looks like `members` should be of type stackdriver.Variable[] - // but is missing fields. Determine if those fields are required or - // if the type should not be stackdriver.Variable[] - const members = properties.map( - this.resolveMirrorProperty_.bind(this, isEvaluated) - ); - if (!isEvaluated && truncate) { - // TDOO: Determine how to remove this explicit cast - members.push({ - name: - 'Only first `config.capture.maxProperties=' + - this.config.capture.maxProperties + - '` properties were captured. Use in an expression' + - ' to see all properties.', - }); - } - return {value: mirror.toText(), members}; - } - - resolveMirrorProperty_( - isEvaluated: boolean, - property: v8.PropertyMirror - ): stackdriver.Variable { - const name = String(property.name()); - // Array length must be special cased as it is a native property that - // we know to be safe to evaluate which is not generally true. - const isArrayLen = property.mirror_.isArray() && name === 'length'; - if (property.isNative() && !isArrayLen) { - return {name, varTableIndex: NATIVE_PROPERTY_MESSAGE_INDEX}; - } - if (property.hasGetter()) { - return {name, varTableIndex: GETTER_MESSAGE_INDEX}; - } - return this.resolveVariable_(name, property.value(), isEvaluated); - } -} - -// This function is used by unit tests to make sure assertions are enabled. -export function testAssert(): void { - assert.strictEqual(0, 1); -} - -/** - * Captures the stack and current execution state. - * - * @return an object with stackFrames, variableTable, and - * evaluatedExpressions fields - */ -export function capture( - execState: v8.ExecutionState, - expressions: string[], - config: ResolvedDebugAgentConfig, - v8debug: v8.Debug -): stackdriver.Breakpoint { - return new StateResolver(execState, expressions, config, v8debug).capture_(); -} diff --git a/test/debugger.ts b/test/debugger.ts deleted file mode 100644 index 3945b38f..00000000 --- a/test/debugger.ts +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2016 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*! - * @module debug/debugger - */ - -// import {Debuggee} from '../src/debuggee'; -import * as stackdriver from '../src/types/stackdriver'; - -// TODO: Write a Debugger interface that works with the Firebase backend. - -export class Debugger { - /** - * @constructor - */ - constructor() {} - - /** - * Gets a list of debuggees in a given project to which the user can set - * breakpoints. - * @param {string} projectId - The project ID for the project whose debuggees - * should be listed. - * @param {boolean=} includeInactive - Whether or not to include inactive - * debuggees in the list (default false). - */ - async listDebuggees(projectId: string, includeInactive: boolean) {} - - /** - * Gets a list of breakpoints in a given debuggee. - * @param {string} debuggeeId - The ID of the debuggee whose breakpoints should - * be listed. - * @param {object=} options - An object containing options on the list of - * breakpoints. - * @param {boolean=} options.includeAllUsers - If set to true, include - * breakpoints set by all users, or just by the caller (default false). - * @param {boolean=} options.includeInactive - Whether or not to include - * inactive breakpoints in the list (default false). - * @param {Action=} options.action - Either 'CAPTURE' or 'LOG'. If specified, - * only breakpoints with a matching action will be part of the list. - */ - listBreakpoints( - debuggeeId: string, - options: { - includeAllUsers?: boolean; - includeInactive?: boolean; - action?: stackdriver.Action; - } - ) {} - - /** - * Gets information about a given breakpoint. - * @param {string} debuggee - The ID of the debuggee in which the breakpoint - * is set. - * @param {string} breakpointId - The ID of the breakpoint to get information - * about. - */ - getBreakpoint(debuggeeId: string, breakpointId: string) {} - - /** - * Sets a new breakpoint. - * @param {Debuggee} debuggeeId - The ID of the debuggee in which the breakpoint - * should be set. - * @param {Breakpoint} breakpoint - An object representing information about - * the breakpoint to set. - */ - setBreakpoint(debuggeeId: string, breakpoint: stackdriver.Breakpoint) {} - - /** - * Deletes a breakpoint. - * @param {Debuggee} debuggeeId - The ID of the debuggee to which the breakpoint - * belongs. - * @param {Breakpoint} breakpointId - The ID of the breakpoint to delete. - */ - deleteBreakpoint(debuggeeId: string, breakpointId: string) {} -} diff --git a/test/test-debuglet.ts b/test/test-debuglet.ts index 53e4ed4c..0c0bde42 100644 --- a/test/test-debuglet.ts +++ b/test/test-debuglet.ts @@ -12,73 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as assert from 'assert'; -import {after, afterEach, before, beforeEach, describe, it} from 'mocha'; -import * as fs from 'fs'; -import * as gcpMetadata from 'gcp-metadata'; +import {describe, it} from 'mocha'; import * as path from 'path'; -import * as proxyquire from 'proxyquire'; -import {DebugAgentConfig, ResolvedDebugAgentConfig} from '../src/agent/config'; import {defaultConfig as DEFAULT_CONFIG} from '../src/agent/config'; -import {Debuggee} from '../src/debuggee'; -import * as stackdriver from '../src/types/stackdriver'; DEFAULT_CONFIG.allowExpressions = true; DEFAULT_CONFIG.workingDirectory = path.join(__dirname, '..', '..'); -import { - Debuglet, - CachedPromise, - FindFilesResult, - Platforms, -} from '../src/agent/debuglet'; -import {ScanResults} from '../src/agent/io/scanner'; -import * as extend from 'extend'; - -const DEBUGGEE_ID = 'bar'; -const REGISTER_PATH = '/v2/controller/debuggees/register'; -const BPS_PATH = '/v2/controller/debuggees/' + DEBUGGEE_ID + '/breakpoints'; -const EXPRESSIONS_REGEX = - /Expressions and conditions are not allowed.*https:\/\/goo\.gl\/ShSm6r/; - -// eslint-disable-next-line @typescript-eslint/no-var-requires -const fakeCredentials = require('./fixtures/gcloud-credentials.json'); - -const packageInfo = { - name: 'Some name', - version: 'Some version', -}; +import {CachedPromise} from '../src/agent/debuglet'; import * as nock from 'nock'; -import * as nocks from './nocks'; nock.disableNetConnect(); -const defaultConfig = extend(true, {}, DEFAULT_CONFIG, {logLevel: 0}); - -let oldGP: string | undefined; - -// TODO: Have this actually implement Breakpoint. -const bp: stackdriver.Breakpoint = { - id: 'test', - action: 'CAPTURE', - location: {path: 'build/test/fixtures/foo.js', line: 2}, -} as stackdriver.Breakpoint; -// TODO: Have this actually implement Breakpoint. -const errorBp: stackdriver.Breakpoint = { - id: 'testLog', - action: 'FOO', - location: {path: 'build/test/fixtures/foo.js', line: 2}, -} as {} as stackdriver.Breakpoint; - -function verifyBreakpointRejection( - re: RegExp, - body: {breakpoint: stackdriver.Breakpoint} -) { - const status = body.breakpoint.status; - const hasCorrectDescription = !!status!.description.format.match(re); - return status!.isError && hasCorrectDescription; -} - describe('CachedPromise', () => { it('CachedPromise.get() will resolve after CachedPromise.resolve()', function (done) { this.timeout(2000); @@ -89,1725 +34,3 @@ describe('CachedPromise', () => { cachedPromise.resolve(); }); }); - -// TODO: Write Debuglet tests that work against the Firebase backend. - -// describe('Debuglet', () => { -// describe('findFiles', () => { -// const SOURCEMAP_DIR = path.join(__dirname, 'fixtures', 'sourcemaps'); - -// it('throws an error for an invalid directory', async () => { -// const config = extend({}, defaultConfig, { -// workingDirectory: path.join(SOURCEMAP_DIR, '!INVALID'), -// }); -// let err: Error | null = null; -// try { -// await Debuglet.findFiles(config, 'fake-id'); -// } catch (e) { -// err = e as Error; -// } -// assert.ok(err); -// }); - -// it('finds the correct sourcemaps files', async () => { -// const config = extend({}, defaultConfig, { -// workingDirectory: SOURCEMAP_DIR, -// }); - -// const searchResults = await Debuglet.findFiles(config, 'fake-id'); -// assert(searchResults.jsStats); -// assert.strictEqual(Object.keys(searchResults.jsStats).length, 1); -// assert(searchResults.jsStats[path.join(SOURCEMAP_DIR, 'js-file.js')]); - -// assert.strictEqual(searchResults.mapFiles.length, 2); -// const mapFiles = searchResults.mapFiles.sort(); -// assert(mapFiles[0].endsWith('empty-source-map.js.map')); -// assert(mapFiles[1].endsWith('js-map-file.js.map')); -// }); -// }); - -// describe('setup', () => { -// before(() => { -// oldGP = process.env.GCLOUD_PROJECT; -// }); - -// after(() => { -// process.env.GCLOUD_PROJECT = oldGP; -// }); - -// beforeEach(() => { -// delete process.env.GCLOUD_PROJECT; -// nocks.oauth2(); -// }); - -// afterEach(() => { -// nock.cleanAll(); -// }); - -// it('should merge config correctly', () => { -// const testValue = 2 * defaultConfig.capture.maxExpandFrames; -// const config = {capture: {maxExpandFrames: testValue}}; - -// // TODO: Fix this so that config does not have to be cast as -// // DebugAgentConfig. -// const mergedConfig = Debuglet.normalizeConfig_( -// config as DebugAgentConfig -// ); -// // TODO: Debuglet.normalizeConfig_() expects 1 parameter but the original -// // test code had zero arguments here. Determine which is correct. -// const compareConfig = Debuglet.normalizeConfig_(null!); -// // The actual config should be exactly defaultConfig with only -// // maxExpandFrames adjusted. -// compareConfig.capture.maxExpandFrames = testValue; -// assert.deepStrictEqual(mergedConfig, compareConfig); -// }); - -// it('should not start when projectId is not available', done => { -// const debug = new Debug({}, packageInfo); - -// const savedGetProjectId = debug.authClient.getProjectId; -// debug.authClient.getProjectId = () => { -// return Promise.reject(new Error('no project id')); -// }; - -// const debuglet = new Debuglet(debug, defaultConfig); - -// debuglet.once('initError', (err: Error) => { -// assert.ok(err); -// // no need to stop the debuggee. -// debug.authClient.getProjectId = savedGetProjectId; -// done(); -// }); -// debuglet.once('started', () => { -// assert.fail('The debuglet should not have started'); -// }); -// debuglet.start(); -// }); - -// it('should give a useful error message when projectId is not available', done => { -// const debug = new Debug({}, packageInfo); - -// const savedGetProjectId = debug.authClient.getProjectId; -// debug.authClient.getProjectId = () => { -// return Promise.reject(new Error('no project id')); -// }; - -// const debuglet = new Debuglet(debug, defaultConfig); - -// let message = ''; -// const savedLoggerError = debuglet.logger.error; -// debuglet.logger.error = (text: string) => { -// message += text; -// }; - -// debuglet.once('initError', err => { -// debug.authClient.getProjectId = savedGetProjectId; -// debuglet.logger.error = savedLoggerError; -// assert.ok(err); -// assert(message.startsWith('The project ID could not be determined:')); -// done(); -// }); -// debuglet.once('started', () => { -// assert.fail('The debuglet should fail to start without a projectId'); -// }); -// debuglet.start(); -// }); - -// it('should not crash without project num', done => { -// const debug = new Debug({}, packageInfo); - -// const savedGetProjectId = debug.authClient.getProjectId; -// debug.authClient.getProjectId = () => { -// return Promise.reject(new Error('no project id')); -// }; - -// const debuglet = new Debuglet(debug, defaultConfig); - -// debuglet.once('started', () => { -// assert.fail('The debuglet should not have started'); -// }); -// debuglet.once('initError', () => { -// debug.authClient.getProjectId = savedGetProjectId; -// done(); -// }); -// debuglet.start(); -// }); - -// it('should use config.projectId', done => { -// const projectId = '11020304f2934-a'; -// const debug = new Debug( -// {projectId, credentials: fakeCredentials}, -// packageInfo -// ); - -// nocks.projectId('project-via-metadata'); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, { -// debuggee: {id: DEBUGGEE_ID}, -// }); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// // TODO: Handle the case where debuglet.debuggee is undefined -// assert.strictEqual((debuglet.debuggee as Debuggee).project, projectId); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should enable breakpoint canary when enableCanary is set', done => { -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); -// nocks.oauth2(); - -// const config = debugletConfig(); -// config.serviceContext.enableCanary = true; -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, { -// debuggee: {id: DEBUGGEE_ID}, -// }); - -// debuglet.once('registered', () => { -// assert.strictEqual( -// (debuglet.debuggee as Debuggee).canaryMode, -// 'CANARY_MODE_ALWAYS_ENABLED' -// ); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should have default resetV8DebuggerThreshold value', done => { -// const debuglet = new Debuglet(new Debug({}, packageInfo), {}); -// assert.strictEqual(debuglet.config.resetV8DebuggerThreshold, 30); -// done(); -// }); - -// it('should overwrite resetV8DebuggerThreshold when available', done => { -// const debuglet = new Debuglet(new Debug({}, packageInfo), { -// resetV8DebuggerThreshold: 123, -// }); -// assert.strictEqual(debuglet.config.resetV8DebuggerThreshold, 123); -// done(); -// }); - -// it('should not fail if files cannot be read', done => { -// const MOCKED_DIRECTORY = process.cwd(); -// const errors: Array<{filename: string; error: string}> = []; -// for (let i = 1; i <= 2; i++) { -// const filename = `cannot-read-${i}.js`; -// const error = `EACCES: permission denied, open '${filename}'`; -// errors.push({filename, error}); -// } -// const mockedDebuglet = proxyquire('../src/agent/debuglet', { -// './io/scanner': { -// scan: (baseDir: string, regex: RegExp, precomputedHash?: string) => { -// assert.strictEqual(baseDir, MOCKED_DIRECTORY); -// const results: ScanResults = { -// errors: () => { -// const map = new Map(); -// for (const item of errors) { -// map.set(item.filename, new Error(item.error)); -// } -// return map; -// }, -// all: () => { -// return {}; -// }, -// selectStats: () => { -// return {}; -// }, -// selectFiles: () => { -// return []; -// }, -// hash: precomputedHash || 'fake-hash', -// }; -// return results; -// }, -// }, -// }); -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); -// const config = extend({}, defaultConfig, { -// workingDirectory: MOCKED_DIRECTORY, -// }); -// const debuglet = new mockedDebuglet.Debuglet(debug, config); -// let text = ''; -// debuglet.logger.warn = (s: string) => { -// text += s; -// }; - -// debuglet.on('initError', () => { -// assert.fail('It should not fail for files it cannot read'); -// }); - -// debuglet.once('started', () => { -// for (const item of errors) { -// const regex = new RegExp(item.error); -// assert( -// regex.test(text), -// `Should warn that file '${item.filename}' cannot be read` -// ); -// } -// debuglet.stop(); -// done(); -// }); - -// debuglet.start(); -// }); - -// describe('environment variables', () => { -// let env: NodeJS.ProcessEnv; -// beforeEach(() => { -// env = extend({}, process.env); -// }); -// afterEach(() => { -// process.env = extend({}, env); -// }); - -// it('should use GCLOUD_PROJECT in lieu of config.projectId', done => { -// process.env.GCLOUD_PROJECT = '11020304f2934-b'; -// const debug = new Debug({credentials: fakeCredentials}, packageInfo); - -// nocks.projectId('project-via-metadata'); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, { -// debuggee: {id: DEBUGGEE_ID}, -// }); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// assert.strictEqual( -// debuglet.debuggee!.project, -// process.env.GCLOUD_PROJECT -// ); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should use options.projectId in preference to the environment variable', done => { -// process.env.GCLOUD_PROJECT = 'should-not-be-used'; -// const debug = new Debug( -// {projectId: 'project-via-options', credentials: fakeCredentials}, -// packageInfo -// ); - -// nocks.projectId('project-via-metadata'); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, { -// debuggee: {id: DEBUGGEE_ID}, -// }); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// assert.strictEqual(debuglet.debuggee!.project, 'project-via-options'); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should respect GCLOUD_DEBUG_LOGLEVEL', done => { -// process.env.GCLOUD_PROJECT = '11020304f2934'; -// process.env.GCLOUD_DEBUG_LOGLEVEL = '3'; -// const debug = new Debug({credentials: fakeCredentials}, packageInfo); - -// nocks.projectId('project-via-metadata'); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, { -// debuggee: {id: DEBUGGEE_ID}, -// }); - -// let buffer = ''; -// const oldConsoleError = console.error; -// console.error = (str: string) => { -// buffer += str; -// }; - -// debuglet.once('registered', () => { -// const logger = debuglet.logger; -// const STRING1 = 'jjjjjjjjjjjjjjjjjfjfjfjf'; -// const STRING2 = 'kkkkkkkfkfkfkfkfkkffkkkk'; - -// logger.info(STRING1); -// logger.debug(STRING2); -// console.error = oldConsoleError; - -// assert(buffer.indexOf(STRING1) !== -1); -// assert(buffer.indexOf(STRING2) === -1); - -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should respect GAE_SERVICE and GAE_VERSION env. vars.', () => { -// process.env.GAE_SERVICE = 'fake-gae-service'; -// process.env.GAE_VERSION = 'fake-gae-version'; -// const debug = new Debug({}, packageInfo); -// const debuglet = new Debuglet(debug, defaultConfig); -// assert.ok(debuglet.config); -// assert.ok(debuglet.config.serviceContext); -// assert.strictEqual( -// debuglet.config.serviceContext.service, -// 'fake-gae-service' -// ); -// assert.strictEqual( -// debuglet.config.serviceContext.version, -// 'fake-gae-version' -// ); -// }); - -// it('should respect GAE_MODULE_NAME and GAE_MODULE_VERSION env. vars.', () => { -// process.env.GAE_MODULE_NAME = 'fake-gae-service'; -// process.env.GAE_MODULE_VERSION = 'fake-gae-version'; -// const debug = new Debug({}, packageInfo); -// const debuglet = new Debuglet(debug, defaultConfig); -// assert.ok(debuglet.config); -// assert.ok(debuglet.config.serviceContext); -// assert.strictEqual( -// debuglet.config.serviceContext.service, -// 'fake-gae-service' -// ); -// assert.strictEqual( -// debuglet.config.serviceContext.version, -// 'fake-gae-version' -// ); -// }); - -// it('should respect K_SERVICE and K_REVISION env. vars.', () => { -// process.env.K_SERVICE = 'fake-cloudrun-service'; -// process.env.K_REVISION = 'fake-cloudrun-version'; -// const debug = new Debug({}, packageInfo); -// const debuglet = new Debuglet(debug, defaultConfig); -// assert.ok(debuglet.config); -// assert.ok(debuglet.config.serviceContext); -// assert.strictEqual( -// debuglet.config.serviceContext.service, -// 'fake-cloudrun-service' -// ); -// assert.strictEqual( -// debuglet.config.serviceContext.version, -// 'fake-cloudrun-version' -// ); -// }); - -// it('should respect FUNCTION_NAME env. var.', () => { -// process.env.FUNCTION_NAME = 'fake-fn-name'; -// const debug = new Debug({}, packageInfo); -// const debuglet = new Debuglet(debug, defaultConfig); -// assert.ok(debuglet.config); -// assert.ok(debuglet.config.serviceContext); -// assert.strictEqual( -// debuglet.config.serviceContext.service, -// 'fake-fn-name' -// ); -// assert.strictEqual( -// debuglet.config.serviceContext.version, -// 'unversioned' -// ); -// }); - -// it('should prefer new flex vars over GAE_MODULE_*', () => { -// process.env.GAE_MODULE_NAME = 'fake-gae-module'; -// process.env.GAE_MODULE_VERSION = 'fake-gae-module-version'; -// process.env.GAE_SERVICE = 'fake-gae-service'; -// process.env.GAE_VERSION = 'fake-gae-version'; -// const debug = new Debug({}, packageInfo); -// const debuglet = new Debuglet(debug, defaultConfig); -// assert.ok(debuglet.config); -// assert.ok(debuglet.config.serviceContext); -// assert.strictEqual( -// debuglet.config.serviceContext.service, -// 'fake-gae-service' -// ); -// assert.strictEqual( -// debuglet.config.serviceContext.version, -// 'fake-gae-version' -// ); -// }); - -// it('should respect GAE_DEPLOYMENT_ID env. var. when available', () => { -// process.env.GAE_DEPLOYMENT_ID = 'some deployment id'; -// delete process.env.GAE_MINOR_VERSION; -// const debug = new Debug({}, packageInfo); -// const debuglet = new Debuglet(debug, defaultConfig); -// assert.ok(debuglet.config); -// assert.ok(debuglet.config.serviceContext); -// assert.strictEqual( -// debuglet.config.serviceContext.minorVersion_, -// 'some deployment id' -// ); -// }); - -// it('should respect GAE_MINOR_VERSION env. var. when available', () => { -// delete process.env.GAE_DEPLOYMENT_ID; -// process.env.GAE_MINOR_VERSION = 'some minor version'; -// const debug = new Debug({}, packageInfo); -// const debuglet = new Debuglet(debug, defaultConfig); -// assert.ok(debuglet.config); -// assert.ok(debuglet.config.serviceContext); -// assert.strictEqual( -// debuglet.config.serviceContext.minorVersion_, -// 'some minor version' -// ); -// }); - -// it('should prefer GAE_DEPLOYMENT_ID over GAE_MINOR_VERSION', () => { -// process.env.GAE_DEPLOYMENT_ID = 'some deployment id'; -// process.env.GAE_MINOR_VERSION = 'some minor version'; -// const debug = new Debug({}, packageInfo); -// const debuglet = new Debuglet(debug, defaultConfig); -// assert.ok(debuglet.config); -// assert.ok(debuglet.config.serviceContext); -// assert.strictEqual( -// debuglet.config.serviceContext.minorVersion_, -// 'some deployment id' -// ); -// }); - -// it('should not have minorVersion unless enviroment provides it', () => { -// const debug = new Debug({}, packageInfo); -// const debuglet = new Debuglet(debug, defaultConfig); -// assert.ok(debuglet.config); -// assert.ok(debuglet.config.serviceContext); -// // TODO: IMPORTANT: It appears that this test is incorrect as it -// // is. That is, if minorVersion is replaced with the -// // correctly named minorVersion_, then the test fails. -// // Resolve this. -// assert.strictEqual( -// undefined, -// ( -// debuglet.config.serviceContext as { -// minorVersion: {}; -// } -// ).minorVersion -// ); -// }); - -// it('should not provide minorversion upon registration on non flex', done => { -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH, (body: {debuggee: Debuggee}) => { -// assert.strictEqual(undefined, body.debuggee.labels!.minorversion); -// return true; -// }) -// .once() -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}); - -// // TODO: Determine if the id parameter should be used. -// debuglet.once('registered', () => { -// debuglet.stop(); -// scope.done(); -// done(); -// }); -// debuglet.start(); -// }); -// }); - -// it('should retry on failed registration', function (done) { -// this.timeout(10000); -// const debug = new Debug( -// {projectId: '11020304f2934', credentials: fakeCredentials}, -// packageInfo -// ); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(404) -// .post(REGISTER_PATH) -// .reply(509) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it("should error if a package.json doesn't exist", done => { -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); -// const config = extend({}, defaultConfig, { -// workingDirectory: __dirname, -// forceNewAgent_: true, -// }); -// const debuglet = new Debuglet(debug, config); - -// debuglet.once('initError', (err: Error) => { -// assert(err); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should by default error when workingDirectory is a root directory with a package.json', done => { -// const debug = new Debug({}, packageInfo); -// /* -// * `path.sep` represents a root directory on both Windows and Unix. -// * On Windows, `path.sep` resolves to the current drive. -// * -// * That is, after opening a command prompt in Windows, relative to the -// * drive C: and starting the Node REPL, the value of `path.sep` -// * represents `C:\\'. -// * -// * If `D:` is entered at the prompt to switch to the D: drive before -// * starting the Node REPL, `path.sep` represents `D:\\`. -// */ -// const root = path.sep; -// const mockedDebuglet = proxyquire('../src/agent/debuglet', { -// /* -// * Mock the 'fs' module to verify that if the root directory is used, -// * and the root directory is reported to contain a `package.json` -// * file, then the agent still produces an `initError` when the -// * working directory is the root directory. -// */ -// fs: { -// stat: ( -// filepath: string | Buffer, -// cb: (err: Error | null, stats: {}) => void -// ) => { -// if (filepath === path.join(root, 'package.json')) { -// // The key point is that looking for `package.json` in the -// // root directory does not cause an error. -// return cb(null, {}); -// } -// fs.stat(filepath, cb); -// }, -// }, -// }); -// const config = extend({}, defaultConfig, {workingDirectory: root}); -// const debuglet = new mockedDebuglet.Debuglet(debug, config); -// let text = ''; -// debuglet.logger.error = (str: string) => { -// text += str; -// }; - -// debuglet.on('initError', (err: Error) => { -// const errorMessage = -// 'The working directory is a root ' + -// 'directory. Disabling to avoid a scan of the entire filesystem ' + -// 'for JavaScript files. Use config `allowRootAsWorkingDirectory` ' + -// 'if you really want to do this.'; -// assert.ok(err); -// assert.strictEqual(err.message, errorMessage); -// assert.ok(text.includes(errorMessage)); -// done(); -// }); - -// debuglet.once('started', () => { -// assert.fail('Should not start if workingDirectory is a root directory'); -// }); - -// debuglet.start(); -// }); - -// it('should be able to force the workingDirectory to be a root directory', done => { -// const root = path.sep; -// // Act like the root directory contains a `package.json` file -// const mockedDebuglet = proxyquire('../src/agent/debuglet', { -// fs: { -// stat: ( -// filepath: string | Buffer, -// cb: (err: Error | null, stats: {}) => void -// ) => { -// if (filepath === path.join(root, 'package.json')) { -// return cb(null, {}); -// } -// fs.stat(filepath, cb); -// }, -// }, -// }); - -// // Don't actually scan the entire filesystem. Act like the filesystem -// // is empty. -// mockedDebuglet.Debuglet.findFiles = ( -// config: ResolvedDebugAgentConfig -// ): Promise => { -// const baseDir = config.workingDirectory; -// assert.strictEqual(baseDir, root); -// return Promise.resolve({ -// jsStats: {}, -// mapFiles: [], -// errors: new Map(), -// hash: 'fake-hash', -// }); -// }; - -// // No need to restore `findFiles` because we are modifying a -// // mocked version of `Debuglet` not `Debuglet` itself. - -// const config = extend({}, defaultConfig, { -// workingDirectory: root, -// allowRootAsWorkingDirectory: true, -// }); - -// const debug = new Debug({}, packageInfo); - -// // Act like the debuglet can get a project id -// debug.authClient.getProjectId = async () => 'some-project-id'; - -// const debuglet = new mockedDebuglet.Debuglet(debug, config); - -// debuglet.on('initError', (err: Error) => { -// assert.ifError(err); -// done(); -// }); - -// debuglet.once('started', () => { -// debuglet.stop(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should register successfully otherwise', done => { -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// nocks.oauth2(); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, { -// debuggee: {id: DEBUGGEE_ID}, -// }); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// it('should stop successfully even if stop is called quickly', () => { -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// nocks.oauth2(); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); - -// debuglet.start(); -// debuglet.stop(); -// }); - -// it('should register successfully even if stop was called first', done => { -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// nocks.oauth2(); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, { -// debuggee: {id: DEBUGGEE_ID}, -// }); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.stop(); - -// debuglet.start(); -// }); - -// it('should attempt to retrieve cluster name if needed', done => { -// const savedRunningOnGCP = Debuglet.runningOnGCP; -// Debuglet.runningOnGCP = () => { -// return Promise.resolve(true); -// }; -// const clusterScope = nock(gcpMetadata.HOST_ADDRESS) -// .get('/computeMetadata/v1/instance/attributes/cluster-name') -// .once() -// .reply(200, 'cluster-name-from-metadata'); - -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// nocks.oauth2(); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, { -// debuggee: {id: DEBUGGEE_ID}, -// }); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// debuglet.stop(); -// clusterScope.done(); -// scope.done(); -// Debuglet.runningOnGCP = savedRunningOnGCP; -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should attempt to retreive region correctly if needed', done => { -// const savedGetPlatform = Debuglet.getPlatform; -// Debuglet.getPlatform = () => Platforms.CLOUD_FUNCTION; - -// const clusterScope = nock(gcpMetadata.HOST_ADDRESS) -// .get('/computeMetadata/v1/instance/region') -// .once() -// .reply(200, '123/456/region_name', gcpMetadata.HEADERS); - -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// nocks.oauth2(); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, { -// debuggee: {id: DEBUGGEE_ID}, -// }); - -// debuglet.once('registered', () => { -// Debuglet.getPlatform = savedGetPlatform; -// assert.strictEqual( -// (debuglet.debuggee as Debuggee).labels?.region, -// 'region_name' -// ); -// debuglet.stop(); -// clusterScope.done(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should continue to register when could not get region', done => { -// const savedGetPlatform = Debuglet.getPlatform; -// Debuglet.getPlatform = () => Platforms.CLOUD_FUNCTION; - -// const clusterScope = nock(gcpMetadata.HOST_ADDRESS) -// .get('/computeMetadata/v1/instance/region') -// .once() -// .reply(400); - -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// nocks.oauth2(); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, { -// debuggee: {id: DEBUGGEE_ID}, -// }); - -// debuglet.once('registered', () => { -// Debuglet.getPlatform = savedGetPlatform; -// debuglet.stop(); -// clusterScope.done(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should pass config source context to api', done => { -// const REPO_URL = -// 'https://github.com/non-existent-users/non-existend-repo'; -// const REVISION_ID = '5'; - -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// const config = debugletConfig({ -// sourceContext: {url: REPO_URL, revisionId: REVISION_ID}, -// }); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH, (body: {debuggee: Debuggee}) => { -// const context = body.debuggee.sourceContexts![0]; -// return ( -// context && -// context.url === REPO_URL && -// context.revisionId === REVISION_ID -// ); -// }) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should pass source context to api if present', done => { -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); -// const old = Debuglet.getSourceContextFromFile; -// Debuglet.getSourceContextFromFile = async () => { -// return {a: 5 as {} as string}; -// }; - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH, (body: {debuggee: Debuggee}) => { -// const context = body.debuggee.sourceContexts![0]; -// return context && context.a === 5; -// }) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}); - -// debuglet.once('registered', (id: string) => { -// Debuglet.getSourceContextFromFile = old; -// assert.strictEqual(id, DEBUGGEE_ID); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should prefer config source context to file', done => { -// const REPO_URL = -// 'https://github.com/non-existent-users/non-existend-repo'; -// const REVISION_ID = '5'; - -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// const old = Debuglet.getSourceContextFromFile; -// Debuglet.getSourceContextFromFile = async () => { -// return {a: 5 as {} as string}; -// }; - -// const config = debugletConfig({ -// sourceContext: {url: REPO_URL, revisionId: REVISION_ID}, -// }); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH, (body: {debuggee: Debuggee}) => { -// const context = body.debuggee.sourceContexts![0]; -// return ( -// context && -// context.url === REPO_URL && -// context.revisionId === REVISION_ID -// ); -// }) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}); - -// debuglet.once('registered', (id: string) => { -// Debuglet.getSourceContextFromFile = old; -// assert.strictEqual(id, DEBUGGEE_ID); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should de-activate when the server responds with isDisabled', function (done) { -// this.timeout(4000); -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, { -// debuggee: {id: DEBUGGEE_ID, isDisabled: true}, -// }); - -// debuglet.once('remotelyDisabled', () => { -// assert.ok(!debuglet.fetcherActive); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should retry after a isDisabled request', function (done) { -// this.timeout(4000); -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID, isDisabled: true}}) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}); - -// let gotDisabled = false; -// debuglet.once('remotelyDisabled', () => { -// assert.ok(!debuglet.fetcherActive); -// gotDisabled = true; -// }); - -// debuglet.once('registered', (id: string) => { -// assert.ok(gotDisabled); -// assert.strictEqual(id, DEBUGGEE_ID); -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should re-register when registration expires', done => { -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}) -// .get(BPS_PATH + '?successOnTimeout=true') -// .reply(404) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}); - -// debuglet.once('registered', (id1: string) => { -// assert.strictEqual(id1, DEBUGGEE_ID); -// debuglet.once('registered', (id2: string) => { -// assert.strictEqual(id2, DEBUGGEE_ID); -// debuglet.stop(); -// scope.done(); -// done(); -// }); -// }); - -// debuglet.start(); -// }); - -// it('should fetch and add breakpoints', function (done) { -// this.timeout(2000); -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}) -// .get(BPS_PATH + '?successOnTimeout=true') -// .reply(200, {breakpoints: [bp]}); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// setTimeout(() => { -// assert.deepStrictEqual(debuglet.activeBreakpointMap.test, bp); -// debuglet.stop(); -// scope.done(); -// done(); -// }, 1000); -// }); - -// debuglet.start(); -// }); - -// it('should have breakpoints fetched when promise is resolved', function (done) { -// this.timeout(2000); -// const breakpoint: stackdriver.Breakpoint = { -// id: 'test1', -// action: 'CAPTURE', -// location: {path: 'build/test/fixtures/foo.js', line: 2}, -// } as stackdriver.Breakpoint; - -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}) -// .get(BPS_PATH + '?successOnTimeout=true') -// .reply(200, {breakpoints: [breakpoint]}); -// const debugPromise = debuglet.isReadyManager.isReady(); -// debuglet.once('registered', () => { -// debugPromise.then(() => { -// // Once debugPromise is resolved, debuggee must be registered. -// assert(debuglet.debuggee); -// setTimeout(() => { -// assert.deepStrictEqual( -// debuglet.activeBreakpointMap.test1, -// breakpoint -// ); -// debuglet.activeBreakpointMap = {}; -// debuglet.stop(); -// scope.done(); -// done(); -// }, 1000); -// }); -// }); -// debuglet.start(); -// }); - -// it('should resolve breakpointFetched promise when registration expires', function (done) { -// this.timeout(2000); -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// // const debuglet = new Debuglet(debug, defaultConfig); -// // const scope = nock(API) -// /// this change to a unique scope per test causes -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}) -// .get(BPS_PATH + '?successOnTimeout=true') -// .reply(404); // signal re-registration. -// const debugPromise = debuglet.isReadyManager.isReady(); -// debugPromise.then(() => { -// debuglet.stop(); -// scope.done(); -// done(); -// }); - -// debuglet.start(); -// }); - -// it('should reject breakpoints with conditions when allowExpressions=false', function (done) { -// this.timeout(2000); -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// const config = debugletConfig({allowExpressions: false}); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}) -// .get(BPS_PATH + '?successOnTimeout=true') -// .reply(200, { -// breakpoints: [ -// { -// id: 'test', -// action: 'CAPTURE', -// condition: 'x === 5', -// location: {path: 'fixtures/foo.js', line: 2}, -// }, -// ], -// }) -// .put( -// BPS_PATH + '/test', -// verifyBreakpointRejection.bind(null, EXPRESSIONS_REGEX) -// ) -// .reply(200); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// setTimeout(() => { -// assert.ok(!debuglet.activeBreakpointMap.test); -// debuglet.stop(); -// debuglet.config.allowExpressions = true; -// scope.done(); -// done(); -// }, 1000); -// }); - -// debuglet.start(); -// }); - -// it('should reject breakpoints with expressions when allowExpressions=false', function (done) { -// this.timeout(2000); -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// const config = debugletConfig({allowExpressions: false}); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}) -// .get(BPS_PATH + '?successOnTimeout=true') -// .reply(200, { -// breakpoints: [ -// { -// id: 'test', -// action: 'CAPTURE', -// expressions: ['x'], -// location: {path: 'fixtures/foo.js', line: 2}, -// }, -// ], -// }) -// .put( -// BPS_PATH + '/test', -// verifyBreakpointRejection.bind(null, EXPRESSIONS_REGEX) -// ) -// .reply(200); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// setTimeout(() => { -// assert.ok(!debuglet.activeBreakpointMap.test); -// debuglet.stop(); -// debuglet.config.allowExpressions = true; -// scope.done(); -// done(); -// }, 1000); -// }); - -// debuglet.start(); -// }); - -// it('should re-fetch breakpoints on error', function (done) { -// this.timeout(6000); - -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// const config = debugletConfig(); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}) -// .get(BPS_PATH + '?successOnTimeout=true') -// .reply(404) -// .get(BPS_PATH + '?successOnTimeout=true') -// .reply(200, {waitExpired: true}) -// .get(BPS_PATH + '?successOnTimeout=true') -// .reply(200, {breakpoints: [bp, errorBp]}) -// .put( -// BPS_PATH + '/' + errorBp.id, -// (body: {breakpoint: stackdriver.Breakpoint}) => { -// const status = body.breakpoint.status; -// return ( -// status!.isError && -// status!.description.format.indexOf('actions are CAPTURE') !== -1 -// ); -// } -// ) -// .reply(200); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// setTimeout(() => { -// assert.deepStrictEqual(debuglet.activeBreakpointMap.test, bp); -// assert(!debuglet.activeBreakpointMap.testLog); -// debuglet.stop(); -// scope.done(); -// done(); -// }, 1000); -// }); - -// debuglet.start(); -// }); - -// it('should expire stale breakpoints', function (done) { -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// this.timeout(6000); - -// const config = debugletConfig({ -// breakpointExpirationSec: 1, -// forceNewAgent_: true, -// }); -// const debuglet = new Debuglet(debug, config); -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}) -// .get(BPS_PATH + '?successOnTimeout=true') -// .reply(200, {breakpoints: [bp]}) -// .put( -// BPS_PATH + '/test', -// (body: {breakpoint: stackdriver.Breakpoint}) => { -// const status = body.breakpoint.status; -// return ( -// status!.description.format === 'The snapshot has expired' && -// status!.refersTo === 'BREAKPOINT_AGE' -// ); -// } -// ) -// .reply(200); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// setTimeout(() => { -// assert.deepStrictEqual(debuglet.activeBreakpointMap.test, bp); -// setTimeout(() => { -// assert(!debuglet.activeBreakpointMap.test); -// debuglet.stop(); -// scope.done(); -// done(); -// }, 1100); -// }, 500); -// }); - -// debuglet.start(); -// }); - -// // This test catches regressions in a bug where the agent would -// // re-schedule an already expired breakpoint to expire if the -// // server listed the breakpoint as active (which it may do depending -// // on how quickly the expiry is processed). -// // The test expires a breakpoint and then has the api respond with -// // the breakpoint listed as active. It validates that the breakpoint -// // is only expired with the server once. -// it('should not update expired breakpoints', function (done) { -// const debug = new Debug( -// {projectId: 'fake-project', credentials: fakeCredentials}, -// packageInfo -// ); - -// this.timeout(6000); - -// const config = debugletConfig({ -// breakpointExpirationSec: 1, -// breakpointUpdateIntervalSec: 1, -// forceNewAgent_: true, -// }); -// const debuglet = new Debuglet(debug, config); -// let unexpectedUpdate = false; -// const scope = nock(config.apiUrl) -// .post(REGISTER_PATH) -// .reply(200, {debuggee: {id: DEBUGGEE_ID}}) -// .get(BPS_PATH + '?successOnTimeout=true') -// .reply(200, {breakpoints: [bp]}) -// .put( -// BPS_PATH + '/test', -// (body: {breakpoint: stackdriver.Breakpoint}) => { -// return ( -// body.breakpoint.status!.description.format === -// 'The snapshot has expired' -// ); -// } -// ) -// .reply(200) -// .get(BPS_PATH + '?successOnTimeout=true') -// .times(4) -// .reply(200, {breakpoints: [bp]}); - -// // Get ready to fail the test if any additional updates come through. -// nock.emitter.on('no match', req => { -// if (req.path.startsWith(BPS_PATH) && req.method === 'PUT') { -// unexpectedUpdate = true; -// } -// }); - -// debuglet.once('registered', (id: string) => { -// assert.strictEqual(id, DEBUGGEE_ID); -// setTimeout(() => { -// assert.deepStrictEqual(debuglet.activeBreakpointMap.test, bp); -// setTimeout(() => { -// assert(!debuglet.activeBreakpointMap.test); -// assert(!unexpectedUpdate, 'unexpected update request'); -// debuglet.stop(); -// scope.done(); -// done(); -// }, 4500); -// }, 500); -// }); - -// debuglet.start(); -// }); -// }); - -// describe('map subtract', () => { -// it('should be correct', () => { -// const a = {a: 1, b: 2}; -// const b = {a: 1}; -// assert.deepStrictEqual(Debuglet.mapSubtract(a, b), [2]); -// assert.deepStrictEqual(Debuglet.mapSubtract(b, a), []); -// assert.deepStrictEqual(Debuglet.mapSubtract(a, {}), [1, 2]); -// assert.deepStrictEqual(Debuglet.mapSubtract({}, b), []); -// }); -// }); - -// describe('format', () => { -// it('should be correct', () => { -// // TODO: Determine if Debuglet.format() should allow a number[] -// // or if only string[] should be allowed. -// assert.deepStrictEqual( -// Debuglet.format('hi', [5] as {} as string[]), -// 'hi' -// ); -// assert.deepStrictEqual( -// Debuglet.format('hi $0', [5] as {} as string[]), -// 'hi 5' -// ); -// assert.deepStrictEqual( -// Debuglet.format('hi $0 $1', [5, 'there'] as {} as string[]), -// 'hi 5 there' -// ); -// assert.deepStrictEqual( -// Debuglet.format('hi $0 $1', [5] as {} as string[]), -// 'hi 5 $1' -// ); -// assert.deepStrictEqual( -// Debuglet.format('hi $0 $1 $0', [5] as {} as string[]), -// 'hi 5 $1 5' -// ); -// assert.deepStrictEqual( -// Debuglet.format('hi $$', [5] as {} as string[]), -// 'hi $' -// ); -// assert.deepStrictEqual( -// Debuglet.format('hi $$0', [5] as {} as string[]), -// 'hi $0' -// ); -// assert.deepStrictEqual( -// Debuglet.format('hi $00', [5] as {} as string[]), -// 'hi 50' -// ); -// assert.deepStrictEqual( -// Debuglet.format('hi $0', ['$1', 5] as {} as string[]), -// 'hi $1' -// ); -// assert.deepStrictEqual( -// Debuglet.format('hi $11', [ -// 0, -// 1, -// 2, -// 3, -// 4, -// 5, -// 6, -// 7, -// 8, -// 9, -// 'a', -// 'b', -// 'c', -// 'd', -// ] as {} as string[]), -// 'hi b' -// ); -// }); -// }); - -// describe('createDebuggee', () => { -// it('should have sensible labels', () => { -// const debuggee = Debuglet.createDebuggee( -// 'some project', -// 'id', -// {service: 'some-service', version: 'production'}, -// {}, -// false, -// packageInfo, -// Platforms.DEFAULT -// ); -// assert.ok(debuggee); -// assert.ok(debuggee.labels); -// assert.strictEqual(debuggee.labels!.module, 'some-service'); -// assert.strictEqual(debuggee.labels!.version, 'production'); -// }); - -// it('should not add a module label when service is default', () => { -// const debuggee = Debuglet.createDebuggee( -// 'fancy-project', -// 'very-unique', -// {service: 'default', version: 'yellow.5'}, -// {}, -// false, -// packageInfo, -// Platforms.DEFAULT -// ); -// assert.ok(debuggee); -// assert.ok(debuggee.labels); -// assert.strictEqual(debuggee.labels!.module, undefined); -// assert.strictEqual(debuggee.labels!.version, 'yellow.5'); -// }); - -// it('should have an error statusMessage with the appropriate arg', () => { -// const debuggee = Debuglet.createDebuggee( -// 'a', -// 'b', -// {}, -// {}, -// false, -// packageInfo, -// Platforms.DEFAULT, -// undefined, -// 'Some Error Message' -// ); -// assert.ok(debuggee); -// assert.ok(debuggee.statusMessage); -// }); - -// it('should be in CANARY_MODE_DEFAULT_ENABLED canaryMode', () => { -// const debuggee = Debuglet.createDebuggee( -// 'some project', -// 'id', -// {enableCanary: true, allowCanaryOverride: true}, -// {}, -// false, -// packageInfo, -// Platforms.DEFAULT -// ); -// assert.strictEqual(debuggee.canaryMode, 'CANARY_MODE_DEFAULT_ENABLED'); -// }); - -// it('should be in CANARY_MODE_ALWAYS_ENABLED canaryMode', () => { -// const debuggee = Debuglet.createDebuggee( -// 'some project', -// 'id', -// {enableCanary: true, allowCanaryOverride: false}, -// {}, -// false, -// packageInfo, -// Platforms.DEFAULT -// ); -// assert.strictEqual(debuggee.canaryMode, 'CANARY_MODE_ALWAYS_ENABLED'); -// }); - -// it('should be in CANARY_MODE_DEFAULT_DISABLED canaryMode', () => { -// const debuggee = Debuglet.createDebuggee( -// 'some project', -// 'id', -// {enableCanary: false, allowCanaryOverride: true}, -// {}, -// false, -// packageInfo, -// Platforms.DEFAULT -// ); -// assert.strictEqual(debuggee.canaryMode, 'CANARY_MODE_DEFAULT_DISABLED'); -// }); - -// it('should be in CANARY_MODE_ALWAYS_DISABLED canaryMode', () => { -// const debuggee = Debuglet.createDebuggee( -// 'some project', -// 'id', -// {enableCanary: false, allowCanaryOverride: false}, -// {}, -// false, -// packageInfo, -// Platforms.DEFAULT -// ); -// assert.strictEqual(debuggee.canaryMode, 'CANARY_MODE_ALWAYS_DISABLED'); -// }); -// }); - -// describe('getPlatform', () => { -// it('should correctly identify default platform.', () => { -// assert.ok(Debuglet.getPlatform() === Platforms.DEFAULT); -// }); - -// it('should correctly identify GCF (legacy) platform.', () => { -// // GCF sets this env var on older runtimes. -// process.env.FUNCTION_NAME = 'mock'; -// assert.ok(Debuglet.getPlatform() === Platforms.CLOUD_FUNCTION); -// delete process.env.FUNCTION_NAME; // Don't contaminate test environment. -// }); - -// it('should correctly identify GCF (modern) platform.', () => { -// // GCF sets this env var on modern runtimes. -// process.env.FUNCTION_TARGET = 'mock'; -// assert.ok(Debuglet.getPlatform() === Platforms.CLOUD_FUNCTION); -// delete process.env.FUNCTION_TARGET; // Don't contaminate test environment. -// }); -// }); - -// describe('getRegion', () => { -// it('should return function region for older GCF runtime', async () => { -// process.env.FUNCTION_REGION = 'mock'; - -// assert.ok((await Debuglet.getRegion()) === 'mock'); - -// delete process.env.FUNCTION_REGION; -// }); - -// it('should return region for newer GCF runtime', async () => { -// const clusterScope = nock(gcpMetadata.HOST_ADDRESS) -// .get('/computeMetadata/v1/instance/region') -// .once() -// .reply(200, '123/456/region_name', gcpMetadata.HEADERS); - -// assert.ok((await Debuglet.getRegion()) === 'region_name'); - -// clusterScope.done(); -// }); - -// it('should return undefined when cannot get region metadata', async () => { -// const clusterScope = nock(gcpMetadata.HOST_ADDRESS) -// .get('/computeMetadata/v1/instance/region') -// .once() -// .reply(400); - -// assert.ok((await Debuglet.getRegion()) === undefined); - -// clusterScope.done(); -// }); -// }); - -// describe('_createUniquifier', () => { -// it('should create a unique string', () => { -// const fn = Debuglet._createUniquifier; - -// const desc = 'description'; -// const version = 'version'; -// const uid = 'uid'; -// const sourceContext = {git: 'something'}; -// const labels = {key: 'value'}; - -// const u1 = fn(desc, version, uid, sourceContext, labels); - -// assert.strictEqual(fn(desc, version, uid, sourceContext, labels), u1); - -// assert.notStrictEqual( -// fn('foo', version, uid, sourceContext, labels), -// u1, -// 'changing the description should change the result' -// ); -// assert.notStrictEqual( -// fn(desc, '1.2', uid, sourceContext, labels), -// u1, -// 'changing the version should change the result' -// ); -// assert.notStrictEqual( -// fn(desc, version, '5', sourceContext, labels), -// u1, -// 'changing the description should change the result' -// ); -// assert.notStrictEqual( -// fn(desc, version, uid, {git: 'blah'}, labels), -// u1, -// 'changing the sourceContext should change the result' -// ); -// assert.notStrictEqual( -// fn(desc, version, uid, sourceContext, {key1: 'value2'}), -// u1, -// 'changing the labels should change the result' -// ); -// }); -// }); -// }); - -// a counter for unique test urls. -// let apiUrlInc = 0; - -// /** -// * returns a new config object to be passed to debuglet. always has apiUrl -// * @param conf custom config values -// */ -// function debugletConfig(conf?: {}): ResolvedDebugAgentConfig & { -// apiUrl: string; -// } { -// const apiUrl = 'https://clouddebugger.googleapis.com' + ++apiUrlInc; -// const c = Object.assign( -// {}, -// DEFAULT_CONFIG, -// conf -// ) as ResolvedDebugAgentConfig & {apiUrl: string}; -// c.apiUrl = apiUrl; -// return c; -// } diff --git a/test/test-module.ts b/test/test-module.ts deleted file mode 100644 index c73538ab..00000000 --- a/test/test-module.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import * as assert from 'assert'; -import {before, describe, it} from 'mocha'; -const m: NodeModule & { - start: Function; - get: () => Debuglet | undefined; - // eslint-disable-next-line @typescript-eslint/no-var-requires -} = require('../..'); -import * as nock from 'nock'; -import * as nocks from './nocks'; -import {Debuglet} from '../src/agent/debuglet'; - -nock.disableNetConnect(); - -// TODO: Re-enable once there's mocking that allows firebase client to connect. - -// describe('Debug module', () => { -// before(done => { -// nocks.projectId('project-via-metadata'); -// const debuglet = m.start({ -// projectId: '0', -// debug: {forceNewAgent_: true, testMode_: true}, -// }); -// debuglet.on('started', () => { -// debuglet.stop(); -// done(); -// }); -// }); - -// it('should throw on attempt to start a new agent', () => { -// assert.throws(() => { -// m.start(); -// }); -// }); - -// it('should return the agent via the get() method', () => { -// const agent = m.get(); -// assert(agent, 'Expected to get the started agent'); -// assert.strictEqual(agent!.config.projectId, '0'); -// }); -// }); - -// describe('Debug module without start() called', () => { -// it('get() should return `undefined`', () => { -// delete require.cache[require.resolve('../..')]; -// const m: NodeModule & { -// start: Function; -// get: () => Debuglet | undefined; -// // eslint-disable-next-line @typescript-eslint/no-var-requires -// } = require('../..'); -// const agent = m.get(); -// assert.strictEqual( -// agent, -// undefined, -// 'Expected `undefined` since the agent was not started' -// ); -// }); -// }); diff --git a/test/test-options-credentials.ts b/test/test-options-credentials.ts deleted file mode 100644 index 23f481b5..00000000 --- a/test/test-options-credentials.ts +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2016 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import * as assert from 'assert'; -import {afterEach, beforeEach, describe, it} from 'mocha'; -import * as extend from 'extend'; -import * as nock from 'nock'; -import * as path from 'path'; - -import * as config from '../src/agent/config'; -import {DebugAgentConfig} from '../src/agent/config'; -import {Debuglet} from '../src/agent/debuglet'; - -import * as nocks from './nocks'; - -const envProject = process.env.GCLOUD_PROJECT; -const packageInfo = { - name: 'Some name', - version: 'Some version', -}; - -nock.disableNetConnect(); - -// TODO: Write tests that verify the choice of credentials when using Firebase. - -// describe('test-options-credentials', () => { -// let debuglet: Debuglet | null = null; - -// beforeEach(() => { -// delete process.env.GCLOUD_PROJECT; -// assert.strictEqual(debuglet, null); -// }); - -// afterEach(() => { -// assert.ok(debuglet); -// debuglet!.stop(); -// debuglet = null; -// process.env.GCLOUD_PROJECT = envProject; -// }); - -// it('should use the keyFilename field of the options object', done => { -// // eslint-disable-next-line @typescript-eslint/no-var-requires -// const credentials = require('./fixtures/gcloud-credentials.json'); -// const options = extend( -// {}, -// { -// projectId: 'fake-project', -// keyFilename: path.join( -// __dirname, -// 'fixtures', -// 'gcloud-credentials.json' -// ), -// } -// ); -// const debug = new Debug(options, packageInfo); -// const scope = nocks.oauth2(body => { -// assert.strictEqual(body.client_id, credentials.client_id); -// assert.strictEqual(body.client_secret, credentials.client_secret); -// assert.strictEqual(body.refresh_token, credentials.refresh_token); -// return true; -// }); -// // Since we have to get an auth token, this always gets intercepted second. -// nocks.register(() => { -// scope.done(); -// setImmediate(done); -// return true; -// }); -// nocks.projectId('project-via-metadata'); -// // TODO: Determine how to remove this cast. -// debuglet = new Debuglet(debug, config as {} as DebugAgentConfig); -// debuglet.start(); -// }); - -// it('should use the credentials field of the options object', done => { -// const options = extend( -// {}, -// { -// projectId: 'fake-project', -// credentials: require('./fixtures/gcloud-credentials.json'), -// } -// ); -// const debug = new Debug(options, packageInfo); -// const scope = nocks.oauth2(body => { -// assert.strictEqual(body.client_id, options.credentials.client_id); -// assert.strictEqual(body.client_secret, options.credentials.client_secret); -// assert.strictEqual(body.refresh_token, options.credentials.refresh_token); -// return true; -// }); -// // Since we have to get an auth token, this always gets intercepted second. -// nocks.register(() => { -// scope.done(); -// setImmediate(done); -// return true; -// }); -// nocks.projectId('project-via-metadata'); -// // TODO: Determine how to remove this cast. -// debuglet = new Debuglet(debug, config as {} as DebugAgentConfig); -// debuglet.start(); -// }); - -// it('should ignore keyFilename if credentials is provided', done => { -// // eslint-disable-next-line @typescript-eslint/no-var-requires -// const fileCredentials = require('./fixtures/gcloud-credentials.json'); -// const credentials: {[key: string]: string | undefined} = { -// client_id: 'a', -// client_secret: 'b', -// refresh_token: 'c', -// type: 'authorized_user', -// }; -// const options = extend( -// {}, -// { -// projectId: 'fake-project', -// keyFilename: path.join('test', 'fixtures', 'gcloud-credentials.json'), -// credentials, -// } -// ); -// const debug = new Debug(options, packageInfo); -// const scope = nocks.oauth2(body => { -// assert.strictEqual(body.client_id, credentials.client_id); -// assert.strictEqual(body.client_secret, credentials.client_secret); -// assert.strictEqual(body.refresh_token, credentials.refresh_token); -// return true; -// }); -// // Since we have to get an auth token, this always gets intercepted second. -// nocks.register(() => { -// scope.done(); -// setImmediate(done); -// return true; -// }); -// nocks.projectId('project-via-metadata'); -// ['client_id', 'client_secret', 'refresh_token'].forEach(field => { -// assert(Object.prototype.hasOwnProperty.call(fileCredentials, field)); -// assert(Object.prototype.hasOwnProperty.call(options.credentials, field)); -// assert.notStrictEqual(options.credentials[field], fileCredentials[field]); -// }); -// // TODO: Determine how to remove this cast. -// debuglet = new Debuglet(debug, config as {} as DebugAgentConfig); -// debuglet.start(); -// }); -// }); diff --git a/test/test-state.ts b/test/test-state.ts deleted file mode 100644 index 0c0ea4c9..00000000 --- a/test/test-state.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -import * as utils from '../src/agent/util/utils'; -import * as proxyquire from 'proxyquire'; - -const describeFn = utils.satisfies(process.version, '>=10') - ? describe.skip - : describe; - -describeFn('state', () => { - // Testing of state.js is driven through test-v8debugapi.js. There are - // minimal unit tests here. - - it('should have assertions enabled', () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const state = require('../src/agent/state/legacy-state'); - - // this test makes sure that the necessary environment variables to enable - // asserts are present during testing. Use run-tests.sh, or export - // CLOUD_DEBUG_ASSERTIONS=1 to make sure this test passes. - if (!process.env.CLOUD_DEBUG_ASSERTIONS) { - console.log( - 'This test requires the enviornment variable ' + - 'CLOUD_DEBUG_ASSERTIONS to be set in order to pass' - ); - } - assert.throws(() => { - state.testAssert(); - }); - }); - - it('should not throw if vm is not an object', () => { - // test for - // https://github.com/googleapis/cloud-debug-nodejs/issues/503 - // eslint-disable-next-line @typescript-eslint/no-var-requires - const state = proxyquire('../src/agent/state/legacy-state', {vm: false}); - assert.ok(state); - }); -}); From 9f0019f533f1f8cbe2e89ae84bdeaeea36d70435 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 21:30:28 +0000 Subject: [PATCH 07/20] chore: correct path to node_modules (#1170) Source-Link: https://togithub.com/googleapis/synthtool/commit/8bc6db86e5064c36421923e310e25908b741b6eb Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:e7a37871068ab50b3841cb08619c288dc0665b62a7f39f2bdb7dea0ce6e89a3d --- .github/.OwlBot.lock.yaml | 4 ++-- .github/sync-repo-settings.yaml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a3d003c6..5ddcbae8 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430 -# created: 2023-08-03T18:46:14.719706948Z + digest: sha256:e7a37871068ab50b3841cb08619c288dc0665b62a7f39f2bdb7dea0ce6e89a3d +# created: 2023-09-22T19:12:26.585611364Z diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 1350faef..b46e4c4d 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -7,7 +7,6 @@ branchProtectionRules: requiredStatusCheckContexts: - "ci/kokoro: Samples test" - "ci/kokoro: System test" - - docs - lint - test (14) - test (16) From 8ee59ac6a1e93c12db9d728480c71a33b659f2f5 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sun, 24 Sep 2023 12:56:13 +0200 Subject: [PATCH 08/20] chore(deps): update dependency @types/estree to v1.0.2 (#1171) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/estree](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`1.0.1` -> `1.0.2`](https://renovatebot.com/diffs/npm/@types%2festree/1.0.1/1.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2festree/1.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2festree/1.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2festree/1.0.1/1.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2festree/1.0.1/1.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/cloud-debug-nodejs). --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 324fcb60..125dff26 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "@compodoc/compodoc": "1.1.21", "@types/acorn": "^4.0.2", "@types/console-log-level": "^1.4.0", - "@types/estree": "1.0.1", + "@types/estree": "1.0.2", "@types/extend": "^3.0.0", "@types/mocha": "^9.0.0", "@types/mv": "^2.1.0", From d477d1eaf1fe8a1d94361acfa1094c5089a13953 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 28 Sep 2023 16:32:25 +0200 Subject: [PATCH 09/20] chore(deps): update dependency @fastify/busboy to v2 (#1173) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 125dff26..736178d3 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ }, "dependencies": { "@google-cloud/common": "^5.0.0", - "@fastify/busboy": "1.1.0", + "@fastify/busboy": "2.0.0", "acorn": "^8.0.0", "coffeescript": "^2.0.0", "console-log-level": "^1.4.0", @@ -60,7 +60,7 @@ }, "overrides": { "firebase-admin": { - "@fastify/busboy": "1.1.0" + "@fastify/busboy": "2.0.0" } }, "devDependencies": { From 1f772d2480b4b5fce292d4dafb96f7062709834c Mon Sep 17 00:00:00 2001 From: James McTavish Date: Mon, 2 Oct 2023 10:34:14 -0400 Subject: [PATCH 10/20] docs: add documentation for common config parameters (#1172) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/cloud-debug-nodejs/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) Fixes #1008 🦕 --- .readme-partials.yaml | 13 ++++++++++++- README.md | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.readme-partials.yaml b/.readme-partials.yaml index aba0bae6..c2531d61 100644 --- a/.readme-partials.yaml +++ b/.readme-partials.yaml @@ -32,6 +32,17 @@ body: |- * firebaseKeyPath - Default google application credentials are used if not provided. + Some key configuration options are: + * allowExpressions - Whether or not it is permitted to evaluate + epressions. Functionality is limited when this is not set, but there + is some risk that malicious expressions can mutate program state. + * serviceContext - This information is utilized in the UI to identify all + the running instances of your service. Set this if you do not like the + default values. + * capture - Configuration options on what is captured on a snapshot. Set + this if the default snapshot captures are too limited. Note that + relaxing constraints may cause performance impact. + See [the agent configuration][config-ts] for a list of possible configuration options. @@ -70,6 +81,6 @@ body: |- * The root directory of your application needs to contain a `package.json` file. - [config-ts]: https://github.com/googleapis/cloud-debug-nodejs/blob/master/src/agent/config.ts + [config-ts]: https://github.com/googleapis/cloud-debug-nodejs/blob/main/src/agent/config.ts [extension-page]: https://github.com/GoogleCloudPlatform/snapshot-debugger/tree/main/snapshot_dbg_extension [snapshot-debugger-readme]: https://github.com/GoogleCloudPlatform/snapshot-debugger#readme diff --git a/README.md b/README.md index 8109ca55..5810e45b 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,17 @@ The following options configure the connection to the Firebase database: * firebaseKeyPath - Default google application credentials are used if not provided. +Some key configuration options are: + * allowExpressions - Whether or not it is permitted to evaluate + epressions. Functionality is limited when this is not set, but there + is some risk that malicious expressions can mutate program state. + * serviceContext - This information is utilized in the UI to identify all + the running instances of your service. Set this if you do not like the + default values. + * capture - Configuration options on what is captured on a snapshot. Set + this if the default snapshot captures are too limited. Note that + relaxing constraints may cause performance impact. + See [the agent configuration][config-ts] for a list of possible configuration options. @@ -120,7 +131,7 @@ leaks. See [#811](https://github.com/googleapis/cloud-debug-nodejs/issues/811) * The root directory of your application needs to contain a `package.json` file. -[config-ts]: https://github.com/googleapis/cloud-debug-nodejs/blob/master/src/agent/config.ts +[config-ts]: https://github.com/googleapis/cloud-debug-nodejs/blob/main/src/agent/config.ts [extension-page]: https://github.com/GoogleCloudPlatform/snapshot-debugger/tree/main/snapshot_dbg_extension [snapshot-debugger-readme]: https://github.com/GoogleCloudPlatform/snapshot-debugger#readme From cd4dee0e6476785f7e06032af086a4164d670fa9 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Oct 2023 13:22:15 +0200 Subject: [PATCH 11/20] chore(deps): update dependency @types/estree to v1.0.3 (#1174) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/estree](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`1.0.2` -> `1.0.3`](https://renovatebot.com/diffs/npm/@types%2festree/1.0.2/1.0.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2festree/1.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2festree/1.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2festree/1.0.2/1.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2festree/1.0.2/1.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/cloud-debug-nodejs). --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 736178d3..ca336dad 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "@compodoc/compodoc": "1.1.21", "@types/acorn": "^4.0.2", "@types/console-log-level": "^1.4.0", - "@types/estree": "1.0.2", + "@types/estree": "1.0.3", "@types/extend": "^3.0.0", "@types/mocha": "^9.0.0", "@types/mv": "^2.1.0", From 728b90ebdd6f73081261019f3d4d2c4ce121bea6 Mon Sep 17 00:00:00 2001 From: James McTavish Date: Wed, 20 Dec 2023 15:06:55 -0500 Subject: [PATCH 12/20] fix: increase capture limit to allow Windows tests to pass (#1188) --- test/test-v8debugapi.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test-v8debugapi.ts b/test/test-v8debugapi.ts index d907fbaf..0a843c6f 100644 --- a/test/test-v8debugapi.ts +++ b/test/test-v8debugapi.ts @@ -1123,13 +1123,13 @@ describe('v8debugapi', () => { const bp: stackdriver.Breakpoint = { id: 'fake-id-124', // TODO(dominickramer): This path can be lest strict when this file has - // been - // converted to Typescript. + // been converted to Typescript. location: {path: 'build/test/test-v8debugapi-code.js', line: 10}, expressions: ['process.env', 'hasGetter'], } as {} as stackdriver.Breakpoint; const oldMaxData = config.capture.maxDataSize; - config.capture.maxDataSize = 20000; + // Note the boosted maxDataSize to accommodate tests run on Windows. + config.capture.maxDataSize = 200000; api.set(bp, err1 => { assert.ifError(err1); api.wait(bp, err2 => { From 509c6f19983103cd638a0cbf69a241ea8edd3b88 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 20 Dec 2023 21:14:15 +0100 Subject: [PATCH 13/20] chore(deps): update dependency @compodoc/compodoc to v1.1.23 (#1175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@compodoc/compodoc](https://togithub.com/compodoc/compodoc) | [`1.1.21` -> `1.1.23`](https://renovatebot.com/diffs/npm/@compodoc%2fcompodoc/1.1.21/1.1.23) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@compodoc%2fcompodoc/1.1.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@compodoc%2fcompodoc/1.1.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@compodoc%2fcompodoc/1.1.21/1.1.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@compodoc%2fcompodoc/1.1.21/1.1.23?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
compodoc/compodoc (@​compodoc/compodoc) ### [`v1.1.23`](https://togithub.com/compodoc/compodoc/blob/HEAD/CHANGELOG.md#1123) [Compare Source](https://togithub.com/compodoc/compodoc/compare/1.1.22...1.1.23) ##### Merged - Update translations in ru-RU locale, sort strings [#​1396](https://togithub.com/compodoc/compodoc/pull/1396), Thanks [Eugeno](https://togithub.com/Eugeno) - Update translations in ru-RU locale, refactor i18n sorting and translation strings [9861d8c](https://togithub.com/compodoc/compodoc/commit/9861d8ccc3065a4bf82126d552c13eddf4e58dc0) - feat: georgian language support [#​1392](https://togithub.com/compodoc/compodoc/pull/1392), Thanks [KostaD02](https://togithub.com/KostaD02) ##### Bug fixes - fix(dark-mode): avoid flickering when navigating between pages ([0ff45cd](https://togithub.com/compodoc/compodoc/commit/0ff45cd)), closes [#​1397](https://togithub.com/compodoc/compodoc/issues/1397) ### [`v1.1.22`](https://togithub.com/compodoc/compodoc/blob/HEAD/CHANGELOG.md#1122) [Compare Source](https://togithub.com/compodoc/compodoc/compare/1.1.21...1.1.22) ##### Merged - Added Russian translation [#​1386](https://togithub.com/compodoc/compodoc/pull/1386), Thanks [RusFjord](https://togithub.com/RusFjord) - docs: updated the tags in the readme file [#​1365](https://togithub.com/compodoc/compodoc/pull/1365), Thanks [alkavats1](https://togithub.com/alkavats1) ##### Bug fixes - fix(app): [@​example](https://togithub.com/example) render twice for methods ([f5d6f97](https://togithub.com/compodoc/compodoc/commit/f5d6f97)), closes [#​1385](https://togithub.com/compodoc/compodoc/issues/1385) - fix(app): interfaces multiple extends support ([229f407](https://togithub.com/compodoc/compodoc/commit/229f407)), closes [#​1364](https://togithub.com/compodoc/compodoc/issues/1364) - fix(app): relax [@​angular-devkit/schematics](https://togithub.com/angular-devkit/schematics) version for Angular v14.x support ([51fe4b9](https://togithub.com/compodoc/compodoc/commit/51fe4b9)), closes [#​1362](https://togithub.com/compodoc/compodoc/issues/1362) - fix(app): disableLifeCycleHooks for pipes and services ([753b74d](https://togithub.com/compodoc/compodoc/commit/753b74d)), closes [#​1369](https://togithub.com/compodoc/compodoc/issues/1369) - fix(app): json export and disableSourceCode - template and style sources should not be added ([6a85f1b](https://togithub.com/compodoc/compodoc/commit/6a85f1b)), closes [#​1370](https://togithub.com/compodoc/compodoc/issues/1370) - fix(app): remove inside dependency no longer used, bump dev/Dependencies ([91865b7](https://togithub.com/compodoc/compodoc/commit/91865b7)), closes [#​1355](https://togithub.com/compodoc/compodoc/issues/1355)
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/cloud-debug-nodejs). --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ca336dad..2b3f2d18 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ }, "devDependencies": { "@babel/plugin-proposal-private-methods": "^7.18.6", - "@compodoc/compodoc": "1.1.21", + "@compodoc/compodoc": "1.1.23", "@types/acorn": "^4.0.2", "@types/console-log-level": "^1.4.0", "@types/estree": "1.0.3", From 780ea600f7540a32cdc2a3c5b8e889fb55944115 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 20 Dec 2023 21:22:15 +0100 Subject: [PATCH 14/20] chore(deps): update dependency @types/estree to v1.0.5 (#1179) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/estree](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`1.0.3` -> `1.0.5`](https://renovatebot.com/diffs/npm/@types%2festree/1.0.3/1.0.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2festree/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2festree/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2festree/1.0.3/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2festree/1.0.3/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/cloud-debug-nodejs). --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2b3f2d18..65a691af 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "@compodoc/compodoc": "1.1.23", "@types/acorn": "^4.0.2", "@types/console-log-level": "^1.4.0", - "@types/estree": "1.0.3", + "@types/estree": "1.0.5", "@types/extend": "^3.0.0", "@types/mocha": "^9.0.0", "@types/mv": "^2.1.0", From a4c3ff88042e2acf3b80d0db92e2c99a910a5abe Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 20 Dec 2023 22:34:15 +0100 Subject: [PATCH 15/20] chore(deps): update dependency @types/node to v20 (#1177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`^18.0.0` -> `^20.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/18.18.6/20.8.8) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/18.18.6/20.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/18.18.6/20.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/cloud-debug-nodejs). --- package.json | 2 +- system-test/fixtures/sample/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 65a691af..44e608d2 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "@types/mocha": "^9.0.0", "@types/mv": "^2.1.0", "@types/ncp": "^2.0.3", - "@types/node": "^18.0.0", + "@types/node": "^20.0.0", "@types/proxyquire": "^1.3.28", "@types/semver": "^7.0.0", "@types/tmp": "^0.2.0", diff --git a/system-test/fixtures/sample/package.json b/system-test/fixtures/sample/package.json index 2798ab60..487fb032 100644 --- a/system-test/fixtures/sample/package.json +++ b/system-test/fixtures/sample/package.json @@ -16,6 +16,6 @@ "devDependencies": { "gts": "^2.0.0", "typescript": "4.8.4", - "@types/node": "^18.0.0" + "@types/node": "^20.0.0" } } From a4209b84501e0a1fa48326db640e8d03d2fdd243 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 21 Dec 2023 15:53:31 +0100 Subject: [PATCH 16/20] chore(deps): update actions/setup-node action to v4 (#1176) --- .github/workflows/ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 62555f76..5aebfdad 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: node: [14, 16, 18, 20] steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - run: node --version @@ -33,7 +33,7 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 14 - run: npm install @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 14 - run: npm install @@ -56,7 +56,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 14 - run: npm install From 03bbe9648b921c7c3d707e0a08d40e022cbe04ec Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:04:15 +0000 Subject: [PATCH 17/20] chore: update cloud-rad version to ^0.4.0 (#1181) Source-Link: https://togithub.com/googleapis/synthtool/commit/1063ef32bfe41b112bade7a2dfad4e84d0058ebd Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:e92044720ab3cb6984a70b0c6001081204375959ba3599ef6c42dd99a7783a67 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/release/docs-devsite.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 5ddcbae8..638efabf 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:e7a37871068ab50b3841cb08619c288dc0665b62a7f39f2bdb7dea0ce6e89a3d -# created: 2023-09-22T19:12:26.585611364Z + digest: sha256:e92044720ab3cb6984a70b0c6001081204375959ba3599ef6c42dd99a7783a67 +# created: 2023-11-10T00:24:05.581078808Z diff --git a/.kokoro/release/docs-devsite.sh b/.kokoro/release/docs-devsite.sh index 3596c1e4..81a89f6c 100755 --- a/.kokoro/release/docs-devsite.sh +++ b/.kokoro/release/docs-devsite.sh @@ -25,6 +25,6 @@ if [[ -z "$CREDENTIALS" ]]; then fi npm install -npm install --no-save @google-cloud/cloud-rad@^0.3.7 +npm install --no-save @google-cloud/cloud-rad@^0.4.0 # publish docs to devsite npx @google-cloud/cloud-rad . cloud-rad From d2533f2ff00264f72d5db54de4b87ba6754f1181 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 21 Dec 2023 16:22:14 +0100 Subject: [PATCH 18/20] chore(deps): update dependency @fastify/busboy to v2.1.0 (#1182) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@fastify/busboy](https://togithub.com/fastify/busboy) | [`2.0.0` -> `2.1.0`](https://renovatebot.com/diffs/npm/@fastify%2fbusboy/2.0.0/2.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@fastify%2fbusboy/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@fastify%2fbusboy/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@fastify%2fbusboy/2.0.0/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@fastify%2fbusboy/2.0.0/2.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
fastify/busboy (@​fastify/busboy) ### [`v2.1.0`](https://togithub.com/fastify/busboy/releases/tag/v2.1.0) [Compare Source](https://togithub.com/fastify/busboy/compare/2.0.0...v2.1.0) ##### What's Changed - chore: replace mocha and chai with tap by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://togithub.com/fastify/busboy/pull/123](https://togithub.com/fastify/busboy/pull/123) - build(deps): bump actions/checkout from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://togithub.com/fastify/busboy/pull/128](https://togithub.com/fastify/busboy/pull/128) - Perf parse params decode text by [@​Uzlopak](https://togithub.com/Uzlopak) in [https://togithub.com/fastify/busboy/pull/109](https://togithub.com/fastify/busboy/pull/109) - chore: add missing `use strict` directives by [@​Fdawgs](https://togithub.com/Fdawgs) in [https://togithub.com/fastify/busboy/pull/132](https://togithub.com/fastify/busboy/pull/132) - chore(bench): optimize split param by [@​Fdawgs](https://togithub.com/Fdawgs) in [https://togithub.com/fastify/busboy/pull/133](https://togithub.com/fastify/busboy/pull/133) - chore(package): explicitly declare js module type by [@​Fdawgs](https://togithub.com/Fdawgs) in [https://togithub.com/fastify/busboy/pull/134](https://togithub.com/fastify/busboy/pull/134) - build(deps): bump actions/setup-node from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://togithub.com/fastify/busboy/pull/135](https://togithub.com/fastify/busboy/pull/135) **Full Changelog**: https://togithub.com/fastify/busboy/compare/2.0.0...v2.1.0
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/cloud-debug-nodejs). --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 44e608d2..13f49789 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ }, "dependencies": { "@google-cloud/common": "^5.0.0", - "@fastify/busboy": "2.0.0", + "@fastify/busboy": "2.1.0", "acorn": "^8.0.0", "coffeescript": "^2.0.0", "console-log-level": "^1.4.0", @@ -60,7 +60,7 @@ }, "overrides": { "firebase-admin": { - "@fastify/busboy": "2.0.0" + "@fastify/busboy": "2.1.0" } }, "devDependencies": { From f7579138f9cb9f6a7d967bf7c57dbef5966259d8 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 21 Dec 2023 16:28:17 +0100 Subject: [PATCH 19/20] fix(deps): update dependency firebase-admin to v12 (#1185) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [firebase-admin](https://firebase.google.com/) ([source](https://togithub.com/firebase/firebase-admin-node)) | [`^10.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/firebase-admin/10.3.0/12.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/firebase-admin/12.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/firebase-admin/12.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/firebase-admin/10.3.0/12.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/firebase-admin/10.3.0/12.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
firebase/firebase-admin-node (firebase-admin) ### [`v12.0.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v12.0.0): Firebase Admin Node.js SDK v12.0.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.11.1...v12.0.0) - Breaking change: Upgraded the `@google-cloud/firestore package` to v7. This is a breaking change. Refer to the Cloud Firestore [release notes](https://togithub.com/googleapis/nodejs-firestore/releases/tag/v7.0.0) for more details. - Breaking change: Upgraded the `@google-cloud/storage package` to v7. This is a breaking change. Refer to the Cloud Storage [release notes](https://togithub.com/googleapis/nodejs-storage/releases/tag/v7.0.0) for more details. - Breaking change: Upgraded TypeScript to [v5.1.6](https://togithub.com/microsoft/TypeScript/releases/tag/v5.1.6). - Deprecated support for Node.js 14. Instead use Node.js 16 or higher when deploying the Admin SDK. Node.js 14 support will be dropped in the next major version. - Upgraded the `google-cloud/firestore` dependency to v7.1.0 to support [sum() and \`average() aggregation functions](https://cloud.google.com/firestore/docs/query-data/aggregation-queries#node.js). - Upgraded the `@firebase/database-compat` package to v1. - Dropped AutoML model support ([#​1974](https://togithub.com/firebase/firebase-admin-node/issues/1974)) ##### Bug Fixes - fix(firestore): Export new aggregate types ([#​2396](https://togithub.com/firebase/firebase-admin-node/issues/2396)) ##### Miscellaneous - \[chore] Release 12.0.0 ([#​2404](https://togithub.com/firebase/firebase-admin-node/issues/2404)) - chore: Deprecate Node.js 14 ([#​2397](https://togithub.com/firebase/firebase-admin-node/issues/2397)) - build(deps): Bump typescript, database-compat ([#​2403](https://togithub.com/firebase/firebase-admin-node/issues/2403)) - build(deps-dev): bump [@​types/firebase-token-generator](https://togithub.com/types/firebase-token-generator) ([#​2399](https://togithub.com/firebase/firebase-admin-node/issues/2399)) - build(deps-dev): bump sinon and [@​types/sinon](https://togithub.com/types/sinon) ([#​2398](https://togithub.com/firebase/firebase-admin-node/issues/2398)) - build(deps-dev): bump [@​types/mocha](https://togithub.com/types/mocha) from 10.0.1 to 10.0.6 ([#​2400](https://togithub.com/firebase/firebase-admin-node/issues/2400)) - build(deps-dev): bump [@​types/minimist](https://togithub.com/types/minimist) from 1.2.2 to 1.2.5 ([#​2389](https://togithub.com/firebase/firebase-admin-node/issues/2389)) - build(deps-dev): bump [@​types/request](https://togithub.com/types/request) from 2.48.8 to 2.48.12 ([#​2390](https://togithub.com/firebase/firebase-admin-node/issues/2390)) - chore(deps): bump google-cloud/firestore and google-cloud/storage ### [`v11.11.1`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.11.1): Firebase Admin Node.js SDK v11.11.1 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.11.0...v11.11.1) ##### Miscellaneous - \[chore] Release 11.11.1 ([#​2387](https://togithub.com/firebase/firebase-admin-node/issues/2387)) - build(deps): bump jwks-rsa from 3.0.1 to 3.1.0 ([#​2381](https://togithub.com/firebase/firebase-admin-node/issues/2381)) - chore(deps): bump google-cloud/firestore to 6.8.0 ([#​2385](https://togithub.com/firebase/firebase-admin-node/issues/2385)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.36.3 to 7.38.3 ([#​2380](https://togithub.com/firebase/firebase-admin-node/issues/2380)) - build(deps-dev): bump [@​types/sinon-chai](https://togithub.com/types/sinon-chai) from 3.2.9 to 3.2.12 ([#​2366](https://togithub.com/firebase/firebase-admin-node/issues/2366)) - build(deps-dev): bump [@​babel/traverse](https://togithub.com/babel/traverse) from 7.21.4 to 7.23.2 ([#​2343](https://togithub.com/firebase/firebase-admin-node/issues/2343)) - build(deps-dev): bump eslint from 8.50.0 to 8.51.0 ([#​2330](https://togithub.com/firebase/firebase-admin-node/issues/2330)) - build(deps-dev): bump [@​types/firebase-token-generator](https://togithub.com/types/firebase-token-generator) ([#​2322](https://togithub.com/firebase/firebase-admin-node/issues/2322)) - Bug Fix for issue [#​2320](https://togithub.com/firebase/firebase-admin-node/issues/2320) ([#​2321](https://togithub.com/firebase/firebase-admin-node/issues/2321)) ### [`v11.11.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.11.0): Firebase Admin Node.js SDK v11.11.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.10.1...v11.11.0) ##### New Features - feat(auth): Add Email Privacy support in Project and Tenant config ([#​2198](https://togithub.com/firebase/firebase-admin-node/issues/2198)) ##### Miscellaneous - \[chore] Release 11.11.0 ([#​2315](https://togithub.com/firebase/firebase-admin-node/issues/2315)) - build(deps-dev): bump [@​types/lodash](https://togithub.com/types/lodash) from 4.14.197 to 4.14.199 ([#​2309](https://togithub.com/firebase/firebase-admin-node/issues/2309)) - build(deps-dev): bump eslint from 8.47.0 to 8.50.0 ([#​2311](https://togithub.com/firebase/firebase-admin-node/issues/2311)) - Update `github.ref` value in `release.yml` ([#​2313](https://togithub.com/firebase/firebase-admin-node/issues/2313)) - build(deps-dev): bump nock from 13.3.2 to 13.3.3 ([#​2288](https://togithub.com/firebase/firebase-admin-node/issues/2288)) - build(deps-dev): bump bcrypt from 5.1.0 to 5.1.1 ([#​2289](https://togithub.com/firebase/firebase-admin-node/issues/2289)) - build(deps-dev): bump eslint from 8.43.0 to 8.47.0 ([#​2279](https://togithub.com/firebase/firebase-admin-node/issues/2279)) - build(deps-dev): bump [@​types/lodash](https://togithub.com/types/lodash) from 4.14.195 to 4.14.197 ([#​2280](https://togithub.com/firebase/firebase-admin-node/issues/2280)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​2282](https://togithub.com/firebase/firebase-admin-node/issues/2282)) - build(deps-dev): bump nock from 13.3.1 to 13.3.2 ([#​2270](https://togithub.com/firebase/firebase-admin-node/issues/2270)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.4.3 to 0.4.4 ([#​2273](https://togithub.com/firebase/firebase-admin-node/issues/2273)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.59.9 to 5.62.0 ([#​2264](https://togithub.com/firebase/firebase-admin-node/issues/2264)) - build(deps): bump [@​google-cloud/firestore](https://togithub.com/google-cloud/firestore) from 6.6.1 to 6.7.0 ([#​2265](https://togithub.com/firebase/firebase-admin-node/issues/2265)) - build(deps-dev): bump [@​types/uuid](https://togithub.com/types/uuid) from 9.0.1 to 9.0.2 ([#​2267](https://togithub.com/firebase/firebase-admin-node/issues/2267)) - build(deps-dev): bump [@​firebase/app-compat](https://togithub.com/firebase/app-compat) from 0.2.13 to 0.2.15 ([#​2263](https://togithub.com/firebase/firebase-admin-node/issues/2263)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.11.0 to 6.12.0 ([#​2253](https://togithub.com/firebase/firebase-admin-node/issues/2253)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.36.1 to 7.36.3 ([#​2261](https://togithub.com/firebase/firebase-admin-node/issues/2261)) - build(deps): bump word-wrap from 1.2.3 to 1.2.4 ([#​2256](https://togithub.com/firebase/firebase-admin-node/issues/2256)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 20.3.2 to 20.4.2 ([#​2255](https://togithub.com/firebase/firebase-admin-node/issues/2255)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.4.2 to 0.4.3 ([#​2252](https://togithub.com/firebase/firebase-admin-node/issues/2252)) ### [`v11.10.1`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.10.1): Firebase Admin Node.js SDK v11.10.1 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.10.0...v11.10.1) ##### Miscellaneous - \[chore] Release 11.10.1 ([#​2248](https://togithub.com/firebase/firebase-admin-node/issues/2248)) - Revert "chore: upgrade databse-compat ([#​2244](https://togithub.com/firebase/firebase-admin-node/issues/2244))" ([#​2247](https://togithub.com/firebase/firebase-admin-node/issues/2247)) ### [`v11.10.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.10.0): Firebase Admin Node.js SDK v11.10.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.9.0...v11.10.0) ##### New Features - feat(functions): Add features to task queue functions ([#​2216](https://togithub.com/firebase/firebase-admin-node/issues/2216)) - feat(auth): Add `TotpInfo` field to `UserRecord` ([#​2197](https://togithub.com/firebase/firebase-admin-node/issues/2197)) - feat(storage): Add `getDownloadUrl` method to the Storage API ([#​2036](https://togithub.com/firebase/firebase-admin-node/issues/2036)) ##### Bug Fixes - fix: Update TOTP docstrings ([#​2245](https://togithub.com/firebase/firebase-admin-node/issues/2245)) ##### Miscellaneous - \[chore] Release 11.10.0 ([#​2246](https://togithub.com/firebase/firebase-admin-node/issues/2246)) - chore: upgrade databse-compat ([#​2244](https://togithub.com/firebase/firebase-admin-node/issues/2244)) - build(deps): bump semver from 5.7.1 to 5.7.2 ([#​2242](https://togithub.com/firebase/firebase-admin-node/issues/2242)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.36.0 to 7.36.1 ([#​2239](https://togithub.com/firebase/firebase-admin-node/issues/2239)) - build(deps-dev): bump sinon from 15.0.4 to 15.2.0 ([#​2240](https://togithub.com/firebase/firebase-admin-node/issues/2240)) - Fixed docgen for `getDownloadURL` ([#​2241](https://togithub.com/firebase/firebase-admin-node/issues/2241)) - Fix Memory Leak in AsyncHttpCall affecting auth.listUsers ([#​2236](https://togithub.com/firebase/firebase-admin-node/issues/2236)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.9.5 to 6.11.0 ([#​2231](https://togithub.com/firebase/firebase-admin-node/issues/2231)) - build(deps): bump [@​google-cloud/firestore](https://togithub.com/google-cloud/firestore) from 6.6.0 to 6.6.1 ([#​2232](https://togithub.com/firebase/firebase-admin-node/issues/2232)) - build(deps-dev): bump [@​firebase/app-compat](https://togithub.com/firebase/app-compat) from 0.2.7 to 0.2.13 ([#​2233](https://togithub.com/firebase/firebase-admin-node/issues/2233)) - Fixes to password policy validation ([#​2227](https://togithub.com/firebase/firebase-admin-node/issues/2227)) - Fix nesting in auth config tests ([#​2228](https://togithub.com/firebase/firebase-admin-node/issues/2228)) - build(deps-dev): bump eslint from 8.41.0 to 8.43.0 ([#​2218](https://togithub.com/firebase/firebase-admin-node/issues/2218)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​2223](https://togithub.com/firebase/firebase-admin-node/issues/2223)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.34.4 to 7.36.0 ([#​2219](https://togithub.com/firebase/firebase-admin-node/issues/2219)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.16.3 to 20.3.2 ([#​2224](https://togithub.com/firebase/firebase-admin-node/issues/2224)) - Expose MultiDB within Firestore ([#​2209](https://togithub.com/firebase/firebase-admin-node/issues/2209)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.59.2 to 5.59.9 ([#​2205](https://togithub.com/firebase/firebase-admin-node/issues/2205)) - build(deps-dev): bump [@​types/lodash](https://togithub.com/types/lodash) from 4.14.194 to 4.14.195 ([#​2206](https://togithub.com/firebase/firebase-admin-node/issues/2206)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.4.1 to 0.4.2 ([#​2208](https://togithub.com/firebase/firebase-admin-node/issues/2208)) ### [`v11.9.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.9.0): Firebase Admin Node.js SDK v11.9.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.8.0...v11.9.0) ##### New Features - feat(auth): Add Password Policies support in Project and Tenant config ([#​2107](https://togithub.com/firebase/firebase-admin-node/issues/2107)) ##### Bug Fixes - fix(firestore): Export `Filter` type from Firestore ([#​2192](https://togithub.com/firebase/firebase-admin-node/issues/2192)) ##### Miscellaneous - \[chore] Release 11.9.0 ([#​2196](https://togithub.com/firebase/firebase-admin-node/issues/2196)) - build(deps-dev): bump yargs from 17.7.1 to 17.7.2 ([#​2199](https://togithub.com/firebase/firebase-admin-node/issues/2199)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​2200](https://togithub.com/firebase/firebase-admin-node/issues/2200)) - build(deps-dev): bump [@​types/firebase-token-generator](https://togithub.com/types/firebase-token-generator) ([#​2201](https://togithub.com/firebase/firebase-admin-node/issues/2201)) - chore: Upgrade Firestore to v6.6.0 ([#​2193](https://togithub.com/firebase/firebase-admin-node/issues/2193)) - fix Unsafe JavaScript Equality Checking ([#​2183](https://togithub.com/firebase/firebase-admin-node/issues/2183)) - build(deps-dev): bump nock from 13.3.0 to 13.3.1 ([#​2187](https://togithub.com/firebase/firebase-admin-node/issues/2187)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​2188](https://togithub.com/firebase/firebase-admin-node/issues/2188)) - build(deps-dev): bump eslint from 8.40.0 to 8.41.0 ([#​2189](https://togithub.com/firebase/firebase-admin-node/issues/2189)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​2182](https://togithub.com/firebase/firebase-admin-node/issues/2182)) - build(deps-dev): bump [@​types/chai](https://togithub.com/types/chai) from 4.3.4 to 4.3.5 ([#​2178](https://togithub.com/firebase/firebase-admin-node/issues/2178)) - build(deps-dev): bump eslint from 8.39.0 to 8.40.0 ([#​2177](https://togithub.com/firebase/firebase-admin-node/issues/2177)) - chore: Pin firebase-tools@11.30.0 to fix the CIs ([#​2185](https://togithub.com/firebase/firebase-admin-node/issues/2185)) ### [`v11.8.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.8.0): Firebase Admin Node.js SDK v11.8.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.7.0...v11.8.0) ##### New Features - feat(appcheck): Added replay protection feature to App Check `verifyToken()` API ([#​2148](https://togithub.com/firebase/firebase-admin-node/issues/2148)) ##### Miscellaneous - \[chore] Release 11.8.0 ([#​2175](https://togithub.com/firebase/firebase-admin-node/issues/2175)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.3.7 to 0.4.1 ([#​2173](https://togithub.com/firebase/firebase-admin-node/issues/2173)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.16.1 to 18.16.3 ([#​2172](https://togithub.com/firebase/firebase-admin-node/issues/2172)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.59.0 to 5.59.2 ([#​2171](https://togithub.com/firebase/firebase-admin-node/issues/2171)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.15.11 to 18.16.1 ([#​2166](https://togithub.com/firebase/firebase-admin-node/issues/2166)) - build(deps-dev): bump eslint from 8.38.0 to 8.39.0 ([#​2160](https://togithub.com/firebase/firebase-admin-node/issues/2160)) - build(deps-dev): bump sinon from 15.0.3 to 15.0.4 ([#​2162](https://togithub.com/firebase/firebase-admin-node/issues/2162)) ### [`v11.7.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.7.0): Firebase Admin Node.js SDK v11.7.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.6.0...v11.7.0) ##### New Features - feat(auth): reCAPTCHA Public preview ([#​2129](https://togithub.com/firebase/firebase-admin-node/issues/2129)) - feat(fcm): Add `sendEach` and `sendEachForMulticast` for FCM batch send ([#​2138](https://togithub.com/firebase/firebase-admin-node/issues/2138)) ##### Miscellaneous - \[chore] Release 11.7.0 ([#​2158](https://togithub.com/firebase/firebase-admin-node/issues/2158)) - build(deps-dev): bump [@​types/sinon](https://togithub.com/types/sinon) from 10.0.13 to 10.0.14 ([#​2157](https://togithub.com/firebase/firebase-admin-node/issues/2157)) - build(deps-dev): bump [@​types/lodash](https://togithub.com/types/lodash) from 4.14.192 to 4.14.194 ([#​2156](https://togithub.com/firebase/firebase-admin-node/issues/2156)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.58.0 to 5.59.0 ([#​2154](https://togithub.com/firebase/firebase-admin-node/issues/2154)) - chore: Upgrade dependencies ([#​2147](https://togithub.com/firebase/firebase-admin-node/issues/2147)) ### [`v11.6.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.6.0): Firebase Admin Node.js SDK v11.6.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.5.0...v11.6.0) ##### New Features - feat(auth): Add TOTP support in Project and Tenant config ([#​1989](https://togithub.com/firebase/firebase-admin-node/issues/1989)) ##### Changed - Deprecate sendToDevice and sendToDeviceGroup and their response classes ([#​2090](https://togithub.com/firebase/firebase-admin-node/issues/2090)) ##### Miscellaneous - \[chore] Release 11.6.0 ([#​2139](https://togithub.com/firebase/firebase-admin-node/issues/2139)) - chore: update app check integration tests ([#​2140](https://togithub.com/firebase/firebase-admin-node/issues/2140)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​2134](https://togithub.com/firebase/firebase-admin-node/issues/2134)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.3.5 to 0.3.7 ([#​2133](https://togithub.com/firebase/firebase-admin-node/issues/2133)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.56.0 to 5.57.1 ([#​2135](https://togithub.com/firebase/firebase-admin-node/issues/2135)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.9.4 to 6.9.5 ([#​2136](https://togithub.com/firebase/firebase-admin-node/issues/2136)) - build(deps-dev): bump sinon from 15.0.2 to 15.0.3 ([#​2126](https://togithub.com/firebase/firebase-admin-node/issues/2126)) - build(deps): bump [@​firebase/database-compat](https://togithub.com/firebase/database-compat) from 0.3.1 to 0.3.4 ([#​2125](https://togithub.com/firebase/firebase-admin-node/issues/2125)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.15.5 to 18.15.10 ([#​2123](https://togithub.com/firebase/firebase-admin-node/issues/2123)) - build(deps-dev): bump eslint from 8.35.0 to 8.36.0 ([#​2124](https://togithub.com/firebase/firebase-admin-node/issues/2124)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.3.1 to 0.3.5 ([#​2127](https://togithub.com/firebase/firebase-admin-node/issues/2127)) - build(deps-dev): bump sinon from 15.0.1 to 15.0.2 ([#​2120](https://togithub.com/firebase/firebase-admin-node/issues/2120)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.9.3 to 6.9.4 ([#​2119](https://togithub.com/firebase/firebase-admin-node/issues/2119)) - build(deps-dev): bump [@​firebase/app-compat](https://togithub.com/firebase/app-compat) from 0.2.3 to 0.2.5 ([#​2118](https://togithub.com/firebase/firebase-admin-node/issues/2118)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​2121](https://togithub.com/firebase/firebase-admin-node/issues/2121)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.15.3 to 18.15.5 ([#​2117](https://togithub.com/firebase/firebase-admin-node/issues/2117)) - build(deps): bump [@​firebase/database-types](https://togithub.com/firebase/database-types) from 0.10.3 to 0.10.4 ([#​2101](https://togithub.com/firebase/firebase-admin-node/issues/2101)) - build(deps-dev): bump yargs from 17.6.0 to 17.7.1 ([#​2099](https://togithub.com/firebase/firebase-admin-node/issues/2099)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.48.2 to 5.56.0 ([#​2115](https://togithub.com/firebase/firebase-admin-node/issues/2115)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.14.2 to 18.15.3 ([#​2114](https://togithub.com/firebase/firebase-admin-node/issues/2114)) - build(deps): bump [@​google-cloud/firestore](https://togithub.com/google-cloud/firestore) from 6.4.3 to 6.5.0 ([#​2102](https://togithub.com/firebase/firebase-admin-node/issues/2102)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.13.0 to 18.14.2 ([#​2088](https://togithub.com/firebase/firebase-admin-node/issues/2088)) - build(deps-dev): bump [@​types/uuid](https://togithub.com/types/uuid) from 8.3.4 to 9.0.1 ([#​2086](https://togithub.com/firebase/firebase-admin-node/issues/2086)) - build(deps-dev): bump minimist from 1.2.7 to 1.2.8 ([#​2081](https://togithub.com/firebase/firebase-admin-node/issues/2081)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​2087](https://togithub.com/firebase/firebase-admin-node/issues/2087)) - build(deps-dev): bump eslint from 8.33.0 to 8.35.0 ([#​2089](https://togithub.com/firebase/firebase-admin-node/issues/2089)) - Fixing links to externally defined RTDB APIs. ([#​2085](https://togithub.com/firebase/firebase-admin-node/issues/2085)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.8.0 to 6.9.3 ([#​2082](https://togithub.com/firebase/firebase-admin-node/issues/2082)) - build(deps): bump [@​google-cloud/firestore](https://togithub.com/google-cloud/firestore) from 6.4.2 to 6.4.3 ([#​2079](https://togithub.com/firebase/firebase-admin-node/issues/2079)) - build(deps): bump [@​google-cloud/firestore](https://togithub.com/google-cloud/firestore) from 6.4.0 to 6.4.2 ([#​2074](https://togithub.com/firebase/firebase-admin-node/issues/2074)) - build(deps-dev): bump [@​firebase/auth-types](https://togithub.com/firebase/auth-types) from 0.11.1 to 0.12.0 ([#​2072](https://togithub.com/firebase/firebase-admin-node/issues/2072)) - build(deps-dev): bump [@​firebase/app-compat](https://togithub.com/firebase/app-compat) from 0.2.1 to 0.2.3 ([#​2071](https://togithub.com/firebase/firebase-admin-node/issues/2071)) - build(deps): bump [@​firebase/database-types](https://togithub.com/firebase/database-types) from 0.10.0 to 0.10.3 ([#​2073](https://togithub.com/firebase/firebase-admin-node/issues/2073)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.34.3 to 7.34.4 ([#​2070](https://togithub.com/firebase/firebase-admin-node/issues/2070)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.11.14 to 18.13.0 ([#​2067](https://togithub.com/firebase/firebase-admin-node/issues/2067)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.33.5 to 7.34.3 ([#​2064](https://togithub.com/firebase/firebase-admin-node/issues/2064)) - build(deps): bump [@​fastify/busboy](https://togithub.com/fastify/busboy) from 1.1.0 to 1.2.1 ([#​2066](https://togithub.com/firebase/firebase-admin-node/issues/2066)) - build(deps-dev): bump eslint from 8.31.0 to 8.33.0 ([#​2060](https://togithub.com/firebase/firebase-admin-node/issues/2060)) - build(deps): bump [@​firebase/database-compat](https://togithub.com/firebase/database-compat) from 0.3.0 to 0.3.1 ([#​2059](https://togithub.com/firebase/firebase-admin-node/issues/2059)) - build(deps-dev): bump nock from 13.2.9 to 13.3.0 ([#​2058](https://togithub.com/firebase/firebase-admin-node/issues/2058)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.2.24 to 0.3.1 ([#​2053](https://togithub.com/firebase/firebase-admin-node/issues/2053)) - build(deps-dev): bump [@​firebase/app-compat](https://togithub.com/firebase/app-compat) from 0.1.37 to 0.2.1 ([#​2052](https://togithub.com/firebase/firebase-admin-node/issues/2052)) ### [`v11.5.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.5.0): Firebase Admin Node.js SDK v11.5.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.4.1...v11.5.0) ##### New Features - feat: Fix impersonated service account parsing exception ([#​1862](https://togithub.com/firebase/firebase-admin-node/issues/1862)) ##### Bug Fixes - fix(firestore): Fix PreferRest caching ([#​2040](https://togithub.com/firebase/firebase-admin-node/issues/2040)) ##### Miscellaneous - \[chore] Release 11.5.0 ([#​2049](https://togithub.com/firebase/firebase-admin-node/issues/2049)) - chore: Increase test coverage for service account impersonation support ([#​2047](https://togithub.com/firebase/firebase-admin-node/issues/2047)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​2045](https://togithub.com/firebase/firebase-admin-node/issues/2045)) - build(deps): bump jwks-rsa from 2.1.5 to 3.0.1 ([#​2046](https://togithub.com/firebase/firebase-admin-node/issues/2046)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.47.0 to 5.48.2 ([#​2044](https://togithub.com/firebase/firebase-admin-node/issues/2044)) - build(deps): bump [@​firebase/database-types](https://togithub.com/firebase/database-types) from 0.9.17 to 0.10.0 ([#​2030](https://togithub.com/firebase/firebase-admin-node/issues/2030)) - build(deps): bump json5 from 2.2.1 to 2.2.3 ([#​2038](https://togithub.com/firebase/firebase-admin-node/issues/2038)) - build(deps-dev): bump eslint from 8.29.0 to 8.31.0 ([#​2033](https://togithub.com/firebase/firebase-admin-node/issues/2033)) - build(deps): bump [@​firebase/database-compat](https://togithub.com/firebase/database-compat) from 0.2.10 to 0.3.0 ([#​2029](https://togithub.com/firebase/firebase-admin-node/issues/2029)) - build(deps-dev): bump sinon from 14.0.2 to 15.0.1 ([#​2028](https://togithub.com/firebase/firebase-admin-node/issues/2028)) ### [`v11.4.1`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.4.1): Firebase Admin Node.js SDK v11.4.1 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.4.0...v11.4.1) ##### Bug Fixes - fix: Update jsonwebtoken to v9.0.0 ([#​2025](https://togithub.com/firebase/firebase-admin-node/issues/2025)) ##### Miscellaneous - \[chore] Release 11.4.1 ([#​2026](https://togithub.com/firebase/firebase-admin-node/issues/2026)) - build(deps-dev): bump mocha from 10.1.0 to 10.2.0 ([#​2019](https://togithub.com/firebase/firebase-admin-node/issues/2019)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.42.1 to 5.47.0 ([#​2020](https://togithub.com/firebase/firebase-admin-node/issues/2020)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​2018](https://togithub.com/firebase/firebase-admin-node/issues/2018)) ### [`v11.4.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.4.0): Firebase Admin Node.js SDK v11.4.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.3.0...v11.4.0) ##### Breaking Changes - change: Deprecate AutoML model support ([#​2013](https://togithub.com/firebase/firebase-admin-node/issues/2013)) ##### New Features - feat(fs): preferRest app option for Firestore ([#​1901](https://togithub.com/firebase/firebase-admin-node/issues/1901)) ##### Bug Fixes - fix(fcm): Increase batch send timeout to 15 seconds ([#​1999](https://togithub.com/firebase/firebase-admin-node/issues/1999)) - fix: Unregister socket timeout listener to prevent MaxListenersExceededWarning ([#​1993](https://togithub.com/firebase/firebase-admin-node/issues/1993)) ##### Miscellaneous - \[chore] Release 11.4.0 ([#​2015](https://togithub.com/firebase/firebase-admin-node/issues/2015)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.6.0 to 6.8.0 ([#​2008](https://togithub.com/firebase/firebase-admin-node/issues/2008)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.11.9 to 18.11.14 ([#​2012](https://togithub.com/firebase/firebase-admin-node/issues/2012)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​2009](https://togithub.com/firebase/firebase-admin-node/issues/2009)) - build(deps): bump decode-uri-component from 0.2.0 to 0.2.2 ([#​1998](https://togithub.com/firebase/firebase-admin-node/issues/1998)) - build(deps): bump qs from 6.5.2 to 6.5.3 in /.github/actions/send-tweet ([#​2006](https://togithub.com/firebase/firebase-admin-node/issues/2006)) - build(deps-dev): bump eslint from 8.28.0 to 8.29.0 ([#​2003](https://togithub.com/firebase/firebase-admin-node/issues/2003)) - build(deps-dev): bump [@​types/lodash](https://togithub.com/types/lodash) from 4.14.186 to 4.14.191 ([#​1997](https://togithub.com/firebase/firebase-admin-node/issues/1997)) - build(deps-dev): bump eslint from 8.24.0 to 8.28.0 ([#​1991](https://togithub.com/firebase/firebase-admin-node/issues/1991)) - build(deps-dev): bump chai from 4.3.6 to 4.3.7 ([#​1990](https://togithub.com/firebase/firebase-admin-node/issues/1990)) - build(deps-dev): bump sinon from 14.0.1 to 14.0.2 ([#​1984](https://togithub.com/firebase/firebase-admin-node/issues/1984)) - build(deps-dev): bump [@​firebase/auth-types](https://togithub.com/firebase/auth-types) from 0.11.0 to 0.11.1 ([#​1985](https://togithub.com/firebase/firebase-admin-node/issues/1985)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.7.23 to 18.11.9 ([#​1983](https://togithub.com/firebase/firebase-admin-node/issues/1983)) ### [`v11.3.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.3.0): Firebase Admin Node.js SDK v11.3.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.2.1...v11.3.0) ##### New Features - feat(extensions): Add extensions namespace ([#​1960](https://togithub.com/firebase/firebase-admin-node/issues/1960)) ##### Miscellaneous - \[chore] Release 11.3.0 ([#​1981](https://togithub.com/firebase/firebase-admin-node/issues/1981)) - Extensions TSDoc edits ([#​1982](https://togithub.com/firebase/firebase-admin-node/issues/1982)) - Extensions docstring tweaks ([#​1980](https://togithub.com/firebase/firebase-admin-node/issues/1980)) - build(deps): bump [@​firebase/database-compat](https://togithub.com/firebase/database-compat) from 0.2.9 to 0.2.10 ([#​1969](https://togithub.com/firebase/firebase-admin-node/issues/1969)) - build(deps-dev): bump [@​types/sinon-chai](https://togithub.com/types/sinon-chai) from 3.2.8 to 3.2.9 ([#​1978](https://togithub.com/firebase/firebase-admin-node/issues/1978)) - build(deps): bump [@​firebase/database-types](https://togithub.com/firebase/database-types) from 0.9.16 to 0.9.17 ([#​1977](https://togithub.com/firebase/firebase-admin-node/issues/1977)) ### [`v11.2.1`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.2.1): Firebase Admin Node.js SDK v11.2.1 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.2.0...v11.2.1) ##### Bug Fixes - fix(firestore): added missing 'ReadWriteTransactionOptions' export ([#​1874](https://togithub.com/firebase/firebase-admin-node/issues/1874)) ([#​1875](https://togithub.com/firebase/firebase-admin-node/issues/1875)) - fix(fcm): Increase FCM timeout to 15s ([#​1947](https://togithub.com/firebase/firebase-admin-node/issues/1947)) ##### Miscellaneous - \[chore] Release 11.2.1 ([#​1972](https://togithub.com/firebase/firebase-admin-node/issues/1972)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.40.0 to 5.42.1 ([#​1968](https://togithub.com/firebase/firebase-admin-node/issues/1968)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1967](https://togithub.com/firebase/firebase-admin-node/issues/1967)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.2.23 to 0.2.24 ([#​1962](https://togithub.com/firebase/firebase-admin-node/issues/1962)) - build(deps-dev): bump [@​firebase/api-documenter](https://togithub.com/firebase/api-documenter) from 0.2.0 to 0.3.0 ([#​1963](https://togithub.com/firebase/firebase-admin-node/issues/1963)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.33.4 to 7.33.5 ([#​1961](https://togithub.com/firebase/firebase-admin-node/issues/1961)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.5.2 to 6.6.0 ([#​1956](https://togithub.com/firebase/firebase-admin-node/issues/1956)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.2.20 to 0.2.23 ([#​1951](https://togithub.com/firebase/firebase-admin-node/issues/1951)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1953](https://togithub.com/firebase/firebase-admin-node/issues/1953)) - Internal implementation of multiDb ([#​1949](https://togithub.com/firebase/firebase-admin-node/issues/1949)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.33.2 to 7.33.4 ([#​1946](https://togithub.com/firebase/firebase-admin-node/issues/1946)) - build(deps-dev): bump mocha from 10.0.0 to 10.1.0 ([#​1944](https://togithub.com/firebase/firebase-admin-node/issues/1944)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1943](https://togithub.com/firebase/firebase-admin-node/issues/1943)) ### [`v11.2.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.2.0): Firebase Admin Node.js SDK v11.2.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.1.0...v11.2.0) ##### New Features - feat(auth): Support sms region config change on Tenant and Project level ([#​1921](https://togithub.com/firebase/firebase-admin-node/issues/1921)) ##### Miscellaneous - \[chore] Release 11.2.0 ([#​1942](https://togithub.com/firebase/firebase-admin-node/issues/1942)) - chore(fs): Upgrade firestore dependency ([#​1941](https://togithub.com/firebase/firebase-admin-node/issues/1941)) - build(deps-dev): bump sinon from 14.0.0 to 14.0.1 ([#​1938](https://togithub.com/firebase/firebase-admin-node/issues/1938)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.33.1 to 7.33.2 ([#​1939](https://togithub.com/firebase/firebase-admin-node/issues/1939)) - build(deps): bump [@​firebase/database-compat](https://togithub.com/firebase/database-compat) from 0.2.7 to 0.2.9 ([#​1940](https://togithub.com/firebase/firebase-admin-node/issues/1940)) - build(deps-dev): bump [@​firebase/app-compat](https://togithub.com/firebase/app-compat) from 0.1.34 to 0.1.37 ([#​1937](https://togithub.com/firebase/firebase-admin-node/issues/1937)) - build(deps): bump [@​firebase/database-types](https://togithub.com/firebase/database-types) from 0.9.13 to 0.9.16 ([#​1932](https://togithub.com/firebase/firebase-admin-node/issues/1932)) - build(deps-dev): bump bcrypt from 5.0.1 to 5.1.0 ([#​1934](https://togithub.com/firebase/firebase-admin-node/issues/1934)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.31.2 to 7.33.1 ([#​1935](https://togithub.com/firebase/firebase-admin-node/issues/1935)) - build(deps): bump jwks-rsa from 2.1.4 to 2.1.5 ([#​1931](https://togithub.com/firebase/firebase-admin-node/issues/1931)) - build(deps-dev): bump minimist from 1.2.6 to 1.2.7 ([#​1930](https://togithub.com/firebase/firebase-admin-node/issues/1930)) - build(deps): bump [@​firebase/database-compat](https://togithub.com/firebase/database-compat) from 0.2.6 to 0.2.7 ([#​1928](https://togithub.com/firebase/firebase-admin-node/issues/1928)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1927](https://togithub.com/firebase/firebase-admin-node/issues/1927)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.38.1 to 5.40.0 ([#​1926](https://togithub.com/firebase/firebase-admin-node/issues/1926)) - build(deps-dev): bump [@​types/mocha](https://togithub.com/types/mocha) from 9.1.1 to 10.0.0 ([#​1919](https://togithub.com/firebase/firebase-admin-node/issues/1919)) - build(deps-dev): bump yargs from 17.5.1 to 17.6.0 ([#​1917](https://togithub.com/firebase/firebase-admin-node/issues/1917)) ### [`v11.1.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.1.0): Firebase Admin Node.js SDK v11.1.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.0.1...v11.1.0) ##### Miscellaneous - \[chore] Release 11.1.0 ([#​1914](https://togithub.com/firebase/firebase-admin-node/issues/1914)) - chore: Update dependencies ([#​1912](https://togithub.com/firebase/firebase-admin-node/issues/1912)) - build(deps-dev): bump eslint from 8.23.0 to 8.24.0 ([#​1911](https://togithub.com/firebase/firebase-admin-node/issues/1911)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.7.1 to 18.7.23 ([#​1910](https://togithub.com/firebase/firebase-admin-node/issues/1910)) - build(deps-dev): bump [@​firebase/app-compat](https://togithub.com/firebase/app-compat) from 0.1.31 to 0.1.34 ([#​1907](https://togithub.com/firebase/firebase-admin-node/issues/1907)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.29.5 to 7.31.2 ([#​1909](https://togithub.com/firebase/firebase-admin-node/issues/1909)) - build(deps): bump json-schema in /.github/actions/send-tweet ([#​1905](https://togithub.com/firebase/firebase-admin-node/issues/1905)) - build(deps): bump uuid from 8.3.2 to 9.0.0 ([#​1898](https://togithub.com/firebase/firebase-admin-node/issues/1898)) - build(deps): bump jose from 2.0.5 to 2.0.6 ([#​1904](https://togithub.com/firebase/firebase-admin-node/issues/1904)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.4.1 to 6.4.2 ([#​1895](https://togithub.com/firebase/firebase-admin-node/issues/1895)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1897](https://togithub.com/firebase/firebase-admin-node/issues/1897)) - build(deps-dev): bump eslint from 8.22.0 to 8.23.0 ([#​1892](https://togithub.com/firebase/firebase-admin-node/issues/1892)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1890](https://togithub.com/firebase/firebase-admin-node/issues/1890)) - build(deps-dev): bump [@​types/lodash](https://togithub.com/types/lodash) from 4.14.182 to 4.14.184 ([#​1888](https://togithub.com/firebase/firebase-admin-node/issues/1888)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.29.2 to 7.29.5 ([#​1887](https://togithub.com/firebase/firebase-admin-node/issues/1887)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.33.0 to 5.34.0 ([#​1884](https://togithub.com/firebase/firebase-admin-node/issues/1884)) - build(deps-dev): bump eslint from 8.21.0 to 8.22.0 ([#​1869](https://togithub.com/firebase/firebase-admin-node/issues/1869)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1883](https://togithub.com/firebase/firebase-admin-node/issues/1883)) - build(deps): bump [@​actions/core](https://togithub.com/actions/core) in /.github/actions/send-email ([#​1878](https://togithub.com/firebase/firebase-admin-node/issues/1878)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.4.0 to 6.4.1 ([#​1872](https://togithub.com/firebase/firebase-admin-node/issues/1872)) - build(deps): bump [@​actions/core](https://togithub.com/actions/core) in /.github/actions/send-tweet ([#​1877](https://togithub.com/firebase/firebase-admin-node/issues/1877)) - chore: Update database dependencies ([#​1865](https://togithub.com/firebase/firebase-admin-node/issues/1865)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.3.0 to 6.4.0 ([#​1864](https://togithub.com/firebase/firebase-admin-node/issues/1864)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.28.7 to 7.29.2 ([#​1863](https://togithub.com/firebase/firebase-admin-node/issues/1863)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1858](https://togithub.com/firebase/firebase-admin-node/issues/1858)) - build(deps): bump [@​google-cloud/firestore](https://togithub.com/google-cloud/firestore) from 5.0.2 to 6.0.0 ([#​1852](https://togithub.com/firebase/firebase-admin-node/issues/1852)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1847](https://togithub.com/firebase/firebase-admin-node/issues/1847)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.6.1 to 18.6.3 ([#​1848](https://togithub.com/firebase/firebase-admin-node/issues/1848)) - build(deps-dev): bump [@​firebase/app-compat](https://togithub.com/firebase/app-compat) from 0.1.29 to 0.1.30 ([#​1846](https://togithub.com/firebase/firebase-admin-node/issues/1846)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.28.6 to 7.28.7 ([#​1850](https://togithub.com/firebase/firebase-admin-node/issues/1850)) - build(deps-dev): bump nock from 13.2.8 to 13.2.9 ([#​1849](https://togithub.com/firebase/firebase-admin-node/issues/1849)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.31.0 to 5.32.0 ([#​1845](https://togithub.com/firebase/firebase-admin-node/issues/1845)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.2.3 to 6.3.0 ([#​1844](https://togithub.com/firebase/firebase-admin-node/issues/1844)) ### [`v11.0.1`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.0.1): Firebase Admin Node.js SDK v11.0.1 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v11.0.0...v11.0.1) ##### Bug Fixes - fix: Add update or create release ([#​1779](https://togithub.com/firebase/firebase-admin-node/issues/1779)) ##### Miscellaneous - \[chore] Release 11.0.1 ([#​1842](https://togithub.com/firebase/firebase-admin-node/issues/1842)) - chore: Update api-documenter config to include project headers ([#​1840](https://togithub.com/firebase/firebase-admin-node/issues/1840)) - PR fixes from [#​1812](https://togithub.com/firebase/firebase-admin-node/issues/1812) ([#​1828](https://togithub.com/firebase/firebase-admin-node/issues/1828)) - build(deps-dev): bump [@​types/sinon](https://togithub.com/types/sinon) from 10.0.12 to 10.0.13 ([#​1836](https://togithub.com/firebase/firebase-admin-node/issues/1836)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.30.6 to 5.31.0 ([#​1834](https://togithub.com/firebase/firebase-admin-node/issues/1834)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.0.4 to 18.6.1 ([#​1835](https://togithub.com/firebase/firebase-admin-node/issues/1835)) - build(deps-dev): bump eslint from 8.19.0 to 8.20.0 ([#​1822](https://togithub.com/firebase/firebase-admin-node/issues/1822)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.28.4 to 7.28.6 ([#​1833](https://togithub.com/firebase/firebase-admin-node/issues/1833)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1832](https://togithub.com/firebase/firebase-admin-node/issues/1832)) - build(deps-dev): bump ts-node from 10.8.2 to 10.9.1 ([#​1819](https://togithub.com/firebase/firebase-admin-node/issues/1819)) - build(deps-dev): bump [@​firebase/app-compat](https://togithub.com/firebase/app-compat) from 0.1.28 to 0.1.29 ([#​1818](https://togithub.com/firebase/firebase-admin-node/issues/1818)) - Use ID token from metadata server when sending tasks for extensions ([#​1812](https://togithub.com/firebase/firebase-admin-node/issues/1812)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.2.17 to 0.2.18 ([#​1816](https://togithub.com/firebase/firebase-admin-node/issues/1816)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.30.0 to 5.30.6 ([#​1815](https://togithub.com/firebase/firebase-admin-node/issues/1815)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 18.0.0 to 18.0.4 ([#​1814](https://togithub.com/firebase/firebase-admin-node/issues/1814)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.2.2 to 6.2.3 ([#​1817](https://togithub.com/firebase/firebase-admin-node/issues/1817)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.28.3 to 7.28.4 ([#​1813](https://togithub.com/firebase/firebase-admin-node/issues/1813)) - build(deps): bump [@​firebase/database-types](https://togithub.com/firebase/database-types) from 0.9.9 to 0.9.11 ([#​1811](https://togithub.com/firebase/firebase-admin-node/issues/1811)) - build(deps-dev): bump nock from 13.2.7 to 13.2.8 ([#​1809](https://togithub.com/firebase/firebase-admin-node/issues/1809)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1808](https://togithub.com/firebase/firebase-admin-node/issues/1808)) - build(deps): bump [@​firebase/database-compat](https://togithub.com/firebase/database-compat) from 0.2.1 to 0.2.3 ([#​1807](https://togithub.com/firebase/firebase-admin-node/issues/1807)) - fixed some typo in validator tests ([#​1792](https://togithub.com/firebase/firebase-admin-node/issues/1792)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.27.1 to 7.28.3 ([#​1798](https://togithub.com/firebase/firebase-admin-node/issues/1798)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1795](https://togithub.com/firebase/firebase-admin-node/issues/1795)) - build(deps-dev): bump [@​types/sinon](https://togithub.com/types/sinon) from 10.0.11 to 10.0.12 ([#​1800](https://togithub.com/firebase/firebase-admin-node/issues/1800)) - build(deps-dev): bump ts-node from 10.8.1 to 10.8.2 ([#​1796](https://togithub.com/firebase/firebase-admin-node/issues/1796)) - build(deps): bump [@​google-cloud/storage](https://togithub.com/google-cloud/storage) from 6.1.0 to 6.2.2 ([#​1797](https://togithub.com/firebase/firebase-admin-node/issues/1797)) - build(deps-dev): bump eslint from 8.18.0 to 8.19.0 ([#​1794](https://togithub.com/firebase/firebase-admin-node/issues/1794)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.2.16 to 0.2.17 ([#​1784](https://togithub.com/firebase/firebase-admin-node/issues/1784)) - build(deps-dev): bump [@​firebase/app-compat](https://togithub.com/firebase/app-compat) from 0.1.27 to 0.1.28 ([#​1786](https://togithub.com/firebase/firebase-admin-node/issues/1786)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.28.0 to 5.30.0 ([#​1785](https://togithub.com/firebase/firebase-admin-node/issues/1785)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.25.2 to 7.27.1 ([#​1782](https://togithub.com/firebase/firebase-admin-node/issues/1782)) - Add lastRefreshTime to UserMetadata toJSON method. ([#​889](https://togithub.com/firebase/firebase-admin-node/issues/889)) - build(deps-dev): bump nock from 13.2.6 to 13.2.7 ([#​1773](https://togithub.com/firebase/firebase-admin-node/issues/1773)) - build(deps-dev): bump eslint from 8.17.0 to 8.18.0 ([#​1774](https://togithub.com/firebase/firebase-admin-node/issues/1774)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1772](https://togithub.com/firebase/firebase-admin-node/issues/1772)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 17.0.42 to 18.0.0 ([#​1775](https://togithub.com/firebase/firebase-admin-node/issues/1775)) - build(deps-dev): bump [@​microsoft/api-extractor](https://togithub.com/microsoft/api-extractor) from 7.25.0 to 7.25.2 ([#​1776](https://togithub.com/firebase/firebase-admin-node/issues/1776)) ### [`v11.0.0`](https://togithub.com/firebase/firebase-admin-node/releases/tag/v11.0.0): Firebase Admin Node.js SDK v11.0.0 [Compare Source](https://togithub.com/firebase/firebase-admin-node/compare/v10.3.0...v11.0.0) ##### Breaking Changes - change: Upgrade Firestore and Storage Dependencies ([#​1760](https://togithub.com/firebase/firebase-admin-node/issues/1760)) ##### Miscellaneous - \[chore] Release 11.0.0 ([#​1770](https://togithub.com/firebase/firebase-admin-node/issues/1770)) - build(deps-dev): bump [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ([#​1768](https://togithub.com/firebase/firebase-admin-node/issues/1768)) - build(deps): bump [@​types/node](https://togithub.com/types/node) from 17.0.41 to 17.0.42 ([#​1769](https://togithub.com/firebase/firebase-admin-node/issues/1769)) - build(deps): bump [@​firebase/database-compat](https://togithub.com/firebase/database-compat) from 0.2.0 to 0.2.1 ([#​1765](https://togithub.com/firebase/firebase-admin-node/issues/1765)) - build(deps-dev): bump [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) from 5.27.1 to 5.28.0 ([#​1764](https://togithub.com/firebase/firebase-admin-node/issues/1764)) - build(deps-dev): bump [@​firebase/auth-compat](https://togithub.com/firebase/auth-compat) from 0.2.15 to 0.2.16 ([#​1766](https://togithub.com/firebase/firebase-admin-node/issues/1766)) - build(deps-dev): bump [@​firebase/app-compat](https://togithub.com/firebase/app-compat) from 0.1.26 to 0.1.27 ([#​1767](https://togithub.com/firebase/firebase-admin-node/issues/1767)) - build(deps): bump [@​firebase/database-types](https://togithub.com/firebase/database-types) from 0.9.8 to 0.9.9 ([#​1763](https://togithub.com/firebase/firebase-admin-node/issues/1763))
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/cloud-debug-nodejs). --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 13f49789..81a2e5fa 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "console-log-level": "^1.4.0", "extend": "^3.0.2", "findit2": "^2.2.3", - "firebase-admin": "^10.0.0", + "firebase-admin": "^12.0.0", "gcp-metadata": "^6.0.0", "p-limit": "^3.0.1", "semver": "^7.0.0", From 8bb6588fba4a41f3ef336fa98af9162cb43455a1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 14:54:15 +0000 Subject: [PATCH 20/20] chore(main): release 9.0.0 (#1162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [9.0.0](https://togithub.com/googleapis/cloud-debug-nodejs/compare/v8.0.0...v9.0.0) (2023-12-21) ### ⚠ BREAKING CHANGES * upgrade to node 14 ([#1160](https://togithub.com/googleapis/cloud-debug-nodejs/issues/1160)) ### Bug Fixes * **deps:** Update dependency firebase-admin to v12 ([#1185](https://togithub.com/googleapis/cloud-debug-nodejs/issues/1185)) ([f757913](https://togithub.com/googleapis/cloud-debug-nodejs/commit/f7579138f9cb9f6a7d967bf7c57dbef5966259d8)) * Increase capture limit to allow Windows tests to pass ([#1188](https://togithub.com/googleapis/cloud-debug-nodejs/issues/1188)) ([728b90e](https://togithub.com/googleapis/cloud-debug-nodejs/commit/728b90ebdd6f73081261019f3d4d2c4ce121bea6)) * Remove unused second parameter ([#1161](https://togithub.com/googleapis/cloud-debug-nodejs/issues/1161)) ([f8815fc](https://togithub.com/googleapis/cloud-debug-nodejs/commit/f8815fce6b64c73e0357873cdf1b4b752887acb1)) ### Miscellaneous Chores * Upgrade to node 14 ([#1160](https://togithub.com/googleapis/cloud-debug-nodejs/issues/1160)) ([bd45473](https://togithub.com/googleapis/cloud-debug-nodejs/commit/bd45473bda6d9f87adcbc4752f773e99a3fbcf89)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- CHANGELOG.md | 18 ++++++++++++++++++ package.json | 2 +- samples/package.json | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 494d0560..720283c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Node.js Agent for Google Cloud Debug ChangeLog +## [9.0.0](https://github.com/googleapis/cloud-debug-nodejs/compare/v8.0.0...v9.0.0) (2023-12-21) + + +### ⚠ BREAKING CHANGES + +* upgrade to node 14 ([#1160](https://github.com/googleapis/cloud-debug-nodejs/issues/1160)) + +### Bug Fixes + +* **deps:** Update dependency firebase-admin to v12 ([#1185](https://github.com/googleapis/cloud-debug-nodejs/issues/1185)) ([f757913](https://github.com/googleapis/cloud-debug-nodejs/commit/f7579138f9cb9f6a7d967bf7c57dbef5966259d8)) +* Increase capture limit to allow Windows tests to pass ([#1188](https://github.com/googleapis/cloud-debug-nodejs/issues/1188)) ([728b90e](https://github.com/googleapis/cloud-debug-nodejs/commit/728b90ebdd6f73081261019f3d4d2c4ce121bea6)) +* Remove unused second parameter ([#1161](https://github.com/googleapis/cloud-debug-nodejs/issues/1161)) ([f8815fc](https://github.com/googleapis/cloud-debug-nodejs/commit/f8815fce6b64c73e0357873cdf1b4b752887acb1)) + + +### Miscellaneous Chores + +* Upgrade to node 14 ([#1160](https://github.com/googleapis/cloud-debug-nodejs/issues/1160)) ([bd45473](https://github.com/googleapis/cloud-debug-nodejs/commit/bd45473bda6d9f87adcbc4752f773e99a3fbcf89)) + ## [8.0.0](https://github.com/googleapis/cloud-debug-nodejs/compare/v7.2.2...v8.0.0) (2023-06-06) diff --git a/package.json b/package.json index 81a2e5fa..be161b7f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/debug-agent", - "version": "8.0.0", + "version": "9.0.0", "author": "Google Inc.", "description": "Stackdriver Debug Agent for Node.js", "main": "./build/src/index", diff --git a/samples/package.json b/samples/package.json index cc039640..d7055e71 100644 --- a/samples/package.json +++ b/samples/package.json @@ -17,7 +17,7 @@ "test": "mocha" }, "dependencies": { - "@google-cloud/debug-agent": "^8.0.0", + "@google-cloud/debug-agent": "^9.0.0", "express": "4.18.2" }, "devDependencies": {