This commit is contained in:
David Kale
2020-09-08 13:25:36 -04:00
parent e4246d2b5b
commit 91fcbb0108
4227 changed files with 416837 additions and 457884 deletions

View File

@@ -2,18 +2,18 @@
> **Tags:**
> - :boom: [Breaking Change]
> - :eyeglasses: [Spec Compliancy]
> - :eyeglasses: [Spec Compliance]
> - :rocket: [New Feature]
> - :bug: [Bug Fix]
> - :memo: [Documentation]
> - :house: [Internal]
> - :nail_care: [Polish]
> Semver Policy: https://github.com/babel/babel/tree/master/packages/babel-parser#semver
> Semver Policy: https://github.com/babel/babel/tree/main/packages/babel-parser#semver
_Note: Gaps between patch versions are faulty, broken or test releases._
See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog.
See the [Babel Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) for the pre-6.8.0 version Changelog.
## 6.17.1 (2017-05-10)
@@ -56,7 +56,7 @@ See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.m
## 7.0.0-beta.7 (2017-03-22)
### Spec Compliancy
### Spec Compliance
* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu)
### Bug Fix
@@ -200,7 +200,7 @@ declare module "C" {
}
```
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons)
@@ -305,7 +305,7 @@ AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon
## 6.15.0 (2017-01-10)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison)
@@ -411,7 +411,7 @@ Will include all parser plugins instead of specifying each one individually. Use
## 6.14.0 (2016-11-16)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo)
@@ -491,7 +491,7 @@ With that test case, there was a ~95ms savings by removing the need for node to
## v6.13.0 (2016-10-21)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman)
@@ -549,7 +549,7 @@ Fixes two tests that are failing after the merge of #172 ([#177](https://github.
## v6.12.0 (2016-10-14)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler)
@@ -643,7 +643,7 @@ export const { foo: [ ,, qux7 ] } = bar;
## v6.11.5 (2016-10-12)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo)
@@ -689,7 +689,7 @@ Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu)
## v6.11.3 (2016-10-01)
### :eyeglasses: Spec Compliancy
### :eyeglasses: Spec Compliance
Add static errors for object rest (#149) ([@danez](https://github.com/danez))
@@ -782,7 +782,7 @@ export toString from './toString';
## 6.11.0 (2016-09-22)
### Spec Compliancy (will break CI)
### Spec Compliance (will break CI)
- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo
@@ -862,9 +862,9 @@ for (+i in {});
## 6.10.0 (2016-09-19)
> We plan to include some spec compliancy bugs in patch versions. An example was the multiple default exports issue.
> We plan to include some spec compliance bugs in patch versions. An example was the multiple default exports issue.
### Spec Compliancy
### Spec Compliance
* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu)
@@ -1023,7 +1023,7 @@ declare module "foo" {
- The existential type `*` is not a valid type parameter.
- The existential type `*` is a primary type
### Spec Compliancy
### Spec Compliance
- The param list for type parameter declarations now consists of `TypeParameter` nodes
- New `TypeParameter` AST Node (replaces using the `Identifier` node before)

View File

@@ -7,10 +7,9 @@ var fs = require("fs");
var filename = process.argv[2];
if (!filename) {
console.error("no filename specified");
process.exit(0);
} else {
var file = fs.readFileSync(filename, "utf8");
var ast = parser.parse(file);
console.log(JSON.stringify(ast, null, " "));
}
var file = fs.readFileSync(filename, "utf8");
var ast = parser.parse(file);
console.log(JSON.stringify(ast, null, " "));

5605
node_modules/@babel/parser/lib/index.js generated vendored

File diff suppressed because it is too large Load Diff

1
node_modules/@babel/parser/lib/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,27 +1,20 @@
{
"_args": [
[
"@babel/parser@7.5.5",
"/Users/pjquirk/Source/GitHub/actions/labeler"
]
],
"_development": true,
"_from": "@babel/parser@7.5.5",
"_id": "@babel/parser@7.5.5",
"_from": "@babel/parser@^7.11.5",
"_id": "@babel/parser@7.11.5",
"_inBundle": false,
"_integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==",
"_integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==",
"_location": "/@babel/parser",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "@babel/parser@7.5.5",
"raw": "@babel/parser@^7.11.5",
"name": "@babel/parser",
"escapedName": "@babel%2fparser",
"scope": "@babel",
"rawSpec": "7.5.5",
"rawSpec": "^7.11.5",
"saveSpec": null,
"fetchSpec": "7.5.5"
"fetchSpec": "^7.11.5"
},
"_requiredBy": [
"/@babel/core",
@@ -31,9 +24,10 @@
"/@types/babel__template",
"/istanbul-lib-instrument"
],
"_resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz",
"_spec": "7.5.5",
"_where": "/Users/pjquirk/Source/GitHub/actions/labeler",
"_resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz",
"_shasum": "c7ff6303df71080ec7a4f5b8c003c58f1cf51037",
"_spec": "@babel/parser@^7.11.5",
"_where": "/Users/dakale/dev/GitHub/actions/labeler/node_modules/@babel/core",
"author": {
"name": "Sebastian McKenzie",
"email": "sebmck@gmail.com"
@@ -41,12 +35,17 @@
"bin": {
"parser": "./bin/babel-parser.js"
},
"bugs": {
"url": "https://github.com/babel/babel/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "A JavaScript parser",
"devDependencies": {
"@babel/code-frame": "^7.5.5",
"@babel/helper-fixtures": "^7.5.5",
"charcodes": "^0.2.0",
"unicode-12.0.0": "^0.7.9"
"@babel/code-frame": "^7.10.4",
"@babel/helper-fixtures": "^7.10.5",
"@babel/helper-validator-identifier": "^7.10.4",
"charcodes": "^0.2.0"
},
"engines": {
"node": ">=6.0.0"
@@ -56,7 +55,7 @@
"lib",
"typings"
],
"gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43",
"gitHead": "af64ccb2b00bc7574943674996c2f0507cdbfb6f",
"homepage": "https://babeljs.io/",
"keywords": [
"babel",
@@ -70,12 +69,13 @@
"main": "lib/index.js",
"name": "@babel/parser",
"publishConfig": {
"tag": "next"
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-parser"
"url": "git+https://github.com/babel/babel.git",
"directory": "packages/babel-parser"
},
"types": "typings/babel-parser.d.ts",
"version": "7.5.5"
"version": "7.11.5"
}

View File

@@ -1,5 +1,5 @@
// Type definitions for @babel/parser
// Project: https://github.com/babel/babel/tree/master/packages/babel-parser
// Project: https://github.com/babel/babel/tree/main/packages/babel-parser
// Definitions by: Troy Gerwien <https://github.com/yortus>
// Marvin Hagemeister <https://github.com/marvinhagemeister>
// Avi Vahl <https://github.com/AviVahl>
@@ -36,6 +36,12 @@ export interface ParserOptions {
allowSuperOutsideMethod?: boolean;
/**
* By default, exported identifiers must refer to a declared variable.
* Set this to true to allow export statements to reference undeclared variables.
*/
allowUndeclaredExports?: boolean;
/**
* Indicate the mode the code should be parsed in.
* Can be one of "script", "module", or "unambiguous". Defaults to "script".
@@ -89,32 +95,40 @@ export interface ParserOptions {
}
export type ParserPlugin =
'estree' |
'jsx' |
'flow' |
'flowComments' |
'typescript' |
'doExpressions' |
'objectRestSpread' |
'asyncGenerators' |
'bigInt' |
'classPrivateMethods' |
'classPrivateProperties' |
'classProperties' |
'decimal' |
'decorators' |
'decorators-legacy' |
'classProperties' |
'classPrivateProperties' |
'classPrivateMethods' |
'doExpressions' |
'dynamicImport' |
'estree' |
'exportDefaultFrom' |
'exportNamespaceFrom' |
'asyncGenerators' |
'exportNamespaceFrom' | // deprecated
'flow' |
'flowComments' |
'functionBind' |
'functionSent' |
'dynamicImport' |
'numericSeparator' |
'optionalChaining' |
'importMeta' |
'bigInt' |
'optionalCatchBinding' |
'throwExpressions' |
'pipelineOperator' |
'jsx' |
'logicalAssignment' |
'moduleAttributes' |
'nullishCoalescingOperator' |
'numericSeparator' |
'objectRestSpread' |
'optionalCatchBinding' |
'optionalChaining' |
'partialApplication' |
'pipelineOperator' |
'placeholders' |
'privateIn' |
'throwExpressions' |
'topLevelAwait' |
'typescript' |
'v8intrinsic' |
ParserPluginWithOptions;
export type ParserPluginWithOptions =