From 9908d8c20ba4b5e3c9c0a335d5be773df787361e Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Sun, 3 Jun 2018 16:54:50 +0700 Subject: [PATCH] add /proposals/ entry points --- .gitignore | 5 +- Gruntfile.js | 11 +- README.md | 104 ++++++++++-------- .../core-js/modules/esnext.array.flat-map.js | 2 +- packages/core-js/modules/esnext.array.flat.js | 2 +- .../core-js/modules/esnext.math.signbit.js | 2 +- .../modules/esnext.reflect.define-metadata.js | 2 +- .../modules/esnext.reflect.delete-metadata.js | 2 +- .../esnext.reflect.get-metadata-keys.js | 2 +- .../modules/esnext.reflect.get-metadata.js | 2 +- .../esnext.reflect.get-own-metadata-keys.js | 2 +- .../esnext.reflect.get-own-metadata.js | 2 +- .../modules/esnext.reflect.has-metadata.js | 2 +- .../esnext.reflect.has-own-metadata.js | 2 +- .../modules/esnext.reflect.metadata.js | 2 +- .../modules/esnext.string.match-all.js | 2 +- .../modules/esnext.symbol.description.js | 2 +- .../proposals/array-flat-and-flat-map.js | 2 + packages/core-js/proposals/array-last.js | 2 + packages/core-js/proposals/asap.js | 1 + .../core-js/proposals/collection-methods.js | 15 +++ .../core-js/proposals/collection-of-from.js | 8 ++ .../proposals/efficient-64-bit-arithmetic.js | 4 + packages/core-js/proposals/global.js | 3 + packages/core-js/proposals/index.js | 1 + packages/core-js/proposals/math-extensions.js | 7 ++ packages/core-js/proposals/math-signbit.js | 1 + .../core-js/proposals/number-from-string.js | 1 + .../core-js/proposals/object-from-entries.js | 2 + packages/core-js/proposals/observable.js | 2 + .../core-js/proposals/pattern-matching.js | 2 + packages/core-js/proposals/promise-try.js | 1 + .../core-js/proposals/reflect-metadata.js | 9 ++ packages/core-js/proposals/richer-keys.js | 2 + packages/core-js/proposals/set-methods.js | 4 + packages/core-js/proposals/string-at.js | 1 + .../core-js/proposals/string-code-points.js | 1 + .../core-js/proposals/string-match-all.js | 1 + .../core-js/proposals/string-replace-all.js | 1 + .../proposals/string-trim-start-end.js | 2 + .../core-js/proposals/symbol-description.js | 1 + packages/core-js/stage/0.js | 12 +- packages/core-js/stage/1.js | 52 ++------- packages/core-js/stage/2.js | 7 +- packages/core-js/stage/3.js | 12 +- packages/core-js/stage/pre.js | 10 +- tests/commonjs.js | 24 ++++ 47 files changed, 209 insertions(+), 130 deletions(-) create mode 100644 packages/core-js/proposals/array-flat-and-flat-map.js create mode 100644 packages/core-js/proposals/array-last.js create mode 100644 packages/core-js/proposals/asap.js create mode 100644 packages/core-js/proposals/collection-methods.js create mode 100644 packages/core-js/proposals/collection-of-from.js create mode 100644 packages/core-js/proposals/efficient-64-bit-arithmetic.js create mode 100644 packages/core-js/proposals/global.js create mode 100644 packages/core-js/proposals/index.js create mode 100644 packages/core-js/proposals/math-extensions.js create mode 100644 packages/core-js/proposals/math-signbit.js create mode 100644 packages/core-js/proposals/number-from-string.js create mode 100644 packages/core-js/proposals/object-from-entries.js create mode 100644 packages/core-js/proposals/observable.js create mode 100644 packages/core-js/proposals/pattern-matching.js create mode 100644 packages/core-js/proposals/promise-try.js create mode 100644 packages/core-js/proposals/reflect-metadata.js create mode 100644 packages/core-js/proposals/richer-keys.js create mode 100644 packages/core-js/proposals/set-methods.js create mode 100644 packages/core-js/proposals/string-at.js create mode 100644 packages/core-js/proposals/string-code-points.js create mode 100644 packages/core-js/proposals/string-match-all.js create mode 100644 packages/core-js/proposals/string-replace-all.js create mode 100644 packages/core-js/proposals/string-trim-start-end.js create mode 100644 packages/core-js/proposals/symbol-description.js diff --git a/.gitignore b/.gitignore index 536209e07bc5..d82a5cd418fa 100644 --- a/.gitignore +++ b/.gitignore @@ -5,18 +5,19 @@ node_modules/ *.bak *.swp +/packages/core-js/LICENSE +/packages/core-js-builder/LICENSE /packages/core-js-bundle/LICENSE /packages/core-js-bundle/index.js /packages/core-js-bundle/minified.js /packages/core-js-bundle/minified.js.map -/packages/core-js/LICENSE /packages/core-js-pure/es/ /packages/core-js-pure/features/ /packages/core-js-pure/internals/ /packages/core-js-pure/modules/ +/packages/core-js-pure/proposals/ /packages/core-js-pure/stage/ /packages/core-js-pure/web/ /packages/core-js-pure/index.js /packages/core-js-pure/LICENSE -/packages/core-js-builder/LICENSE /tests/bundles/ diff --git a/Gruntfile.js b/Gruntfile.js index fbcdca664489..583f1d63cb72 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -75,7 +75,16 @@ module.exports = grunt => { }, { expand: true, cwd: './packages/core-js/', - src: ['internals/**', 'modules/**', 'es/**', 'stage/**', 'web/**', 'features/**', 'index.js'], + src: [ + 'es/**', + 'features/**', + 'internals/**', + 'modules/**', + 'proposals/**', + 'stage/**', + 'web/**', + 'index.js', + ], dest: './packages/core-js-pure/', }, { expand: true, diff --git a/README.md b/README.md index c08c3167de34..693fd6543242 100644 --- a/README.md +++ b/README.md @@ -816,7 +816,7 @@ function timeLimit(promise, time) { timeLimit(sleepRandom(5), 10).then(x => console.log(x)); // => 853, after 5 sec. timeLimit(sleepRandom(15), 10).catch(x => console.log(x)); // Error: Await > 10 sec ``` -With [async functions](https://tc39.github.io/ecmascript-asyncawait) [example](http://goo.gl/wnQS4j): +[Example](http://goo.gl/wnQS4j) with async functions: ```js let delay = time => new Promise(resolve => setTimeout(resolve, time)) @@ -1411,7 +1411,7 @@ None. ```js core-js(-pure)/stage/3 ``` -* `Array#flat` and `Array#flatMap` [proposal](https://tc39.github.io/proposal-flatMap) - modules [`esnext.array.flat`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.array.flat.js) and [`esnext.array.flat-map`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.array.flat-map.js) +* `Array#flat` and `Array#flatMap` [proposal](https://github.com/tc39/proposal-flatMap) - modules [`esnext.array.flat`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.array.flat.js) and [`esnext.array.flat-map`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.array.flat-map.js) ```js class Array { flat(depthArg?: number = 1): Array; @@ -1420,6 +1420,7 @@ class Array { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/array-flat-and-flat-map core-js(-pure)/features/array/flat core-js(-pure)/features/array/flat-map core-js(-pure)/features/array/virtual/flat @@ -1433,7 +1434,7 @@ core-js(-pure)/features/array/virtual/flat-map [{ a: 1, b: 2 }, { a: 3, b: 4 }, { a: 5, b: 6 }].flatMap(it => [it.a, it.b]); // => [1, 2, 3, 4, 5, 6] ``` -* `String#matchAll` [proposal](https://tc39.github.io/proposal-string-matchall/) - module [`esnext.string.match-all`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.string.match-all.js) +* `String#matchAll` [proposal](https://github.com/tc39/proposal-string-matchall) - module [`esnext.string.match-all`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.string.match-all.js) ```js class String { matchAll(regexp: RegExp): Iterator; @@ -1441,6 +1442,7 @@ class String { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/string-match-all core-js(-pure)/features/string/match-all core-js(-pure)/features/string/virtual/match-all ``` @@ -1461,6 +1463,7 @@ class String { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/string-trim-start-end core-js(-pure)/features/string/trim-start core-js(-pure)/features/string/trim-end core-js(-pure)/features/string/trim-left @@ -1481,6 +1484,7 @@ let global: Object; ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/global core-js(-pure)/features/global ``` [*Examples*](http://goo.gl/gEqMl7): @@ -1490,7 +1494,7 @@ global.Array === Array; // => true ```js core-js(-pure)/stage/2 ``` -* `Symbol#description` [proposal](https://tc39.github.io/proposal-Symbol-description/) - module [`esnext.symbol.description`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.symbol.description.js) +* `Symbol#description` [proposal](https://github.com/tc39/proposal-Symbol-description) - module [`esnext.symbol.description`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.symbol.description.js) ```js class Symbol { get description: string | void; @@ -1498,6 +1502,7 @@ class Symbol { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/symbol-description core-js/features/symbol/description ``` [*Examples*](https://goo.gl/MWizfc): @@ -1509,6 +1514,8 @@ Symbol().description; // => undefined #### Stage 2 proposals [*CommonJS entry points:*](#commonjs) ``` +core-js(-pure)/stage/2 +``` * `Object.fromEntries`, [proposal](https://github.com/tc39/proposal-object-from-entries), module [`esnext.object.from-entries`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.object.from-entries.js) ```js class Object { @@ -1517,6 +1524,7 @@ class Object { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/object-from-entries core-js(-pure)/features/object/from-entries ``` [*Examples*](): @@ -1549,10 +1557,11 @@ class Set { ``` [*CommonJS entry points:*](#commonjs) ```js -core-js/features/set/difference -core-js/features/set/intersection -core-js/features/set/symmetric-difference -core-js/features/set/union +core-js/proposals/set-methods +core-js(-pure)/features/set/difference +core-js(-pure)/features/set/intersection +core-js(-pure)/features/set/symmetric-difference +core-js(-pure)/features/set/union ``` [*Examples*](https://goo.gl/YjaxTN): ```js @@ -1566,6 +1575,7 @@ new Set([1, 2, 3]).symmetricDifference([3, 4, 5]); // => Set {1, 2, 4, 5} [*CommonJS entry points:*](#commonjs) ```js core-js(-pure)/stage/1 +``` * Getting last item from `Array` [proposal](https://github.com/keithamus/proposal-array-last) - modules [`esnext.array.last-item`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.array.last-item.js) and [`esnext.array.last-index`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.array.last-index.js) ```js class Array { @@ -1576,6 +1586,7 @@ class Array { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/array-last core-js/features/array/last-item core-js/features/array/last-index ``` @@ -1597,6 +1608,7 @@ class String { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/string-replace-all core-js/features/string/replace-all ``` [*Examples*](https://goo.gl/wUXNXN): @@ -1611,6 +1623,7 @@ class Promise { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/promise-try core-js(-pure)/features/promise/try ``` [*Examples*](https://goo.gl/k5GGRo): @@ -1660,29 +1673,31 @@ class WeakMap { ``` [*CommonJS entry points:*](#commonjs) ```js -core-js/features/set/add-all -core-js/features/set/delete-all -core-js/features/set/every -core-js/features/set/filter -core-js/features/set/find -core-js/features/set/from -core-js/features/set/join -core-js/features/set/map -core-js/features/set/of -core-js/features/set/reduce -core-js/features/set/some -core-js/features/map/filter -core-js/features/map/from -core-js/features/map/group-by -core-js/features/map/key-by -core-js/features/map/map-keys -core-js/features/map/map-values -core-js/features/map/merge -core-js/features/map/of -core-js/features/weak-set/of -core-js/features/weak-set/from -core-js/features/weak-map/of -core-js/features/weak-map/from +core-js/proposals/collection-methods +core-js/proposals/collection-of-from +core-js(-pure)/features/set/add-all +core-js(-pure)/features/set/delete-all +core-js(-pure)/features/set/every +core-js(-pure)/features/set/filter +core-js(-pure)/features/set/find +core-js(-pure)/features/set/from +core-js(-pure)/features/set/join +core-js(-pure)/features/set/map +core-js(-pure)/features/set/of +core-js(-pure)/features/set/reduce +core-js(-pure)/features/set/some +core-js(-pure)/features/map/filter +core-js(-pure)/features/map/from +core-js(-pure)/features/map/group-by +core-js(-pure)/features/map/key-by +core-js(-pure)/features/map/map-keys +core-js(-pure)/features/map/map-values +core-js(-pure)/features/map/merge +core-js(-pure)/features/map/of +core-js(-pure)/features/weak-set/of +core-js(-pure)/features/weak-set/from +core-js(-pure)/features/weak-map/of +core-js(-pure)/features/weak-map/from ``` [*Examples*](https://goo.gl/mSC7eU): ```js @@ -1697,6 +1712,7 @@ function compositeSymbol(...args: Array): symbol; ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/richer-keys core-js(-pure)/features/composite-key core-js(-pure)/features/composite-symbol ``` @@ -1743,6 +1759,7 @@ class Symbol { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/observable core-js(-pure)/features/observable core-js(-pure)/features/symbol/observable ``` @@ -1757,15 +1774,7 @@ new Observable(observer => { complete() { console.log('!'); } }); ``` -* `Math.{clamp, DEG_PER_RAD, degrees, fscale, rad-per-deg, radians, scale}` - [proposal](https://github.com/rwaldron/proposal-math-extensions) - modules - [`esnext.math.clamp`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.clamp.js), - [`esnext.math.DEG_PER_RAD`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.DEG_PER_RAD.js), - [`esnext.math.degrees`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.degrees.js), - [`esnext.math.fscale`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.fscale.js), - [`esnext.math.RAD_PER_DEG`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.RAD_PER_DEG.js), - [`esnext.math.radians`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.radians.js) and - [`esnext.math.scale`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.scale.js) +* `Math` extensions [proposal](https://github.com/rwaldron/proposal-math-extensions) - modules [`esnext.math.clamp`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.clamp.js), [`esnext.math.DEG_PER_RAD`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.DEG_PER_RAD.js), [`esnext.math.degrees`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.degrees.js), [`esnext.math.fscale`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.fscale.js), [`esnext.math.RAD_PER_DEG`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.RAD_PER_DEG.js), [`esnext.math.radians`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.radians.js) and [`esnext.math.scale`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.scale.js) ```js namespace Math { DEG_PER_RAD: number; @@ -1779,6 +1788,7 @@ namespace Math { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/math-extensions core-js(-pure)/features/math/clamp core-js(-pure)/features/math/deg-per-rad core-js(-pure)/features/math/degrees @@ -1787,7 +1797,7 @@ core-js(-pure)/features/math/rad-per-deg core-js(-pure)/features/math/radians core-js(-pure)/features/math/scale ``` -* `Math.signbit` [proposal](http://jfbastien.github.io/papers/Math.signbit.html) - module [`esnext.math.signbit`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.signbit.js) +* `Math.signbit` [proposal](https://github.com/tc39/proposal-Math.signbit) - module [`esnext.math.signbit`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.signbit.js) ```js namespace Math { signbit(x: number): boolean; @@ -1795,6 +1805,7 @@ namespace Math { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/math-signbit core-js(-pure)/features/math/signbit ``` [*Examples*](https://goo.gl/rPWbzZ): @@ -1813,6 +1824,7 @@ class Number { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/number-from-string core-js(-pure)/features/number/from-string ``` * `String#codePoints` [proposal](https://github.com/RReverser/string-prototype-codepoints) - module [`esnext.string.code-points`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.string.code-points.js) @@ -1823,6 +1835,7 @@ class String { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/string-code-points core-js(-pure)/features/string/code-points ``` [*Example*](https://goo.gl/Jt7SsD): @@ -1846,6 +1859,7 @@ class String { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/string-at core-js(-pure)/features/string/at core-js(-pure)/features/string/virtual/at ``` @@ -1854,7 +1868,7 @@ core-js(-pure)/features/string/virtual/at 'a𠮷b'.at(1); // => '𠮷' 'a𠮷b'.at(1).length; // => 2 ``` -* `Math.{iaddh, isubh, imulh, umulh}` [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - modules [`esnext.math.iaddh`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.iaddh.js), [`esnext.math.isubh`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.isubh.js), [`esnext.math.imulh`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.imulh.js) and [`esnext.math.umulh`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.umulh.js) +* Efficient 64 bit arithmetic [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - modules [`esnext.math.iaddh`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.iaddh.js), [`esnext.math.isubh`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.isubh.js), [`esnext.math.imulh`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.imulh.js) and [`esnext.math.umulh`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.math.umulh.js) ```js namespace Math { iaddh(lo0: number, hi0: number, lo1: number, hi1: number): number; @@ -1865,6 +1879,7 @@ namespace Math { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/efficient-64-bit-arithmetic core-js(-pure)/features/math/iaddh core-js(-pure)/features/math/isubh core-js(-pure)/features/math/imulh @@ -1876,6 +1891,7 @@ function asap(fn: Function): void; ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/asap core-js(-pure)/features/asap ``` [*Examples*](http://goo.gl/tx3SRK): @@ -1891,6 +1907,7 @@ class Symbol { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/pattern-matching core-js(-pure)/features/symbol/pattern-match core-js(-pure)/features/symbol/pattern-value ``` @@ -1900,7 +1917,7 @@ core-js(-pure)/features/symbol/pattern-value ```js core-js(-pure)/stage/pre ``` -* `Reflect` metadata [proposal](https://rbuckton.github.io/reflect-metadata/) - modules [`esnext.reflect.define-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.define-metadata.js), [`esnext.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.delete-metadata.js), [`esnext.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.get-metadata.js), [`esnext.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.get-metadata-keys.js), [`esnext.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.get-own-metadata.js), [`esnext.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.get-own-metadata-keys.js), [`esnext.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.has-metadata.js), [`esnext.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.has-own-metadata.js) and [`esnext.reflect.metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.metadata.js). +* `Reflect` metadata [proposal](https://github.com/rbuckton/reflect-metadata) - modules [`esnext.reflect.define-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.define-metadata.js), [`esnext.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.delete-metadata.js), [`esnext.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.get-metadata.js), [`esnext.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.get-metadata-keys.js), [`esnext.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.get-own-metadata.js), [`esnext.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.get-own-metadata-keys.js), [`esnext.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.has-metadata.js), [`esnext.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.has-own-metadata.js) and [`esnext.reflect.metadata`](https://github.com/zloirock/core-js/blob/v3/packages/core-js/modules/esnext.reflect.metadata.js). ```js namespace Reflect { defineMetadata(metadataKey: any, metadataValue: any, target: Object, propertyKey?: PropertyKey): void; @@ -1916,6 +1933,7 @@ namespace Reflect { ``` [*CommonJS entry points:*](#commonjs) ```js +core-js/proposals/reflect-metadata core-js(-pure)/features/reflect/define-metadata core-js(-pure)/features/reflect/delete-metadata core-js(-pure)/features/reflect/get-metadata diff --git a/packages/core-js/modules/esnext.array.flat-map.js b/packages/core-js/modules/esnext.array.flat-map.js index 1a0e131390bc..06e04faf549f 100644 --- a/packages/core-js/modules/esnext.array.flat-map.js +++ b/packages/core-js/modules/esnext.array.flat-map.js @@ -6,7 +6,7 @@ var aFunction = require('../internals/a-function'); var arraySpeciesCreate = require('../internals/array-species-create'); // `Array.prototype.flatMap` method -// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +// https://github.com/tc39/proposal-flatMap require('../internals/export')({ target: 'Array', proto: true }, { flatMap: function flatMap(callbackfn /* , thisArg */) { var O = toObject(this); diff --git a/packages/core-js/modules/esnext.array.flat.js b/packages/core-js/modules/esnext.array.flat.js index 05e797547f0b..6c1acd4fccac 100644 --- a/packages/core-js/modules/esnext.array.flat.js +++ b/packages/core-js/modules/esnext.array.flat.js @@ -6,7 +6,7 @@ var toInteger = require('../internals/to-integer'); var arraySpeciesCreate = require('../internals/array-species-create'); // `Array.prototype.flat` method -// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flat +// https://github.com/tc39/proposal-flatMap require('../internals/export')({ target: 'Array', proto: true }, { flat: function flat(/* depthArg = 1 */) { var depthArg = arguments[0]; diff --git a/packages/core-js/modules/esnext.math.signbit.js b/packages/core-js/modules/esnext.math.signbit.js index c153d6daf943..47ce152652bd 100644 --- a/packages/core-js/modules/esnext.math.signbit.js +++ b/packages/core-js/modules/esnext.math.signbit.js @@ -1,5 +1,5 @@ // `Math.signbit` method -// http://jfbastien.github.io/papers/Math.signbit.html +// https://github.com/tc39/proposal-Math.signbit require('../internals/export')({ target: 'Math', stat: true }, { signbit: function signbit(x) { // eslint-disable-next-line no-self-compare return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; diff --git a/packages/core-js/modules/esnext.reflect.define-metadata.js b/packages/core-js/modules/esnext.reflect.define-metadata.js index 7c411fd94395..8c08e1d4b35e 100644 --- a/packages/core-js/modules/esnext.reflect.define-metadata.js +++ b/packages/core-js/modules/esnext.reflect.define-metadata.js @@ -4,7 +4,7 @@ var toMetaKey = ReflectMetadataModule.key; var ordinaryDefineOwnMetadata = ReflectMetadataModule.set; // `Reflect.defineMetadata` method -// https://rbuckton.github.io/reflect-metadata/ +// https://github.com/rbuckton/reflect-metadata ReflectMetadataModule.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); } }); diff --git a/packages/core-js/modules/esnext.reflect.delete-metadata.js b/packages/core-js/modules/esnext.reflect.delete-metadata.js index 42b2835077da..2afe412f41af 100644 --- a/packages/core-js/modules/esnext.reflect.delete-metadata.js +++ b/packages/core-js/modules/esnext.reflect.delete-metadata.js @@ -5,7 +5,7 @@ var getOrCreateMetadataMap = ReflectMetadataModule.map; var store = ReflectMetadataModule.store; // `Reflect.deleteMetadata` method -// https://rbuckton.github.io/reflect-metadata/ +// https://github.com/rbuckton/reflect-metadata ReflectMetadataModule.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); diff --git a/packages/core-js/modules/esnext.reflect.get-metadata-keys.js b/packages/core-js/modules/esnext.reflect.get-metadata-keys.js index 4346b05eb822..ea1d264d03c8 100644 --- a/packages/core-js/modules/esnext.reflect.get-metadata-keys.js +++ b/packages/core-js/modules/esnext.reflect.get-metadata-keys.js @@ -21,7 +21,7 @@ var ordinaryMetadataKeys = function (O, P) { }; // `Reflect.getMetadataKeys` method -// https://rbuckton.github.io/reflect-metadata/ +// https://github.com/rbuckton/reflect-metadata ReflectMetadataModule.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); } }); diff --git a/packages/core-js/modules/esnext.reflect.get-metadata.js b/packages/core-js/modules/esnext.reflect.get-metadata.js index 3f46ee28104d..2b909921b549 100644 --- a/packages/core-js/modules/esnext.reflect.get-metadata.js +++ b/packages/core-js/modules/esnext.reflect.get-metadata.js @@ -13,7 +13,7 @@ var ordinaryGetMetadata = function (MetadataKey, O, P) { }; // `Reflect.getMetadata` method -// https://rbuckton.github.io/reflect-metadata/ +// https://github.com/rbuckton/reflect-metadata ReflectMetadataModule.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); } }); diff --git a/packages/core-js/modules/esnext.reflect.get-own-metadata-keys.js b/packages/core-js/modules/esnext.reflect.get-own-metadata-keys.js index fc292392583c..930e048695a8 100644 --- a/packages/core-js/modules/esnext.reflect.get-own-metadata-keys.js +++ b/packages/core-js/modules/esnext.reflect.get-own-metadata-keys.js @@ -4,7 +4,7 @@ var ordinaryOwnMetadataKeys = ReflectMetadataModule.keys; var toMetaKey = ReflectMetadataModule.key; // `Reflect.getOwnMetadataKeys` method -// https://rbuckton.github.io/reflect-metadata/ +// https://github.com/rbuckton/reflect-metadata ReflectMetadataModule.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); } }); diff --git a/packages/core-js/modules/esnext.reflect.get-own-metadata.js b/packages/core-js/modules/esnext.reflect.get-own-metadata.js index bdf3cd7e5a2d..2009c97c1437 100644 --- a/packages/core-js/modules/esnext.reflect.get-own-metadata.js +++ b/packages/core-js/modules/esnext.reflect.get-own-metadata.js @@ -4,7 +4,7 @@ var ordinaryGetOwnMetadata = ReflectMetadataModule.get; var toMetaKey = ReflectMetadataModule.key; // `Reflect.getOwnMetadata` method -// https://rbuckton.github.io/reflect-metadata/ +// https://github.com/rbuckton/reflect-metadata ReflectMetadataModule.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { return ordinaryGetOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); diff --git a/packages/core-js/modules/esnext.reflect.has-metadata.js b/packages/core-js/modules/esnext.reflect.has-metadata.js index 219284f7bbad..1973673b0602 100644 --- a/packages/core-js/modules/esnext.reflect.has-metadata.js +++ b/packages/core-js/modules/esnext.reflect.has-metadata.js @@ -12,7 +12,7 @@ var ordinaryHasMetadata = function (MetadataKey, O, P) { }; // `Reflect.hasMetadata` method -// https://rbuckton.github.io/reflect-metadata/ +// https://github.com/rbuckton/reflect-metadata ReflectMetadataModule.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); } }); diff --git a/packages/core-js/modules/esnext.reflect.has-own-metadata.js b/packages/core-js/modules/esnext.reflect.has-own-metadata.js index 16eff141ab7d..35e3c637d95d 100644 --- a/packages/core-js/modules/esnext.reflect.has-own-metadata.js +++ b/packages/core-js/modules/esnext.reflect.has-own-metadata.js @@ -4,7 +4,7 @@ var ordinaryHasOwnMetadata = ReflectMetadataModule.has; var toMetaKey = ReflectMetadataModule.key; // `Reflect.hasOwnMetadata` method -// https://rbuckton.github.io/reflect-metadata/ +// https://github.com/rbuckton/reflect-metadata ReflectMetadataModule.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { return ordinaryHasOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); diff --git a/packages/core-js/modules/esnext.reflect.metadata.js b/packages/core-js/modules/esnext.reflect.metadata.js index 67b5d259e636..a770bf8ce914 100644 --- a/packages/core-js/modules/esnext.reflect.metadata.js +++ b/packages/core-js/modules/esnext.reflect.metadata.js @@ -5,7 +5,7 @@ var toMetaKey = ReflectMetadataModule.key; var ordinaryDefineOwnMetadata = ReflectMetadataModule.set; // `Reflect.metadata` method -// https://rbuckton.github.io/reflect-metadata/ +// https://github.com/rbuckton/reflect-metadata ReflectMetadataModule.exp({ metadata: function metadata(metadataKey, metadataValue) { return function decorator(target, targetKey) { ordinaryDefineOwnMetadata( diff --git a/packages/core-js/modules/esnext.string.match-all.js b/packages/core-js/modules/esnext.string.match-all.js index 97ddd764d3f3..102ed7e3c235 100644 --- a/packages/core-js/modules/esnext.string.match-all.js +++ b/packages/core-js/modules/esnext.string.match-all.js @@ -77,7 +77,7 @@ var $RegExpStringIterator = createIteratorConstructor(function RegExpStringItera }); // `String.prototype.matchAll` method -// https://tc39.github.io/proposal-string-matchall/ +// https://github.com/tc39/proposal-string-matchall require('../internals/export')({ target: 'String', proto: true }, { matchAll: function matchAll(regexp) { var O = requireObjectCoercible(this); diff --git a/packages/core-js/modules/esnext.symbol.description.js b/packages/core-js/modules/esnext.symbol.description.js index 5a0b9cac45e6..b2b97dbccb06 100644 --- a/packages/core-js/modules/esnext.symbol.description.js +++ b/packages/core-js/modules/esnext.symbol.description.js @@ -1,5 +1,5 @@ // `Symbol.prototype.description` getter -// https://tc39.github.io/proposal-Symbol-description/ +// https://github.com/tc39/proposal-Symbol-description 'use strict'; var DESCRIPTORS = require('../internals/descriptors'); var has = require('../internals/has'); diff --git a/packages/core-js/proposals/array-flat-and-flat-map.js b/packages/core-js/proposals/array-flat-and-flat-map.js new file mode 100644 index 000000000000..3c3ae7893ec6 --- /dev/null +++ b/packages/core-js/proposals/array-flat-and-flat-map.js @@ -0,0 +1,2 @@ +require('../modules/esnext.array.flat'); +require('../modules/esnext.array.flat-map'); diff --git a/packages/core-js/proposals/array-last.js b/packages/core-js/proposals/array-last.js new file mode 100644 index 000000000000..c6710312b51b --- /dev/null +++ b/packages/core-js/proposals/array-last.js @@ -0,0 +1,2 @@ +require('../modules/esnext.array.last-index'); +require('../modules/esnext.array.last-item'); diff --git a/packages/core-js/proposals/asap.js b/packages/core-js/proposals/asap.js new file mode 100644 index 000000000000..81d065c544dd --- /dev/null +++ b/packages/core-js/proposals/asap.js @@ -0,0 +1 @@ +require('../modules/esnext.asap'); diff --git a/packages/core-js/proposals/collection-methods.js b/packages/core-js/proposals/collection-methods.js new file mode 100644 index 000000000000..8117e4fcf55a --- /dev/null +++ b/packages/core-js/proposals/collection-methods.js @@ -0,0 +1,15 @@ +require('../modules/esnext.map.group-by'); +require('../modules/esnext.map.key-by'); +require('../modules/esnext.map.filter'); +require('../modules/esnext.map.map-keys'); +require('../modules/esnext.map.map-values'); +require('../modules/esnext.map.merge'); +require('../modules/esnext.set.add-all'); +require('../modules/esnext.set.delete-all'); +require('../modules/esnext.set.every'); +require('../modules/esnext.set.filter'); +require('../modules/esnext.set.find'); +require('../modules/esnext.set.join'); +require('../modules/esnext.set.map'); +require('../modules/esnext.set.reduce'); +require('../modules/esnext.set.some'); diff --git a/packages/core-js/proposals/collection-of-from.js b/packages/core-js/proposals/collection-of-from.js new file mode 100644 index 000000000000..ade30003e64d --- /dev/null +++ b/packages/core-js/proposals/collection-of-from.js @@ -0,0 +1,8 @@ +require('../modules/esnext.map.from'); +require('../modules/esnext.map.of'); +require('../modules/esnext.set.from'); +require('../modules/esnext.set.of'); +require('../modules/esnext.weak-map.from'); +require('../modules/esnext.weak-map.of'); +require('../modules/esnext.weak-set.from'); +require('../modules/esnext.weak-set.of'); diff --git a/packages/core-js/proposals/efficient-64-bit-arithmetic.js b/packages/core-js/proposals/efficient-64-bit-arithmetic.js new file mode 100644 index 000000000000..71d40dcb609e --- /dev/null +++ b/packages/core-js/proposals/efficient-64-bit-arithmetic.js @@ -0,0 +1,4 @@ +require('../modules/esnext.math.iaddh'); +require('../modules/esnext.math.isubh'); +require('../modules/esnext.math.imulh'); +require('../modules/esnext.math.umulh'); diff --git a/packages/core-js/proposals/global.js b/packages/core-js/proposals/global.js new file mode 100644 index 000000000000..76530d397633 --- /dev/null +++ b/packages/core-js/proposals/global.js @@ -0,0 +1,3 @@ +require('../modules/esnext.global'); + +module.exports = require('../internals/global'); diff --git a/packages/core-js/proposals/index.js b/packages/core-js/proposals/index.js new file mode 100644 index 000000000000..b87a7490700f --- /dev/null +++ b/packages/core-js/proposals/index.js @@ -0,0 +1 @@ +require('../stage'); diff --git a/packages/core-js/proposals/math-extensions.js b/packages/core-js/proposals/math-extensions.js new file mode 100644 index 000000000000..80d86af3fdab --- /dev/null +++ b/packages/core-js/proposals/math-extensions.js @@ -0,0 +1,7 @@ +require('../modules/esnext.math.clamp'); +require('../modules/esnext.math.deg-per-rad'); +require('../modules/esnext.math.degrees'); +require('../modules/esnext.math.fscale'); +require('../modules/esnext.math.rad-per-deg'); +require('../modules/esnext.math.radians'); +require('../modules/esnext.math.scale'); diff --git a/packages/core-js/proposals/math-signbit.js b/packages/core-js/proposals/math-signbit.js new file mode 100644 index 000000000000..e0a51d176ad1 --- /dev/null +++ b/packages/core-js/proposals/math-signbit.js @@ -0,0 +1 @@ +require('../modules/esnext.math.signbit'); diff --git a/packages/core-js/proposals/number-from-string.js b/packages/core-js/proposals/number-from-string.js new file mode 100644 index 000000000000..094d084202f6 --- /dev/null +++ b/packages/core-js/proposals/number-from-string.js @@ -0,0 +1 @@ +require('../modules/esnext.number.from-string'); diff --git a/packages/core-js/proposals/object-from-entries.js b/packages/core-js/proposals/object-from-entries.js new file mode 100644 index 000000000000..8b2d44496f4b --- /dev/null +++ b/packages/core-js/proposals/object-from-entries.js @@ -0,0 +1,2 @@ +require('../modules/es.array.iterator'); +require('../modules/esnext.object.from-entries'); diff --git a/packages/core-js/proposals/observable.js b/packages/core-js/proposals/observable.js new file mode 100644 index 000000000000..cf591564d246 --- /dev/null +++ b/packages/core-js/proposals/observable.js @@ -0,0 +1,2 @@ +require('../modules/esnext.observable'); +require('../modules/esnext.symbol.observable'); diff --git a/packages/core-js/proposals/pattern-matching.js b/packages/core-js/proposals/pattern-matching.js new file mode 100644 index 000000000000..36ad8a3e4182 --- /dev/null +++ b/packages/core-js/proposals/pattern-matching.js @@ -0,0 +1,2 @@ +require('../modules/esnext.symbol.pattern-match'); +require('../modules/esnext.symbol.pattern-value'); diff --git a/packages/core-js/proposals/promise-try.js b/packages/core-js/proposals/promise-try.js new file mode 100644 index 000000000000..ce5aca5f00e2 --- /dev/null +++ b/packages/core-js/proposals/promise-try.js @@ -0,0 +1 @@ +require('../modules/esnext.promise.try'); diff --git a/packages/core-js/proposals/reflect-metadata.js b/packages/core-js/proposals/reflect-metadata.js new file mode 100644 index 000000000000..512b1f25218f --- /dev/null +++ b/packages/core-js/proposals/reflect-metadata.js @@ -0,0 +1,9 @@ +require('../modules/esnext.reflect.define-metadata'); +require('../modules/esnext.reflect.delete-metadata'); +require('../modules/esnext.reflect.get-metadata'); +require('../modules/esnext.reflect.get-metadata-keys'); +require('../modules/esnext.reflect.get-own-metadata'); +require('../modules/esnext.reflect.get-own-metadata-keys'); +require('../modules/esnext.reflect.has-metadata'); +require('../modules/esnext.reflect.has-own-metadata'); +require('../modules/esnext.reflect.metadata'); diff --git a/packages/core-js/proposals/richer-keys.js b/packages/core-js/proposals/richer-keys.js new file mode 100644 index 000000000000..47f5e2ed82de --- /dev/null +++ b/packages/core-js/proposals/richer-keys.js @@ -0,0 +1,2 @@ +require('../modules/esnext.composite-key'); +require('../modules/esnext.composite-symbol'); diff --git a/packages/core-js/proposals/set-methods.js b/packages/core-js/proposals/set-methods.js new file mode 100644 index 000000000000..0d3f58581347 --- /dev/null +++ b/packages/core-js/proposals/set-methods.js @@ -0,0 +1,4 @@ +require('../modules/esnext.set.difference'); +require('../modules/esnext.set.intersection'); +require('../modules/esnext.set.union'); +require('../modules/esnext.set.symmetric-difference'); diff --git a/packages/core-js/proposals/string-at.js b/packages/core-js/proposals/string-at.js new file mode 100644 index 000000000000..e992e58d48cf --- /dev/null +++ b/packages/core-js/proposals/string-at.js @@ -0,0 +1 @@ +require('../modules/esnext.string.at'); diff --git a/packages/core-js/proposals/string-code-points.js b/packages/core-js/proposals/string-code-points.js new file mode 100644 index 000000000000..3717523ee50d --- /dev/null +++ b/packages/core-js/proposals/string-code-points.js @@ -0,0 +1 @@ +require('../modules/esnext.string.code-points'); diff --git a/packages/core-js/proposals/string-match-all.js b/packages/core-js/proposals/string-match-all.js new file mode 100644 index 000000000000..fae0de270fd0 --- /dev/null +++ b/packages/core-js/proposals/string-match-all.js @@ -0,0 +1 @@ +require('../modules/esnext.string.match-all'); diff --git a/packages/core-js/proposals/string-replace-all.js b/packages/core-js/proposals/string-replace-all.js new file mode 100644 index 000000000000..d5d30341fd0f --- /dev/null +++ b/packages/core-js/proposals/string-replace-all.js @@ -0,0 +1 @@ +require('../modules/esnext.string.replace-all'); diff --git a/packages/core-js/proposals/string-trim-start-end.js b/packages/core-js/proposals/string-trim-start-end.js new file mode 100644 index 000000000000..7a0dc40c9e1a --- /dev/null +++ b/packages/core-js/proposals/string-trim-start-end.js @@ -0,0 +1,2 @@ +require('../modules/esnext.string.trim-left'); +require('../modules/esnext.string.trim-right'); diff --git a/packages/core-js/proposals/symbol-description.js b/packages/core-js/proposals/symbol-description.js new file mode 100644 index 000000000000..e7b8c632de29 --- /dev/null +++ b/packages/core-js/proposals/symbol-description.js @@ -0,0 +1 @@ +require('../modules/esnext.symbol.description'); diff --git a/packages/core-js/stage/0.js b/packages/core-js/stage/0.js index 9a000fb50596..c404a1579288 100644 --- a/packages/core-js/stage/0.js +++ b/packages/core-js/stage/0.js @@ -1,10 +1,6 @@ -require('../modules/esnext.asap'); -require('../modules/esnext.math.iaddh'); -require('../modules/esnext.math.isubh'); -require('../modules/esnext.math.imulh'); -require('../modules/esnext.math.umulh'); -require('../modules/esnext.string.at'); -require('../modules/esnext.symbol.pattern-match'); -require('../modules/esnext.symbol.pattern-value'); +require('../proposals/asap'); +require('../proposals/efficient-64-bit-arithmetic'); +require('../proposals/string-at'); +require('../proposals/pattern-matching'); module.exports = require('./1'); diff --git a/packages/core-js/stage/1.js b/packages/core-js/stage/1.js index 9eea14b6d253..0d5752026d4e 100644 --- a/packages/core-js/stage/1.js +++ b/packages/core-js/stage/1.js @@ -1,43 +1,13 @@ -require('../modules/esnext.array.last-index'); -require('../modules/esnext.array.last-item'); -require('../modules/esnext.map.from'); -require('../modules/esnext.map.group-by'); -require('../modules/esnext.map.key-by'); -require('../modules/esnext.map.of'); -require('../modules/esnext.map.filter'); -require('../modules/esnext.map.map-keys'); -require('../modules/esnext.map.map-values'); -require('../modules/esnext.map.merge'); -require('../modules/esnext.math.clamp'); -require('../modules/esnext.math.deg-per-rad'); -require('../modules/esnext.math.degrees'); -require('../modules/esnext.math.fscale'); -require('../modules/esnext.math.rad-per-deg'); -require('../modules/esnext.math.radians'); -require('../modules/esnext.math.scale'); -require('../modules/esnext.math.signbit'); -require('../modules/esnext.number.from-string'); -require('../modules/esnext.observable'); -require('../modules/esnext.promise.try'); -require('../modules/esnext.set.from'); -require('../modules/esnext.set.of'); -require('../modules/esnext.set.add-all'); -require('../modules/esnext.set.delete-all'); -require('../modules/esnext.set.every'); -require('../modules/esnext.set.filter'); -require('../modules/esnext.set.find'); -require('../modules/esnext.set.join'); -require('../modules/esnext.set.map'); -require('../modules/esnext.set.reduce'); -require('../modules/esnext.set.some'); -require('../modules/esnext.string.code-points'); -require('../modules/esnext.string.replace-all'); -require('../modules/esnext.symbol.observable'); -require('../modules/esnext.weak-map.from'); -require('../modules/esnext.weak-map.of'); -require('../modules/esnext.weak-set.from'); -require('../modules/esnext.weak-set.of'); -require('../modules/esnext.composite-key'); -require('../modules/esnext.composite-symbol'); +require('../proposals/array-last'); +require('../proposals/collection-methods'); +require('../proposals/collection-of-from'); +require('../proposals/math-extensions'); +require('../proposals/math-signbit'); +require('../proposals/number-from-string'); +require('../proposals/observable'); +require('../proposals/promise-try'); +require('../proposals/string-code-points'); +require('../proposals/string-replace-all'); +require('../proposals/richer-keys'); module.exports = require('./2'); diff --git a/packages/core-js/stage/2.js b/packages/core-js/stage/2.js index 5be25b73d112..c2212c235c63 100644 --- a/packages/core-js/stage/2.js +++ b/packages/core-js/stage/2.js @@ -1,7 +1,4 @@ -require('../modules/esnext.object.from-entries'); -require('../modules/esnext.set.difference'); -require('../modules/esnext.set.intersection'); -require('../modules/esnext.set.union'); -require('../modules/esnext.set.symmetric-difference'); +require('../proposals/object-from-entries'); +require('../proposals/set-methods'); module.exports = require('./3'); diff --git a/packages/core-js/stage/3.js b/packages/core-js/stage/3.js index 32f3570851fd..fc2bb3ff7e60 100644 --- a/packages/core-js/stage/3.js +++ b/packages/core-js/stage/3.js @@ -1,9 +1,7 @@ -require('../modules/esnext.array.flat'); -require('../modules/esnext.array.flat-map'); -require('../modules/esnext.global'); -require('../modules/esnext.string.match-all'); -require('../modules/esnext.string.trim-left'); -require('../modules/esnext.string.trim-right'); -require('../modules/esnext.symbol.description'); +require('../proposals/array-flat-and-flat-map'); +require('../proposals/global'); +require('../proposals/string-match-all'); +require('../proposals/string-trim-start-end'); +require('../proposals/symbol-description'); module.exports = require('./4'); diff --git a/packages/core-js/stage/pre.js b/packages/core-js/stage/pre.js index 2c18ca2b65ce..bc939d16375d 100644 --- a/packages/core-js/stage/pre.js +++ b/packages/core-js/stage/pre.js @@ -1,11 +1,3 @@ -require('../modules/esnext.reflect.define-metadata'); -require('../modules/esnext.reflect.delete-metadata'); -require('../modules/esnext.reflect.get-metadata'); -require('../modules/esnext.reflect.get-metadata-keys'); -require('../modules/esnext.reflect.get-own-metadata'); -require('../modules/esnext.reflect.get-own-metadata-keys'); -require('../modules/esnext.reflect.has-metadata'); -require('../modules/esnext.reflect.has-own-metadata'); -require('../modules/esnext.reflect.metadata'); +require('../proposals/reflect-metadata'); module.exports = require('./0'); diff --git a/tests/commonjs.js b/tests/commonjs.js index 96a6c3f5001d..00ebab5a908a 100644 --- a/tests/commonjs.js +++ b/tests/commonjs.js @@ -572,6 +572,30 @@ for (const _PATH of ['../packages/core-js-pure', '../packages/core-js']) { ok('setImmediate' in load('web/immediate')); load('web/dom-collections'); ok('setImmediate' in load('web')); + load('proposals/array-flat-and-flat-map'); + load('proposals/array-last'); + load('proposals/asap'); + load('proposals/collection-methods'); + load('proposals/collection-of-from'); + load('proposals/efficient-64-bit-arithmetic'); + load('proposals/global'); + load('proposals/math-extensions'); + load('proposals/math-signbit'); + load('proposals/number-from-string'); + load('proposals/object-from-entries'); + load('proposals/observable'); + load('proposals/pattern-matching'); + load('proposals/promise-try'); + load('proposals/reflect-metadata'); + load('proposals/richer-keys'); + load('proposals/set-methods'); + load('proposals/string-at'); + load('proposals/string-code-points'); + load('proposals/string-match-all'); + load('proposals/string-replace-all'); + load('proposals/string-trim-start-end'); + load('proposals/symbol-description'); + load('proposals'); ok(load('stage/4')); ok(load('stage/3')); ok(load('stage/2'));