pyret-npm 0.0.42 → 0.0.43

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.
Files changed (2) hide show
  1. package/package.json +5 -2
  2. package/pyret.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyret-npm",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "description": "The CLI for the Pyret programming language",
5
5
  "files": [
6
6
  "pyret.js",
@@ -30,5 +30,8 @@
30
30
  "bugs": {
31
31
  "url": "https://github.com/brownplt/pyret-npm/issues"
32
32
  },
33
- "homepage": "https://github.com/brownplt/pyret-npm#readme"
33
+ "homepage": "https://github.com/brownplt/pyret-npm#readme",
34
+ "devDependencies": {
35
+ "jest": "^30.0.0"
36
+ }
34
37
  }
package/pyret.js CHANGED
@@ -4,6 +4,7 @@ const usage = require('command-line-usage');
4
4
  const commandLineArgs = require('command-line-args');
5
5
  const pyretClient = require('./client-lib');
6
6
  const path = require('path');
7
+ const fs = require('fs');
7
8
  const stripAnsi = require('strip-ansi');
8
9
  const {version} = require("./package.json");
9
10
 
@@ -274,7 +275,8 @@ if(!options["pyret-options"]["outfile"] && options["pyret-options"]["program"])
274
275
  const programName = options["pyret-options"]["program"];
275
276
  const parleyName = options["_all"]["local-parley"];
276
277
  if(path.extname(programName) === ".arr") {
277
- options["pyret-options"]["outfile"] = path.join(parleyName, programName.slice(0, -4) + ".jarr");
278
+ const outPath = path.join(parleyName, path.basename(programName).slice(0, -4) + ".jarr");
279
+ options["pyret-options"]["outfile"] = outPath;
278
280
  }
279
281
  }
280
282