Skip to content

Commit

Permalink
feat!: widen peer dependency range to include zone.js v0.15.0 (#2571)
Browse files Browse the repository at this point in the history
Co-authored-by: Mend Renovate <[email protected]>
  • Loading branch information
pichlermarc and renovate-bot authored Dec 6, 2024
1 parent de679ad commit 2e0cbdf
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion metapackages/auto-instrumentations-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0",
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0"
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0 || ^0.15.0"
},
"devDependencies": {
"@babel/core": "7.24.6",
Expand Down
36 changes: 16 additions & 20 deletions package-lock.json

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

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"webpack": "5.94.0",
"webpack-cli": "5.1.4",
"webpack-merge": "5.10.0",
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0"
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0 || ^0.15.0"
},
"dependencies": {
"@opentelemetry/core": "^1.8.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"webpack": "5.94.0",
"webpack-cli": "5.1.4",
"webpack-merge": "5.10.0",
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0"
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0 || ^0.15.0"
},
"dependencies": {
"@opentelemetry/core": "^1.8.0",
Expand All @@ -85,7 +85,7 @@
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0",
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0"
"zone.js": "^0.11.4 || ^0.13.0 || ^0.14.0 || ^0.15.0"
},
"sideEffects": false,
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/web/opentelemetry-instrumentation-user-interaction#readme"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ export class UserInteractionInstrumentation extends InstrumentationBase<UserInte
* implements enable function
*/
override enable() {
const ZoneWithPrototype = this.getZoneWithPrototype();
const ZoneWithPrototype = this._getZoneWithPrototype();
this._diag.debug(
'applying patch to',
this.moduleName,
Expand Down Expand Up @@ -645,7 +645,7 @@ export class UserInteractionInstrumentation extends InstrumentationBase<UserInte
* implements unpatch function
*/
override disable() {
const ZoneWithPrototype = this.getZoneWithPrototype();
const ZoneWithPrototype = this._getZoneWithPrototype();
this._diag.debug(
'removing patch from',
this.moduleName,
Expand Down Expand Up @@ -680,7 +680,7 @@ export class UserInteractionInstrumentation extends InstrumentationBase<UserInte
/**
* returns Zone
*/
getZoneWithPrototype(): ZoneTypeWithPrototype | undefined {
private _getZoneWithPrototype(): ZoneTypeWithPrototype | undefined {
const _window: WindowWithZone = window as unknown as WindowWithZone;
return _window.Zone;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ describe('UserInteractionInstrumentation', () => {
});

sandbox
.stub(userInteractionInstrumentation, 'getZoneWithPrototype')
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore this is private, but it exists
.stub(userInteractionInstrumentation, '_getZoneWithPrototype')
.callsFake(() => {
return false as any;
});
Expand Down

0 comments on commit 2e0cbdf

Please sign in to comment.