Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
736b689c3b | ||
|
|
e12b377014 | ||
|
|
5fd5b815ab | ||
|
|
92db8312f6 | ||
|
|
e080fe547d | ||
|
|
b967ecf063 | ||
|
|
365b7285d2 | ||
|
|
a40d532b0e | ||
|
|
0487bf911d | ||
|
|
57c72d1cd0 | ||
|
|
335bdffec2 | ||
|
|
e1d76a1dfe |
10
CHANGELOG.md
10
CHANGELOG.md
@@ -13,6 +13,16 @@ _Note: Gaps between patch versions are faulty/broken releases._
|
||||
|
||||
See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
|
||||
|
||||
## 5.1.5
|
||||
|
||||
* **Internal**
|
||||
* Bump `core-js` version.
|
||||
|
||||
## 5.1.4
|
||||
|
||||
* **Polish**
|
||||
* Add missing `Reflect` methods to runtime transformer.
|
||||
|
||||
## 5.1.3
|
||||
|
||||
* **Internal**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel-core",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"version": "5.1.3",
|
||||
"version": "5.1.6",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"repository": "babel/babel",
|
||||
@@ -30,7 +30,7 @@
|
||||
"ast-types": "~0.7.0",
|
||||
"chalk": "^1.0.0",
|
||||
"convert-source-map": "^1.0.0",
|
||||
"core-js": "^0.8.1",
|
||||
"core-js": "^0.8.3",
|
||||
"debug": "^2.1.1",
|
||||
"detect-indent": "^3.0.0",
|
||||
"estraverse": "^3.0.0",
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "babel",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"version": "5.1.2",
|
||||
"version": "5.1.5",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"repository": "babel/babel",
|
||||
"preferGlobal": true,
|
||||
"dependencies": {
|
||||
"babel-core": "^5.1.2",
|
||||
"babel-core": "^5.1.5",
|
||||
"chokidar": "^1.0.0",
|
||||
"commander": "^2.6.0",
|
||||
"fs-readdir-recursive": "^0.1.0",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel-runtime",
|
||||
"description": "babel selfContained runtime",
|
||||
"version": "5.1.2",
|
||||
"version": "5.1.5",
|
||||
"repository": "babel/babel",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"dependencies": {
|
||||
|
||||
@@ -4,12 +4,11 @@ import * as acorn from "../../acorn";
|
||||
import * as util from "../util";
|
||||
import fs from "fs";
|
||||
|
||||
export { util, acorn };
|
||||
export { util, acorn, transform };
|
||||
export { canCompile } from "../util";
|
||||
|
||||
export { default as options } from "../transformation/file/options";
|
||||
export { default as Transformer } from "../transformation/transformer";
|
||||
export { default as transform } from "../transformation";
|
||||
export { default as traverse } from "../traversal";
|
||||
export { default as buildExternalHelpers } from "../tools/build-external-helpers";
|
||||
export { version } from "../../../package";
|
||||
@@ -54,3 +53,18 @@ export function transformFileSync(filename: string, opts?: Object = {}) {
|
||||
opts.filename = filename;
|
||||
return transform(fs.readFileSync(filename), opts);
|
||||
}
|
||||
|
||||
export function parse(code, opts = {}) {
|
||||
opts.ecmaVersion = 6;
|
||||
opts.plugins = {
|
||||
flow: true,
|
||||
jsx: true
|
||||
};
|
||||
opts.features = {};
|
||||
|
||||
for (var key in transform.transformers) {
|
||||
opts.features[key] = true;
|
||||
}
|
||||
|
||||
return acorn.parse(code, opts);
|
||||
}
|
||||
|
||||
@@ -44,11 +44,10 @@ export default function (loc, opts = {}) {
|
||||
find(up, rel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (opts.breakConfig !== true) {
|
||||
find(loc, rel);
|
||||
}
|
||||
|
||||
|
||||
return opts;
|
||||
};
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
"unshift": "array/unshift",
|
||||
"values": "array/values"
|
||||
},
|
||||
|
||||
"Object": {
|
||||
"assign": "object/assign",
|
||||
"classof": "object/classof",
|
||||
@@ -65,13 +66,16 @@
|
||||
"setPrototypeOf": "object/set-prototype-of",
|
||||
"values": "object/values"
|
||||
},
|
||||
|
||||
"RegExp": {
|
||||
"escape": "regexp/escape"
|
||||
},
|
||||
|
||||
"Function": {
|
||||
"only": "function/only",
|
||||
"part": "function/part"
|
||||
},
|
||||
|
||||
"Math": {
|
||||
"acosh": "math/acosh",
|
||||
"asinh": "math/asinh",
|
||||
@@ -92,11 +96,13 @@
|
||||
"tanh": "math/tanh",
|
||||
"trunc": "math/trunc"
|
||||
},
|
||||
|
||||
"Date": {
|
||||
"addLocale": "date/add-locale",
|
||||
"formatUTC": "date/format-utc",
|
||||
"format": "date/format"
|
||||
},
|
||||
|
||||
"Symbol": {
|
||||
"for": "symbol/for",
|
||||
"hasInstance": "symbol/for-instance",
|
||||
@@ -112,6 +118,7 @@
|
||||
"toStringTag": "symbol/to-string-tag",
|
||||
"unscopables": "symbol/unscopables"
|
||||
},
|
||||
|
||||
"String": {
|
||||
"at": "string/at",
|
||||
"codePointAt": "string/code-point-at",
|
||||
@@ -124,8 +131,9 @@
|
||||
"startsWith": "string/starts-with",
|
||||
"unescapeHTML": "string/unescape-html"
|
||||
},
|
||||
|
||||
"Number": {
|
||||
"epsilon": "number/epsilon",
|
||||
"EPSILON": "number/epsilon",
|
||||
"isFinite": "number/is-finite",
|
||||
"isInteger": "number/is-integer",
|
||||
"isNaN": "number/is-nan",
|
||||
@@ -135,6 +143,23 @@
|
||||
"parseFloat": "number/parse-float",
|
||||
"parseInt": "number/parse-int",
|
||||
"random": "number/random"
|
||||
},
|
||||
|
||||
"Reflect": {
|
||||
"apply": "reflect/apply",
|
||||
"construct": "reflect/construct",
|
||||
"defineProperty": "reflect/define-property",
|
||||
"deleteProperty": "reflect/delete-property",
|
||||
"enumerate": "reflect/enumerate",
|
||||
"getOwnPropertyDescriptor": "reflect/get-own-property-descriptor",
|
||||
"getPrototypeOf": "reflect/get-prototype-of",
|
||||
"get": "reflect/get",
|
||||
"has": "reflect/has",
|
||||
"isExtensible": "reflect/is-extensible",
|
||||
"ownKeys": "reflect/own-keys",
|
||||
"preventExtensions": "reflect/prevent-extensions",
|
||||
"setPrototypeOf": "reflect/set-prototype-of",
|
||||
"set": "reflect/set"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ var astVisitor = traverse.explode({
|
||||
var obj = node.object;
|
||||
|
||||
if (!has(definitions.builtins, obj.name)) return;
|
||||
if (scope.getBindingIdentifier(obj.name)) return;
|
||||
|
||||
var modulePath = definitions.builtins[obj.name];
|
||||
return t.memberExpression(
|
||||
|
||||
Reference in New Issue
Block a user