Skip to content

Commit

Permalink
chore(polyfills): Remove Promise.allSettled polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Oct 2, 2023
1 parent ece5138 commit f084ed3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 67 deletions.
7 changes: 0 additions & 7 deletions modules/polyfills/src/index.browser.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
// loaders.gl, MIT License

import {allSettled} from './promise/all-settled';

if (!('allSettled' in Promise)) {
// @ts-ignore
Promise.allSettled = allSettled;
}

// eslint-disable-next-line @typescript-eslint/no-empty-function
export function installFilePolyfills() {}

Expand Down
3 changes: 1 addition & 2 deletions modules/polyfills/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable dot-notation */
import {isBrowser} from './utils/globals';
import {isBrowser} from './utils/is-browser';

import {TextDecoder, TextEncoder} from './lib/encoding';
import {allSettled} from './promise/all-settled';

// Node specific
import * as base64 from './node/buffer/btoa.node';
Expand Down
21 changes: 0 additions & 21 deletions modules/polyfills/src/promise/all-settled.ts

This file was deleted.

37 changes: 0 additions & 37 deletions modules/polyfills/src/utils/globals.ts

This file was deleted.

6 changes: 6 additions & 0 deletions modules/polyfills/src/utils/is-browser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// loaders.gl, MIT license

/* eslint-disable no-restricted-globals */
export const isBrowser: boolean =
// @ts-ignore process.browser
typeof process !== 'object' || String(process) !== '[object process]' || process.browser;

0 comments on commit f084ed3

Please sign in to comment.