eslint-module-utils
Advanced tools
+6
-0
@@ -8,2 +8,7 @@ # Change Log | ||
| ## v2.7.3 - 2022-01-26 | ||
| ### Fixed | ||
| - [Fix] `parse`: restore compatibility by making the return value `ast` again ([#2350], thanks [@ljharb]) | ||
| ## v2.7.2 - 2022-01-01 | ||
@@ -114,2 +119,3 @@ | ||
| [#2350]: https://github.com/import-js/eslint-plugin-import/issues/2350 | ||
| [#2343]: https://github.com/import-js/eslint-plugin-import/pull/2343 | ||
@@ -116,0 +122,0 @@ [#2261]: https://github.com/import-js/eslint-plugin-import/pull/2261 |
+1
-1
| { | ||
| "name": "eslint-module-utils", | ||
| "version": "2.7.2", | ||
| "version": "2.7.3", | ||
| "description": "Core utilities to support eslint-plugin-import and other module-related plugins.", | ||
@@ -5,0 +5,0 @@ "engines": { |
+14
-13
@@ -35,2 +35,12 @@ 'use strict'; | ||
| // this exists to smooth over the unintentional breaking change in v2.7. | ||
| // TODO, semver-major: avoid mutating `ast` and return a plain object instead. | ||
| function makeParseReturn(ast, visitorKeys) { | ||
| if (ast) { | ||
| ast.visitorKeys = visitorKeys; | ||
| ast.ast = ast; | ||
| } | ||
| return ast; | ||
| } | ||
| exports.default = function parse(path, content, context) { | ||
@@ -77,6 +87,3 @@ | ||
| ast = parserRaw.ast; | ||
| return { | ||
| ast, | ||
| visitorKeys: keysFromParser(parserPath, parser, parserRaw), | ||
| }; | ||
| return makeParseReturn(ast, keysFromParser(parserPath, parser, parserRaw)); | ||
| } catch (e) { | ||
@@ -94,14 +101,8 @@ console.warn(); | ||
| } else { | ||
| return { | ||
| ast, | ||
| visitorKeys: keysFromParser(parserPath, parser, undefined), | ||
| }; | ||
| return makeParseReturn(ast, keysFromParser(parserPath, parser, undefined)); | ||
| } | ||
| } | ||
| const keys = keysFromParser(parserPath, parser, undefined); | ||
| return { | ||
| ast: parser.parse(content, parserOptions), | ||
| visitorKeys: keys, | ||
| }; | ||
| const ast = parser.parse(content, parserOptions); | ||
| return makeParseReturn(ast, keysFromParser(parserPath, parser, undefined)); | ||
| }; | ||
@@ -108,0 +109,0 @@ |
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
32144
1.59%