Skip to content

Commit

Permalink
drop Metadata Reflection API
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Nov 1, 2023
1 parent 3713f24 commit f84006d
Show file tree
Hide file tree
Showing 45 changed files with 1 addition and 937 deletions.
44 changes: 0 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
- [Stage 0 proposals](#stage-0-proposals)
- [`Function.prototype.demethodize`](#functionprototypedemethodize)
- [`Function.{ isCallable, isConstructor }`](#function-iscallable-isconstructor-)
- [Pre-stage 0 proposals](#pre-stage-0-proposals)
- [`Reflect` metadata](#reflect-metadata)
- [Web standards](#web-standards)
- [`self`](#self)
- [`structuredClone`](#structuredclone)
Expand Down Expand Up @@ -3055,48 +3053,6 @@ Function.isConstructor(() => {}); // => false
Function.isConstructor(class {}); // => true
```

#### Pre-stage 0 proposals[⬆](#index)
[*CommonJS entry points:*](#commonjs-api)
```js
core-js(-pure)/stage/pre
```
##### [`Reflect` metadata](https://github.com/rbuckton/reflect-metadata)[⬆](#index)
Modules [`esnext.reflect.define-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.define-metadata.js), [`esnext.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.delete-metadata.js), [`esnext.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.get-metadata.js), [`esnext.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.get-metadata-keys.js), [`esnext.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.get-own-metadata.js), [`esnext.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.get-own-metadata-keys.js), [`esnext.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.has-metadata.js), [`esnext.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.has-own-metadata.js) and [`esnext.reflect.metadata`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.reflect.metadata.js).
```js
namespace Reflect {
defineMetadata(metadataKey: any, metadataValue: any, target: Object, propertyKey?: PropertyKey): void;
getMetadata(metadataKey: any, target: Object, propertyKey?: PropertyKey): any;
getOwnMetadata(metadataKey: any, target: Object, propertyKey?: PropertyKey): any;
hasMetadata(metadataKey: any, target: Object, propertyKey?: PropertyKey): boolean;
hasOwnMetadata(metadataKey: any, target: Object, propertyKey?: PropertyKey): boolean;
deleteMetadata(metadataKey: any, target: Object, propertyKey?: PropertyKey): boolean;
getMetadataKeys(target: Object, propertyKey?: PropertyKey): Array<mixed>;
getOwnMetadataKeys(target: Object, propertyKey?: PropertyKey): Array<mixed>;
metadata(metadataKey: any, metadataValue: any): decorator(target: Object, targetKey?: PropertyKey) => void;
}
```
[*CommonJS entry points:*](#commonjs-api)
```js
core-js/proposals/reflect-metadata
core-js(-pure)/full/reflect/define-metadata
core-js(-pure)/full/reflect/delete-metadata
core-js(-pure)/full/reflect/get-metadata
core-js(-pure)/full/reflect/get-metadata-keys
core-js(-pure)/full/reflect/get-own-metadata
core-js(-pure)/full/reflect/get-own-metadata-keys
core-js(-pure)/full/reflect/has-metadata
core-js(-pure)/full/reflect/has-own-metadata
core-js(-pure)/full/reflect/metadata
```
[*Examples*](https://goo.gl/KCo3PS):
```js
let object = {};
Reflect.defineMetadata('foo', 'bar', object);
Reflect.ownKeys(object); // => []
Reflect.getOwnMetadataKeys(object); // => ['foo']
Reflect.getOwnMetadata('foo', object); // => 'bar'
```

### Web standards[⬆](#index)
#### `self`[⬆](#index)
[Spec](https://html.spec.whatwg.org/multipage/window-object.html#dom-self), module [`web.self`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/web.self.js)
Expand Down
27 changes: 0 additions & 27 deletions packages/core-js-compat/src/data.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1974,33 +1974,6 @@ export const data = {
bun: '0.7.1',
chrome: '119',
},
// TODO: Remove from `core-js@4`
'esnext.reflect.define-metadata': {
},
// TODO: Remove from `core-js@4`
'esnext.reflect.delete-metadata': {
},
// TODO: Remove from `core-js@4`
'esnext.reflect.get-metadata': {
},
// TODO: Remove from `core-js@4`
'esnext.reflect.get-metadata-keys': {
},
// TODO: Remove from `core-js@4`
'esnext.reflect.get-own-metadata': {
},
// TODO: Remove from `core-js@4`
'esnext.reflect.get-own-metadata-keys': {
},
// TODO: Remove from `core-js@4`
'esnext.reflect.has-metadata': {
},
// TODO: Remove from `core-js@4`
'esnext.reflect.has-own-metadata': {
},
// TODO: Remove from `core-js@4`
'esnext.reflect.metadata': {
},
'esnext.regexp.escape': {
},
'esnext.set.add-all': {
Expand Down
7 changes: 0 additions & 7 deletions packages/core-js/full/reflect/define-metadata.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/core-js/full/reflect/delete-metadata.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/core-js/full/reflect/get-metadata-keys.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/core-js/full/reflect/get-metadata.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/core-js/full/reflect/get-own-metadata-keys.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/core-js/full/reflect/get-own-metadata.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/core-js/full/reflect/has-metadata.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/core-js/full/reflect/has-own-metadata.js

This file was deleted.

11 changes: 0 additions & 11 deletions packages/core-js/full/reflect/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
'use strict';
var parent = require('../../actual/reflect');
require('../../modules/es.map.constructor');
require('../../modules/es.weak-map.constructor');
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');

module.exports = parent;
7 changes: 0 additions & 7 deletions packages/core-js/full/reflect/metadata.js

This file was deleted.

59 changes: 0 additions & 59 deletions packages/core-js/internals/reflect-metadata.js

This file was deleted.

17 changes: 0 additions & 17 deletions packages/core-js/modules/esnext.reflect.define-metadata.js

This file was deleted.

22 changes: 0 additions & 22 deletions packages/core-js/modules/esnext.reflect.delete-metadata.js

This file was deleted.

30 changes: 0 additions & 30 deletions packages/core-js/modules/esnext.reflect.get-metadata-keys.js

This file was deleted.

26 changes: 0 additions & 26 deletions packages/core-js/modules/esnext.reflect.get-metadata.js

This file was deleted.

17 changes: 0 additions & 17 deletions packages/core-js/modules/esnext.reflect.get-own-metadata-keys.js

This file was deleted.

17 changes: 0 additions & 17 deletions packages/core-js/modules/esnext.reflect.get-own-metadata.js

This file was deleted.

Loading

0 comments on commit f84006d

Please sign in to comment.