@babel/parser
Advanced tools
| #!/usr/bin/env node | ||
| /* eslint-disable no-var, unicorn/prefer-node-protocol */ | ||
| var parser = require(".."); | ||
| var fs = require("fs"); | ||
| import { parse } from ".."; | ||
| import { readFileSync } from "node:fs"; | ||
| var filename = process.argv[2]; | ||
| const filename = process.argv[2]; | ||
| if (!filename) { | ||
| console.error("no filename specified"); | ||
| } else { | ||
| var file = fs.readFileSync(filename, "utf8"); | ||
| var ast = parser.parse(file); | ||
| const file = readFileSync(filename, "utf8"); | ||
| const ast = parse(file); | ||
| console.log(JSON.stringify(ast, null, " ")); | ||
| } |
+7
-7
| { | ||
| "name": "@babel/parser", | ||
| "version": "8.0.0-rc.2", | ||
| "version": "8.0.0-rc.3", | ||
| "description": "A JavaScript parser", | ||
@@ -37,10 +37,10 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
| "dependencies": { | ||
| "@babel/types": "^8.0.0-rc.2" | ||
| "@babel/types": "^8.0.0-rc.3" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/code-frame": "^8.0.0-rc.2", | ||
| "@babel/helper-check-duplicate-nodes": "^8.0.0-rc.2", | ||
| "@babel/helper-fixtures": "^8.0.0-rc.2", | ||
| "@babel/helper-string-parser": "^8.0.0-rc.2", | ||
| "@babel/helper-validator-identifier": "^8.0.0-rc.2", | ||
| "@babel/code-frame": "^8.0.0-rc.3", | ||
| "@babel/helper-check-duplicate-nodes": "^8.0.0-rc.3", | ||
| "@babel/helper-fixtures": "^8.0.0-rc.3", | ||
| "@babel/helper-string-parser": "^8.0.0-rc.3", | ||
| "@babel/helper-validator-identifier": "^8.0.0-rc.3", | ||
| "charcodes": "^0.2.0" | ||
@@ -47,0 +47,0 @@ }, |
| import { File, Expression } from "@babel/types"; | ||
| // This file is auto-generated! Do not modify it directly. | ||
| // Run `yarn gulp bundle-dts` to re-generate it. | ||
| // Run `make bundle-babel-parser-dts` to re-generate it. | ||
| /* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents */ | ||
@@ -11,3 +11,3 @@ | ||
| index: number; | ||
| constructor(line: number, col: number, index: number); | ||
| constructor(line: number, col: number, index?: number); | ||
| } | ||
@@ -134,2 +134,3 @@ //# sourceMappingURL=module-errors.d.ts.map | ||
| ]; | ||
| DecoratorAbstractMethod: []; | ||
| DecoratorArgumentsOutsideParentheses: []; | ||
@@ -278,2 +279,3 @@ DecoratorsBeforeAfterExport: []; | ||
| ]; | ||
| PipelineUnparenthesized: []; | ||
| AbstractMethodHasImplementation: [{ methodName: string }]; | ||
@@ -556,2 +558,6 @@ AbstractPropertyHasInitializer: [{ propertyName: string }]; | ||
| /** | ||
| * Adds a locations property to each node: [node.loc] | ||
| */ | ||
| locations?: boolean | "packed"; | ||
| /** | ||
| * Adds all parsed tokens to a tokens property on the File node. | ||
@@ -558,0 +564,0 @@ */ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
1963563
-0.34%15772
-5.22%18
20%Updated