Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9108422f99 | ||
|
|
9e8f4b25ca | ||
|
|
1cecd24823 | ||
|
|
97f6e1469b | ||
|
|
ec46eaf224 | ||
|
|
a102692103 | ||
|
|
0376ec8ff0 | ||
|
|
5932a07610 |
@@ -13,6 +13,14 @@ _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.2
|
||||
|
||||
* **Bug Fix**
|
||||
* Fix `NodePath#isPure` on `Property` nodes.
|
||||
* Use cwd instead of entry file directory when working out relative directory for `babel/register`.
|
||||
* **Internal**
|
||||
* Add scary warning for those few who choose to use the WIP experimental transformers.
|
||||
|
||||
## 5.5.1
|
||||
|
||||
* **Bug Fix**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel-core",
|
||||
"description": "A compiler for writing next generation JavaScript",
|
||||
"version": "5.5.1",
|
||||
"version": "5.5.2",
|
||||
"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.5.0",
|
||||
"version": "5.5.1",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"repository": "babel/babel",
|
||||
"preferGlobal": true,
|
||||
"dependencies": {
|
||||
"babel-core": "^5.5.0",
|
||||
"babel-core": "^5.5.1",
|
||||
"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.5.0",
|
||||
"version": "5.5.1",
|
||||
"license": "MIT",
|
||||
"repository": "babel/babel",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
|
||||
@@ -38,7 +38,7 @@ var only;
|
||||
var oldHandlers = {};
|
||||
var maps = {};
|
||||
|
||||
var cwd = require.main ? require.main.filename : process.cwd();
|
||||
var cwd = process.cwd();
|
||||
|
||||
var getRelativePath = function (filename){
|
||||
return path.relative(cwd, filename);
|
||||
|
||||
@@ -16,6 +16,10 @@ export default class Logger {
|
||||
return parts;
|
||||
}
|
||||
|
||||
warn(msg) {
|
||||
console.warn(this._buildMessage(msg));
|
||||
}
|
||||
|
||||
error(msg: string, Constructor = Error) {
|
||||
throw new Constructor(this._buildMessage(msg));
|
||||
}
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
},
|
||||
|
||||
"experimental": {
|
||||
"deprecated": "use `--stage 0`/`{ stage: 0 }` instead"
|
||||
"description": "allow use of experimental transformers",
|
||||
"default": false
|
||||
},
|
||||
|
||||
"highlightCode": {
|
||||
|
||||
@@ -13,6 +13,12 @@ export default class TransformerPass {
|
||||
this.handlers = transformer.handlers;
|
||||
this.file = file;
|
||||
this.key = transformer.key;
|
||||
|
||||
if (this.canTransform() && transformer.metadata.experimental && !file.opts.experimental) {
|
||||
file.log.warn(`THE TRANSFORMER ${this.key} HAS BEEN MARKED AS EXPERIMENTAL AND IS WIP. USE AT YOUR OWN RISK. ` +
|
||||
"THIS WILL HIGHLY LIKELY BREAK YOUR CODE SO USE WITH **EXTREME** CAUTION. ENABLE THE " +
|
||||
"`experimental` OPTION TO IGNORE THIS WARNING.");
|
||||
}
|
||||
}
|
||||
|
||||
canTransform(): boolean {
|
||||
|
||||
@@ -2,7 +2,8 @@ import * as t from "../../../types";
|
||||
|
||||
export var metadata = {
|
||||
optional: true,
|
||||
group: "builtin-prepass"
|
||||
group: "builtin-prepass",
|
||||
experimental: true
|
||||
};
|
||||
|
||||
export function AssignmentExpression() {
|
||||
|
||||
@@ -19,7 +19,8 @@ function toStatements(node) {
|
||||
|
||||
export var metadata = {
|
||||
optional: true,
|
||||
group: "builtin-pre"
|
||||
group: "builtin-pre",
|
||||
experimental: true
|
||||
};
|
||||
|
||||
export function ReferencedIdentifier(node, parent, scope) {
|
||||
|
||||
@@ -585,8 +585,8 @@ export default class Scope {
|
||||
}
|
||||
return true;
|
||||
} else if (t.isProperty(node)) {
|
||||
if (node.computed && !t.isPure(node.key, constantsOnly)) return false;
|
||||
return t.isPure(node.value, constantsOnly);
|
||||
if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
|
||||
return this.isPure(node.value, constantsOnly);
|
||||
} else {
|
||||
return t.isPure(node);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user