chore: update to typescript 4.1 and gts 3 (#1890)

This commit is contained in:
Gerhard Stöbich 2021-02-03 17:53:25 +01:00 committed by GitHub
parent e68863f8e6
commit 65277da18d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
108 changed files with 21067 additions and 15877 deletions

View File

@ -11,9 +11,9 @@
"dev": true
},
"typescript": {
"version": "3.9.7",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz",
"integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
"integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==",
"dev": true
}
}

View File

@ -13,7 +13,7 @@
},
"devDependencies": {
"@types/node": "10.17.50",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0"

View File

@ -11,9 +11,9 @@
"dev": true
},
"typescript": {
"version": "3.9.7",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz",
"integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
"integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==",
"dev": true
}
}

View File

@ -13,7 +13,7 @@
},
"devDependencies": {
"@types/node": "12.19.13",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0"

View File

@ -11,9 +11,9 @@
"dev": true
},
"typescript": {
"version": "3.9.7",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz",
"integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
"integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==",
"dev": true
}
}

View File

@ -13,7 +13,7 @@
},
"devDependencies": {
"@types/node": "8.10.66",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0"

View File

@ -369,9 +369,9 @@
}
},
"typescript": {
"version": "3.9.7",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz",
"integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
"integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==",
"dev": true
},
"unpipe": {

View File

@ -20,6 +20,6 @@
"express": "4.17.1"
},
"devDependencies": {
"typescript": "3.9.7"
"typescript": "4.1.3"
}
}

