pyret-npm 0.0.42 → 0.0.44

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": "pyret-npm",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
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
  }
@@ -211984,7 +211984,7 @@ return {"staticModules":{"builtin://global":({
211984
211984
  // Since this relies on offsetTop, which are rounded up to the nearest integer,
211985
211985
  // it's only good to within +-2px.
211986
211986
  var ua = "", baselineFudge = 0;
211987
- if (window.navigator && window.navigator.userAgent) {
211987
+ if (typeof window !== 'undefined' && window.navigator && window.navigator.userAgent) {
211988
211988
  ua = window.navigator.userAgent;
211989
211989
  }
211990
211990
  if (ua.indexOf("Firefox") !== -1) {
@@ -1415,7 +1415,7 @@
1415
1415
  // Since this relies on offsetTop, which are rounded up to the nearest integer,
1416
1416
  // it's only good to within +-2px.
1417
1417
  var ua = "", baselineFudge = 0;
1418
- if (window.navigator && window.navigator.userAgent) {
1418
+ if (typeof window !== 'undefined' && window.navigator && window.navigator.userAgent) {
1419
1419
  ua = window.navigator.userAgent;
1420
1420
  }
1421
1421
  if (ua.indexOf("Firefox") !== -1) {
@@ -1415,7 +1415,7 @@
1415
1415
  // Since this relies on offsetTop, which are rounded up to the nearest integer,
1416
1416
  // it's only good to within +-2px.
1417
1417
  var ua = "", baselineFudge = 0;
1418
- if (window.navigator && window.navigator.userAgent) {
1418
+ if (typeof window !== 'undefined' && window.navigator && window.navigator.userAgent) {
1419
1419
  ua = window.navigator.userAgent;
1420
1420
  }
1421
1421
  if (ua.indexOf("Firefox") !== -1) {
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