Skip to content

Commit 2e0cbdf

Browse files
feat!: widen peer dependency range to include zone.js v0.15.0 (#2571)
Co-authored-by: Mend Renovate <[email protected]>
1 parent de679ad commit 2e0cbdf

File tree

7 files changed

+27
-28
lines changed

7 files changed

+27
-28
lines changed

metapackages/auto-instrumentations-web/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"peerDependencies": {
3333
"@opentelemetry/api": "^1.3.0",
34-
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0"
34+
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0 || ^0.15.0"
3535
},
3636
"devDependencies": {
3737
"@babel/core": "7.24.6",

package-lock.json

+16-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/web/opentelemetry-instrumentation-long-task/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"webpack": "5.94.0",
7575
"webpack-cli": "5.1.4",
7676
"webpack-merge": "5.10.0",
77-
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0"
77+
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0 || ^0.15.0"
7878
},
7979
"dependencies": {
8080
"@opentelemetry/core": "^1.8.0",

plugins/web/opentelemetry-instrumentation-user-interaction/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"webpack": "5.94.0",
7777
"webpack-cli": "5.1.4",
7878
"webpack-merge": "5.10.0",
79-
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0"
79+
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0 || ^0.15.0"
8080
},
8181
"dependencies": {
8282
"@opentelemetry/core": "^1.8.0",
@@ -85,7 +85,7 @@
8585
},
8686
"peerDependencies": {
8787
"@opentelemetry/api": "^1.3.0",
88-
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0"
88+
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0 || ^0.15.0"
8989
},
9090
"sideEffects": false,
9191
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/web/opentelemetry-instrumentation-user-interaction#readme"

plugins/web/opentelemetry-instrumentation-user-interaction/src/instrumentation.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ export class UserInteractionInstrumentation extends InstrumentationBase<UserInte
575575
* implements enable function
576576
*/
577577
override enable() {
578-
const ZoneWithPrototype = this.getZoneWithPrototype();
578+
const ZoneWithPrototype = this._getZoneWithPrototype();
579579
this._diag.debug(
580580
'applying patch to',
581581
this.moduleName,
@@ -645,7 +645,7 @@ export class UserInteractionInstrumentation extends InstrumentationBase<UserInte
645645
* implements unpatch function
646646
*/
647647
override disable() {
648-
const ZoneWithPrototype = this.getZoneWithPrototype();
648+
const ZoneWithPrototype = this._getZoneWithPrototype();
649649
this._diag.debug(
650650
'removing patch from',
651651
this.moduleName,
@@ -680,7 +680,7 @@ export class UserInteractionInstrumentation extends InstrumentationBase<UserInte
680680
/**
681681
* returns Zone
682682
*/
683-
getZoneWithPrototype(): ZoneTypeWithPrototype | undefined {
683+
private _getZoneWithPrototype(): ZoneTypeWithPrototype | undefined {
684684
const _window: WindowWithZone = window as unknown as WindowWithZone;
685685
return _window.Zone;
686686
}

plugins/web/opentelemetry-instrumentation-user-interaction/src/internal-types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17+
/// <reference types="zone.js" />
1718
import { HrTime } from '@opentelemetry/api';
1819
import { EventName } from './types';
1920

plugins/web/opentelemetry-instrumentation-user-interaction/test/userInteraction.nozone.test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ describe('UserInteractionInstrumentation', () => {
5858
});
5959

6060
sandbox
61-
.stub(userInteractionInstrumentation, 'getZoneWithPrototype')
61+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
62+
// @ts-ignore this is private, but it exists
63+
.stub(userInteractionInstrumentation, '_getZoneWithPrototype')
6264
.callsFake(() => {
6365
return false as any;
6466
});

0 commit comments

Comments
 (0)