Skip to content

Commit

Permalink
Decorator Metadata proposal returned to usage Symbol.metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Mar 28, 2023
1 parent c9522f7 commit 63ffc6d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- (Async) Explicit Resource Management proposals:
- `(Async)DisposableStack.prototype.move` marks the original stack as disposed, [#1226](https://github.com/zloirock/core-js/issues/1226)
- Some simplifications like [proposal-explicit-resource-management/150](https://github.com/tc39/proposal-explicit-resource-management/pull/150)
- [Decorator Metadata proposal](https://github.com/tc39/proposal-decorator-metadata) returned to usage `Symbol.metadata`, [March 2023 TC39 meeting](https://github.com/babel/proposals/issues/87#issuecomment-1478790137), [proposal-decorator-metadata/12](https://github.com/tc39/proposal-decorator-metadata/pull/12)
- Compat data improvements:
- [`URLSearchParams.prototype.size`](https://github.com/whatwg/url/pull/734) marked as supported from FF112, NodeJS 19.8 and Deno 1.32
- Added Safari 16.4 compat data
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
- [`String.dedent`](#stringdedent)
- [Async explicit resource management](#async-explicit-resource-management)
- [`Symbol` predicates](#symbol-predicates)
- [`Symbol.metadataKey` for decorators metadata proposal](#symbolmetadatakey-for-decorators-metadata-proposal)
- [`Symbol.metadata` for decorators metadata proposal](#symbolmetadata-for-decorators-metadata-proposal)
- [Stage 1 proposals](#stage-1-proposals)
- [`Observable`](#observable)
- [New collections methods](#new-collections-methods)
Expand Down Expand Up @@ -2616,17 +2616,17 @@ Symbol.isRegistered(Symbol('key')); // => false
Symbol.isWellKnown(Symbol.iterator); // => true
Symbol.isWellKnown(Symbol('key')); // => false
```
##### [`Symbol.metadataKey` for decorators metadata proposal](https://github.com/tc39/proposal-decorator-metadata)[⬆](#index)
Module [`esnext.symbol.metadata-key`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.symbol.metadata-key.js).
##### [`Symbol.metadata` for decorators metadata proposal](https://github.com/tc39/proposal-decorator-metadata)[⬆](#index)
Module [`esnext.symbol.metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.symbol.metadata.js).
```js
class Symbol {
static metadataKey: @@metadataKey;
static metadata: @@metadata;
}
```
[*CommonJS entry points:*](#commonjs-api)
```js
core-js/proposals/decorator-metadata
core-js(-pure)/full/symbol/metadata-key
core-js/proposals/decorator-metadata-v2
core-js(-pure)/full/symbol/metadata
```

#### Stage 1 proposals[⬆](#index)
Expand Down
2 changes: 2 additions & 0 deletions packages/core-js/proposals/decorator-metadata-v2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// https://github.com/tc39/proposal-decorator-metadata
require('../modules/esnext.symbol.metadata');
1 change: 1 addition & 0 deletions packages/core-js/proposals/decorator-metadata.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// TODO: Remove from `core-js@4`
// https://github.com/tc39/proposal-decorator-metadata
require('../modules/esnext.symbol.metadata-key');
3 changes: 2 additions & 1 deletion packages/core-js/stage/2.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ var parent = require('./3');
require('../proposals/array-is-template-object');
require('../proposals/async-explicit-resource-management');
require('../proposals/async-iterator-helpers');
require('../proposals/decorator-metadata');
require('../proposals/decorator-metadata-v2');
require('../proposals/iterator-range');
require('../proposals/map-upsert-stage-2');
require('../proposals/string-dedent');
require('../proposals/symbol-predicates');
// TODO: Obsolete versions, remove from `core-js@4`
require('../proposals/array-grouping');
require('../proposals/decorators');
require('../proposals/decorator-metadata');
require('../proposals/iterator-helpers');
require('../proposals/set-methods');
require('../proposals/using-statement');
Expand Down

0 comments on commit 63ffc6d

Please sign in to comment.