Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some definitions #211

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix some definitions
  • Loading branch information
zloirock committed Apr 3, 2024
commit 8ba3abd2842b60527de804c30ee9f9d0e099f68e
24 changes: 15 additions & 9 deletions packages/babel-plugin-polyfill-corejs3/src/built-in-definitions.ts
Original file line number Diff line number Diff line change
@@ -452,10 +452,10 @@ export const StaticProperties: ObjectMap2<CoreJSPolyfillDescriptor> = {
},

Map: {
from: define(null, ["esnext.map.from", ...MapDependencies]),
from: define("map/from", ["esnext.map.from", ...MapDependencies]),
groupBy: define("map/group-by", ["es.map.group-by", ...MapDependencies]),
keyBy: define("map/key-by", ["esnext.map.key-by", ...MapDependencies]),
of: define(null, ["esnext.map.of", ...MapDependencies]),
of: define("map/of", ["esnext.map.of", ...MapDependencies]),
},

Number: {
@@ -608,8 +608,8 @@ export const StaticProperties: ObjectMap2<CoreJSPolyfillDescriptor> = {
},

Set: {
from: define(null, ["esnext.set.from", ...SetDependencies]),
of: define(null, ["esnext.set.of", ...SetDependencies]),
from: define("set/from", ["esnext.set.from", ...SetDependencies]),
of: define("set/of", ["esnext.set.of", ...SetDependencies]),
},

String: {
@@ -707,13 +707,19 @@ export const StaticProperties: ObjectMap2<CoreJSPolyfillDescriptor> = {
},

WeakMap: {
from: define(null, ["esnext.weak-map.from", ...WeakMapDependencies]),
of: define(null, ["esnext.weak-map.of", ...WeakMapDependencies]),
from: define("weak-map/from", [
"esnext.weak-map.from",
...WeakMapDependencies,
]),
of: define("weak-map/of", ["esnext.weak-map.of", ...WeakMapDependencies]),
},

WeakSet: {
from: define(null, ["esnext.weak-set.from", ...WeakSetDependencies]),
of: define(null, ["esnext.weak-set.of", ...WeakSetDependencies]),
from: define("weak-set/from", [
"esnext.weak-set.from",
...WeakSetDependencies,
]),
of: define("weak-set/of", ["esnext.weak-set.of", ...WeakSetDependencies]),
},

Int8Array: TypedArrayStaticMethods("es.typed-array.int8-array"),
@@ -746,7 +752,7 @@ export const StaticProperties: ObjectMap2<CoreJSPolyfillDescriptor> = {
};

export const InstanceProperties = {
asIndexedPairs: define("instance/asIndexedPairs", [
asIndexedPairs: define(null, [
"esnext.async-iterator.as-indexed-pairs",
...AsyncIteratorDependencies,
"esnext.iterator.as-indexed-pairs",
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var _context, _context2, _context3, _context4, _context5, _context6, _context7;
var _context, _context2, _context3, _context4, _context5, _context6;
import _findLastInstanceProperty from "core-js-pure/features/instance/find-last.js";
import _findLastIndexInstanceProperty from "core-js-pure/features/instance/find-last-index.js";
import _asIndexedPairsInstanceProperty from "core-js-pure/features/instance/asIndexedPairs.js";
import _Iterator$from from "core-js-pure/features/iterator/from.js";
import _groupByInstanceProperty from "core-js-pure/features/instance/group-by.js";
import _AsyncIterator$from from "core-js-pure/features/async-iterator/from.js";
@@ -15,19 +14,19 @@ import _Symbol$matcher from "core-js-pure/features/symbol/matcher.js";
import _Symbol$metadata from "core-js-pure/features/symbol/metadata.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
_asIndexedPairsInstanceProperty(_context3 = []).call(_context3);
[].asIndexedPairs();
_Iterator$from({
next: () => ({
done: Math.random() > .9,
value: Math.random() * 10 | 0
})
}).forEach(console.log).toArray();
_groupByInstanceProperty(_context4 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context4, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context5 = _uniqueByInstanceProperty(_context6 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context6, x => x)).call(_context5, x => x % 2);
_groupByInstanceProperty(_context3 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context3, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context4 = _uniqueByInstanceProperty(_context5 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context5, x => x)).call(_context4, x => x % 2);
_Number$range(1, 2);
_BigInt$range(1n, 2n);
_Array$isTemplateObject((x => x)`a${x}z`);
_emplaceInstanceProperty(_context7 = new Map([['x', 1]])).call(_context7, 'x', {
_emplaceInstanceProperty(_context6 = new Map([['x', 1]])).call(_context6, 'x', {
update: x => x + 1,
insert: () => 0
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8;
import _findLastInstanceProperty from "core-js-pure/features/instance/find-last.js";
import _findLastIndexInstanceProperty from "core-js-pure/features/instance/find-last-index.js";
import _asIndexedPairsInstanceProperty from "core-js-pure/features/instance/asIndexedPairs.js";
import _Iterator$from from "core-js-pure/features/iterator/from.js";
import _groupByInstanceProperty from "core-js-pure/features/instance/group-by.js";
import _AsyncIterator$from from "core-js-pure/features/async-iterator/from.js";
@@ -20,19 +19,19 @@ import _structuredClone from "core-js-pure/features/structured-clone.js";
import _withInstanceProperty from "core-js-pure/features/instance/with.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
_asIndexedPairsInstanceProperty(_context3 = []).call(_context3);
[].asIndexedPairs();
_Iterator$from({
next: () => ({
done: Math.random() > .9,
value: Math.random() * 10 | 0
})
}).forEach(console.log).toArray();
_groupByInstanceProperty(_context4 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context4, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context5 = _uniqueByInstanceProperty(_context6 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context6, x => x)).call(_context5, x => x % 2);
_groupByInstanceProperty(_context3 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context3, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context4 = _uniqueByInstanceProperty(_context5 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context5, x => x)).call(_context4, x => x % 2);
_Number$range(1, 2);
_BigInt$range(1n, 2n);
_Array$isTemplateObject((x => x)`a${x}z`);
_emplaceInstanceProperty(_context7 = new Map([['x', 1]])).call(_context7, 'x', {
_emplaceInstanceProperty(_context6 = new Map([['x', 1]])).call(_context6, 'x', {
update: x => x + 1,
insert: () => 0
});
@@ -44,8 +43,8 @@ Symbol.matchAll;
_Symbol$metadata;
Symbol.replaceAll;
new URL(url);
const foo = _groupByToMapInstanceProperty(_context8 = [1, 2, 3]).call(_context8, bar);
const push = _unThisInstanceProperty(_context9 = [].push).call(_context9);
const foo = _groupByToMapInstanceProperty(_context7 = [1, 2, 3]).call(_context7, bar);
const push = _unThisInstanceProperty(_context8 = [].push).call(_context8);
_Function$isConstructor;
throw new DOMException();
_structuredClone(72);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8;
import _findLastInstanceProperty from "core-js-pure/features/instance/find-last.js";
import _findLastIndexInstanceProperty from "core-js-pure/features/instance/find-last-index.js";
import _asIndexedPairsInstanceProperty from "core-js-pure/features/instance/asIndexedPairs.js";
import _Iterator$from from "core-js-pure/features/iterator/from.js";
import _groupByInstanceProperty from "core-js-pure/features/instance/group-by.js";
import _AsyncIterator$from from "core-js-pure/features/async-iterator/from.js";
@@ -21,19 +20,19 @@ import _structuredClone from "core-js-pure/features/structured-clone.js";
import _withInstanceProperty from "core-js-pure/features/instance/with.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
_asIndexedPairsInstanceProperty(_context3 = []).call(_context3);
[].asIndexedPairs();
_Iterator$from({
next: () => ({
done: Math.random() > .9,
value: Math.random() * 10 | 0
})
}).forEach(console.log).toArray();
_groupByInstanceProperty(_context4 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context4, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context5 = _uniqueByInstanceProperty(_context6 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context6, x => x)).call(_context5, x => x % 2);
_groupByInstanceProperty(_context3 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context3, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context4 = _uniqueByInstanceProperty(_context5 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context5, x => x)).call(_context4, x => x % 2);
_Number$range(1, 2);
_BigInt$range(1n, 2n);
_Array$isTemplateObject((x => x)`a${x}z`);
_emplaceInstanceProperty(_context7 = new Map([['x', 1]])).call(_context7, 'x', {
_emplaceInstanceProperty(_context6 = new Map([['x', 1]])).call(_context6, 'x', {
update: x => x + 1,
insert: () => 0
});
@@ -45,8 +44,8 @@ Symbol.matchAll;
_Symbol$metadata;
Symbol.replaceAll;
new URL(url);
const foo = _groupByToMapInstanceProperty(_context8 = [1, 2, 3]).call(_context8, bar);
const push = _unThisInstanceProperty(_context9 = _pushInstanceProperty([])).call(_context9);
const foo = _groupByToMapInstanceProperty(_context7 = [1, 2, 3]).call(_context7, bar);
const push = _unThisInstanceProperty(_context8 = _pushInstanceProperty([])).call(_context8);
_Function$isConstructor;
throw new DOMException();
_structuredClone(72);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8;
import _findLastInstanceProperty from "core-js-pure/features/instance/find-last.js";
import _findLastIndexInstanceProperty from "core-js-pure/features/instance/find-last-index.js";
import _asIndexedPairsInstanceProperty from "core-js-pure/features/instance/asIndexedPairs.js";
import _Iterator$from from "core-js-pure/features/iterator/from.js";
import _groupByInstanceProperty from "core-js-pure/features/instance/group-by.js";
import _AsyncIterator$from from "core-js-pure/features/async-iterator/from.js";
@@ -28,19 +27,19 @@ import _AsyncDisposableStack from "core-js-pure/features/async-disposable-stack/
import _Iterator from "core-js-pure/features/iterator/index.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
_asIndexedPairsInstanceProperty(_context3 = []).call(_context3);
[].asIndexedPairs();
_Iterator$from({
next: () => ({
done: Math.random() > .9,
value: Math.random() * 10 | 0
})
}).forEach(console.log).toArray();
_groupByInstanceProperty(_context4 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context4, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context5 = _uniqueByInstanceProperty(_context6 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context6, x => x)).call(_context5, x => x % 2);
_groupByInstanceProperty(_context3 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context3, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context4 = _uniqueByInstanceProperty(_context5 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context5, x => x)).call(_context4, x => x % 2);
_Number$range(1, 2);
_BigInt$range(1n, 2n);
_Array$isTemplateObject((x => x)`a${x}z`);
_emplaceInstanceProperty(_context7 = new Map([['x', 1]])).call(_context7, 'x', {
_emplaceInstanceProperty(_context6 = new Map([['x', 1]])).call(_context6, 'x', {
update: x => x + 1,
insert: () => 0
});
@@ -52,8 +51,8 @@ Symbol.matchAll;
_Symbol$metadata;
Symbol.replaceAll;
new URL(url);
const foo = _groupByToMapInstanceProperty(_context8 = [1, 2, 3]).call(_context8, bar);
const push = _unThisInstanceProperty(_context9 = _pushInstanceProperty([])).call(_context9);
const foo = _groupByToMapInstanceProperty(_context7 = [1, 2, 3]).call(_context7, bar);
const push = _unThisInstanceProperty(_context8 = _pushInstanceProperty([])).call(_context8);
_Function$isConstructor;
throw new DOMException();
_structuredClone(72);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8;
import _findLastInstanceProperty from "core-js-pure/features/instance/find-last.js";
import _findLastIndexInstanceProperty from "core-js-pure/features/instance/find-last-index.js";
import _asIndexedPairsInstanceProperty from "core-js-pure/features/instance/asIndexedPairs.js";
import _Iterator$from from "core-js-pure/features/iterator/from.js";
import _groupByInstanceProperty from "core-js-pure/features/instance/group-by.js";
import _AsyncIterator$from from "core-js-pure/features/async-iterator/from.js";
@@ -34,19 +33,19 @@ import _Symbol$isRegistered from "core-js-pure/features/symbol/is-registered.js"
import _demethodizeInstanceProperty from "core-js-pure/features/instance/demethodize.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
_asIndexedPairsInstanceProperty(_context3 = []).call(_context3);
[].asIndexedPairs();
_Iterator$from({
next: () => ({
done: Math.random() > .9,
value: Math.random() * 10 | 0
})
}).forEach(console.log).toArray();
_groupByInstanceProperty(_context4 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context4, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context5 = _uniqueByInstanceProperty(_context6 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context6, x => x)).call(_context5, x => x % 2);
_groupByInstanceProperty(_context3 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context3, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context4 = _uniqueByInstanceProperty(_context5 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context5, x => x)).call(_context4, x => x % 2);
_Number$range(1, 2);
_BigInt$range(1n, 2n);
_Array$isTemplateObject((x => x)`a${x}z`);
_emplaceInstanceProperty(_context7 = new Map([['x', 1]])).call(_context7, 'x', {
_emplaceInstanceProperty(_context6 = new Map([['x', 1]])).call(_context6, 'x', {
update: x => x + 1,
insert: () => 0
});
@@ -58,8 +57,8 @@ Symbol.matchAll;
_Symbol$metadata;
Symbol.replaceAll;
new URL(url);
const foo = _groupByToMapInstanceProperty(_context8 = [1, 2, 3]).call(_context8, bar);
const push = _unThisInstanceProperty(_context9 = _pushInstanceProperty([])).call(_context9);
const foo = _groupByToMapInstanceProperty(_context7 = [1, 2, 3]).call(_context7, bar);
const push = _unThisInstanceProperty(_context8 = _pushInstanceProperty([])).call(_context8);
_Function$isConstructor;
throw new DOMException();
_structuredClone(72);
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8;
import _findLastInstanceProperty from "core-js-pure/features/instance/find-last.js";
import _findLastIndexInstanceProperty from "core-js-pure/features/instance/find-last-index.js";
import _asIndexedPairsInstanceProperty from "core-js-pure/features/instance/asIndexedPairs.js";
import _Iterator$from from "core-js-pure/features/iterator/from.js";
import _groupByInstanceProperty from "core-js-pure/features/instance/group-by.js";
import _AsyncIterator$from from "core-js-pure/features/async-iterator/from.js";
@@ -36,19 +35,19 @@ import _URL$canParse from "core-js-pure/features/url/can-parse.js";
import _Map$groupBy from "core-js-pure/features/map/group-by.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
_asIndexedPairsInstanceProperty(_context3 = []).call(_context3);
[].asIndexedPairs();
_Iterator$from({
next: () => ({
done: Math.random() > .9,
value: Math.random() * 10 | 0
})
}).forEach(console.log).toArray();
_groupByInstanceProperty(_context4 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context4, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context5 = _uniqueByInstanceProperty(_context6 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context6, x => x)).call(_context5, x => x % 2);
_groupByInstanceProperty(_context3 = _AsyncIterator$from([1, 2, 3, 4, 5, 6, 7]).drop(1).take(5).filter(it => it % 2)).call(_context3, it => id % 4).map(it => it ** 2).toArray().then(console.log);
_groupByInstanceProperty(_context4 = _uniqueByInstanceProperty(_context5 = [1, 2, 3, 4, 5, 6, 7, 7]).call(_context5, x => x)).call(_context4, x => x % 2);
_Number$range(1, 2);
_BigInt$range(1n, 2n);
_Array$isTemplateObject((x => x)`a${x}z`);
_emplaceInstanceProperty(_context7 = new Map([['x', 1]])).call(_context7, 'x', {
_emplaceInstanceProperty(_context6 = new Map([['x', 1]])).call(_context6, 'x', {
update: x => x + 1,
insert: () => 0
});
@@ -60,8 +59,8 @@ Symbol.matchAll;
_Symbol$metadata;
Symbol.replaceAll;
new URL(url);
const foo = _groupByToMapInstanceProperty(_context8 = [1, 2, 3]).call(_context8, bar);
const push = _unThisInstanceProperty(_context9 = _pushInstanceProperty([])).call(_context9);
const foo = _groupByToMapInstanceProperty(_context7 = [1, 2, 3]).call(_context7, bar);
const push = _unThisInstanceProperty(_context8 = _pushInstanceProperty([])).call(_context8);
_Function$isConstructor;
throw new DOMException();
_structuredClone(72);
Loading