diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f3776019161..c03a2274fc3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixes +- `[jest-haste-map]` Remove `__proto__` usage ([#13256](https://github.com/facebook/jest/pull/13256)) - `[jest-mock]` Improve `spyOn` typings to handle optional properties ([#13247](https://github.com/facebook/jest/pull/13247)) ### Chore & Maintenance diff --git a/packages/jest-haste-map/src/watchers/WatchmanWatcher.js b/packages/jest-haste-map/src/watchers/WatchmanWatcher.js index c7f8791bf34b..69ef94afaf0f 100644 --- a/packages/jest-haste-map/src/watchers/WatchmanWatcher.js +++ b/packages/jest-haste-map/src/watchers/WatchmanWatcher.js @@ -34,8 +34,7 @@ export default function WatchmanWatcher(dir, opts) { this.init(); } -// eslint-disable-next-line no-proto -WatchmanWatcher.prototype.__proto__ = EventEmitter.prototype; +Object.setPrototypeOf(WatchmanWatcher.prototype, EventEmitter.prototype); /** * Run the watchman `watch` command on the root and subscribe to changes.