@speclynx/apidom-datamodel 2.13.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +6 -6
- package/dist/apidom-datamodel.browser.js +257 -127
- package/dist/apidom-datamodel.browser.min.js +1 -1
- package/package.json +3 -3
- package/src/Metadata.cjs +91 -0
- package/src/Metadata.mjs +87 -0
- package/src/clone/index.cjs +3 -3
- package/src/clone/index.mjs +3 -3
- package/src/index.cjs +3 -1
- package/src/index.mjs +2 -1
- package/src/primitives/CollectionElement.cjs +1 -1
- package/src/primitives/CollectionElement.mjs +1 -1
- package/src/primitives/Element.cjs +30 -43
- package/src/primitives/Element.mjs +31 -44
- package/src/registration.cjs +6 -2
- package/src/registration.mjs +6 -2
- package/src/serialisers/JSONSerialiser.cjs +37 -3
- package/src/serialisers/JSONSerialiser.mjs +37 -3
- package/types/apidom-datamodel.d.ts +60 -22
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.0.0](https://github.com/speclynx/apidom/compare/v2.13.1...v3.0.0) (2026-03-05)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- introduce new memory efficient meta data management ([#129](https://github.com/speclynx/apidom/issues/129)) ([82ae0d7](https://github.com/speclynx/apidom/commit/82ae0d7cc2e9ee7037c3d9681817add2ca18dc92))
|
|
11
|
+
|
|
12
|
+
### BREAKING CHANGES
|
|
13
|
+
|
|
14
|
+
- meta data use to be elements before, now they are simple primitives
|
|
15
|
+
|
|
6
16
|
## [2.13.1](https://github.com/speclynx/apidom/compare/v2.13.0...v2.13.1) (2026-02-28)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @speclynx/apidom-datamodel
|
package/README.md
CHANGED
|
@@ -41,8 +41,8 @@ element.attributes.set('attr', 'value');
|
|
|
41
41
|
|
|
42
42
|
Additionally, convenience attributes are exposed on every element as shortcuts for common meta properties:
|
|
43
43
|
|
|
44
|
-
- `id` (
|
|
45
|
-
- `classes` (
|
|
44
|
+
- `id` (string) - Shortcut for `.meta.get('id')`
|
|
45
|
+
- `classes` (string[]) - Shortcut for `.meta.get('classes')`
|
|
46
46
|
- `links` (ArrayElement) - Shortcut for `.meta.get('links')`
|
|
47
47
|
|
|
48
48
|
```js
|
|
@@ -52,8 +52,8 @@ const element = new StringElement('hello');
|
|
|
52
52
|
element.id = 'greeting';
|
|
53
53
|
element.classes = ['important', 'message'];
|
|
54
54
|
|
|
55
|
-
element.id
|
|
56
|
-
element.classes
|
|
55
|
+
element.id; // => 'greeting'
|
|
56
|
+
element.classes; // => ['important', 'message']
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
### StringElement
|
|
@@ -638,8 +638,8 @@ Functions for creating shallow and deep copies of ApiDOM elements.
|
|
|
638
638
|
### Shallow cloning
|
|
639
639
|
|
|
640
640
|
Creates a shallow clone of an ApiDOM element. The element itself is cloned,
|
|
641
|
-
but content references are shared
|
|
642
|
-
to preserve semantic information
|
|
641
|
+
but content references are shared.
|
|
642
|
+
Meta and attributes are deep cloned to preserve semantic information.
|
|
643
643
|
|
|
644
644
|
```js
|
|
645
645
|
import { ObjectElement, cloneShallow } from '@speclynx/apidom-datamodel';
|