Skip to content

Commit b1e028b

Browse files
sofislsummer-ji-enggcf-owl-bot[bot]
authored
build!: update library to use Node 12 (#644)
* build!: Update library to use Node 12 Co-authored-by: Summer Ji <summerji@google.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 59a4cff commit b1e028b

5 files changed

Lines changed: 12 additions & 10 deletions

File tree

handwritten/nodejs-error-reporting/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "Apache-2.0",
66
"author": "Google Inc.",
77
"engines": {
8-
"node": ">=10"
8+
"node": ">=12.0.0"
99
},
1010
"repository": "googleapis/nodejs-error-reporting",
1111
"main": "./build/src/index.js",
@@ -39,6 +39,7 @@
3939
},
4040
"devDependencies": {
4141
"@compodoc/compodoc": "^1.1.10",
42+
"@hapi/hapi": "^20.1.0",
4243
"@types/boom": "^7.2.1",
4344
"@types/console-log-level": "^1.4.0",
4445
"@types/express": "^4.17.0",
@@ -55,18 +56,17 @@
5556
"c8": "^7.0.0",
5657
"codecov": "^3.5.0",
5758
"express": "^4.17.1",
58-
"gts": "^2.0.0",
59-
"@hapi/hapi": "^20.1.0",
59+
"gts": "^3.1.0",
6060
"js-green-licenses": "^3.0.0",
6161
"json-stable-stringify": "^1.0.1",
6262
"koa": "^2.7.0",
6363
"linkinator": "^2.0.0",
64-
"mocha": "^8.0.0",
64+
"mocha": "^9.2.2",
6565
"nock": "^13.0.0",
6666
"post-install-check": "0.0.1",
6767
"proxyquire": "^2.1.0",
6868
"restify": "^8.3.3",
69-
"typescript": "^3.8.3",
69+
"typescript": "^4.6.4",
7070
"uuid": "^8.0.0"
7171
}
7272
}

handwritten/nodejs-error-reporting/samples/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"!test/"
1010
],
1111
"engines": {
12-
"node": ">=10"
12+
"node": ">=12.0.0"
1313
},
1414
"scripts": {
1515
"test": "mocha --timeout=600000"
@@ -23,4 +23,4 @@
2323
"gaxios": "^5.0.0",
2424
"mocha": "^8.0.0"
2525
}
26-
}
26+
}

handwritten/nodejs-error-reporting/src/configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ export class Configuration {
412412
if (typeof this._givenConfiguration.projectId === 'string') {
413413
this._projectId = this._givenConfiguration.projectId!;
414414
} else if (typeof this._givenConfiguration.projectId === 'number') {
415-
this._projectId = this._givenConfiguration.projectId!.toString();
415+
this._projectId = String(this._givenConfiguration!.projectId);
416416
}
417417
}
418418
return this._projectId;

handwritten/nodejs-error-reporting/src/interfaces/manual.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ export function handlerSetup(
124124
// The API expects the error to contain a stack trace. Thus we
125125
// append the stack trace of the point where the error was
126126
// constructed. See the `message-builder.js` file for more details.
127-
const stackErr = err as ErrorMessage & {_autoGeneratedStackTrace: string};
127+
const stackErr = err as ErrorMessage & {
128+
_autoGeneratedStackTrace?: string;
129+
};
128130
if (stackErr._autoGeneratedStackTrace) {
129131
err.setMessage(err.message + '\n' + stackErr._autoGeneratedStackTrace);
130132
// Delete the property so that if the ErrorMessage is reported a

handwritten/nodejs-error-reporting/system-test/error-reporting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ describe('error-reporting', () => {
604604
timeout: number
605605
) {
606606
function expectedTopOfStack() {
607-
return new Promise((resolve, reject) => {
607+
return new Promise<void>((resolve, reject) => {
608608
errors.report(
609609
errOb,
610610
undefined,

0 commit comments

Comments
 (0)