diff --git a/CHANGELOG.md b/CHANGELOG.md index f73fdd783d45..796474d57a29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,11 +24,15 @@ - [`RegExp.escape` stage 2 proposal](https://github.com/tc39/proposal-regex-escaping) - Moved to hex-escape semantics, [regex-escaping/67](https://github.com/tc39/proposal-regex-escaping/pull/67) - It's not the final change of the way of escaping, waiting for [regex-escaping/77](https://github.com/tc39/proposal-regex-escaping/pull/77) soon -- [Pattern matching proposal](https://github.com/tc39/proposal-pattern-matching): +- [Pattern matching stage 1 proposal](https://github.com/tc39/proposal-pattern-matching): - Built-ins: - `Symbol.customMatcher` - Once again, [the used well-known symbol was renamed](https://github.com/tc39/proposal-pattern-matching/pull/295) - Added new entries for that +- [Extractors stage 1 proposal](https://github.com/tc39/proposal-extractors): + - Built-ins: + - `Symbol.customMatcher` + - Since the `Symbol.customMatcher` well-known symbol from the pattern matching proposal is also used in the exactors proposal, added an entry also for this proposal - Added [`URL.parse`](https://url.spec.whatwg.org/#dom-url-parse), [url/825](https://github.com/whatwg/url/pull/825) - Engines bugs fixes: - Added a fix of [Safari `{ Object, Map }.groupBy` bug that does not support iterable primitives](https://bugs.webkit.org/show_bug.cgi?id=271524) diff --git a/README.md b/README.md index 665a78657e89..cce0b880279b 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,7 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3]) - [`String.cooked`](#stringcooked) - [`String.prototype.codePoints`](#stringprototypecodepoints) - [`Symbol.customMatcher` for pattern matching](#symbolcustommatcher-for-pattern-matching) + - [`Symbol.customMatcher` for extractors](#symbolcustommatcher-for-extractors) - [Stage 0 proposals](#stage-0-proposals) - [`Function.prototype.demethodize`](#functionprototypedemethodize) - [`Function.{ isCallable, isConstructor }`](#function-iscallable-isconstructor-) @@ -3098,6 +3099,19 @@ core-js/proposals/pattern-matching-v2 core-js(-pure)/full/symbol/custom-matcher ``` +##### [`Symbol.customMatcher` for extractors](https://github.com/tc39/proposal-extractors)[⬆](#index) +Module [`esnext.symbol.custom-matcher`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.symbol.custom-matcher.js). +```js +class Symbol { + static customMatcher: @@customMatcher; +} +``` +[*CommonJS entry points:*](#commonjs-api) +```js +core-js/proposals/pattern-extractors +core-js(-pure)/full/symbol/custom-matcher +``` + #### Stage 0 proposals[⬆](#index) [*CommonJS entry points:*](#commonjs-api) ```js diff --git a/packages/core-js/proposals/extractors.js b/packages/core-js/proposals/extractors.js new file mode 100644 index 000000000000..abda3a8c6ab7 --- /dev/null +++ b/packages/core-js/proposals/extractors.js @@ -0,0 +1,3 @@ +'use strict'; +// https://github.com/tc39/proposal-extractors +require('../modules/esnext.symbol.custom-matcher'); diff --git a/packages/core-js/stage/1.js b/packages/core-js/stage/1.js index d359930b40b1..4f59dad3533f 100644 --- a/packages/core-js/stage/1.js +++ b/packages/core-js/stage/1.js @@ -7,6 +7,7 @@ require('../proposals/array-unique'); require('../proposals/collection-methods'); require('../proposals/collection-of-from'); require('../proposals/data-view-get-set-uint8-clamped'); +require('../proposals/extractors'); require('../proposals/keys-composition'); require('../proposals/math-extensions'); require('../proposals/math-signbit'); diff --git a/tests/entries/unit.mjs b/tests/entries/unit.mjs index 62564f30d054..27a9ae0f39f9 100644 --- a/tests/entries/unit.mjs +++ b/tests/entries/unit.mjs @@ -924,6 +924,7 @@ for (PATH of ['core-js-pure', 'core-js']) { load('proposals/efficient-64-bit-arithmetic'); load('proposals/error-cause'); load('proposals/explicit-resource-management'); + load('proposals/extractors'); load('proposals/float16'); load('proposals/function-demethodize'); load('proposals/function-is-callable-is-constructor');