Compare commits

...

3 Commits

Author SHA1 Message Date
Nicolò Ribaudo
e315d65a7a v7.7.3 2019-11-08 23:45:00 +03:00
Nicolò Ribaudo
0287c0f02f Don't recover from "adjacent jsx elements" parser error (#10682) 2019-11-08 23:23:04 +03:00
Babel Bot
c2bace4b73 Add v7.7.2 to CHANGELOG.md [skip ci] 2019-11-06 23:28:38 +00:00
8 changed files with 19 additions and 202 deletions

View File

@@ -17,6 +17,15 @@ See [Babylon's CHANGELOG](packages/babylon/CHANGELOG.md) for the Babylon pre-7.0
<!-- DO NOT CHANGE THESE COMMENTS - See .github/actions/trigger-github-release/update-changelog.js -->
<!-- insert-new-changelog-here -->
## v7.7.2 (2019-11-07)
#### :bug: Bug Fix
* `babel-parser`
* [#10669](https://github.com/babel/babel/pull/10669) Parse arrows with params annotations in conditional expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo))
* `babel-plugin-transform-typescript`
* [#10658](https://github.com/babel/babel/pull/10658) fix: remove accessibility of constructor ([@JLHwung](https://github.com/JLHwung))
* `babel-traverse`
* [#10656](https://github.com/babel/babel/pull/10656) fix: add inList setter for compatibility with babel-minify ([@JLHwung](https://github.com/JLHwung))
## v7.7.1 (2019-11-05)
#### :bug: Bug Fix

View File

@@ -1,5 +1,5 @@
{
"version": "7.7.2",
"version": "7.7.3",
"changelog": {
"repo": "babel/babel",
"cacheDir": ".changelog",

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/parser",
"version": "7.7.2",
"version": "7.7.3",
"description": "A JavaScript parser",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",

View File

@@ -484,18 +484,12 @@ export default (superClass: Class<Parser>): Class<Parser> =>
node.closingElement = closingElement;
}
node.children = children;
while (this.isRelational("<")) {
// In case we encounter an lt token here it will always be the start of
// jsx as the lt sign is not allowed in places that expect an expression
this.finishToken(tt.jsxTagStart);
this.raise(
if (this.isRelational("<")) {
throw this.raise(
this.state.start,
"Adjacent JSX elements must be wrapped in an enclosing tag. " +
"Did you want a JSX fragment <>...</>?",
);
this.jsxParseElement();
}
return isFragment(openingElement)

View File

@@ -0,0 +1,3 @@
{
"throws": "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (1:22)"
}

View File

@@ -1,189 +0,0 @@
{
"type": "File",
"start": 0,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 37
}
},
"errors": [
"SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (1:22)"
],
"program": {
"type": "Program",
"start": 0,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 37
}
},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start": 0,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 37
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 4,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 36
}
},
"id": {
"type": "Identifier",
"start": 4,
"end": 5,
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 5
},
"identifierName": "x"
},
"name": "x"
},
"init": {
"type": "JSXElement",
"start": 8,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 36
}
},
"openingElement": {
"type": "JSXOpeningElement",
"start": 8,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 13
}
},
"name": {
"type": "JSXIdentifier",
"start": 9,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 12
}
},
"name": "div"
},
"attributes": [],
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start": 16,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 22
}
},
"name": {
"type": "JSXIdentifier",
"start": 18,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 21
}
},
"name": "div"
}
},
"children": [
{
"type": "JSXText",
"start": 13,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 13
},
"end": {
"line": 1,
"column": 16
}
},
"extra": {
"rawValue": "one",
"raw": "one"
},
"value": "one"
}
]
}
}
],
"kind": "var"
}
],
"directives": []
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/preset-env-standalone",
"version": "7.7.2",
"version": "7.7.3",
"description": "Standalone build of babel-prest-env for use in non-Node.js environments.",
"main": "babel-preset-env.js",
"files": [
@@ -17,7 +17,7 @@
"@babel/plugin-transform-named-capturing-groups-regex": "^7.7.0",
"@babel/plugin-transform-new-target": "^7.4.4",
"@babel/preset-env": "^7.7.1",
"@babel/standalone": "^7.7.2"
"@babel/standalone": "^7.7.3"
},
"keywords": [
"babel",

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/standalone",
"version": "7.7.2",
"version": "7.7.3",
"description": "Standalone build of Babel for use in non-Node.js environments.",
"main": "babel.js",
"files": [