Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit 433f4b2

Browse files
authored
chore(deps): update dependency @types/node to v16 (#1461)
1 parent fbcc88c commit 433f4b2

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"@types/knex": "^0.15.1",
6161
"@types/methods": "^1.1.0",
6262
"@types/mocha": "^9.0.0",
63-
"@types/node": "^14.0.0",
63+
"@types/node": "^16.0.0",
6464
"@types/node-fetch": "^2.5.0",
6565
"@types/once": "^1.4.0",
6666
"@types/proxyquire": "^1.3.28",

src/tracing.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ export class Tracing implements Component {
170170
}
171171

172172
// Make trace agent available globally without requiring package
173-
global._google_trace_agent = this.traceAgent;
173+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
174+
(global as any)._google_trace_agent = this.traceAgent;
174175

175176
this.logger.info('StackdriverTracer#start: Trace Agent activated.');
176177
}

test/test-cls.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ describe('Continuation-Local Storage', () => {
117117
setImmediate(() => {
118118
assert.strictEqual(c.getContext(), 'modified');
119119
progress();
120-
}, 1);
120+
});
121121
setTimeout(() => {
122122
assert.strictEqual(c.getContext(), 'modified');
123123
progress();

test/test-trace-cluster.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import * as assert from 'assert';
1616
import {describe, it, before, after} from 'mocha';
1717
import axiosModule from 'axios';
18-
import * as cluster from 'cluster';
18+
import * as _cluster from 'cluster';
1919
import {Server} from 'http';
2020
import {AddressInfo} from 'net';
2121
import {express_4 as expressModule} from '../src/plugins/types';
@@ -45,10 +45,10 @@ describe('test-trace-cluster', () => {
4545
});
4646

4747
it('should not interfere with express span', async () => {
48-
if (cluster.isMaster) {
48+
if ((_cluster as unknown as _cluster.Cluster).isPrimary) {
4949
await new Promise<void>(resolve => {
50-
const worker = cluster.fork();
51-
worker.on('exit', code => {
50+
const worker = (_cluster as unknown as _cluster.Cluster).fork();
51+
worker.on('exit', (code: unknown) => {
5252
assert.strictEqual(code, 0);
5353
console.log('Success!');
5454
resolve();
@@ -74,7 +74,7 @@ describe('test-trace-cluster', () => {
7474
recordedTime = Date.now() - recordedTime;
7575
const serverSpan = testTraceModule.getOneSpan(isServerSpan);
7676
assertSpanDuration(serverSpan, [DEFAULT_SPAN_DURATION, recordedTime]);
77-
cluster.worker.disconnect();
77+
(_cluster as unknown as _cluster.Cluster)?.worker?.disconnect();
7878
server.close();
7979
}
8080
});

0 commit comments

Comments
 (0)