Skip to content

Commit

Permalink
chore: update typescript to 4.3 and enable noImplicitOverride (#2241)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Dyla <[email protected]>
  • Loading branch information
Flarna and dyladan authored Jun 1, 2021
1 parent 56c032e commit d551781
Show file tree
Hide file tree
Showing 54 changed files with 86 additions and 85 deletions.
2 changes: 1 addition & 1 deletion backwards-compatability/node10/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"@types/node": "10.17.59",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node12/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"@types/node": "12.20.11",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion backwards-compatability/node8/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"@types/node": "8.10.66",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"@opentelemetry/api": "^0.20.0",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"peerDependencies": {
"@opentelemetry/api": "^0.20.0"
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@
"devDependencies": {
"@commitlint/cli": "12.1.1",
"@commitlint/config-conventional": "12.1.1",
"@typescript-eslint/eslint-plugin": "4.22.0",
"@typescript-eslint/parser": "4.22.0",
"@typescript-eslint/eslint-plugin": "4.25.0",
"@typescript-eslint/parser": "4.25.0",
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"eslint": "7.25.0",
"eslint": "7.27.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-import": "2.23.3",
"eslint-plugin-node": "11.1.0",
"gh-pages": "3.1.0",
"husky": "4.3.8",
"lerna": "3.22.1",
"lerna-changelog": "1.0.1",
"markdownlint-cli": "0.27.1",
"typescript": "4.2.4",
"typescript": "4.3.2",
"update-ts-references": "2.3.0"
},
"husky": {
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-api-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"nyc": "15.1.0",
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"typescript": "4.2.4",
"typescript": "4.3.2",
"webpack": "4.46.0"
}
}
2 changes: 1 addition & 1 deletion packages/opentelemetry-api-metrics/test/api/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('API', () => {
});

class TestMeterProvider extends NoopMeterProvider {
getMeter() {
override getMeter() {
return dummyMeter;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-context-async-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"rimraf": "3.0.2",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"peerDependencies": {
"@opentelemetry/api": "^0.20.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-context-zone-peer-dep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4",
"typescript": "4.3.2",
"webpack": "4.46.0",
"webpack-cli": "4.6.0",
"zone.js": "0.11.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-context-zone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4",
"typescript": "4.3.2",
"webpack": "4.46.0",
"webpack-cli": "4.6.0",
"webpack-merge": "5.7.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4",
"typescript": "4.3.2",
"webpack": "4.46.0"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"peerDependencies": {
"@opentelemetry/api": "^0.20.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"peerDependencies": {
"@opentelemetry/api": "^0.20.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export abstract class CollectorExporterNodeBase<
this._sendingPromises.push(promise);
}

onInit(config: CollectorExporterNodeConfigBase): void {
override onInit(config: CollectorExporterNodeConfigBase): void {
this._isShutdown = false;
// defer to next tick and lazy load to avoid loading protobufjs too early
// and making this impossible to be instrumented
Expand All @@ -68,7 +68,7 @@ export abstract class CollectorExporterNodeBase<
});
}

send(
override send(
objects: ExportItem[],
onSuccess: () => void,
onError: (error: collectorTypes.CollectorExporterError) => void
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-exporter-collector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4",
"typescript": "4.3.2",
"webpack": "4.46.0",
"webpack-cli": "4.6.0",
"webpack-merge": "5.7.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-exporter-collector/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export namespace opentelemetryProto {
*/
export class CollectorExporterError extends Error {
readonly code?: number;
readonly name: string = 'CollectorExporterError';
override readonly name: string = 'CollectorExporterError';
readonly data?: string;

constructor(message?: string, code?: number, data?: string) {
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-exporter-jaeger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"sinon": "10.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"peerDependencies": {
"@opentelemetry/api": "^0.20.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-exporter-prometheus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"sinon": "10.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"peerDependencies": {
"@opentelemetry/api": "^0.20.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-exporter-zipkin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4",
"typescript": "4.3.2",
"webpack": "4.46.0",
"webpack-cli": "4.6.0",
"webpack-merge": "5.7.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-instrumentation-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4",
"typescript": "4.3.2",
"webpack": "4.46.0",
"webpack-cli": "4.6.0",
"webpack-merge": "5.7.3"
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-instrumentation-fetch/src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ export class FetchInstrumentation extends InstrumentationBase<
/**
* implements enable function
*/
enable() {
override enable() {
if (isWrapped(window.fetch)) {
this._unwrap(window, 'fetch');
api.diag.debug('removing previous patch for constructor');
Expand All @@ -469,7 +469,7 @@ export class FetchInstrumentation extends InstrumentationBase<
/**
* implements unpatch function
*/
disable() {
override disable() {
this._unwrap(window, 'fetch');
this._usedResources = new WeakSet<PerformanceResourceTiming>();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-instrumentation-grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"sinon": "10.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"peerDependencies": {
"@opentelemetry/api": "^0.20.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ import { AttributeNames } from '../enums/AttributeNames';

export class GrpcJsInstrumentation extends InstrumentationBase {
constructor(
protected _config: GrpcInstrumentationConfig & InstrumentationConfig = {},
protected override _config: GrpcInstrumentationConfig & InstrumentationConfig = {},
name: string,
version: string
) {
super(name, version, _config);
}

public setConfig(
public override setConfig(
config: GrpcInstrumentationConfig & InstrumentationConfig = {}
) {
this._config = Object.assign({}, config);
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-instrumentation-grpc/src/grpc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ export class GrpcNativeInstrumentation extends InstrumentationBase<
typeof grpcTypes
> {
constructor(
protected _config: GrpcInstrumentationConfig & InstrumentationConfig = {},
protected override _config: GrpcInstrumentationConfig & InstrumentationConfig = {},
name: string,
version: string
) {
super(name, version, _config);
}

public setConfig(
public override setConfig(
config: GrpcInstrumentationConfig & InstrumentationConfig = {}
) {
this._config = Object.assign({}, config);
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-instrumentation-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"superagent": "6.1.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"peerDependencies": {
"@opentelemetry/api": "^0.20.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-instrumentation-http/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class HttpInstrumentation extends InstrumentationBase<Http> {
return this._config;
}

setConfig(config: HttpInstrumentationConfig & InstrumentationConfig = {}) {
override setConfig(config: HttpInstrumentationConfig & InstrumentationConfig = {}) {
this._config = Object.assign({}, config);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4",
"typescript": "4.3.2",
"webpack": "4.46.0",
"webpack-cli": "4.6.0",
"webpack-merge": "5.7.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ export class XMLHttpRequestInstrumentation extends InstrumentationBase<XMLHttpRe
/**
* implements enable function
*/
enable() {
override enable() {
api.diag.debug('applying patch to', this.moduleName, this.version);

if (isWrapped(XMLHttpRequest.prototype.open)) {
Expand All @@ -530,7 +530,7 @@ export class XMLHttpRequestInstrumentation extends InstrumentationBase<XMLHttpRe
/**
* implements disable function
*/
disable() {
override disable() {
api.diag.debug('removing patch from', this.moduleName, this.version);

this._unwrap(XMLHttpRequest.prototype, 'open');
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-instrumentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"ts-loader": "8.2.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4",
"typescript": "4.3.2",
"webpack": "4.46.0",
"webpack-cli": "4.6.0",
"webpack-merge": "5.7.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export abstract class InstrumentationBase
extends InstrumentationAbstract
implements types.Instrumentation {
constructor(
readonly instrumentationName: string,
readonly instrumentationVersion: string,
instrumentationName: string,
instrumentationVersion: string,
config: types.InstrumentationConfig = {}
) {
super(instrumentationName, instrumentationVersion, config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class TestInstrumentation extends InstrumentationBase {
constructor(config: TestInstrumentationConfig & InstrumentationConfig = {}) {
super('test', '1.0.0', Object.assign({}, config));
}
enable() {}
disable() {}
override enable() {}
override disable() {}
init() {}
}

Expand All @@ -56,7 +56,7 @@ describe('BaseInstrumentation', () => {
it('should enable instrumentation by default', () => {
let called = false;
class TestInstrumentation2 extends TestInstrumentation {
enable() {
override enable() {
called = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class FooInstrumentation extends InstrumentationBase {
init() {
return [];
}
enable() {}
disable() {}
override enable() {}
override disable() {}
}

describe('autoLoader', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class FooInstrumentation extends InstrumentationBase {
return [];
}

enable() {}
override enable() {}

disable() {}
override disable() {}
}

// const fooInstrumentation = new FooInstrumentation();
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"sinon": "10.0.0",
"ts-mocha": "8.0.0",
"ts-node": "9.1.1",
"typescript": "4.2.4"
"typescript": "4.3.2"
},
"peerDependencies": {
"@opentelemetry/api": "^0.20.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-metrics/src/BaseObserverMetric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export abstract class BaseObserverMetric
);
}

async getMetricRecord(): Promise<MetricRecord[]> {
override async getMetricRecord(): Promise<MetricRecord[]> {
const observerResult = new ObserverResult();
await this._callback(observerResult);

Expand Down
Loading

0 comments on commit d551781

Please sign in to comment.