From 7933bfe9a1f706f45077e5ea64591aeebd87b27f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Sep 2022 01:02:19 +0200 Subject: [PATCH 01/11] chore(deps): update dependency uuid to v9 (#1150) 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 | |---|---|---|---|---|---| | [uuid](https://togithub.com/uuidjs/uuid) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/uuid/8.3.2/9.0.0) | [![age](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/compatibility-slim/8.3.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/uuid/9.0.0/confidence-slim/8.3.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
uuidjs/uuid ### [`v9.0.0`](https://togithub.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#​900-httpsgithubcomuuidjsuuidcomparev832v900-2022-09-05) [Compare Source](https://togithub.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) ##### ⚠ BREAKING CHANGES - Drop Node.js 10.x support. This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022. - Remove the minified UMD build from the package. Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays. For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished. - Drop IE 11 and Safari 10 support. Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015. This also removes the fallback on msCrypto instead of the crypto API. Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack. ##### Features - optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#​597](https://togithub.com/uuidjs/uuid/issues/597)) ([3a033f6](https://togithub.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc)) - remove UMD build ([#​645](https://togithub.com/uuidjs/uuid/issues/645)) ([e948a0f](https://togithub.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#​620](https://togithub.com/uuidjs/uuid/issues/620) - use native crypto.randomUUID when available ([#​600](https://togithub.com/uuidjs/uuid/issues/600)) ([c9e076c](https://togithub.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4)) ##### Bug Fixes - add Jest/jsdom compatibility ([#​642](https://togithub.com/uuidjs/uuid/issues/642)) ([16f9c46](https://togithub.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd)) - change default export to named function ([#​545](https://togithub.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://togithub.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a)) - handle error when parameter is not set in v3 and v5 ([#​622](https://togithub.com/uuidjs/uuid/issues/622)) ([fcd7388](https://togithub.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091)) - run npm audit fix ([#​644](https://togithub.com/uuidjs/uuid/issues/644)) ([04686f5](https://togithub.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353)) - upgrading from uuid3 broken link ([#​568](https://togithub.com/uuidjs/uuid/issues/568)) ([1c849da](https://togithub.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6)) ##### build - drop Node.js 8.x from babel transpile target ([#​603](https://togithub.com/uuidjs/uuid/issues/603)) ([aa11485](https://togithub.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5)) - drop support for legacy browsers (IE11, Safari 10) ([#​604](https://togithub.com/uuidjs/uuid/issues/604)) ([0f433e5](https://togithub.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148)) - drop node 10.x to upgrade dev dependencies ([#​653](https://togithub.com/uuidjs/uuid/issues/653)) ([28a5712](https://togithub.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)), closes [#​643](https://togithub.com/uuidjs/uuid/issues/643) ##### [8.3.2](https://togithub.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) ##### Bug Fixes - lazy load getRandomValues ([#​537](https://togithub.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://togithub.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#​536](https://togithub.com/uuidjs/uuid/issues/536) ##### [8.3.1](https://togithub.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) ##### Bug Fixes - support expo>=39.0.0 ([#​515](https://togithub.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://togithub.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#​375](https://togithub.com/uuidjs/uuid/issues/375)
--- ### 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, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-bigquery). --- package.json | 2 +- samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6a31455c..b6412ebe 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "p-event": "^4.1.0", "readable-stream": "^4.0.0", "stream-events": "^1.0.5", - "uuid": "^8.0.0" + "uuid": "^9.0.0" }, "devDependencies": { "@google-cloud/storage": "^6.0.0", diff --git a/samples/package.json b/samples/package.json index c949ec2e..6a4ae26f 100644 --- a/samples/package.json +++ b/samples/package.json @@ -28,6 +28,6 @@ "mocha": "^8.0.0", "proxyquire": "^2.1.3", "sinon": "^14.0.0", - "uuid": "^8.0.0" + "uuid": "^9.0.0" } } \ No newline at end of file From 65afd6e3d1b75204850abd84f77cd78e4e83dfa0 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:40:33 +0100 Subject: [PATCH 02/11] chore(deps): update dependency jsdoc to v4 (#1169) 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 | |---|---|---|---|---|---| | [jsdoc](https://togithub.com/jsdoc/jsdoc) | [`^3.6.3` -> `^4.0.0`](https://renovatebot.com/diffs/npm/jsdoc/3.6.11/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/compatibility-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/confidence-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
jsdoc/jsdoc ### [`v4.0.0`](https://togithub.com/jsdoc/jsdoc/blob/HEAD/CHANGES.md#​400-November-2022) [Compare Source](https://togithub.com/jsdoc/jsdoc/compare/3.6.11...084218523a7d69fec14a852ce680f374f526af28) - JSDoc releases now use [semantic versioning](https://semver.org/). If JSDoc makes backwards-incompatible changes in the future, the major version will be incremented. - JSDoc no longer uses the [`taffydb`](https://taffydb.com/) package. If your JSDoc template or plugin uses the `taffydb` package, see the [instructions for replacing `taffydb` with `@jsdoc/salty`](https://togithub.com/jsdoc/jsdoc/tree/main/packages/jsdoc-salty#use-salty-in-a-jsdoc-template). - JSDoc now supports Node.js 12.0.0 and later.
--- ### 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://app.renovatebot.com/dashboard#github/googleapis/nodejs-bigquery). --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b6412ebe..48cf0198 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "discovery-tsd": "^0.3.0", "execa": "^5.0.0", "gts": "^3.1.0", - "jsdoc": "^3.6.3", + "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", From 3bda1dad3c5c27a9bf1443bc4b8ceb0884edbc8c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 11:20:20 +0100 Subject: [PATCH 03/11] chore(deps): update dependency @types/node to v18 (#1167) 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)) | [`^16.0.0` -> `^18.0.0`](https://renovatebot.com/diffs/npm/@types%2fnode/16.18.3/18.11.9) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/compatibility-slim/16.18.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fnode/18.11.9/confidence-slim/16.18.3)](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://app.renovatebot.com/dashboard#github/googleapis/nodejs-bigquery). --- package.json | 2 +- system-test/fixtures/kitchen/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 48cf0198..27ed3934 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@types/mocha": "^9.0.0", "@types/mv": "^2.1.0", "@types/ncp": "^2.0.1", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.0", "@types/tmp": "0.2.3", diff --git a/system-test/fixtures/kitchen/package.json b/system-test/fixtures/kitchen/package.json index a9f5788f..4439ec90 100644 --- a/system-test/fixtures/kitchen/package.json +++ b/system-test/fixtures/kitchen/package.json @@ -16,7 +16,7 @@ "@google-cloud/bigquery": "file:./google-cloud-bigquery.tgz" }, "devDependencies": { - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "typescript": "^3.0.0", "gts": "^3.0.0" } From 4fee5488a4fcceb94427d601d1f58a57197b66b9 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 23 Nov 2022 00:50:33 -0500 Subject: [PATCH 04/11] Fix function name typo (#1139) instertingDataTypes -> insertingDataTypes Co-authored-by: Steffany Brown <30247553+steffnay@users.noreply.github.com> Co-authored-by: meredithslota --- samples/insertingDataTypes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/insertingDataTypes.js b/samples/insertingDataTypes.js index 55e286dc..e2b005dc 100644 --- a/samples/insertingDataTypes.js +++ b/samples/insertingDataTypes.js @@ -20,7 +20,7 @@ function main(datasetId = 'my_dataset', tableId = 'my_table') { const {BigQuery} = require('@google-cloud/bigquery'); const bigquery = new BigQuery(); - async function instertingDataTypes() { + async function insertingDataTypes() { // Inserts data of various BigQuery-supported types into a table. /** @@ -140,6 +140,6 @@ function main(datasetId = 'my_dataset', tableId = 'my_table') { console.log(`Inserted ${rows.length} rows`); } // [END bigquery_inserting_data_types] - instertingDataTypes(); + insertingDataTypes(); } main(...process.argv.slice(2)); From 844328539e4c1df54435e0d8906ca7e53f6ab937 Mon Sep 17 00:00:00 2001 From: Arneesh Aima <44923038+arneesh@users.noreply.github.com> Date: Wed, 23 Nov 2022 11:35:00 +0530 Subject: [PATCH 05/11] (docs): minor typo fix in createView sample code (#1121) Co-authored-by: Steffany Brown <30247553+steffnay@users.noreply.github.com> Co-authored-by: meredithslota --- samples/createView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/createView.js b/samples/createView.js index 546c3df9..f4bffb06 100644 --- a/samples/createView.js +++ b/samples/createView.js @@ -32,7 +32,7 @@ function main( /** * TODO(developer): Uncomment the following lines before running the sample. */ - // const myDatasetId = "my_table" + // const myDatasetId = "my_dataset" // const myTableId = "my_table" // const projectId = "bigquery-public-data"; // const sourceDatasetId = "usa_names" From 0d974f0e0bd8f73bd460a940b3a08779b7a3bbe2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 23:42:31 +0000 Subject: [PATCH 06/11] build: have Kokoro grab service account credentials from secret that will be rotated (#1174) * build: have Kokoro grab service account credentials from secret that will be rotated Source-Link: https://togithub.com/googleapis/synthtool/commit/4a0230eb8dc497f36fd3839e6144982131f30a9d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:f59941869d508c6825deeffce180579545fd528f359f549a80a18ec0458d7094 --- .github/.OwlBot.lock.yaml | 3 +-- .kokoro/continuous/node12/samples-test.cfg | 5 +++++ .kokoro/presubmit/node12/samples-test.cfg | 5 +++++ .kokoro/samples-test.sh | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 74883698..6c41b308 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:bb493bf01d28519e82ab61c490c20122c85a7119c03a978ad0c34b4239fbad15 -# created: 2022-08-23T18:40:55.597313991Z + digest: sha256:f59941869d508c6825deeffce180579545fd528f359f549a80a18ec0458d7094 diff --git a/.kokoro/continuous/node12/samples-test.cfg b/.kokoro/continuous/node12/samples-test.cfg index 3fa1edf7..54748bab 100644 --- a/.kokoro/continuous/node12/samples-test.cfg +++ b/.kokoro/continuous/node12/samples-test.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-bigquery/.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/samples-test.cfg b/.kokoro/presubmit/node12/samples-test.cfg index 3fa1edf7..54748bab 100644 --- a/.kokoro/presubmit/node12/samples-test.cfg +++ b/.kokoro/presubmit/node12/samples-test.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-bigquery/.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/samples-test.sh b/.kokoro/samples-test.sh index fbc058a4..806c0082 100755 --- a/.kokoro/samples-test.sh +++ b/.kokoro/samples-test.sh @@ -19,7 +19,7 @@ set -eo pipefail export NPM_CONFIG_PREFIX=${HOME}/.npm-global # Setup service account credentials. -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secret_manager/long-door-651-kokoro-system-test-service-account export GCLOUD_PROJECT=long-door-651 cd $(dirname $0)/.. From 14e5c8a6cd828a2dfa55bfa7c11f8299aaaa053a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 19 Dec 2022 22:50:27 +0000 Subject: [PATCH 07/11] build: have Kokoro grab service account credentials from secret that will be rotated for system tests (#1176) Source-Link: https://togithub.com/googleapis/synthtool/commit/abbc97db69a57dcb991ba97ef503305b701ffb3a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:fe04ae044dadf5ad88d979dbcc85e0e99372fb5d6316790341e6aca5e4e3fbc8 --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/continuous/node12/system-test.cfg | 5 +++++ .kokoro/presubmit/node12/system-test.cfg | 5 +++++ .kokoro/system-test.sh | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 6c41b308..788f7a9f 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:f59941869d508c6825deeffce180579545fd528f359f549a80a18ec0458d7094 + digest: sha256:fe04ae044dadf5ad88d979dbcc85e0e99372fb5d6316790341e6aca5e4e3fbc8 diff --git a/.kokoro/continuous/node12/system-test.cfg b/.kokoro/continuous/node12/system-test.cfg index 95e3a84f..c89e9937 100644 --- a/.kokoro/continuous/node12/system-test.cfg +++ b/.kokoro/continuous/node12/system-test.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-bigquery/.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/system-test.cfg b/.kokoro/presubmit/node12/system-test.cfg index 95e3a84f..c89e9937 100644 --- a/.kokoro/presubmit/node12/system-test.cfg +++ b/.kokoro/presubmit/node12/system-test.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/nodejs-bigquery/.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/system-test.sh b/.kokoro/system-test.sh index 87fa0653..0201e9df 100755 --- a/.kokoro/system-test.sh +++ b/.kokoro/system-test.sh @@ -19,7 +19,7 @@ set -eo pipefail export NPM_CONFIG_PREFIX=${HOME}/.npm-global # Setup service account credentials. -export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secret_manager/long-door-651-kokoro-system-test-service-account export GCLOUD_PROJECT=long-door-651 cd $(dirname $0)/.. From cdabb2591e3c43605b4d1465e4c51c02db19e214 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 10 Jan 2023 17:09:20 +0000 Subject: [PATCH 08/11] chore(deps): update dependency sinon to v15 (#1171) --- package.json | 2 +- samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 27ed3934..d69fa264 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "mv": "^2.1.1", "ncp": "^2.0.0", "proxyquire": "^2.1.0", - "sinon": "^14.0.0", + "sinon": "^15.0.0", "tmp": "0.2.1", "typescript": "^4.6.4" } diff --git a/samples/package.json b/samples/package.json index 6a4ae26f..26b2a527 100644 --- a/samples/package.json +++ b/samples/package.json @@ -27,7 +27,7 @@ "chai": "^4.2.0", "mocha": "^8.0.0", "proxyquire": "^2.1.3", - "sinon": "^14.0.0", + "sinon": "^15.0.0", "uuid": "^9.0.0" } } \ No newline at end of file From 388897ff09166dde63c4aac929452ad0e96ded2e Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 10 Jan 2023 20:22:23 +0000 Subject: [PATCH 09/11] chore(deps): update dependency @types/uuid to v9 (#1173) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d69fa264..ea245e22 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.0", "@types/tmp": "0.2.3", - "@types/uuid": "^8.0.0", + "@types/uuid": "^9.0.0", "c8": "^7.0.0", "codecov": "^3.5.0", "discovery-tsd": "^0.3.0", From df1dcd3899dd10f20988b938b31ac571c997bffd Mon Sep 17 00:00:00 2001 From: Alvaro Viebrantz Date: Wed, 25 Jan 2023 17:35:57 -0400 Subject: [PATCH 10/11] feat: add set client endpoint sample (#1170) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add set client endpoint sample * fix: lint issues * fix: add region tag and remove async function * fix: move example to internal function * fix(bigquery): follow parameter style guide for samples * fix: update license file header with 2023 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Lo Ferris <50979514+loferris@users.noreply.github.com> Co-authored-by: Owl Bot --- README.md | 1 + samples/README.md | 18 ++++++++++++++++ samples/setClientEndpoint.js | 40 +++++++++++++++++++++++++++++++++++ samples/test/clients.test.js | 9 ++++++++ samples/test/datasets.test.js | 29 +++++++++++++++++++++++++ 5 files changed, 97 insertions(+) create mode 100644 samples/setClientEndpoint.js diff --git a/README.md b/README.md index 3961a512..72801ad4 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-bigquery/tr | Relax Column Load Append | [source code](https://github.com/googleapis/nodejs-bigquery/blob/main/samples/relaxColumnLoadAppend.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/relaxColumnLoadAppend.js,samples/README.md) | | Relax Column Query Append | [source code](https://github.com/googleapis/nodejs-bigquery/blob/main/samples/relaxColumnQueryAppend.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/relaxColumnQueryAppend.js,samples/README.md) | | Remove Table Clustering | [source code](https://github.com/googleapis/nodejs-bigquery/blob/main/samples/removeTableClustering.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/removeTableClustering.js,samples/README.md) | +| Set Client Endpoint | [source code](https://github.com/googleapis/nodejs-bigquery/blob/main/samples/setClientEndpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/setClientEndpoint.js,samples/README.md) | | Set User Agent | [source code](https://github.com/googleapis/nodejs-bigquery/blob/main/samples/setUserAgent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/setUserAgent.js,samples/README.md) | | Table Exists | [source code](https://github.com/googleapis/nodejs-bigquery/blob/main/samples/tableExists.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/tableExists.js,samples/README.md) | | Undelete Table | [source code](https://github.com/googleapis/nodejs-bigquery/blob/main/samples/undeleteTable.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/undeleteTable.js,samples/README.md) | diff --git a/samples/README.md b/samples/README.md index 88cdbd52..71ad7f52 100644 --- a/samples/README.md +++ b/samples/README.md @@ -102,6 +102,7 @@ * [Relax Column Load Append](#relax-column-load-append) * [Relax Column Query Append](#relax-column-query-append) * [Remove Table Clustering](#remove-table-clustering) + * [Set Client Endpoint](#set-client-endpoint) * [Set User Agent](#set-user-agent) * [Table Exists](#table-exists) * [Undelete Table](#undelete-table) @@ -1678,6 +1679,23 @@ __Usage:__ +### Set Client Endpoint + +View the [source code](https://github.com/googleapis/nodejs-bigquery/blob/main/samples/setClientEndpoint.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/setClientEndpoint.js,samples/README.md) + +__Usage:__ + + +`node samples/setClientEndpoint.js` + + +----- + + + + ### Set User Agent View the [source code](https://github.com/googleapis/nodejs-bigquery/blob/main/samples/setUserAgent.js). diff --git a/samples/setClientEndpoint.js b/samples/setClientEndpoint.js new file mode 100644 index 00000000..5ec8575d --- /dev/null +++ b/samples/setClientEndpoint.js @@ -0,0 +1,40 @@ +// Copyright 2023 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. + +'use strict'; + +function main(region = 'my-region') { + // [START bigquery_set_client_endpoint] + // Import the Google Cloud client library + const {BigQuery} = require('@google-cloud/bigquery'); + + function setClientEndpoint() { + // Create a bigquery client pointing to a specific endpoint + + /** + * TODO(developer): Uncomment the following line of code and fill in your region before running the sample. + */ + // const region = 'my-region'; + + const bigquery = new BigQuery({ + apiEndpoint: `${region}-bigquery.googleapis.com`, + }); + + console.log('API Endpoint:'); + console.log(bigquery.apiEndpoint); + } + // [END bigquery_set_client_endpoint] + setClientEndpoint(); +} +main(...process.argv.slice(2)); diff --git a/samples/test/clients.test.js b/samples/test/clients.test.js index a81e5a7e..cb6f1aeb 100644 --- a/samples/test/clients.test.js +++ b/samples/test/clients.test.js @@ -26,4 +26,13 @@ describe('Client', () => { assert.match(output, /User agent:/); assert.match(output, /my-user-agent/); }); + it('should should set client endpoint', async () => { + let output = execSync('node setClientEndpoint.js us-east4'); + assert.match(output, /API Endpoint:/); + assert.match(output, /https:\/\/blue-sea-697d.quartiers047.workers.dev:443\/https\/us-east4-bigquery.googleapis.com/); + + output = execSync('node setClientEndpoint.js eu'); + assert.match(output, /API Endpoint:/); + assert.match(output, /https:\/\/blue-sea-697d.quartiers047.workers.dev:443\/https\/eu-bigquery.googleapis.com/); + }); }); diff --git a/samples/test/datasets.test.js b/samples/test/datasets.test.js index 93cf2011..66f56c46 100644 --- a/samples/test/datasets.test.js +++ b/samples/test/datasets.test.js @@ -49,6 +49,35 @@ describe('Datasets', () => { assert.ok(exists); }); + it('should create a dataset using a regional endpoint', async () => { + const euBigquery = new BigQuery({ + apiEndpoint: 'eu-bigquery.googleapis.com', + }); + const euDatasetId = datasetId + '_eu'; + await euBigquery.createDataset(euDatasetId, { + location: 'eu', + }); + const [exists] = await euBigquery.dataset(euDatasetId).exists(); + assert.ok(exists); + }); + + it('should fail to create a dataset using a different region from the client endpoint', async () => { + const usEast4Bigquery = new BigQuery({ + apiEndpoint: 'us-east4-bigquery.googleapis.com', + }); + const usDatasetId = datasetId + '_us'; + let error; + try { + await usEast4Bigquery.createDataset(usDatasetId, { + location: 'us-central1', + }); + } catch (err) { + error = err; + } + assert.isNotNull(error); + assert.equal(error.message, 'Invalid storage region'); + }); + it('should list datasets', async () => { const output = execSync('node listDatasets.js'); assert.match(output, /Datasets:/); From 6e82485e74042b8c0ad1bad7f14680f97916eaa7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 27 Jan 2023 11:56:57 -0800 Subject: [PATCH 11/11] chore(main): release 6.1.0 (#1180) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ package.json | 2 +- samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1023d14..c58ec3fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/bigquery?activeTab=versions +## [6.1.0](https://github.com/googleapis/nodejs-bigquery/compare/v6.0.3...v6.1.0) (2023-01-25) + + +### Features + +* Add set client endpoint sample ([#1170](https://github.com/googleapis/nodejs-bigquery/issues/1170)) ([df1dcd3](https://github.com/googleapis/nodejs-bigquery/commit/df1dcd3899dd10f20988b938b31ac571c997bffd)) + ## [6.0.3](https://github.com/googleapis/nodejs-bigquery/compare/v6.0.2...v6.0.3) (2022-08-23) diff --git a/package.json b/package.json index ea245e22..be0f696f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/bigquery", "description": "Google BigQuery Client Library for Node.js", - "version": "6.0.3", + "version": "6.1.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/samples/package.json b/samples/package.json index 26b2a527..bbff3f46 100644 --- a/samples/package.json +++ b/samples/package.json @@ -16,7 +16,7 @@ "test": "mocha --timeout 200000" }, "dependencies": { - "@google-cloud/bigquery": "^6.0.3", + "@google-cloud/bigquery": "^6.1.0", "@google-cloud/storage": "^6.0.0", "google-auth-library": "^7.0.0", "readline-promise": "^1.0.4",