diff --git a/package.json b/package.json index 4abe7be7..03f34240 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "timekeeper": "^2.0.0", "tmp": "0.2.1", "ts-node": "^10.7.0", - "typescript": "^5.1.6" + "typescript": "5.1.6" }, "dependencies": { "@google-cloud/common": "^5.0.0", diff --git a/src/cls/async-hooks.ts b/src/cls/async-hooks.ts index 369ce917..696c19e4 100644 --- a/src/cls/async-hooks.ts +++ b/src/cls/async-hooks.ts @@ -192,7 +192,11 @@ export class AsyncHooksCLS implements CLS { if (ee[method]) { shimmer.wrap(ee, method, oldMethod => { return function (this: {}, event: string, cb: Func) { - return oldMethod.call(this, event, that.bindWithCurrentContext(cb)); + return oldMethod!.call( + this, + event, + that.bindWithCurrentContext(cb) + ); }; }); } diff --git a/src/index.ts b/src/index.ts index aa417e85..0db070bf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -51,9 +51,9 @@ let traceAgent: StackdriverTracer; function initConfig(userConfig: Forceable): TopLevelConfig { let envSetConfig = {}; if (process.env.GCLOUD_TRACE_CONFIG) { - envSetConfig = require(path.resolve( - process.env.GCLOUD_TRACE_CONFIG! - )) as Config; + envSetConfig = require( + path.resolve(process.env.GCLOUD_TRACE_CONFIG!) + ) as Config; } // Configuration order of precedence: // 1. Environment Variables diff --git a/test/test-span-data.ts b/test/test-span-data.ts index c384f10c..6bfaa093 100644 --- a/test/test-span-data.ts +++ b/test/test-span-data.ts @@ -216,10 +216,11 @@ describe('SpanData', () => { for (const sourceMapType of sourceMapTypes) { it(`uses source maps when available in stack traces: ${sourceMapType}`, () => { - const {applyGeneric} = - require(`./fixtures/source-maps-test/${sourceMapType}`) as { - applyGeneric: (fn: () => T) => T; - }; + const {applyGeneric} = require( + `./fixtures/source-maps-test/${sourceMapType}` + ) as { + applyGeneric: (fn: () => T) => T; + }; const spanData = applyGeneric( () => new CommonSpanData(trace, 'name', '0', 0) ); diff --git a/test/utils.ts b/test/utils.ts index 67b5cd40..519e13dc 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -191,9 +191,9 @@ function getFixturesForModule(moduleName: string): Array> { return moduleNameMatches && versionCompatible; }) .map(key => { - const version = - require(`./plugins/fixtures/${key}/node_modules/${moduleName}/package.json`) - .version as string; + const version = require( + `./plugins/fixtures/${key}/node_modules/${moduleName}/package.json` + ).version as string; const parsedVersion = semver.parse(version)!; const getModule: () => T = () => require(`./plugins/fixtures/${key}`); // Convenience function -- returns if.skip if the selected module's