-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
The event-target-shim dependency is a major version out of date, resulting in duplicate installation headaches for projects that actually need the newer event-target-shim version to polyfill event related globals (the old version doesn't export the needed classes) at the same time as the abort-controller/polyfill.
For example, in graphql-react-examples:
npm ls event-target-shim
graphql-react-examples@ /[redacted]/graphql-react-examples
├─┬ [email protected]
│ └── [email protected]
└── [email protected]
if (typeof window === 'undefined') {
if (!('performance' in global))
global.performance = require('perf_hooks').performance;
if (!('EventTarget' in global))
global.EventTarget =
require('events').EventTarget || require('event-target-shim').EventTarget;
if (!('Event' in global))
global.Event =
require('events').Event || require('event-target-shim').Event;
if (!('CustomEvent' in global))
global.CustomEvent = class CustomEvent extends Event {
constructor(eventName, { detail, ...eventOptions } = {}) {
super(eventName, eventOptions);
this.detail = detail;
}
};
require('abort-controller/polyfill');
}anion155
Metadata
Metadata
Assignees
Labels
No labels