Skip to content

Commit

Permalink
chore!: Upgrade to Node version 18 (#834)
Browse files Browse the repository at this point in the history
* Ran script and solved compiler errors

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* run the linter

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* Upgrade node version

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* only test on Node 18

* Change arrify import

* Downgrade arrify

* Add void for various promises

* Add void to solve linting issues

* Add void

* Remove the script

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
danieljbruce and gcf-owl-bot[bot] authored Mar 3, 2025
1 parent 6e05fd5 commit e831600
Show file tree
Hide file tree
Showing 35 changed files with 254 additions and 243 deletions.
7 changes: 3 additions & 4 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,6 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
digest: sha256:609822e3c09b7a1bd90b99655904609f162cc15acb4704f1edf778284c36f429
# created: 2024-10-01T19:34:30.797530443Z
image: 'gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest'
digest: 'sha256:0d39e59663287ae929c1d4ccf8ebf7cef9946826c9b86eda7e85d8d752dbb584'
1 change: 1 addition & 0 deletions .github/release-trigger.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enabled: true
multiScmName: nodejs-common
4 changes: 2 additions & 2 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ branchProtectionRules:
- "ci/kokoro: Samples test"
- "ci/kokoro: System test"
- lint
- test (14)
- test (16)
- test (18)
- test (20)
- test (22)
- cla/google
- windows
- OwlBot Post Processor
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18, 20]
node: [18, 20, 22]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: node --version
Expand All @@ -29,30 +29,30 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18
- run: npm install --engine-strict
- run: npm test
env:
MOCHA_THROW_DEPRECATION: false
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18
- run: npm install
- run: npm run lint
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18
- run: npm install
- run: npm run docs
- uses: JustinBeckwith/linkinator-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .kokoro/release/docs-devsite.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/release/docs.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/release/docs.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/release/publish.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions .kokoro/samples-test.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/system-test.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/test.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/test.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/trampoline_v2.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"author": "Google Inc.",
"engines": {
"node": ">=14.0.0"
"node": ">=18"
},
"repository": "googleapis/nodejs-common",
"main": "./build/src/index.js",
Expand Down Expand Up @@ -34,39 +34,39 @@
"dependencies": {
"@google-cloud/projectify": "^4.0.0",
"@google-cloud/promisify": "^4.0.0",
"arrify": "^2.0.1",
"duplexify": "^4.1.1",
"arrify": "^2.0.0",
"duplexify": "^4.1.3",
"extend": "^3.0.2",
"google-auth-library": "^9.0.0",
"google-auth-library": "^10.0.0-rc.1",
"html-entities": "^2.5.2",
"retry-request": "^7.0.0",
"teeny-request": "^9.0.0"
"retry-request": "^8.0.0",
"teeny-request": "^10.0.0"
},
"devDependencies": {
"@types/ent": "^2.2.1",
"@types/extend": "^3.0.1",
"@types/mocha": "^9.0.0",
"@types/mv": "^2.1.0",
"@types/ncp": "^2.0.3",
"@types/node": "^20.4.9",
"@types/proxyquire": "^1.3.28",
"@types/request": "^2.48.4",
"@types/sinon": "^17.0.0",
"@types/tmp": "0.2.6",
"c8": "^8.0.1",
"codecov": "^3.6.5",
"gts": "^5.0.0",
"jsdoc": "^4.0.0",
"@types/ent": "^2.2.8",
"@types/extend": "^3.0.4",
"@types/mocha": "^10.0.10",
"@types/mv": "^2.1.4",
"@types/ncp": "^2.0.8",
"@types/node": "^22.13.5",
"@types/proxyquire": "^1.3.31",
"@types/request": "^2.48.12",
"@types/sinon": "^17.0.4",
"@types/tmp": "^0.2.6",
"c8": "^10.1.3",
"codecov": "^3.8.3",
"gts": "^6.0.2",
"jsdoc": "^4.0.4",
"jsdoc-fresh": "^3.0.0",
"jsdoc-region-tag": "^3.0.0",
"linkinator": "^3.0.0",
"mocha": "^9.2.2",
"linkinator": "^6.1.2",
"mocha": "^11.1.0",
"mv": "^2.1.1",
"ncp": "^2.0.0",
"nock": "^13.0.0",
"nock": "^14.0.1",
"proxyquire": "^2.1.3",
"sinon": "^17.0.0",
"tmp": "0.2.3",
"typescript": "^5.1.6"
"sinon": "^19.0.2",
"tmp": "^0.2.3",
"typescript": "^5.8.2"
}
}
2 changes: 1 addition & 1 deletion samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "Apache-2.0",
"author": "Google LLC",
"engines": {
"node": ">=14.0.0"
"node": ">=18"
},
"repository": "googleapis/nodejs-common",
"private": true,
Expand Down
6 changes: 3 additions & 3 deletions src/operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Operation<T = any> extends ServiceObject<T> {
{
baseUrl: '',
},
config
config,
);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down Expand Up @@ -106,7 +106,7 @@ export class Operation<T = any> extends ServiceObject<T> {
this.completeListeners++;
if (!this.hasActiveListeners) {
this.hasActiveListeners = true;
this.startPolling_();
void this.startPolling_();
}
}
});
Expand All @@ -125,7 +125,7 @@ export class Operation<T = any> extends ServiceObject<T> {
* @private
*/
protected poll_(callback: MetadataCallback): void {
this.getMetadata((err: ApiError, body: Metadata) => {
void this.getMetadata((err: ApiError, body: Metadata) => {
if (err || body!.error) {
callback(err || (body!.error as Error));
return;
Expand Down
Loading

0 comments on commit e831600

Please sign in to comment.