forked from babel/babel-polyfills
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not import files missing in
@babel/runtime-corejs3
(babel#209)
- Loading branch information
1 parent
ccc82b1
commit b71c568
Showing
8 changed files
with
228 additions
and
1 deletion.
There are no files selected for viewing
179 changes: 179 additions & 0 deletions
179
packages/babel-plugin-polyfill-corejs3/src/babel-runtime-corejs3-paths.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
// This file contains the list of paths supported by @babel/runtime-corejs3. | ||
// It must _not_ be edited, as all new features should go through direct | ||
// injection of core-js-pure imports. | ||
|
||
export const stable = new Set([ | ||
"array", | ||
"array/from", | ||
"array/is-array", | ||
"array/of", | ||
"bind", | ||
"clear-immediate", | ||
"code-point-at", | ||
"concat", | ||
"copy-within", | ||
"date/now", | ||
"ends-with", | ||
"entries", | ||
"every", | ||
"fill", | ||
"filter", | ||
"find", | ||
"find-index", | ||
"flags", | ||
"flat", | ||
"flat-map", | ||
"for-each", | ||
"includes", | ||
"index-of", | ||
"json/stringify", | ||
"keys", | ||
"last-index-of", | ||
"map", | ||
"map", | ||
"math/acosh", | ||
"math/asinh", | ||
"math/atanh", | ||
"math/cbrt", | ||
"math/clz32", | ||
"math/cosh", | ||
"math/expm1", | ||
"math/fround", | ||
"math/hypot", | ||
"math/imul", | ||
"math/log10", | ||
"math/log1p", | ||
"math/log2", | ||
"math/sign", | ||
"math/sinh", | ||
"math/tanh", | ||
"math/trunc", | ||
"number/epsilon", | ||
"number/is-finite", | ||
"number/is-integer", | ||
"number/is-nan", | ||
"number/is-safe-integer", | ||
"number/max-safe-integer", | ||
"number/min-safe-integer", | ||
"number/parse-float", | ||
"number/parse-int", | ||
"object/assign", | ||
"object/create", | ||
"object/define-properties", | ||
"object/define-property", | ||
"object/entries", | ||
"object/freeze", | ||
"object/from-entries", | ||
"object/get-own-property-descriptor", | ||
"object/get-own-property-descriptors", | ||
"object/get-own-property-names", | ||
"object/get-own-property-symbols", | ||
"object/get-prototype-of", | ||
"object/is", | ||
"object/is-extensible", | ||
"object/is-frozen", | ||
"object/is-sealed", | ||
"object/keys", | ||
"object/prevent-extensions", | ||
"object/seal", | ||
"object/set-prototype-of", | ||
"object/values", | ||
"pad-end", | ||
"pad-start", | ||
"parse-float", | ||
"parse-int", | ||
"promise", | ||
"queue-microtask", | ||
"reduce", | ||
"reduce-right", | ||
"reflect/apply", | ||
"reflect/construct", | ||
"reflect/define-property", | ||
"reflect/delete-property", | ||
"reflect/get", | ||
"reflect/get-own-property-descriptor", | ||
"reflect/get-prototype-of", | ||
"reflect/has", | ||
"reflect/is-extensible", | ||
"reflect/own-keys", | ||
"reflect/prevent-extensions", | ||
"reflect/set", | ||
"reflect/set-prototype-of", | ||
"repeat", | ||
"reverse", | ||
"set", | ||
"set-immediate", | ||
"set-interval", | ||
"set-timeout", | ||
"slice", | ||
"some", | ||
"sort", | ||
"splice", | ||
"starts-with", | ||
"string/from-code-point", | ||
"string/raw", | ||
"symbol", | ||
"symbol/async-iterator", | ||
"symbol/for", | ||
"symbol/has-instance", | ||
"symbol/is-concat-spreadable", | ||
"symbol/iterator", | ||
"symbol/key-for", | ||
"symbol/match", | ||
"symbol/replace", | ||
"symbol/search", | ||
"symbol/species", | ||
"symbol/split", | ||
"symbol/to-primitive", | ||
"symbol/to-string-tag", | ||
"symbol/unscopables", | ||
"trim", | ||
"trim-end", | ||
"trim-left", | ||
"trim-right", | ||
"trim-start", | ||
"url", | ||
"url-search-params", | ||
"values", | ||
"weak-map", | ||
"weak-set", | ||
]); | ||
|
||
export const proposals = new Set([ | ||
...stable, | ||
"aggregate-error", | ||
"at", | ||
"code-points", | ||
"composite-key", | ||
"composite-symbol", | ||
"global-this", | ||
"match-all", | ||
"math/clamp", | ||
"math/degrees", | ||
"math/deg-per-rad", | ||
"math/fscale", | ||
"math/iaddh", | ||
"math/imulh", | ||
"math/isubh", | ||
"math/rad-per-deg", | ||
"math/radians", | ||
"math/scale", | ||
"math/seeded-prng", | ||
"math/signbit", | ||
"math/umulh", | ||
"number/from-string", | ||
"observable", | ||
"reflect/define-metadata", | ||
"reflect/delete-metadata", | ||
"reflect/get-metadata", | ||
"reflect/get-metadata-keys", | ||
"reflect/get-own-metadata", | ||
"reflect/get-own-metadata-keys", | ||
"reflect/has-metadata", | ||
"reflect/has-own-metadata", | ||
"reflect/metadata", | ||
"replace-all", | ||
"symbol/dispose", | ||
"symbol/observable", | ||
"symbol/pattern-match", | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...lugin-polyfill-corejs3/test/fixtures/regression/babel-runtime-missing-proposals/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Promise.allSettled(1, 2, 3); | ||
Observable(1, 2, 3); |
14 changes: 14 additions & 0 deletions
14
...in-polyfill-corejs3/test/fixtures/regression/babel-runtime-missing-proposals/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"@@/polyfill-corejs3", | ||
{ | ||
"method": "usage-pure", | ||
"proposals": true, | ||
"#__secret_key__@babel/runtime__compatibility": { | ||
"useBabelRuntime": true | ||
} | ||
} | ||
] | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
...ugin-polyfill-corejs3/test/fixtures/regression/babel-runtime-missing-proposals/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import _Promise from "@babel/runtime-corejs3/core-js/promise.js"; | ||
import _Observable from "@babel/runtime-corejs3/core-js/observable.js"; | ||
_Promise.allSettled(1, 2, 3); | ||
_Observable(1, 2, 3); |
2 changes: 2 additions & 0 deletions
2
...es/babel-plugin-polyfill-corejs3/test/fixtures/regression/babel-runtime-missing/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Promise.allSettled(1, 2, 3); | ||
Observable(1, 2, 3); |
13 changes: 13 additions & 0 deletions
13
...babel-plugin-polyfill-corejs3/test/fixtures/regression/babel-runtime-missing/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"@@/polyfill-corejs3", | ||
{ | ||
"method": "usage-pure", | ||
"#__secret_key__@babel/runtime__compatibility": { | ||
"useBabelRuntime": true | ||
} | ||
} | ||
] | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
...s/babel-plugin-polyfill-corejs3/test/fixtures/regression/babel-runtime-missing/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import _Promise from "@babel/runtime-corejs3/core-js-stable/promise.js"; | ||
_Promise.allSettled(1, 2, 3); | ||
Observable(1, 2, 3); |