Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27f039488e | ||
|
|
e3ce82e12f | ||
|
|
4934ea56a0 | ||
|
|
ce03457b19 | ||
|
|
1298c67949 | ||
|
|
668274edcb | ||
|
|
0694a7dd06 |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel-core",
|
||||
"description": "A compiler for writing next generation JavaScript",
|
||||
"version": "5.5.7",
|
||||
"version": "5.5.8",
|
||||
"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.6",
|
||||
"version": "5.5.7",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"repository": "babel/babel",
|
||||
"preferGlobal": true,
|
||||
"dependencies": {
|
||||
"babel-core": "^5.5.6",
|
||||
"babel-core": "^5.5.7",
|
||||
"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.6",
|
||||
"version": "5.5.7",
|
||||
"license": "MIT",
|
||||
"repository": "babel/babel",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
console.trace("I know someone out there is hotlinking straight to this file. This is a " +
|
||||
"PRIVATE API. I hate you, but I wont break your code just because you're a " +
|
||||
"programmer who practices bad habits.");
|
||||
|
||||
export { default } from "../transformation/file/options/resolve-rc";
|
||||
@@ -71,7 +71,7 @@ var visit = function (node, name, scope) {
|
||||
// check to see if we have a local binding of the id we're setting inside of
|
||||
// the function, this is important as there are caveats associated
|
||||
|
||||
var bindingInfo = scope.getOwnBindingInfo(name);
|
||||
var bindingInfo = scope.getOwnBinding(name);
|
||||
|
||||
if (bindingInfo) {
|
||||
if (bindingInfo.kind === "param") {
|
||||
|
||||
@@ -44,12 +44,10 @@ export function getAncestry() {
|
||||
* Description
|
||||
*/
|
||||
|
||||
export function inType(types) {
|
||||
if (!Array.isArray(types)) types = [types];
|
||||
|
||||
export function inType() {
|
||||
var path = this;
|
||||
while (path) {
|
||||
for (var type of (types: Array)) {
|
||||
for (var type of (arguments: Array)) {
|
||||
if (path.node.type === type) return true;
|
||||
}
|
||||
path = path.parentPath;
|
||||
|
||||
@@ -23,6 +23,18 @@ export function getStatementParent(): ?NodePath {
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
|
||||
export function getOpposite() {
|
||||
if (this.key === "left") {
|
||||
return this.getSibling("right");
|
||||
} else if (this.key === "right") {
|
||||
return this.getSibling("left");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
|
||||
@@ -279,7 +279,7 @@ export default class Scope {
|
||||
/**
|
||||
* Determine whether evaluating the specific input `node` is a consequenceless reference. ie.
|
||||
* evaluating it wont result in potentially arbitrary code from being ran. The following are
|
||||
* whitelisted and determined not cause side effects:
|
||||
* whitelisted and determined not to cause side effects:
|
||||
*
|
||||
* - `this` expressions
|
||||
* - `super` expressions
|
||||
@@ -492,7 +492,7 @@ export default class Scope {
|
||||
for (var name in ids) {
|
||||
var id = ids[name];
|
||||
|
||||
var local = this.getOwnBindingInfo(name);
|
||||
var local = this.getOwnBinding(name);
|
||||
if (local) {
|
||||
// don't ever let a type alias shadow a local binding
|
||||
if (kind === "type") continue;
|
||||
@@ -819,7 +819,7 @@ export default class Scope {
|
||||
var scope = this;
|
||||
|
||||
do {
|
||||
var binding = scope.getOwnBindingInfo(name);
|
||||
var binding = scope.getOwnBinding(name);
|
||||
if (binding) return binding;
|
||||
} while (scope = scope.parent);
|
||||
}
|
||||
@@ -828,7 +828,7 @@ export default class Scope {
|
||||
* Description
|
||||
*/
|
||||
|
||||
getOwnBindingInfo(name: string) {
|
||||
getOwnBinding(name: string) {
|
||||
return this.bindings[name];
|
||||
}
|
||||
|
||||
@@ -855,7 +855,7 @@ export default class Scope {
|
||||
*/
|
||||
|
||||
hasOwnBinding(name: string) {
|
||||
return !!this.getOwnBindingInfo(name);
|
||||
return !!this.getOwnBinding(name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user