parsanol 1.5.21 → 1.5.23
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/README.md +5 -4
- package/dist/runtime-core.d.ts +7 -0
- package/dist/runtime-core.js +15 -0
- package/package.json +1 -1
- package/vendor/parsanol-wasm/BUILT_FROM.json +5 -5
- package/vendor/parsanol-wasm/parsanol_bg.wasm +0 -0
- package/vendor/parsanol-web/BUILT_FROM.json +5 -5
- package/vendor/parsanol-web/parsanol_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -128,10 +128,11 @@ accepts only integer budgets in `1..8192`. Existing methods retain their default
|
|
|
128
128
|
budget; rule-reference and shape limits are independent. Both Node and browser
|
|
129
129
|
entries expose this method. The budget is the enforcement ceiling, not a depth
|
|
130
130
|
guarantee: recursion past the host stack surfaces as a host `RangeError` before
|
|
131
|
-
the budget is reached
|
|
132
|
-
depth
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
the budget is reached. Engine 1.5.22's frame diet roughly doubled the
|
|
132
|
+
achievable depth on the shipped wasm (depth 400 recurses in the standard
|
|
133
|
+
harness); the bound remains engine- and host-specific. A stack-exhausted call
|
|
134
|
+
can leave the artifact's ownership guard stuck — it still parses, but `free()`
|
|
135
|
+
may throw; drop the whole runtime in that case instead.
|
|
135
136
|
|
|
136
137
|
Binding shape JSON has a separate 512-container budget. `applyBindings` and
|
|
137
138
|
`applyBindingsArtifact` throw `ShapeDepthLimitExceeded` (`category: "shape_depth_limit"`,
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export declare class PargRuntimeCore {
|
|
|
58
58
|
readonly renderSpec: Record<string, RenderSegment[]>;
|
|
59
59
|
readonly entry: string;
|
|
60
60
|
readonly defaultEntry: string | null;
|
|
61
|
+
private disposed;
|
|
61
62
|
/** parsanol-ts#5 provenance: SHA-256 of the .parg source text and the
|
|
62
63
|
* compiler version. Null for artifacts compiled before these fields
|
|
63
64
|
* existed (unverifiable, not stale). */
|
|
@@ -90,6 +91,12 @@ export declare class PargRuntimeCore {
|
|
|
90
91
|
private rebind;
|
|
91
92
|
/** Parse with the native wasm engine; returns the parsanol-shape tree. */
|
|
92
93
|
parseShape(input: string): unknown;
|
|
94
|
+
/** Release the native artifact, tolerating a stranded ownership guard.
|
|
95
|
+
* A host-stack-exhausted parse can leave the wasm-bindgen borrow flag
|
|
96
|
+
* set (the trap skips the Rust drop), after which the generated
|
|
97
|
+
* `free()` throws; the runtime is still disposable — the wasm object
|
|
98
|
+
* is left to the host GC. Safe to call twice. */
|
|
99
|
+
dispose(): void;
|
|
93
100
|
/** Explicit historical memo/causal-diagnostic policy; old APIs remain strict.
|
|
94
101
|
* This is a parse result, not a best-effort recovery capture envelope. */
|
|
95
102
|
parseShapeWithCompatibility(input: string, compatibility: ParsingCompatibility): CompatibilityEnvelope;
|
package/dist/runtime-core.js
CHANGED
|
@@ -70,6 +70,7 @@ export class PargRuntimeCore {
|
|
|
70
70
|
renderSpec;
|
|
71
71
|
entry;
|
|
72
72
|
defaultEntry;
|
|
73
|
+
disposed = false;
|
|
73
74
|
/** parsanol-ts#5 provenance: SHA-256 of the .parg source text and the
|
|
74
75
|
* compiler version. Null for artifacts compiled before these fields
|
|
75
76
|
* existed (unverifiable, not stale). */
|
|
@@ -159,6 +160,20 @@ export class PargRuntimeCore {
|
|
|
159
160
|
return rethrowNative(error);
|
|
160
161
|
}
|
|
161
162
|
}
|
|
163
|
+
/** Release the native artifact, tolerating a stranded ownership guard.
|
|
164
|
+
* A host-stack-exhausted parse can leave the wasm-bindgen borrow flag
|
|
165
|
+
* set (the trap skips the Rust drop), after which the generated
|
|
166
|
+
* `free()` throws; the runtime is still disposable — the wasm object
|
|
167
|
+
* is left to the host GC. Safe to call twice. */
|
|
168
|
+
dispose() {
|
|
169
|
+
if (this.disposed)
|
|
170
|
+
return;
|
|
171
|
+
this.disposed = true;
|
|
172
|
+
try {
|
|
173
|
+
this.artifact.free();
|
|
174
|
+
}
|
|
175
|
+
catch { /* the guard stayed set; GC reclaims */ }
|
|
176
|
+
}
|
|
162
177
|
/** Explicit historical memo/causal-diagnostic policy; old APIs remain strict.
|
|
163
178
|
* This is a parse result, not a best-effort recovery capture envelope. */
|
|
164
179
|
parseShapeWithCompatibility(input, compatibility) {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repository": "https://github.com/parsanol/parsanol-rs",
|
|
3
3
|
"upstream_base": "0985ab5a647a87f347da51529ea4ee47adbf9324",
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"built_source_commit": "
|
|
4
|
+
"source_commit": "8a11e7f64f99cb1671bf445e1454df1116ec12ab",
|
|
5
|
+
"built_source_commit": "8a11e7f64f99cb1671bf445e1454df1116ec12ab",
|
|
6
6
|
"source_tree": "140ed1ded3bbda04174357867fb8cbea94dfec3f",
|
|
7
7
|
"built_source_tree_equal": true,
|
|
8
|
-
"crate_version": "1.5.
|
|
8
|
+
"crate_version": "1.5.22",
|
|
9
9
|
"unreleased_candidate": false,
|
|
10
10
|
"target": "nodejs",
|
|
11
11
|
"profile": "release",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"wasm_vm_atom_calls": 1024
|
|
18
18
|
},
|
|
19
19
|
"lockfile": "scripts/wasm-build/Cargo.lock",
|
|
20
|
-
"lockfile_sha256": "
|
|
20
|
+
"lockfile_sha256": "6a3e85399b95c63b8f0d3c8b367b7e7d79223cbce0488bd0b5c03358e18afed2",
|
|
21
21
|
"files": {
|
|
22
|
-
"parsanol_bg.wasm": "
|
|
22
|
+
"parsanol_bg.wasm": "6c488ccb19648469efef4963e1ecb518a2717b9b969fcc312ae22771a363e074",
|
|
23
23
|
"parsanol.d.ts": "6ab38f3e1b965e02ed5f5c2c325a9c053e01a5ebab81d7edc47bae310d5af7c9",
|
|
24
24
|
"LICENSE": "47f4778bc0bfbeb3614d173dd1ec09ddd8cab994039193e2d3de2edcd7886c7e",
|
|
25
25
|
"parsanol.cjs": "1bad1744a822d3ecfd94f98b54eb04d5af91a019ddc1c357527c4ed906b6f81f",
|
|
Binary file
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@parsanol/wasm",
|
|
3
3
|
"version": "1.5.4",
|
|
4
|
-
"crate_version": "1.5.
|
|
4
|
+
"crate_version": "1.5.22",
|
|
5
5
|
"target": "web",
|
|
6
6
|
"repository": "https://github.com/parsanol/parsanol-rs",
|
|
7
7
|
"tarball": "https://registry.npmjs.org/@parsanol/wasm/-/wasm-1.5.4.tgz",
|
|
8
8
|
"integrity": "sha512-oeYj52TYg6DomXRIP4iyY5Yj3NwdljcMUok/LQlozO4OlMqyYfvrReaihf2ox9oqqk5aLi0UcQrEYuEfOFRtmw==",
|
|
9
9
|
"tarball_sha256": "6f9ea6f9277776f9ac96e7423df54693aa5dcce8cf1c7abef85b39fa724b3b3c",
|
|
10
10
|
"files": {
|
|
11
|
-
"parsanol_bg.wasm": "
|
|
11
|
+
"parsanol_bg.wasm": "6c488ccb19648469efef4963e1ecb518a2717b9b969fcc312ae22771a363e074",
|
|
12
12
|
"parsanol.d.ts": "aa08501d788aa5518867791a798b60a209d3d9c86989f73a9d7384084415206d",
|
|
13
13
|
"LICENSE": "47f4778bc0bfbeb3614d173dd1ec09ddd8cab994039193e2d3de2edcd7886c7e",
|
|
14
14
|
"parsanol.js": "7c500cc0b826a6d4d1658c244633de772cd74d6dea5a49ae3fc5f0b618a97a03",
|
|
15
15
|
"parsanol_bg.wasm.d.ts": "ef01436ac5df8b968090772ddc88b1f434084b7c7efb712794323d886a484804",
|
|
16
16
|
"README.md": "577c2d75ac98c331379a50698624b68c773eb4603648108f80f4399fde33d339"
|
|
17
17
|
},
|
|
18
|
-
"source_commit": "
|
|
19
|
-
"lockfile_sha256": "
|
|
20
|
-
"built_source_commit": "
|
|
18
|
+
"source_commit": "8a11e7f64f99cb1671bf445e1454df1116ec12ab",
|
|
19
|
+
"lockfile_sha256": "6a3e85399b95c63b8f0d3c8b367b7e7d79223cbce0488bd0b5c03358e18afed2",
|
|
20
|
+
"built_source_commit": "8a11e7f64f99cb1671bf445e1454df1116ec12ab",
|
|
21
21
|
"built_source_tree_equal": true,
|
|
22
22
|
"upstream_base": "0985ab5a647a87f347da51529ea4ee47adbf9324",
|
|
23
23
|
"unreleased_candidate": false
|
|
Binary file
|