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

Add missing things in core-js-pure 3 #198

Merged
merged 7 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ export const StaticProperties: ObjectMap2<CoreJSPolyfillDescriptor> = {

Map: {
from: define(null, ["esnext.map.from", ...MapDependencies]),
groupBy: define(null, ["es.map.group-by", ...MapDependencies]),
keyBy: define(null, ["esnext.map.key-by", ...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]),
},

Expand Down Expand Up @@ -515,18 +515,18 @@ export const StaticProperties: ObjectMap2<CoreJSPolyfillDescriptor> = {

Promise: {
all: define(null, PromiseDependenciesWithIterators),
allSettled: define(null, [
allSettled: define("promise/all-settled", [
"es.promise.all-settled",
...PromiseDependenciesWithIterators,
]),
any: define(null, [
any: define("promise/any", [
"es.promise.any",
"es.aggregate-error",
...PromiseDependenciesWithIterators,
]),
race: define(null, PromiseDependenciesWithIterators),
try: define(null, ["esnext.promise.try", ...PromiseDependencies]),
withResolvers: define(null, [
try: define("promise/try", ["esnext.promise.try", ...PromiseDependencies]),
withResolvers: define("promise/with-resolvers", [
"es.promise.with-resolvers",
...PromiseDependencies,
]),
Expand Down
14 changes: 0 additions & 14 deletions packages/babel-plugin-polyfill-corejs3/src/shipped-proposals.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
// This file is automatically generated by scripts/build-corejs3-shipped-proposals.mjs

export default new Set<string>([
"esnext.suppressed-error.constructor",
"esnext.array.from-async",
"esnext.array.group",
"esnext.array.group-to-map",
"esnext.array-buffer.detached",
"esnext.array-buffer.transfer",
"esnext.array-buffer.transfer-to-fixed-length",
"esnext.iterator.constructor",
"esnext.iterator.drop",
"esnext.iterator.every",
"esnext.iterator.filter",
"esnext.iterator.find",
"esnext.iterator.flat-map",
"esnext.iterator.for-each",
"esnext.iterator.from",
"esnext.iterator.map",
"esnext.iterator.reduce",
"esnext.iterator.some",
"esnext.iterator.take",
"esnext.iterator.to-array",
"esnext.json.is-raw-json",
"esnext.json.parse",
"esnext.json.raw-json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import _isWellFormedInstanceProperty from "core-js-pure/features/instance/is-wel
import _toWellFormedInstanceProperty from "core-js-pure/features/instance/to-well-formed.js";
import _self from "core-js-pure/stable/self.js";
import _URL$canParse from "core-js-pure/stable/url/can-parse.js";
import _Map$groupBy from "core-js-pure/features/map/group-by.js";
import _Promise from "core-js-pure/stable/promise/index.js";
import _URLSearchParams from "core-js-pure/stable/url-search-params/index.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
Expand Down Expand Up @@ -75,6 +76,6 @@ _Symbol.isWellKnownSymbol(foo);
_Symbol.isRegisteredSymbol(foo);
_Symbol.metadata;
Object.groupBy(a, b);
_Map.groupBy(a, b);
_Map$groupBy(a, b);
_Promise.withResolvers();
new _URLSearchParams().has(a, b);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import _toWellFormedInstanceProperty from "core-js-pure/stable/instance/to-well-
import _self from "core-js-pure/stable/self.js";
import _URL$canParse from "core-js-pure/stable/url/can-parse.js";
import _Object$groupBy from "core-js-pure/features/object/group-by.js";
import _Promise from "core-js-pure/stable/promise/index.js";
import _Map$groupBy from "core-js-pure/features/map/group-by.js";
import _Promise$withResolvers from "core-js-pure/features/promise/with-resolvers.js";
import _URLSearchParams from "core-js-pure/stable/url-search-params/index.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
Expand Down Expand Up @@ -76,8 +77,8 @@ _Symbol.isWellKnownSymbol(foo);
_Symbol.isRegisteredSymbol(foo);
_Symbol.metadata;
_Object$groupBy(a, b);
_Map.groupBy(a, b);
_Promise.withResolvers();
_Map$groupBy(a, b);
_Promise$withResolvers();
new _URLSearchParams().has(a, b);
Math.f16round(foo);
foo.getFloat16(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import _toWellFormedInstanceProperty from "core-js-pure/stable/instance/to-well-
import _self from "core-js-pure/stable/self.js";
import _URL$canParse from "core-js-pure/stable/url/can-parse.js";
import _Object$groupBy from "core-js-pure/features/object/group-by.js";
import _Promise from "core-js-pure/stable/promise/index.js";
import _Map$groupBy from "core-js-pure/features/map/group-by.js";
import _Promise$withResolvers from "core-js-pure/features/promise/with-resolvers.js";
import _URLSearchParams from "core-js-pure/stable/url-search-params/index.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
Expand Down Expand Up @@ -76,8 +77,8 @@ _Symbol.isWellKnownSymbol(foo);
_Symbol.isRegisteredSymbol(foo);
_Symbol.metadata;
_Object$groupBy(a, b);
_Map.groupBy(a, b);
_Promise.withResolvers();
_Map$groupBy(a, b);
_Promise$withResolvers();
new _URLSearchParams().has(a, b);
Math.f16round(foo);
foo.getFloat16(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import _toWellFormedInstanceProperty from "core-js-pure/stable/instance/to-well-
import _self from "core-js-pure/stable/self.js";
import _URL$canParse from "core-js-pure/stable/url/can-parse.js";
import _Object$groupBy from "core-js-pure/features/object/group-by.js";
import _Promise from "core-js-pure/stable/promise/index.js";
import _Map$groupBy from "core-js-pure/features/map/group-by.js";
import _Promise$withResolvers from "core-js-pure/features/promise/with-resolvers.js";
import _URLSearchParams from "core-js-pure/stable/url-search-params/index.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
Expand Down Expand Up @@ -76,8 +77,8 @@ _Symbol.isWellKnownSymbol(foo);
_Symbol.isRegisteredSymbol(foo);
_Symbol.metadata;
_Object$groupBy(a, b);
_Map.groupBy(a, b);
_Promise.withResolvers();
_Map$groupBy(a, b);
_Promise$withResolvers();
new _URLSearchParams().has(a, b);
Math.f16round(foo);
foo.getFloat16(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import _toWellFormedInstanceProperty from "core-js-pure/stable/instance/to-well-
import _self from "core-js-pure/stable/self.js";
import _URL$canParse from "core-js-pure/stable/url/can-parse.js";
import _Object$groupBy from "core-js-pure/stable/object/group-by.js";
import _Promise from "core-js-pure/stable/promise/index.js";
import _Map$groupBy from "core-js-pure/stable/map/group-by.js";
import _Promise$withResolvers from "core-js-pure/stable/promise/with-resolvers.js";
import _URLSearchParams from "core-js-pure/stable/url-search-params/index.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
Expand Down Expand Up @@ -76,8 +77,8 @@ _Symbol.isWellKnownSymbol(foo);
_Symbol.isRegisteredSymbol(foo);
_Symbol.metadata;
_Object$groupBy(a, b);
_Map.groupBy(a, b);
_Promise.withResolvers();
_Map$groupBy(a, b);
_Promise$withResolvers();
new _URLSearchParams().has(a, b);
Math.f16round(foo);
foo.getFloat16(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import _Symbol$isWellKnown from "core-js-pure/features/symbol/is-well-known.js";
import _Symbol$isRegistered from "core-js-pure/features/symbol/is-registered.js";
import _demethodizeInstanceProperty from "core-js-pure/features/instance/demethodize.js";
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);
Expand Down Expand Up @@ -88,6 +89,6 @@ Symbol.isWellKnownSymbol(foo);
Symbol.isRegisteredSymbol(foo);
_Symbol$metadata;
Object.groupBy(a, b);
Map.groupBy(a, b);
_Map$groupBy(a, b);
Promise.withResolvers();
new URLSearchParams().has(a, b);
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import _URL$canParse from "core-js-pure/features/url/can-parse.js";
import _Symbol$isWellKnownSymbol from "core-js-pure/features/symbol/is-well-known-symbol.js";
import _Symbol$isRegisteredSymbol from "core-js-pure/features/symbol/is-registered-symbol.js";
import _Object$groupBy from "core-js-pure/features/object/group-by.js";
import _Map$groupBy from "core-js-pure/features/map/group-by.js";
import _Promise$withResolvers from "core-js-pure/features/promise/with-resolvers.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
_asIndexedPairsInstanceProperty(_context3 = []).call(_context3);
Expand Down Expand Up @@ -91,8 +93,8 @@ _Symbol$isWellKnownSymbol(foo);
_Symbol$isRegisteredSymbol(foo);
_Symbol$metadata;
_Object$groupBy(a, b);
Map.groupBy(a, b);
Promise.withResolvers();
_Map$groupBy(a, b);
_Promise$withResolvers();
new URLSearchParams().has(a, b);
Math.f16round(foo);
foo.getFloat16(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import _URL$canParse from "core-js-pure/features/url/can-parse.js";
import _Symbol$isWellKnownSymbol from "core-js-pure/features/symbol/is-well-known-symbol.js";
import _Symbol$isRegisteredSymbol from "core-js-pure/features/symbol/is-registered-symbol.js";
import _Object$groupBy from "core-js-pure/features/object/group-by.js";
import _Map$groupBy from "core-js-pure/features/map/group-by.js";
import _Promise$withResolvers from "core-js-pure/features/promise/with-resolvers.js";
import _Math$f16round from "core-js-pure/features/math/f16round.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
_findLastIndexInstanceProperty(_context2 = []).call(_context2, fn);
Expand Down Expand Up @@ -92,8 +94,8 @@ _Symbol$isWellKnownSymbol(foo);
_Symbol$isRegisteredSymbol(foo);
_Symbol$metadata;
_Object$groupBy(a, b);
Map.groupBy(a, b);
Promise.withResolvers();
_Map$groupBy(a, b);
_Promise$withResolvers();
new URLSearchParams().has(a, b);
_Math$f16round(foo);
foo.getFloat16(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import _URL$canParse from "core-js-pure/features/url/can-parse.js";
import _Symbol$isWellKnownSymbol from "core-js-pure/features/symbol/is-well-known-symbol.js";
import _Symbol$isRegisteredSymbol from "core-js-pure/features/symbol/is-registered-symbol.js";
import _Object$groupBy from "core-js-pure/features/object/group-by.js";
import _Map$groupBy from "core-js-pure/features/map/group-by.js";
import _Promise$withResolvers from "core-js-pure/features/promise/with-resolvers.js";
import _Math$f16round from "core-js-pure/features/math/f16round.js";
import _RegExp$escape from "core-js-pure/features/regexp/escape.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
Expand Down Expand Up @@ -93,8 +95,8 @@ _Symbol$isWellKnownSymbol(foo);
_Symbol$isRegisteredSymbol(foo);
_Symbol$metadata;
_Object$groupBy(a, b);
Map.groupBy(a, b);
Promise.withResolvers();
_Map$groupBy(a, b);
_Promise$withResolvers();
new URLSearchParams().has(a, b);
_Math$f16round(foo);
foo.getFloat16(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import _URL$canParse from "core-js-pure/features/url/can-parse.js";
import _Symbol$isWellKnownSymbol from "core-js-pure/features/symbol/is-well-known-symbol.js";
import _Symbol$isRegisteredSymbol from "core-js-pure/features/symbol/is-registered-symbol.js";
import _Object$groupBy from "core-js-pure/features/object/group-by.js";
import _Map$groupBy from "core-js-pure/features/map/group-by.js";
import _Promise$withResolvers from "core-js-pure/features/promise/with-resolvers.js";
import _Math$f16round from "core-js-pure/features/math/f16round.js";
import _RegExp$escape from "core-js-pure/features/regexp/escape.js";
_findLastInstanceProperty(_context = []).call(_context, fn);
Expand Down Expand Up @@ -93,8 +95,8 @@ _Symbol$isWellKnownSymbol(foo);
_Symbol$isRegisteredSymbol(foo);
_Symbol$metadata;
_Object$groupBy(a, b);
Map.groupBy(a, b);
Promise.withResolvers();
_Map$groupBy(a, b);
_Promise$withResolvers();
new URLSearchParams().has(a, b);
_Math$f16round(foo);
foo.getFloat16(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,21 @@ JSON.parse
Math.pow

Symbol.something

Map.from
Map.groupBy
Map.keyBy
Map.of

Promise.all
Promise.allSettled
Promise.any
Promise.race
Promise.try
Promise.withResolvers
WeakMap.from

ArrayBuffer.isView

Uint8Array.from
Uint8Array.of
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ var _Symbol$split = require("core-js-pure/stable/symbol/split.js");
var _Symbol$toPrimitive = require("core-js-pure/stable/symbol/to-primitive.js");
var _Symbol$toStringTag = require("core-js-pure/stable/symbol/to-string-tag.js");
var _Symbol$unscopables = require("core-js-pure/stable/symbol/unscopables.js");
var _Map = require("core-js-pure/stable/map/index.js");
var _Map$groupBy = require("core-js-pure/features/map/group-by.js");
var _Promise = require("core-js-pure/stable/promise/index.js");
var _Promise$allSettled = require("core-js-pure/features/promise/all-settled.js");
var _Promise$any = require("core-js-pure/features/promise/any.js");
var _WeakMap = require("core-js-pure/stable/weak-map/index.js");
_Array$from;
_Array$isArray;
_Array$of;
Expand Down Expand Up @@ -193,3 +199,17 @@ Date.something;
JSON.parse;
Math.pow;
_Symbol.something;
_Map.from;
_Map$groupBy;
_Map.keyBy;
_Map.of;
_Promise.all;
_Promise$allSettled;
_Promise$any;
_Promise.race;
_Promise.try;
_Promise.withResolvers;
liuxingbaoyu marked this conversation as resolved.
Show resolved Hide resolved
_WeakMap.from;
ArrayBuffer.isView;
Uint8Array.from;
Uint8Array.of;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this expected? I didn't find the corresponding file.

Copy link
Member

@zloirock zloirock Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All typed array features are not polyfilled in the pure version.