Skip to content

Commit 1263ea9

Browse files
feat!: drop node8 support, support for async iterators (#297)
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.
1 parent 418baa9 commit 1263ea9

13 files changed

Lines changed: 3661 additions & 1588 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/gts"
3+
}

packages/google-cloud-iot/.eslintrc.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/google-cloud-iot/.prettierrc

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
module.exports = {
16+
...require('gts/.prettierrc.json')
17+
}

packages/google-cloud-iot/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "Apache-2.0",
66
"author": "Google LLC",
77
"engines": {
8-
"node": ">=8.10.0"
8+
"node": ">=10"
99
},
1010
"repository": "googleapis/nodejs-iot",
1111
"main": "build/src/index.js",
@@ -42,27 +42,29 @@
4242
"prelint": "cd samples; npm link ../; npm i"
4343
},
4444
"dependencies": {
45-
"google-gax": "^1.9.0"
45+
"google-gax": "^2.0.1"
4646
},
4747
"devDependencies": {
4848
"@types/mocha": "^7.0.0",
4949
"@types/node": "^12.0.0",
50+
"@types/sinon": "^7.5.2",
5051
"c8": "^7.0.0",
5152
"eslint": "^6.0.0",
5253
"eslint-config-prettier": "^6.0.0",
5354
"eslint-plugin-node": "^11.0.0",
5455
"eslint-plugin-prettier": "^3.0.0",
55-
"gts": "^1.0.0",
56+
"gts": "2.0.0-alpha.9",
5657
"jsdoc": "^3.6.2",
5758
"jsdoc-fresh": "^1.0.1",
5859
"jsdoc-region-tag": "^1.0.2",
5960
"linkinator": "^2.0.0",
60-
"prettier": "^1.13.7",
6161
"mocha": "^7.0.0",
6262
"null-loader": "^3.0.0",
6363
"pack-n-play": "^1.0.0-2",
64+
"prettier": "^1.13.7",
65+
"sinon": "^9.0.1",
6466
"ts-loader": "^6.2.1",
65-
"typescript": "^3.7.0",
67+
"typescript": "^3.8.3",
6668
"webpack": "^4.41.2",
6769
"webpack-cli": "^3.3.10"
6870
}

packages/google-cloud-iot/smoke-test/device_manager_smoke_test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@
1414

1515
'use strict';
1616

17+
const {describe, it} = require('mocha');
18+
1719
describe('DeviceManagerSmokeTest', () => {
1820
if (!process.env.GCLOUD_PROJECT) {
1921
throw new Error('Usage: GCLOUD_PROJECT=<project_id> node #{$0}');
2022
}
2123
const projectId = process.env.GCLOUD_PROJECT;
2224

2325
it('successfully makes a call to the service using promises', done => {
26+
// eslint-disable-next-line node/no-missing-require
2427
const iot = require('../src');
2528

2629
const client = new iot.v1.DeviceManagerClient({
@@ -43,6 +46,7 @@ describe('DeviceManagerSmokeTest', () => {
4346
});
4447

4548
it('successfully makes a call to the service using callbacks', done => {
49+
// eslint-disable-next-line node/no-missing-require
4650
const iot = require('../src');
4751

4852
const client = new iot.v1.DeviceManagerClient({
@@ -76,6 +80,7 @@ describe('DeviceManagerSmokeTest', () => {
7680
});
7781

7882
it('successfully makes a call to the service using streaming', done => {
83+
// eslint-disable-next-line node/no-missing-require
7984
const iot = require('../src');
8085

8186
const client = new iot.v1.DeviceManagerClient({

0 commit comments

Comments
 (0)