895
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -47,21 +47,21 @@
"devDependencies": {
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@typescript-eslint/eslint-plugin": "4.13.0",
"@typescript-eslint/parser": "4.13.0",
"@typescript-eslint/eslint-plugin": "4.14.2",
"@typescript-eslint/parser": "4.14.2",
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"eslint": "7.17.0",
"eslint": "7.19.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-plugin-header": "3.1.0",
"eslint-plugin-import": "2.22.1",
"gh-pages": "3.1.0",
"gts": "2.0.2",
"husky": "4.3.7",
"gts": "3.1.0",
"husky": "4.3.8",
"lerna": "3.22.1",
"lerna-changelog": "1.0.1",
"markdownlint-cli": "0.26.0",
"typescript": "3.9.7",
"typescript": "4.1.3",
"update-ts-references": "2.0.0"
},
"husky": {

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@
"@types/node": "14.14.12",
"@types/webpack-env": "1.16.0",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
@ -67,7 +67,7 @@
"nyc": "15.1.0",
"ts-loader": "8.0.12",
"ts-mocha": "8.0.0",
"typescript": "3.9.7",
"typescript": "4.1.3",
"webpack": "4.44.2"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@
"@types/sinon": "9.0.10",
"@types/webpack-env": "1.16.0",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
@ -73,7 +73,7 @@
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"typedoc": "0.20.14",
"typescript": "3.9.7",
"typescript": "4.1.3",
"webpack": "4.46.0"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -44,13 +44,13 @@
"@types/node": "14.14.20",
"@types/shimmer": "1.0.1",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/context-base": "^0.16.0"

View File

@ -31,11 +31,11 @@ type PatchedEventEmitter = {
} & EventEmitter;
const ADD_LISTENER_METHODS = [
'addListener' as 'addListener',
'on' as 'on',
'once' as 'once',
'prependListener' as 'prependListener',
'prependOnceListener' as 'prependOnceListener',
'addListener' as const,
'on' as const,
'once' as const,
'prependListener' as const,
'prependOnceListener' as const,
];
export abstract class AbstractAsyncHooksContextManager

File diff suppressed because it is too large Load Diff

View File

@ -45,12 +45,12 @@
"@types/mocha": "8.2.0",
"@types/node": "14.14.20",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -49,7 +49,7 @@
"@types/zone.js": "0.5.12",
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
@ -64,7 +64,7 @@
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7",
"typescript": "4.1.3",
"webpack": "4.46.0",
"webpack-cli": "4.3.1",
"zone.js": "0.11.3"

File diff suppressed because it is too large Load Diff

View File

@ -45,7 +45,7 @@
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
"karma-mocha": "2.0.1",
@ -58,7 +58,7 @@
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7",
"typescript": "4.1.3",
"webpack": "4.46.0",
"webpack-cli": "4.3.1",
"webpack-merge": "5.7.3"

File diff suppressed because it is too large Load Diff

View File

@ -57,7 +57,7 @@
"@types/sinon": "9.0.10",
"@types/webpack-env": "1.16.0",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
@ -72,7 +72,7 @@
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7",
"typescript": "4.1.3",
"webpack": "4.46.0"
},
"dependencies": {

View File

@ -31,7 +31,7 @@ describe('attributes', () => {
it('should allow nullish values', () => {
assert.ok(isAttributeValue(null));
assert.ok(isAttributeValue(undefined));
// @ts-expect-error
// @ts-expect-error verify that no arg works
assert.ok(isAttributeValue());
});

View File

@ -271,7 +271,7 @@ describe('HttpTraceContext', () => {
it('should fail gracefully on bad responses from getter', () => {
const ctx1 = httpTraceContext.extract(ROOT_CONTEXT, carrier, {
// @ts-expect-error
// @ts-expect-error verify with number
get: (c, k) => 1, // not a number
keys: () => [],
});

View File

@ -176,7 +176,7 @@ describe('Composite Propagator', () => {
inject: () => {},
fields: () => ['p1'],
},
// @ts-expect-error
// @ts-expect-error verify missing fields case
{
extract: c => c,
inject: () => {},

File diff suppressed because it is too large Load Diff

View File

@ -52,7 +52,7 @@
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"cpx": "1.5.0",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
@ -60,7 +60,7 @@
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@grpc/proto-loader": "^0.5.4",

View File

@ -54,7 +54,7 @@ export abstract class CollectorExporterNodeBase<
onSuccess: () => void,
onError: (error: collectorTypes.CollectorExporterError) => void
): void {
const promise = new Promise(resolve => {
const promise = new Promise<void>(resolve => {
const _onSuccess = (): void => {
onSuccess();
_onFinish();

File diff suppressed because it is too large Load Diff

View File

@ -52,7 +52,7 @@
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"cpx": "1.5.0",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
@ -60,7 +60,7 @@
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@grpc/proto-loader": "^0.5.4",

View File

@ -35,7 +35,7 @@ export abstract class CollectorExporterNodeBase<
onSuccess: () => void,
onError: (error: collectorTypes.CollectorExporterError) => void
): void {
const promise = new Promise(resolve => {
const promise = new Promise<void>(resolve => {
const _onSuccess = (): void => {
onSuccess();
_onFinish();

View File

@ -194,7 +194,7 @@ describe('CollectorMetricExporter - node with proto over http', () => {
it('should log the error message', done => {
collectorExporter.export(metrics, result => {
assert.strictEqual(result.code, ExportResultCode.FAILED);
// @ts-expect-error
// @ts-expect-error verify error code
assert.strictEqual(result.error.code, 400);
done();
});

View File

@ -143,7 +143,7 @@ describe('CollectorTraceExporter - node with proto over http', () => {
it('should log the error message', done => {
collectorExporter.export(spans, result => {
assert.strictEqual(result.code, ExportResultCode.FAILED);
// @ts-expect-error
// @ts-expect-error verify error code
assert.strictEqual(result.error.code, 400);
done();
});

File diff suppressed because it is too large Load Diff

View File

@ -56,7 +56,7 @@
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"cpx": "1.5.0",
"gts": "2.0.2",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
@ -71,7 +71,7 @@
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7",
"typescript": "4.1.3",
"webpack": "4.46.0",
"webpack-cli": "4.3.1",
"webpack-merge": "5.7.3"

View File

@ -97,7 +97,7 @@ export abstract class CollectorExporterBase<
}
private _export(items: ExportItem[]): Promise<unknown> {
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
try {
this.logger.debug('items to be sent', items);
this.send(items, resolve, reject);

View File

@ -68,7 +68,7 @@ export abstract class CollectorExporterBrowserBase<
const serviceRequest = this.convert(items);
const body = JSON.stringify(serviceRequest);
const promise = new Promise(resolve => {
const promise = new Promise<void>(resolve => {
const _onSuccess = (): void => {
onSuccess();
_onFinish();

View File

@ -62,7 +62,7 @@ export abstract class CollectorExporterNodeBase<
}
const serviceRequest = this.convert(objects);
const promise = new Promise(resolve => {
const promise = new Promise<void>(resolve => {
const _onSuccess = (): void => {
onSuccess();
_onFinish();

View File

@ -17,6 +17,8 @@
import { Attributes, Logger, SpanKind, StatusCode } from '@opentelemetry/api';
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/no-unused-vars */
export namespace opentelemetryProto {
export namespace collector {
export namespace trace.v1 {

File diff suppressed because it is too large Load Diff

View File

@ -45,7 +45,7 @@
"@types/node": "14.14.20",
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
@ -53,7 +53,7 @@
"sinon": "9.2.3",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

View File

@ -161,7 +161,7 @@ export class JaegerExporter implements SpanExporter {
}
private async _flush(): Promise<void> {
await new Promise((resolve, reject) => {
await new Promise<void>((resolve, reject) => {
this._sender.flush((_count: number, err?: string) => {
if (err) {
return reject(new Error(err));

File diff suppressed because it is too large Load Diff

View File

@ -42,13 +42,13 @@
"@types/mocha": "8.2.0",
"@types/node": "14.14.20",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

File diff suppressed because it is too large Load Diff

View File

@ -53,7 +53,7 @@
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
@ -69,7 +69,7 @@
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7",
"typescript": "4.1.3",
"webpack": "4.46.0",
"webpack-cli": "4.3.1",
"webpack-merge": "5.7.3"

View File

@ -74,7 +74,7 @@ export class ZipkinExporter implements SpanExporter {
);
return;
}
const promise = new Promise(resolve => {
const promise = new Promise<void>(resolve => {
this._sendSpans(spans, this._serviceName!, result => {
resolve();
resultCallback(result);

File diff suppressed because it is too large Load Diff

View File

@ -53,7 +53,7 @@
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"grpc": "1.24.4",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"node-pre-gyp": "0.17.0",
"nyc": "15.1.0",
@ -62,7 +62,7 @@
"sinon": "9.2.3",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

File diff suppressed because it is too large Load Diff

View File

@ -53,7 +53,7 @@
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
@ -68,7 +68,7 @@
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7",
"typescript": "4.1.3",
"webpack": "4.46.0",
"webpack-cli": "4.3.1",
"webpack-merge": "5.7.3"

View File

@ -335,7 +335,7 @@ export class FetchInstrumentation extends InstrumentationBase<
return original
.apply(this, [url, options])
.then(
onSuccess.bind(this, span, resolve),
(onSuccess as any).bind(this, span, resolve),
onError.bind(this, span, reject)
);
}

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"grpc": "1.24.4",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"node-pre-gyp": "0.17.0",
"nyc": "15.1.0",
@ -64,7 +64,7 @@
"sinon": "9.2.3",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@
"axios": "0.21.1",
"codecov": "3.8.1",
"got": "9.6.0",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
@ -66,7 +66,7 @@
"superagent": "6.1.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

View File

@ -224,6 +224,7 @@ export class HttpInstrumentation extends InstrumentationBase<Http> {
return (original: Func<http.ClientRequest>): Func<http.ClientRequest> => {
const instrumentation = this;
return function httpsOutgoingRequest(
// eslint-disable-next-line node/no-unsupported-features/node-builtins
options: https.RequestOptions | string | URL,
...args: HttpRequestArgs
): http.ClientRequest {
@ -251,6 +252,7 @@ export class HttpInstrumentation extends InstrumentationBase<Http> {
/** Patches HTTPS outgoing get requests */
private _getPatchHttpsOutgoingGetFunction(
clientRequest: (
// eslint-disable-next-line node/no-unsupported-features/node-builtins
options: http.RequestOptions | string | URL,
...args: HttpRequestArgs
) => http.ClientRequest
@ -258,6 +260,7 @@ export class HttpInstrumentation extends InstrumentationBase<Http> {
return (original: Func<http.ClientRequest>): Func<http.ClientRequest> => {
const instrumentation = this;
return function httpsOutgoingRequest(
// eslint-disable-next-line node/no-unsupported-features/node-builtins
options: https.RequestOptions | string | URL,
...args: HttpRequestArgs
): http.ClientRequest {

View File

@ -89,10 +89,9 @@ export const hasExpectHeader = (options: RequestOptions): boolean => {
/**
* Check whether the given obj match pattern
* @param constant e.g URL of request
* @param obj obj to inspect
* @param pattern Match pattern
*/
export const satisfiesPattern = <T>(
export const satisfiesPattern = (
constant: string,
pattern: IgnoreMatcher
): boolean => {

File diff suppressed because it is too large Load Diff

View File

@ -52,7 +52,7 @@
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
@ -67,7 +67,7 @@
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7",
"typescript": "4.1.3",
"webpack": "4.46.0",
"webpack-cli": "4.3.1",
"webpack-merge": "5.7.3"

View File

@ -39,6 +39,7 @@ export type SendBody =
| ArrayBufferView
| ArrayBuffer
| FormData
// eslint-disable-next-line node/no-unsupported-features/node-builtins
| URLSearchParams
| ReadableStream<Uint8Array>
| null;

View File

@ -56,7 +56,7 @@ const getData = (
async?: boolean
) => {
// eslint-disable-next-line no-async-promise-executor
return new Promise(async (resolve, reject) => {
return new Promise<void>(async (resolve, reject) => {
if (async === undefined) {
async = true;
}

File diff suppressed because it is too large Load Diff

View File

@ -71,7 +71,7 @@
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"cpx": "1.5.0",
"gts": "2.0.2",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
@ -86,7 +86,7 @@
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7",
"typescript": "4.1.3",
"webpack": "4.46.0",
"webpack-cli": "4.3.1",
"webpack-merge": "5.7.3"

View File

@ -20,7 +20,7 @@ import * as types from '../../types';
/**
* Base abstract class for instrumenting web plugins
*/
export abstract class InstrumentationBase<T = any>
export abstract class InstrumentationBase
extends InstrumentationAbstract
implements types.Instrumentation {
constructor(

File diff suppressed because it is too large Load Diff

View File

@ -45,14 +45,14 @@
"@types/node": "14.14.20",
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"sinon": "9.2.3",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

View File

@ -17,7 +17,6 @@
import * as api from '@opentelemetry/api-metrics';
import { Logger, NoopLogger } from '@opentelemetry/api';
import { BatchObserverResult } from './BatchObserverResult';
import { MetricRecord } from './export/types';
const NOOP_CALLBACK = () => {};
const MAX_TIMEOUT_UPDATE_MS = 500;
@ -38,7 +37,7 @@ export class BatchObserver {
this._callback = callback || NOOP_CALLBACK;
}
collect(): Promise<MetricRecord[]> {
collect(): Promise<void> {
this._logger.debug('getMetricRecord - start');
return new Promise(resolve => {
const observerResult = new BatchObserverResult();

View File

@ -68,7 +68,6 @@ if (Number(process.versions.node.match(/^\d+/)) >= 10) {
// type bigint
// Preferring BigInt builtin object instead of bigint literal to keep Node.js v8.x working.
// TODO: should metric instruments support bigint?
// @ts-ignore
BigInt(1) // eslint-disable-line node/no-unsupported-features/es-builtins
);
}
@ -428,7 +427,7 @@ describe('Meter', () => {
await Promise.all(
nonNumberValues.map(async val => {
// @ts-expect-error
// @ts-expect-error verify non number types
boundCounter.add(val);
await meter.collect();
const [record1] = meter.getProcessor().checkPointSet();
@ -446,7 +445,7 @@ describe('Meter', () => {
await Promise.all(
nonNumberValues.map(async val => {
// @ts-expect-error
// @ts-expect-error verify non number types
boundCounter.add(val);
await meter.collect();
const [record1] = meter.getProcessor().checkPointSet();
@ -721,7 +720,7 @@ describe('Meter', () => {
await Promise.all(
nonNumberValues.map(async val => {
// @ts-expect-error
// @ts-expect-error verify non number types
boundValueRecorder.record(val);
await meter.collect();
const [record1] = meter.getProcessor().checkPointSet();
@ -816,7 +815,7 @@ describe('Meter', () => {
},
(observerResult: api.ObserverResult) => {
// simulate async
return new Promise(resolve => {
return new Promise<void>(resolve => {
setTimeout(() => {
observerResult.observe(getValue(), { pid: '123', core: '1' });
resolve();
@ -947,7 +946,7 @@ describe('Meter', () => {
},
(observerResult: api.ObserverResult) => {
// simulate async
return new Promise(resolve => {
return new Promise<void>(resolve => {
setTimeout(() => {
observerResult.observe(getCpuUsage(), { pid: '123', core: '1' });
observerResult.observe(getCpuUsage(), { pid: '123', core: '2' });
@ -1038,7 +1037,7 @@ describe('Meter', () => {
},
(observerResult: api.ObserverResult) => {
// simulate async
return new Promise(resolve => {
return new Promise<void>(resolve => {
setTimeout(() => {
observerResult.observe(getValue(), { pid: '123', core: '1' });
resolve();

View File

@ -49,7 +49,7 @@ describe('HistogramAggregator', () => {
});
it('should throw if no boundaries are defined', () => {
// @ts-ignore
// @ts-expect-error verify use without boundaries
assert.throws(() => new HistogramAggregator());
assert.throws(() => new HistogramAggregator([]));
});

File diff suppressed because it is too large Load Diff

View File

@ -48,14 +48,14 @@
"@types/semver": "7.3.4",
"@types/shimmer": "1.0.1",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"shimmer": "1.2.1",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

File diff suppressed because it is too large Load Diff

View File

@ -54,7 +54,7 @@
"@types/shimmer": "1.0.1",
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
@ -62,7 +62,7 @@
"sinon": "9.2.3",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

File diff suppressed because it is too large Load Diff

View File

@ -52,7 +52,7 @@
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"grpc": "1.24.4",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"node-pre-gyp": "0.17.0",
"nyc": "15.1.0",
@ -61,7 +61,7 @@
"sinon": "9.2.3",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

File diff suppressed because it is too large Load Diff

View File

@ -56,7 +56,7 @@
"axios": "0.21.1",
"codecov": "3.8.1",
"got": "9.6.0",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
@ -67,7 +67,7 @@
"superagent": "6.1.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

View File

@ -89,10 +89,9 @@ export const hasExpectHeader = (options: RequestOptions): boolean => {
/**
* Check whether the given obj match pattern
* @param constant e.g URL of request
* @param obj obj to inspect
* @param pattern Match pattern
*/
export const satisfiesPattern = <T>(
export const satisfiesPattern = (
constant: string,
pattern: IgnoreMatcher
): boolean => {

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@
"axios": "0.21.1",
"codecov": "3.8.1",
"got": "9.6.0",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
@ -66,7 +66,7 @@
"superagent": "6.1.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

File diff suppressed because it is too large Load Diff

View File

@ -46,13 +46,13 @@
"@types/mocha": "8.2.0",
"@types/node": "14.14.20",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"typescript": "3.9.7"
"typescript": "4.1.3"
}
}

View File

@ -468,7 +468,7 @@ describe('B3MultiPropagator', () => {
it('should fail gracefully on bad responses from getter', () => {
const ctx1 = b3Propagator.extract(ROOT_CONTEXT, carrier, {
// @ts-expect-error
// @ts-expect-error verify number is not allowed
get: (c, k) => 1, // not a number
keys: defaultTextMapGetter.keys,
});

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,7 @@
"@types/node": "14.14.20",
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
@ -51,7 +51,7 @@
"sinon": "9.2.3",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

File diff suppressed because it is too large Load Diff

View File

@ -44,14 +44,14 @@
"@types/node": "14.14.20",
"@types/semver": "7.3.4",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
"rimraf": "3.0.2",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@
"@types/node": "14.14.20",
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
@ -55,7 +55,7 @@
"sinon": "9.2.3",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

File diff suppressed because it is too large Load Diff

View File

@ -60,7 +60,7 @@
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"gcp-metadata": "^4.1.4",
"gts": "2.0.2",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"mocha": "7.2.0",
"nyc": "15.1.0",
@ -68,6 +68,6 @@
"sinon": "9.2.3",
"ts-loader": "8.0.14",
"ts-mocha": "8.0.0",
"typescript": "3.9.7"
"typescript": "4.1.3"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,7 @@
"@types/node": "14.14.20",
"@types/sinon": "9.0.10",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
@ -51,6 +51,6 @@
"sinon": "9.2.3",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "3.9.7"
"typescript": "4.1.3"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -42,7 +42,7 @@
"@types/mocha": "8.2.0",
"@types/node": "14.14.20",
"codecov": "3.8.1",
"gts": "2.0.2",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
@ -50,7 +50,7 @@
"ts-node": "9.1.1",
"tslint-consistent-codestyle": "1.16.0",
"tslint-microsoft-contrib": "6.2.0",
"typescript": "3.9.7"
"typescript": "4.1.3"
},
"dependencies": {
"@opentelemetry/api": "^0.16.0",

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More