File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121- Removed the now redundant ` not IE > 0 ` from the Browserslist query.
2222- Updated ` react-dom/server ` imports in tests to suit React v18.
2323- Fixed the ` fetchGraphQL ` test with the global ` fetch ` API unavailable for new versions of Node.js that have the ` fetch ` global.
24+ - Use ` globalThis ` instead of ` global ` in tests.
2425- Fixed some JSDoc links.
2526- Removed some unnecessary JSDoc comments in tests.
2627- Revamped the readme:
Original file line number Diff line number Diff line change 44
55import { AbortController } from "abort-controller" ;
66
7- if ( ! ( "AbortController" in global ) ) global . AbortController = AbortController ;
7+ if ( ! ( "AbortController" in globalThis ) )
8+ globalThis . AbortController = AbortController ;
Original file line number Diff line number Diff line change 44
55import { AbortSignal } from "abort-controller" ;
66
7- if ( ! ( "AbortSignal" in global ) ) global . AbortSignal = AbortSignal ;
7+ if ( ! ( "AbortSignal" in globalThis ) ) globalThis . AbortSignal = AbortSignal ;
Original file line number Diff line number Diff line change 11// @ts -check
22
3- if ( ! ( "CustomEvent" in global ) )
4- global . CustomEvent =
3+ if ( ! ( "CustomEvent" in globalThis ) )
4+ globalThis . CustomEvent =
55 /**
66 * `CustomEvent` polyfill.
7- * @type {typeof global .CustomEvent }
7+ * @type {typeof globalThis .CustomEvent }
88 */
9- class CustomEvent extends global . Event {
9+ class CustomEvent extends globalThis . Event {
1010 /**
1111 * @param {string } type Event type.
1212 * @param {CustomEventInit } [eventInitDict] Custom event options.
Original file line number Diff line number Diff line change 22
33import { Event } from "event-target-shim" ;
44
5- if ( ! ( "Event" in global ) ) global . Event = Event ;
5+ if ( ! ( "Event" in globalThis ) ) globalThis . Event = Event ;
Original file line number Diff line number Diff line change 22
33import { EventTarget } from "event-target-shim" ;
44
5- if ( ! ( "EventTarget" in global ) ) global . EventTarget = EventTarget ;
5+ if ( ! ( "EventTarget" in globalThis ) ) globalThis . EventTarget = EventTarget ;
Original file line number Diff line number Diff line change 22
33import { performance } from "perf_hooks" ;
44
5- if ( ! ( "performance" in global ) )
5+ if ( ! ( "performance" in globalThis ) )
66 // @ts -ignore Node.js has a partial implementation.
7- global . performance = performance ;
7+ globalThis . performance = performance ;
You can’t perform that action at this time.
0 commit comments