Comparing version 1.6.0 to 1.6.1
@@ -0,1 +1,10 @@ | ||
### Version 1.6.1 (2018-03-12) | ||
- Fixed: The "Babel code frame" now shows up for parse errors again. (Regression | ||
since 1.6.0.) | ||
- Fixed: `random.js` is now created as expected again. (Regression since 1.6.0.) | ||
- Fixed: The examples were upgraded and fixed, and a `cherow` example was added. | ||
(Not part of the npm package.) | ||
### Version 1.6.0 (2017-06-26) | ||
@@ -2,0 +11,0 @@ |
"use strict"; | ||
const createCodeFrame = require("babel-code-frame"); | ||
const babelCodeFrame = require("@babel/code-frame"); | ||
const fs = require("fs"); | ||
@@ -147,7 +147,8 @@ const mkdirp = require("mkdirp"); | ||
} catch (error) { | ||
const message = error && | ||
const message = | ||
error && | ||
error.code === "MODULE_NOT_FOUND" && | ||
error.message.includes(testModule) | ||
? error.message | ||
: `Error when loading module '${testModule}':\n${printError(error)}`; | ||
? error.message | ||
: `Error when loading module '${testModule}':\n${printError(error)}`; | ||
return { stderr: message, code: 1 }; | ||
@@ -175,3 +176,5 @@ } | ||
return { | ||
stderr: `Failed to read '${codePath}' for reproduction:\n${error.message}`, | ||
stderr: `Failed to read '${codePath}' for reproduction:\n${ | ||
error.message | ||
}`, | ||
code: 1 | ||
@@ -187,3 +190,5 @@ }; | ||
return { | ||
stderr: `Failed to read '${dataPath}' for reproduction:\n${error.message}`, | ||
stderr: `Failed to read '${dataPath}' for reproduction:\n${ | ||
error.message | ||
}`, | ||
code: 1 | ||
@@ -274,3 +279,3 @@ }; | ||
function writeFiles(outputDir, options) { | ||
const code = options && options.code === undefined ? options.code : null; | ||
const code = options && options.code !== undefined ? options.code : null; | ||
const result = (options && options.result) || {}; | ||
@@ -332,8 +337,12 @@ const reproduce = (options && options.reproduce) || false; | ||
const errorLocation = getLocation(error); | ||
if (typeof line === "number") { | ||
const codeFrame = createCodeFrame( | ||
if (typeof errorLocation.line === "number") { | ||
const codeFrame = babelCodeFrame.codeFrameColumns( | ||
code, | ||
errorLocation.line, | ||
errorLocation.column, | ||
{ | ||
start: { | ||
line: errorLocation.line, | ||
column: errorLocation.column | ||
} | ||
}, | ||
{ | ||
highlightCode: true | ||
@@ -355,11 +364,13 @@ } | ||
const line = error.loc && typeof error.loc.line === "number" | ||
? error.loc.line | ||
: typeof error.lineNumber === "number" | ||
? error.lineNumber | ||
: typeof error.line === "number" ? error.line : undefined; | ||
const line = | ||
error.loc && typeof error.loc.line === "number" | ||
? error.loc.line | ||
: typeof error.lineNumber === "number" | ||
? error.lineNumber | ||
: typeof error.line === "number" ? error.line : undefined; | ||
const column = error.loc && typeof error.loc.column === "number" | ||
? error.loc.column + 1 | ||
: typeof error.column === "number" ? error.column : undefined; | ||
const column = | ||
error.loc && typeof error.loc.column === "number" | ||
? error.loc.column + 1 | ||
: typeof error.column === "number" ? error.column : undefined; | ||
@@ -366,0 +377,0 @@ return { line, column }; |
@@ -202,5 +202,6 @@ "use strict"; | ||
function generateRandomJS(options) { | ||
const fuzzer = options && options.sourceType === "script" | ||
? shiftFuzzer.fuzzScript | ||
: shiftFuzzer.fuzzModule; | ||
const fuzzer = | ||
options && options.sourceType === "script" | ||
? shiftFuzzer.fuzzScript | ||
: shiftFuzzer.fuzzModule; | ||
@@ -207,0 +208,0 @@ const randomAST = fuzzer( |
{ | ||
"name": "eslump", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"license": "MIT", | ||
@@ -34,3 +34,3 @@ "author": "Simon Lydell", | ||
"dependencies": { | ||
"babel-code-frame": "^6.22.0", | ||
"@babel/code-frame": "^7.0.0-beta.40", | ||
"mkdirp": "^0.5.1", | ||
@@ -40,21 +40,23 @@ "optionator": "^0.8.2", | ||
"random-item": "^1.0.0", | ||
"shift-codegen": "^5.0.4", | ||
"shift-codegen": "^5.0.5", | ||
"shift-fuzzer": "^1.0.2", | ||
"shift-reducer": "^4.0.0" | ||
"shift-reducer": "^4.2.0" | ||
}, | ||
"devDependencies": { | ||
"acorn": "^5.0.3", | ||
"babel-generator": "^6.25.0", | ||
"babylon": "^6.17.4", | ||
"escodegen": "^1.8.1", | ||
"eslint": "^4.1.0", | ||
"eslint-plugin-node": "^5.0.0", | ||
"eslint-plugin-prettier": "^2.1.2", | ||
"espree": "^3.4.3", | ||
"@babel/generator": "^7.0.0-beta.40", | ||
"acorn": "^5.5.3", | ||
"babel-generator": "^6.26.1", | ||
"babylon": "^7.0.0-beta.40", | ||
"cherow": "^1.3.0", | ||
"escodegen": "^1.9.1", | ||
"eslint": "^4.18.2", | ||
"eslint-plugin-node": "^6.0.1", | ||
"eslint-plugin-prettier": "^2.6.0", | ||
"espree": "^3.5.4", | ||
"esprima": "^4.0.0", | ||
"flow-parser": "^0.47.0", | ||
"prettier": "^1.4.4", | ||
"shift-parser": "^5.0.7", | ||
"unexpected": "^10.29.0" | ||
"flow-parser": "^0.67.1", | ||
"prettier": "^1.11.1", | ||
"shift-parser": "^5.2.3", | ||
"unexpected": "^10.37.2" | ||
} | ||
} |
@@ -88,5 +88,6 @@ "use strict"; | ||
const times = options && options.times === undefined ? 1 : options.times; | ||
const choices = options && options.allowNewlines | ||
? insertCommentsChoicesWithNewlines | ||
: insertCommentsChoices; | ||
const choices = | ||
options && options.allowNewlines | ||
? insertCommentsChoicesWithNewlines | ||
: insertCommentsChoices; | ||
@@ -93,0 +94,0 @@ const items = whitespaceString.match(insertCommentsTokens) || []; |
@@ -138,2 +138,3 @@ # eslump | ||
- [Babylon] | ||
- [cherow] | ||
- [espree] | ||
@@ -145,3 +146,3 @@ - [esprima] | ||
- Code generators: | ||
- [babel-generator] | ||
- [@babel/generator] | ||
- [escodegen] | ||
@@ -251,4 +252,5 @@ - [Prettier] | ||
[acorn]: https://github.com/ternjs/acorn | ||
[babel-generator]: https://github.com/babel/babel/tree/master/packages/babel-generator | ||
[Babylon]: https://github.com/babel/babylon | ||
[@babel/generator]: https://github.com/babel/babel/tree/master/packages/babel-generator | ||
[Babylon]: https://github.com/babel/babel/blob/master/packages/babylon | ||
[cherow]: https://github.com/cherow/cherow | ||
[escodegen]: https://github.com/estools/escodegen | ||
@@ -255,0 +257,0 @@ [esfuzz]: https://github.com/estools/esfuzz |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33681
653
263
0
15
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
- Removedbabel-code-frame@^6.22.0
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedbabel-code-frame@6.26.0(transitive)
- Removedchalk@1.1.3(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
Updatedshift-codegen@^5.0.5
Updatedshift-reducer@^4.2.0