Skip to content

Commit

Permalink
feat!: drop node8 support, support for async iterators (#482)
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 b5280f1 commit 5c689ca
Show file tree
Hide file tree
Showing 16 changed files with 4,004 additions and 1,710 deletions.
3 changes: 3 additions & 0 deletions packages/google-cloud-translate/.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 packages/google-cloud-translate/.eslintrc.yml

This file was deleted.

8 changes: 0 additions & 8 deletions packages/google-cloud-translate/.prettierrc

This file was deleted.

17 changes: 17 additions & 0 deletions packages/google-cloud-translate/.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')
}
10 changes: 6 additions & 4 deletions packages/google-cloud-translate/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": ">=8.10.0"
"node": ">=10"
},
"repository": "googleapis/nodejs-translate",
"main": "build/src/index.js",
Expand Down Expand Up @@ -48,7 +48,7 @@
"@google-cloud/promisify": "^1.0.0",
"arrify": "^2.0.0",
"extend": "^3.0.2",
"google-gax": "^1.11.1",
"google-gax": "^2.0.1",
"is-html": "^2.0.0",
"protobufjs": "^6.8.8"
},
Expand All @@ -58,14 +58,15 @@
"@types/node": "^10.5.7",
"@types/proxyquire": "^1.3.28",
"@types/request": "^2.47.1",
"@types/sinon": "^7.5.2",
"c8": "^7.0.0",
"codecov": "^3.0.2",
"eslint": "^6.0.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.0.0",
"google-auth-library": "^5.7.0",
"gts": "^1.0.0",
"gts": "2.0.0-alpha.9",
"http2spy": "^1.1.0",
"jsdoc": "^3.6.2",
"jsdoc-fresh": "^1.0.1",
Expand All @@ -75,6 +76,7 @@
"pack-n-play": "^1.0.0-2",
"prettier": "^1.13.5",
"proxyquire": "^2.0.1",
"typescript": "3.6.4"
"sinon": "^9.0.1",
"typescript": "^3.8.3"
}
}
2 changes: 2 additions & 0 deletions packages/google-cloud-translate/src/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ import arrify = require('arrify');
import * as extend from 'extend';
import {GoogleAuthOptions} from 'google-auth-library';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const isHtml = require('is-html');
import {
DecorateRequestOptions,
BodyResponseCallback,
} from '@google-cloud/common/build/src/util';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const PKG = require('../../../package.json');

export interface TranslateRequest {
Expand Down
Loading

0 comments on commit 5c689ca

Please sign in to comment.