eyeling 1.5.18 → 1.5.19

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 CHANGED
@@ -100,7 +100,7 @@ npm run test:packlist
100
100
  ```
101
101
 
102
102
  - `test:api` runs an independent JS API test suite (does not rely on `examples/`).
103
- - `test:examples` runs the examples in `examples` directory and compares against the golden outputs in `examples/output`.
103
+ - `test:examples` runs the examples in the `examples` directory and compares against the golden outputs in `examples/output`.
104
104
  - `test:package` does a “real consumer” smoke test: `npm pack` → install tarball into a temp project → run API + CLI + examples.
105
105
  - `test:packlist` sanity-checks what will be published in the npm tarball (and the CLI shebang/bin wiring).
106
106
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyeling",
3
- "version": "1.5.18",
3
+ "version": "1.5.19",
4
4
  "description": "A minimal Notation3 (N3) reasoner in JavaScript.",
5
5
  "main": "./index.js",
6
6
  "keywords": [
@@ -164,20 +164,18 @@ function main() {
164
164
  }
165
165
 
166
166
  // Run eyeling on this file (cwd examplesDir so relative behavior matches old script)
167
- const r = run(nodePath, [eyelingJsPath, file], { cwd: examplesDir });
168
- const rc = (r.status == null) ? 1 : r.status;
167
+ const outFd = fs.openSync(generatedPath, 'w');
169
168
 
170
- // Write stdout to file (expectedPath in git mode; tmp in npm mode)
171
- try {
172
- fs.writeFileSync(generatedPath, r.stdout || '', 'utf8');
173
- } catch (e) {
174
- const ms = Date.now() - start;
175
- fail(`${idx} ${file} (${ms} ms)`);
176
- fail(`Cannot write output: ${e.message}`);
177
- failed++;
178
- if (tmpDir) rmrf(tmpDir);
179
- continue;
180
- }
169
+ const r = cp.spawnSync(nodePath, [eyelingJsPath, file], {
170
+ cwd: examplesDir,
171
+ stdio: ['ignore', outFd, 'pipe'], // stdout -> file, stderr captured
172
+ maxBuffer: 200 * 1024 * 1024,
173
+ encoding: 'utf8'
174
+ });
175
+
176
+ fs.closeSync(outFd);
177
+
178
+ const rc = (r.status == null) ? 1 : r.status;
181
179
 
182
180
  const ms = Date.now() - start;
183
181