@remnic/core 10.0.23 → 10.0.25
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.25",
|
|
4
4
|
"description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -3347,7 +3347,7 @@
|
|
|
3347
3347
|
"core"
|
|
3348
3348
|
],
|
|
3349
3349
|
"peerDependencies": {
|
|
3350
|
-
"@remnic/coding-graph": "^10.0.
|
|
3350
|
+
"@remnic/coding-graph": "^10.0.25"
|
|
3351
3351
|
},
|
|
3352
3352
|
"peerDependenciesMeta": {
|
|
3353
3353
|
"@remnic/coding-graph": {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
|
|
4
|
+
import { decodeYamlScalar } from "./yaml-scalar.js";
|
|
5
|
+
|
|
6
|
+
test("decodeYamlScalar trims unquoted text without coercing scalar-looking strings", () => {
|
|
7
|
+
for (const value of ["connector", "true", "42", "null", "'single quoted'", ""]) {
|
|
8
|
+
assert.equal(decodeYamlScalar(` \t${value}\r\n`), value);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
test("decodeYamlScalar preserves whitespace inside quotes and decodes an empty quoted value", () => {
|
|
13
|
+
assert.equal(decodeYamlScalar(' \t" connector "\r\n'), " connector ");
|
|
14
|
+
assert.equal(decodeYamlScalar('""'), "");
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test("decodeYamlScalar decodes escaped control characters, quotes, backslashes, and Unicode", () => {
|
|
18
|
+
const encoded = String.raw`"line\nnext\r\t\b\f\"quote\"\\path\u263a"`;
|
|
19
|
+
|
|
20
|
+
assert.equal(decodeYamlScalar(encoded), 'line\nnext\r\t\b\f"quote"\\path☺');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test("decodeYamlScalar keeps literal backslash sequences distinct from escaped control characters", () => {
|
|
24
|
+
assert.equal(decodeYamlScalar(String.raw`"literal\\n"`), String.raw`literal\n`);
|
|
25
|
+
assert.equal(decodeYamlScalar(String.raw`"actual\n"`), "actual\n");
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test("decodeYamlScalar preserves malformed quoted content after removing only its outer quotes", () => {
|
|
29
|
+
assert.equal(decodeYamlScalar(String.raw`"connector\q"`), String.raw`connector\q`);
|
|
30
|
+
assert.equal(decodeYamlScalar('"a "quoted" value"'), 'a "quoted" value');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test("decodeYamlScalar leaves unmatched quotes as text", () => {
|
|
34
|
+
for (const value of ['"connector', 'connector"', '"']) {
|
|
35
|
+
assert.equal(decodeYamlScalar(` ${value} `), value);
|
|
36
|
+
}
|
|
37
|
+
});
|