Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c7ef0a2c9 | ||
|
|
8f79010b16 | ||
|
|
022e6f26aa | ||
|
|
138fa6c9f8 | ||
|
|
c07704cc80 | ||
|
|
bf811ea34a | ||
|
|
8af3ea1c43 | ||
|
|
5fbe147a5e | ||
|
|
a9e214b1db |
@@ -13,6 +13,12 @@ _Note: Gaps between patch versions are faulty/broken releases._
|
||||
|
||||
See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
|
||||
|
||||
## 5.0.1
|
||||
|
||||
* **Bug Fix**
|
||||
* Fix duplicate declaration regression.
|
||||
* Fix not being able to call non-writable methods.
|
||||
|
||||
## 5.0.0
|
||||
|
||||
* **New Feature**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel-core",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"version": "5.0.0",
|
||||
"version": "5.0.2",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"repository": "babel/babel",
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
{
|
||||
"name": "babel",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"version": "5.0.0-beta4",
|
||||
"version": "5.0.1",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"repository": "babel/babel",
|
||||
"preferGlobal": true,
|
||||
"dependencies": {
|
||||
"chokidar": "^0.12.6",
|
||||
"babel-core": "5.0.0-beta4",
|
||||
"babel-core": "^5.0.1",
|
||||
"commander": "^2.6.0",
|
||||
"fs-readdir-recursive": "^0.1.0",
|
||||
"output-file-sync": "^1.1.0",
|
||||
"lodash": "^3.2.0",
|
||||
"convert-source-map": "^0.5.0",
|
||||
"source-map": "^0.4.0"
|
||||
"source-map": "^0.4.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"babel": "./bin/babel/index.js",
|
||||
"babel-node": "./bin/babel-node",
|
||||
"babel-external-helpers": "./bin/babel-external-helpers"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "babel-runtime",
|
||||
"description": "babel selfContained runtime",
|
||||
"version": "5.0.0-beta4",
|
||||
"version": "5.0.1",
|
||||
"repository": "babel/babel",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"dependencies": {
|
||||
"core-js": "^0.8.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,6 @@ var pkg = require(pkgLoc);
|
||||
var mainPkg = require("../package.json");
|
||||
|
||||
pkg.version = mainPkg.version;
|
||||
pkg.dependencies["babel-core"] = mainPkg.version;
|
||||
pkg.dependencies["babel-core"] = "^" + mainPkg.version;
|
||||
|
||||
outputFile(pkgLoc, JSON.stringify(pkg, null, 2));
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
} else {
|
||||
return get(parent, property, receiver);
|
||||
}
|
||||
} else if ("value" in desc && desc.writable) {
|
||||
} else if ("value" in desc) {
|
||||
return desc.value;
|
||||
} else {
|
||||
var getter = desc.get;
|
||||
|
||||
@@ -7,7 +7,7 @@ export default function traverse(parent, opts, scope, state, parentPath) {
|
||||
|
||||
if (!opts.noScope && !scope) {
|
||||
if (parent.type !== "Program" && parent.type !== "File") {
|
||||
throw new Error(`Must pass a scope unless traversing a Program/File got a ${parent.type} node`);
|
||||
throw new Error(`Must pass a scope and parentPath unless traversing a Program/File got a ${parent.type} node`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -216,9 +216,9 @@ export default class TraversalPath {
|
||||
this.opts = context.opts;
|
||||
}
|
||||
|
||||
this.setScope(file);
|
||||
|
||||
this.type = this.node && this.node.type;
|
||||
|
||||
this.setScope(file);
|
||||
}
|
||||
|
||||
_remove() {
|
||||
|
||||
@@ -57,7 +57,8 @@ var blockVariableVisitor = {
|
||||
enter(node, parent, scope, state) {
|
||||
if (this.isFunctionDeclaration() || this.isBlockScoped()) {
|
||||
state.registerDeclaration(this);
|
||||
} else if (this.isScope()) {
|
||||
}
|
||||
if (this.isScope()) {
|
||||
this.skip();
|
||||
}
|
||||
}
|
||||
@@ -100,7 +101,7 @@ export default class Scope {
|
||||
*/
|
||||
|
||||
traverse(node: Object, opts: Object, state?) {
|
||||
traverse(node, opts, this, state);
|
||||
traverse(node, opts, this, state, this.path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"externalHelpers": true
|
||||
}
|
||||
@@ -2,10 +2,8 @@
|
||||
|
||||
var _obj;
|
||||
|
||||
var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||||
|
||||
var o = _obj = {
|
||||
m: function m() {
|
||||
return _get(Object.getPrototypeOf(_obj), "x", this);
|
||||
return babelHelpers.get(Object.getPrototypeOf(_obj), "x", this);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
function A() {
|
||||
let a;
|
||||
}
|
||||
|
||||
function B() {
|
||||
let a;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
function A() {
|
||||
var a = undefined;
|
||||
}
|
||||
|
||||
function B() {
|
||||
var a = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user