Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
feat!: drop node8 support, support for async iterators (#300)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM.

New feature: methods with pagination now support async iteration.
  • Loading branch information
alexander-fenster authored Mar 31, 2020
1 parent 23a93ef commit c2ca42e
Show file tree
Hide file tree
Showing 19 changed files with 5,146 additions and 2,196 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts"
}
15 changes: 0 additions & 15 deletions .eslintrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [8, 10, 12, 13]
node: [10, 12, 13]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Expand Down
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

17 changes: 17 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2020 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.exports = {
...require('gts/.prettierrc.json')
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function quickstart(
console.log('Key rings:');
keyRings.forEach(keyRing => console.log(keyRing.name));
} else {
console.log(`No key rings found.`);
console.log('No key rings found.');
}
}

Expand Down
12 changes: 6 additions & 6 deletions helperMethods.ts.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
*/

getIamPolicy(
request: protosTypes.google.iam.v1.GetIamPolicyRequest,
request: protos.google.iam.v1.GetIamPolicyRequest,
options: gax.CallOptions,
callback: protosTypes.google.iam.v1.IAMPolicy.GetIamPolicyCallback
callback: protos.google.iam.v1.IAMPolicy.GetIamPolicyCallback
) {
return this._iamClient.getIamPolicy(request, options, callback);
}
setIamPolicy(
request: protosTypes.google.iam.v1.SetIamPolicyRequest,
request: protos.google.iam.v1.SetIamPolicyRequest,
options: gax.CallOptions,
callback: protosTypes.google.iam.v1.IAMPolicy.SetIamPolicyCallback
callback: protos.google.iam.v1.IAMPolicy.SetIamPolicyCallback
) {
return this._iamClient.setIamPolicy(request, options, callback);
}
testIamPermissions(
request: protosTypes.google.iam.v1.TestIamPermissionsRequest,
request: protos.google.iam.v1.TestIamPermissionsRequest,
options: gax.CallOptions,
callback?: protosTypes.google.iam.v1.IAMPolicy.TestIamPermissionsCallback
callback?: protos.google.iam.v1.IAMPolicy.TestIamPermissionsCallback
) {
return this._iamClient.testIamPermissions(request, options, callback);
}
Expand Down
10 changes: 6 additions & 4 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 LLC",
"engines": {
"node": ">=8.10.0"
"node": ">=10"
},
"repository": "googleapis/nodejs-kms",
"main": "build/src/index.js",
Expand Down Expand Up @@ -42,17 +42,18 @@
"prepare": "npm run compile"
},
"dependencies": {
"google-gax": "^1.14.2"
"google-gax": "^2.0.1"
},
"devDependencies": {
"@types/mocha": "^7.0.2",
"@types/node": "^13.7.7",
"@types/sinon": "^7.5.2",
"c8": "^7.1.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.2",
"gts": "^1.1.2",
"gts": "2.0.0-alpha.9",
"jsdoc": "^3.6.3",
"jsdoc-fresh": "^1.0.2",
"jsdoc-region-tag": "^1.0.4",
Expand All @@ -62,8 +63,9 @@
"pack-n-play": "^1.0.0-2",
"power-assert": "^1.6.1",
"prettier": "^1.19.1",
"sinon": "^9.0.1",
"ts-loader": "^6.2.1",
"typescript": "^3.7.0",
"typescript": "^3.8.3",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async function quickstart(
console.log('Key rings:');
keyRings.forEach(keyRing => console.log(keyRing.name));
} else {
console.log(`No key rings found.`);
console.log('No key rings found.');
}
}
// [END kms_quickstart]
Expand Down
Loading

0 comments on commit c2ca42e

Please sign in to comment.