Skip to content

Commit

Permalink
build!: update library to use Node 12 (#706)
Browse files Browse the repository at this point in the history
* build!: Update library to use Node 12
Co-authored-by: Summer Ji <[email protected]>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
sofisl authored May 24, 2022
1 parent 433cc45 commit 63d6a93
Show file tree
Hide file tree
Showing 21 changed files with 17 additions and 157 deletions.
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.

7 changes: 0 additions & 7 deletions .kokoro/continuous/node10/samples-test.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions .kokoro/continuous/node10/system-test.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 removed .kokoro/continuous/node8/test.cfg
Empty file.
34 changes: 0 additions & 34 deletions .kokoro/presubmit/node10/common.cfg

This file was deleted.

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

This file was deleted.

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

This file was deleted.

7 changes: 0 additions & 7 deletions .kokoro/presubmit/node10/samples-test.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions .kokoro/presubmit/node10/system-test.cfg

This file was deleted.

Empty file removed .kokoro/presubmit/node10/test.cfg
Empty file.
10 changes: 5 additions & 5 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": ">=10"
"node": ">=12.0.0"
},
"repository": "googleapis/nodejs-logging-winston",
"main": "./build/src/index.js",
Expand Down Expand Up @@ -51,7 +51,7 @@
},
"dependencies": {
"@google-cloud/logging": "^9.6.9",
"google-auth-library": "^7.0.0",
"google-auth-library": "^8.0.2",
"lodash.mapvalues": "^4.6.0",
"winston-transport": "^4.3.0"
},
Expand All @@ -66,12 +66,12 @@
"@types/uuid": "^8.0.0",
"c8": "^7.0.0",
"codecov": "^3.5.0",
"gts": "^2.0.0",
"gts": "^3.1.0",
"linkinator": "^2.0.0",
"mocha": "^8.0.0",
"mocha": "^9.2.2",
"post-install-check": "0.0.1",
"proxyquire": "^2.1.0",
"typescript": "^3.9.7",
"typescript": "^4.6.4",
"uuid": "^8.0.0",
"winston": "^3.2.1"
},
Expand Down
4 changes: 2 additions & 2 deletions samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"author": "Google Inc.",
"repository": "googleapis/nodejs-logging-winston",
"engines": {
"node": ">=10"
"node": ">=12.0.0"
},
"scripts": {
"test": "mocha --timeout 600000"
Expand All @@ -21,4 +21,4 @@
"chai": "^4.2.0",
"mocha": "^8.0.0"
}
}
}
2 changes: 1 addition & 1 deletion system-test/errors-transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class ErrorsApiTransport extends common.Service {
async request(options: common.DecorateRequestOptions) {
return new Promise<ApiResponse>((resolve, reject) => {
super.request(options, (err, _, res) =>
err ? reject(err) : resolve(res)
err ? reject(err) : resolve(res as common.ResponseBody)
);
});
}
Expand Down
2 changes: 1 addition & 1 deletion system-test/test-middleware-express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe(__filename, () => {
it('should write request correlated log entries', function () {
this.timeout(TEST_TIMEOUT);
// eslint-disable-next-line no-async-promise-executor
return new Promise(async resolve => {
return new Promise<void>(async resolve => {
const logger = winston.createLogger();
const mw = await elb.makeMiddleware(logger, {
logName: LOG_NAME,
Expand Down
7 changes: 6 additions & 1 deletion test/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ import {LoggingCommon} from '../src/common';

declare const global: {[index: string]: {} | null};

interface Metadata {
value(): void;
labels?: {label2?: string};
}

describe('logging-common', () => {
let fakeLogInstance: Logging;
let fakeLoggingOptions_: Options | null;
Expand Down Expand Up @@ -508,7 +513,7 @@ describe('logging-common', () => {
const MESSAGE = 'message';
const PREFIX = 'prefix';
const LABELS = {label1: 'value1'};
const METADATA = {value: () => {}, labels: {label2: 'value2'}};
const METADATA: Metadata = {value: () => {}, labels: {label2: 'value2'}};

beforeEach(() => {
const opts = Object.assign({}, OPTIONS, {
Expand Down

0 comments on commit 63d6a93

Please sign in to comment.