@limaformat/lima 0.3.0 → 0.3.1
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 +9 -0
- package/dist/references2.js +12 -2
- package/package.json +24 -22
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,15 @@ are both frozen regardless of what this file shows.
|
|
|
12
12
|
|
|
13
13
|
## [Unreleased]
|
|
14
14
|
|
|
15
|
+
## [0.3.1] — 2026-08-12
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- References 2.0 document references now resolve correctly when the source
|
|
20
|
+
and target share a top-level mapping, including sibling fields and separate
|
|
21
|
+
nested branches. Genuine self-references and dependency cycles remain
|
|
22
|
+
unresolved.
|
|
23
|
+
|
|
15
24
|
## [0.3.0] — 2026-08-12
|
|
16
25
|
|
|
17
26
|
### Changed
|
package/dist/references2.js
CHANGED
|
@@ -23,8 +23,18 @@ const lookupPath = (root, segments) => {
|
|
|
23
23
|
};
|
|
24
24
|
const documentTarget = (root, path) => {
|
|
25
25
|
const segments = path.split('.');
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
let value = root.get(segments[0]);
|
|
27
|
+
if (value === undefined)
|
|
28
|
+
return undefined;
|
|
29
|
+
let index = 1;
|
|
30
|
+
while (index < segments.length && value.kind === 'mapping') {
|
|
31
|
+
const child = value.entries.get(segments[index]);
|
|
32
|
+
if (child === undefined)
|
|
33
|
+
return undefined;
|
|
34
|
+
value = child;
|
|
35
|
+
index++;
|
|
36
|
+
}
|
|
37
|
+
return { root: value, tail: segments.slice(index) };
|
|
28
38
|
};
|
|
29
39
|
const lookupPartial = (partials, path) => {
|
|
30
40
|
const dot = path.indexOf('.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limaformat/lima",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Lima frontmatter parser — LIMA Is Metadata Annotation",
|
|
5
5
|
"keywords": ["frontmatter", "parser", "yaml", "markdown", "metadata"],
|
|
6
6
|
"homepage": "https://limaformat.dev",
|
|
@@ -20,25 +20,27 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"files": ["dist", "README.md", "LICENSE", "CHANGELOG.md"],
|
|
23
|
-
"engines": {
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsc -p tsconfig.build.json",
|
|
28
|
+
"pretest": "bun run build",
|
|
29
|
+
"test": "bun test",
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"prepublishOnly": "bun run typecheck && bun test",
|
|
32
|
+
"bench": "bun run bench/index.ts",
|
|
33
|
+
"bench:vs-yaml": "bun run bench/vs-yaml.ts",
|
|
34
|
+
"bench:vs-yaml:node": "node bench/vs-yaml-node.mjs",
|
|
35
|
+
"bench:cross-language": "bun run bench/cross-language.ts",
|
|
36
|
+
"bench:differential": "bun run bench/differential.ts",
|
|
37
|
+
"wordcount": "bun run scripts/wordcount.ts"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/bun": "^1.3.14",
|
|
41
|
+
"@types/js-yaml": "^4.0.9",
|
|
42
|
+
"js-yaml": "^5.2.3",
|
|
43
|
+
"typescript": "^7.0.2",
|
|
44
|
+
"typescript-classic": "npm:typescript@^5.9.3"
|
|
45
|
+
}
|
|
44
46
|
}
|