@aurelia/metadata
Advanced tools
Comparing version 2.0.1-dev.202406121156 to 2.0.1-dev.202407071342
@@ -6,2 +6,14 @@ # Change Log | ||
<a name="2.0.0-beta.20"></a> | ||
# 2.0.0-beta.20 (2024-07-07) | ||
### Bug Fixes: | ||
* **metadata:** own metadata (#1992) ([bb1fe26](https://github.com/aurelia/aurelia/commit/bb1fe26)) | ||
### Refactorings: | ||
* **tooling:** bindable inheritance ([bb1fe26](https://github.com/aurelia/aurelia/commit/bb1fe26)) | ||
<a name="2.0.0-beta.19"></a> | ||
@@ -8,0 +20,0 @@ # 2.0.0-beta.19 (2024-06-12) |
{ | ||
"name": "@aurelia/metadata", | ||
"version": "2.0.1-dev.202406121156", | ||
"version": "2.0.1-dev.202407071342", | ||
"main": "dist/cjs/index.cjs", | ||
@@ -5,0 +5,0 @@ "module": "dist/esm/index.mjs", |
@@ -84,3 +84,9 @@ /** | ||
define(value: any, type: any,...keys: string[]): void { | ||
const metadata = type[Symbol.metadata] ??= Object.create(null); | ||
// Define metadata on the type, when absent. | ||
// Note that TS also does exactly that when decorators are used. | ||
// This avoids the problem of children inheriting and overwriting metadata from their parents. | ||
let metadata = Object.getOwnPropertyDescriptor(type, Symbol.metadata)?.value; | ||
if (metadata == null) { | ||
Object.defineProperty(type, Symbol.metadata, { value: metadata = Object.create(null), enumerable: true, configurable: true, writable: true }); | ||
} | ||
const length = keys.length; | ||
@@ -87,0 +93,0 @@ switch (length) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47549
722