Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
chore: upgrade gRPC, ts to newest compatible version (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
aabmass committed Jul 19, 2021
1 parent 03d0c9e commit 9bd4f11
Show file tree
Hide file tree
Showing 74 changed files with 2,114 additions and 4,363 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.

## Unreleased
- chore(stackdriver): upgrade google-auth-library, drop node8 (#887)
- chore: upgrade gRPC, ts to newest compatible version (#907)
BREAKING CHANGE: upgrade to TypeScript 3.x

## 0.0.22 - 2020-05-18
- fix(deps): update dependency uuid to v8 (#807)
Expand Down
2 changes: 1 addition & 1 deletion examples/grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@opencensus/exporter-stackdriver": "^0.0.20",
"@opencensus/instrumentation-grpc": "^0.0.20",
"@opencensus/nodejs": "^0.0.20",
"grpc": "^1.18.0"
"grpc": "^1.24.10"
},
"devDependencies": {
"semistandard": "^13.0.1"
Expand Down
34 changes: 16 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
"access": "public"
},
"devDependencies": {
"@types/node": "^10.12.12",
"@types/node": "^10.17.60",
"lerna": "^2.11.0",
"typedoc": "^0.17.0",
"typescript": "^3.0.0"
"typescript": "^3.9.10"
}
}
31 changes: 16 additions & 15 deletions packages/opencensus-core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/opencensus-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"access": "public"
},
"devDependencies": {
"@types/continuation-local-storage": "^3.2.1",
"@types/continuation-local-storage": "3.2.1",
"@types/mocha": "^7.0.0",
"@types/node": "^10.12.12",
"@types/node": "^10.17.60",
"@types/once": "^1.4.0",
"@types/semver": "^7.0.0",
"@types/shimmer": "^1.0.1",
Expand All @@ -66,7 +66,7 @@
"nyc": "14.1.1",
"ts-mocha": "^7.0.0",
"ts-node": "^8.0.0",
"typescript": "~2.9.0"
"typescript": "^3.9.10"
},
"dependencies": {
"continuation-local-storage": "^3.2.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/opencensus-core/src/internal/cls-ah.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class AsyncHooksNamespace implements CLSNamespace {
const contextWrapper = function(this: {}) {
const oldContext = current;
current = boundContext;
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'IArguments' is not assignable to... Remove this comment to see the full error message
const res = cb.apply(this, arguments) as T;
current = oldContext;
return res;
Expand All @@ -118,6 +119,7 @@ class AsyncHooksNamespace implements CLSNamespace {
if (ee[method]) {
shimmer.wrap(ee, method, oldMethod => {
return function(this: {}, event: string, cb: Func<void>) {
// @ts-expect-error ts-migrate(2684) FIXME: The 'this' context of type '((event: string | symb... Remove this comment to see the full error message
return oldMethod.call(this, event, ns.bind(cb));
};
});
Expand Down
2 changes: 2 additions & 0 deletions packages/opencensus-core/test/test-cumulative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ describe('CUMULATIVE', () => {
EMPTY_CONSTANT_LABELS
);

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down Expand Up @@ -194,6 +195,7 @@ describe('CUMULATIVE', () => {
const point = instance.getDefaultTimeSeries();
point.inc(10);

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1480000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down
1 change: 1 addition & 0 deletions packages/opencensus-core/test/test-derived-cumulative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ describe('DerivedCumulative', () => {
startime
);

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down
1 change: 1 addition & 0 deletions packages/opencensus-core/test/test-derived-gauge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe('DerivedGauge', () => {
EMPTY_CONSTANT_LABELS
);

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down
2 changes: 2 additions & 0 deletions packages/opencensus-core/test/test-gauge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ describe('GAUGE_INT64', () => {
EMPTY_CONSTANT_LABELS
);

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down Expand Up @@ -414,6 +415,7 @@ describe('GAUGE_DOUBLE', () => {
EMPTY_CONSTANT_LABELS
);

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down
9 changes: 9 additions & 0 deletions packages/opencensus-core/test/test-metric-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('addInt64Gauge', () => {
beforeEach(() => {
registry = new MetricRegistry();

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down Expand Up @@ -129,6 +130,7 @@ describe('addDoubleGauge', () => {
beforeEach(() => {
registry = new MetricRegistry();

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down Expand Up @@ -226,6 +228,7 @@ describe('addDerivedInt64Gauge', () => {
beforeEach(() => {
registry = new MetricRegistry();

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down Expand Up @@ -330,6 +333,7 @@ describe('addDerivedDoubleGauge', () => {
beforeEach(() => {
registry = new MetricRegistry();

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down Expand Up @@ -392,6 +396,7 @@ describe('addInt64Cumulative', () => {
beforeEach(() => {
registry = new MetricRegistry();

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down Expand Up @@ -474,6 +479,7 @@ describe('addDoubleCumulative', () => {
beforeEach(() => {
registry = new MetricRegistry();

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down Expand Up @@ -560,6 +566,7 @@ describe('addDerivedInt64Cumulative', () => {
beforeEach(() => {
registry = new MetricRegistry();

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down Expand Up @@ -669,6 +676,7 @@ describe('addDerivedDoubleCumulative', () => {
beforeEach(() => {
registry = new MetricRegistry();

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down Expand Up @@ -793,6 +801,7 @@ describe('Add multiple gauges', () => {
beforeEach(() => {
registry = new MetricRegistry();

// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down
1 change: 1 addition & 0 deletions packages/opencensus-core/test/test-stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ describe('Stats', () => {
}

it('should not create a view with distribution aggregation when no bucket boundaries were given', () => {
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
assert.throws(globalStats.createView, 'No bucketBoundaries specified');
});
});
Expand Down
2 changes: 2 additions & 0 deletions packages/opencensus-core/test/test-time-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ describe('getTimestampWithProcessHRTime()', () => {
});

it('should return timestamp with respect to now and process.hrtime', () => {
// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand All @@ -43,6 +44,7 @@ describe('getTimestampWithProcessHRTime()', () => {
});

it('should handle excess of nanos', () => {
// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 10000000012];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down
1 change: 1 addition & 0 deletions packages/opencensus-core/test/test-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ describe('BaseView', () => {
}

beforeEach(() => {
// @ts-expect-error ts-migrate(2741) FIXME: Property 'bigint' is missing in type '() => [numbe... Remove this comment to see the full error message
process.hrtime = () => [100, 1e7];
Date.now = () => 1450000000000;
// Force the clock to recalibrate the time offset with the mocked time
Expand Down

0 comments on commit 9bd4f11

Please sign in to comment.