@aurelia/metadata
Advanced tools
Comparing version 2.1.0-dev.202405280947 to 2.1.0-dev.202407271309
@@ -6,2 +6,19 @@ # 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> | ||
# 2.0.0-beta.19 (2024-06-12) | ||
**Note:** Version bump only for package @aurelia/metadata | ||
<a name="2.0.0-beta.18"></a> | ||
@@ -8,0 +25,0 @@ # 2.0.0-beta.18 (2024-05-23) |
{ | ||
"name": "@aurelia/metadata", | ||
"version": "2.1.0-dev.202405280947", | ||
"version": "2.1.0-dev.202407271309", | ||
"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
47558
722