parsanol 0.10.1 → 0.10.3

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/dist/runtime.js CHANGED
@@ -46,6 +46,15 @@ export class PargRuntime {
46
46
  constructor(artifactJson, entry) {
47
47
  const parsed = JSON.parse(artifactJson);
48
48
  this.envelope = parsed;
49
+ // Dynamic artifacts (parsanol-ruby#129 runtime state / custom atoms)
50
+ // carry Ruby closures; their grammars deserialize portably but parse
51
+ // only on a Ruby runtime. Fail here, at the boundary, with the
52
+ // routing answer instead of a wasm deserialization error deep in the
53
+ // atom tree.
54
+ if (parsed["dynamic"] === true) {
55
+ throw new Error("this artifact uses PARG runtime state or custom atoms and parses " +
56
+ "only on a Ruby runtime (parsanol-ruby#129)");
57
+ }
49
58
  this.artifact = new (wasm().PargArtifactJs)(artifactJson);
50
59
  this.schema = JSON.parse(this.artifact.schema());
51
60
  this.renderSpec =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parsanol",
3
- "version": "0.10.1",
3
+ "version": "0.10.3",
4
4
  "description": "PARG artifact runtime for TypeScript \u2014 checksum-verified artifact load, wasm parse, bindings, schema-driven materialization",
5
5
  "type": "module",
6
6
  "main": "dist/runtime.js",
@@ -1,2 +1,2 @@
1
- 350212cfffbb24044cff85acd61a335bfb0316fc
1
+ 68d8f05b92379bd78365ca29fae05fc58b76f235
2
2
  built with: wasm-pack build --target=nodejs --features wasm (from parsanol-rs/parsanol)