Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build!: drop Node 10 to support and update lastest Typescript #1252

Merged
merged 6 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ branchProtectionRules:
- "ci/kokoro: System test"
- docs
- lint
- test (10)
- test (12)
- test (14)
- test (16)
- cla/google
- windows
- OwlBot Post Processor
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: [10, 12, 14]
node: [12, 14, 16]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
34 changes: 0 additions & 34 deletions .kokoro/continuous/node10/common.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions .kokoro/continuous/node10/docs.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions .kokoro/continuous/node10/lint.cfg

This file was deleted.

9 changes: 0 additions & 9 deletions .kokoro/continuous/node10/test.cfg

This file was deleted.

24 changes: 0 additions & 24 deletions .kokoro/continuous/node8/common.cfg

This file was deleted.

Empty file.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@types/fs-extra": "^9.0.0",
"@types/mocha": "^9.0.0",
"@types/ncp": "^2.0.1",
"@types/node": ">=15.6.0",
"@types/node": "^17.0.31",
"@types/node-fetch": "^2.5.4",
"@types/object-hash": "^2.1.0",
"@types/proxyquire": "^1.3.28",
Expand All @@ -47,7 +47,7 @@
"file-loader": "^6.0.0",
"fs-extra": "^10.0.0",
"google-proto-files": "^2.5.0",
"gts": "^2.0.0",
"gts": "^3.1.0",
"is-docker": "^3.0.0",
"json-loader": "^0.5.7",
"karma": "^6.0.0",
Expand All @@ -71,7 +71,7 @@
"sinon": "^13.0.0",
"stream-events": "^1.0.4",
"ts-loader": "^9.0.0",
"typescript": "^3.8.3",
"typescript": "^4.6.4",
"walkdir": "^0.4.0",
"webpack": "^5.0.0",
"webpack-cli": "^4.0.0"
Expand Down Expand Up @@ -112,7 +112,7 @@
},
"homepage": "https://github.com/googleapis/gax-nodejs#readme",
"engines": {
"node": ">=10"
"node": ">=12"
},
"browser": "build/src/fallback.js"
}
8 changes: 0 additions & 8 deletions src/streamingCalls/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/* This file describes the gRPC-streaming. */

import {Duplex, DuplexOptions, Readable, Stream, Writable} from 'stream';
import {Metadata} from '@grpc/grpc-js';

import {
APICallback,
Expand Down Expand Up @@ -77,13 +76,6 @@ export enum StreamType {
BIDI_STREAMING = 3,
}

interface Status {
code: number;
details: string;
message?: string;
metadata?: Metadata;
}

export class StreamProxy extends duplexify implements GRPCCallResult {
type: StreamType;
private _callback: APICallback;
Expand Down
2 changes: 1 addition & 1 deletion test/browser-test/test.endtoend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('Run tests against gRPC server', () => {
port: 1337,
};

// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
global.isBrowser = true;
const client = new EchoClient(opts);
Expand Down
2 changes: 1 addition & 1 deletion test/browser-test/test.grpc-fallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

/* eslint-disable @typescript-eslint/ban-ts-ignore */
/* eslint-disable @typescript-eslint/ban-ts-comment */

import * as assert from 'assert';
import {GoogleAuth} from 'google-auth-library';
Expand Down
4 changes: 1 addition & 3 deletions test/browser-test/test.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import {Transform} from 'stream';
import {EchoClient} from '../fixtures/google-gax-packaging-test-app/src/v1beta1';
import {GoogleAuth} from 'google-auth-library';
import {GoogleError} from '../../src';
interface Operation {
promise(): Function;
}

describe('Run unit tests of echo client', () => {
interface GoogleError extends Error {
code: number;
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/google-gax-packaging-test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"protobufjs": "^6.10.2"
},
"engines": {
"node": ">=10.0.0"
"node": ">=12.0.0"
}
}
2 changes: 1 addition & 1 deletion test/fixtures/google-gax-packaging-test-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async function testEchoError(client: EchoClient) {
Error);
try {
await client.echo(request);
} catch (err) {
} catch (err: any) {
clearTimeout(timer);
assert.strictEqual(JSON.stringify(err.statusDetails), JSON.stringify(expectedDetails));
assert.ok(errorInfo!)
Expand Down
2 changes: 1 addition & 1 deletion test/unit/bundling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

/* eslint-disable @typescript-eslint/ban-ts-ignore */
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable no-prototype-builtins */

import * as assert from 'assert';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/gax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* allowing that causes another errors of non-camelcase symbols anyways.
* Therefore quote-props is disabled explicitly only in this file. */

/* eslint-disable @typescript-eslint/ban-ts-ignore */
/* eslint-disable @typescript-eslint/ban-ts-comment */

import * as assert from 'assert';
import {describe, it} from 'mocha';
Expand Down
2 changes: 2 additions & 0 deletions test/unit/googleError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ describe('gRPC-google error decoding', () => {
try {
decoder.decodeProtobufAny(any);
} catch (err) {
assert(err instanceof Error);
assert.strictEqual(
0,
err
Expand All @@ -161,6 +162,7 @@ describe('gRPC-google error decoding', () => {
try {
decoder.decodeProtobufAny(any);
} catch (err) {
assert(err instanceof Error);
assert.strictEqual(0, err.toString().indexOf('Error: no such type'));
}
});
Expand Down
2 changes: 1 addition & 1 deletion test/unit/grpc-fallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

/* eslint-disable @typescript-eslint/ban-ts-ignore */
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable no-undef */

import * as assert from 'assert';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/grpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

/* eslint-disable @typescript-eslint/ban-ts-ignore */
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable no-prototype-builtins */
/* eslint-disable @typescript-eslint/no-var-requires */

Expand Down
2 changes: 1 addition & 1 deletion test/unit/longrunning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ describe('longrunning', () => {
finalOperation: PENDING_OP,
});
const apiCall = createApiCall(func, client);
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore incomplete options
apiCall(
{},
Expand Down
2 changes: 1 addition & 1 deletion test/unit/pagedIteration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

/* eslint-disable @typescript-eslint/ban-ts-ignore */
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable no-prototype-builtins */

import * as assert from 'assert';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/regapic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

/* xslint-disable @typescript-eslint/ban-ts-ignore */
/* xslint-disable @typescript-eslint/ban-ts-comment */
/* xslint-disable no-undef */

import * as assert from 'assert';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

/* eslint-disable @typescript-eslint/ban-ts-ignore */
/* eslint-disable @typescript-eslint/ban-ts-comment */

import * as assert from 'assert';
import * as sinon from 'sinon';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/transcoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

/* eslint-disable @typescript-eslint/ban-ts-ignore */
/* eslint-disable @typescript-eslint/ban-ts-comment */

import {describe, it} from 'mocha';
import {RequestType} from '../../src/apitypes';
Expand Down