Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6110b0c0b3 | ||
|
|
365e221d95 | ||
|
|
acbc4859c0 | ||
|
|
55750e05e7 | ||
|
|
ba9c4db673 | ||
|
|
ba8a63a69e | ||
|
|
25581981b5 | ||
|
|
02a6feed73 | ||
|
|
f3acedbf08 | ||
|
|
35ab4ffaab |
@@ -13,6 +13,11 @@ _Note: Gaps between patch versions are faulty/broken releases._
|
||||
|
||||
See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
|
||||
|
||||
## 5.5.1
|
||||
|
||||
* **Bug Fix**
|
||||
* Remove `ClassProperty` nodes always in the `Flow` transformer. This is fine now since class properties aren't supported in any engine that supports classes but the `es7.classProperties` transformer will need to be updated in the future to desugar to ES6 classes instead of relying on the `es6.classes` transformer from being ran.
|
||||
|
||||
## 5.5.0
|
||||
|
||||
* **Bug Fix**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel-core",
|
||||
"description": "A compiler for writing next generation JavaScript",
|
||||
"version": "5.5.0",
|
||||
"version": "5.5.1",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "babel",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"version": "5.4.7",
|
||||
"version": "5.5.0",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"repository": "babel/babel",
|
||||
"preferGlobal": true,
|
||||
"dependencies": {
|
||||
"babel-core": "^5.4.7",
|
||||
"babel-core": "^5.5.0",
|
||||
"chokidar": "^1.0.0",
|
||||
"commander": "^2.6.0",
|
||||
"convert-source-map": "^1.1.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel-runtime",
|
||||
"description": "babel selfContained runtime",
|
||||
"version": "5.4.7",
|
||||
"version": "5.5.0",
|
||||
"license": "MIT",
|
||||
"repository": "babel/babel",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
|
||||
@@ -513,7 +513,7 @@ pp.parseNew = function() {
|
||||
pp.parseTemplateElement = function() {
|
||||
let elem = this.startNode()
|
||||
elem.value = {
|
||||
raw: this.input.slice(this.start, this.end),
|
||||
raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'),
|
||||
cooked: this.value
|
||||
}
|
||||
this.next()
|
||||
|
||||
@@ -577,11 +577,15 @@ pp.readTmplToken = function() {
|
||||
} else if (isNewLine(ch)) {
|
||||
out += this.input.slice(chunkStart, this.pos)
|
||||
++this.pos
|
||||
if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
|
||||
++this.pos
|
||||
out += "\n"
|
||||
} else {
|
||||
out += String.fromCharCode(ch)
|
||||
switch (ch) {
|
||||
case 13:
|
||||
if (this.input.charCodeAt(this.pos) === 10) ++this.pos;
|
||||
case 10:
|
||||
out += "\n";
|
||||
break;
|
||||
default:
|
||||
out += String.fromCharCode(ch);
|
||||
break;
|
||||
}
|
||||
if (this.options.locations) {
|
||||
++this.curLine
|
||||
|
||||
@@ -8,6 +8,7 @@ export function Flow(node) {
|
||||
|
||||
export function ClassProperty(node) {
|
||||
node.typeAnnotation = null;
|
||||
if (!node.value) this.dangerouslyRemove();
|
||||
}
|
||||
|
||||
export function Class(node) {
|
||||
|
||||
@@ -20,7 +20,7 @@ export default class Binding {
|
||||
|
||||
deoptValue() {
|
||||
this.clearValue();
|
||||
this.deoptValue = true;
|
||||
this.hasDeoptedValue = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -28,7 +28,7 @@ export default class Binding {
|
||||
*/
|
||||
|
||||
setValue(value) {
|
||||
if (this.deoptValue) return;
|
||||
if (this.hasDeoptedValue) return;
|
||||
this.hasValue = true;
|
||||
this.value = value;
|
||||
}
|
||||
@@ -38,9 +38,9 @@ export default class Binding {
|
||||
*/
|
||||
|
||||
clearValue() {
|
||||
this.deoptValue = false;
|
||||
this.hasValue = false;
|
||||
this.value = null;
|
||||
this.hasDeoptedValue = false;
|
||||
this.hasValue = false;
|
||||
this.value = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -813,7 +813,7 @@ test("`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`", {
|
||||
type: "TemplateLiteral",
|
||||
quasis: [{
|
||||
type: "TemplateElement",
|
||||
value: {raw: "\\n\\r\\b\\v\\t\\f\\\n\\\r\n", cooked: "\n\r\b\u000b\t\f"},
|
||||
value: {raw: "\\n\\r\\b\\v\\t\\f\\\n\\\n", cooked: "\n\r\b\u000b\t\f"},
|
||||
tail: true,
|
||||
loc: {
|
||||
start: {line: 1, column: 1},
|
||||
@@ -841,7 +841,7 @@ test("`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`", {
|
||||
locations: true
|
||||
});
|
||||
|
||||
test("`\n\r\n`", {
|
||||
test("`\n\r\n\r`", {
|
||||
type: "Program",
|
||||
body: [{
|
||||
type: "ExpressionStatement",
|
||||
@@ -849,27 +849,27 @@ test("`\n\r\n`", {
|
||||
type: "TemplateLiteral",
|
||||
quasis: [{
|
||||
type: "TemplateElement",
|
||||
value: {raw: "\n\r\n", cooked: "\n\n"},
|
||||
value: {raw: "\n\n\n", cooked: "\n\n\n"},
|
||||
tail: true,
|
||||
loc: {
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 3, column: 0}
|
||||
end: {line: 4, column: 0}
|
||||
}
|
||||
}],
|
||||
expressions: [],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 3, column: 1}
|
||||
end: {line: 4, column: 1}
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 3, column: 1}
|
||||
end: {line: 4, column: 1}
|
||||
}
|
||||
}],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 3, column: 1}
|
||||
end: {line: 4, column: 1}
|
||||
}
|
||||
}, {
|
||||
ecmaVersion: 6,
|
||||
@@ -14134,8 +14134,6 @@ test('function normal(x, y = 10) {}', {
|
||||
}]
|
||||
}, {ecmaVersion: 6});
|
||||
|
||||
test("'use strict'; function f([x,,z]) {}", {}, {ecmaVersion: 6});
|
||||
|
||||
// test preserveParens option with arrow functions
|
||||
test("() => 42", {
|
||||
type: "Program",
|
||||
|
||||
@@ -64,14 +64,8 @@ class Foo8 {
|
||||
"bar"() {}
|
||||
}
|
||||
function foo(requiredParam, optParam) {}
|
||||
class Foo9 {
|
||||
prop1;
|
||||
prop2;
|
||||
}
|
||||
class Foo10 {
|
||||
static prop1;
|
||||
prop2;
|
||||
}
|
||||
class Foo9 {}
|
||||
class Foo10 {}
|
||||
var x = 4;
|
||||
class Array {
|
||||
concat(items) {}
|
||||
|
||||
Reference in New Issue
Block a user