Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b45f64858 | ||
|
|
b89cf6768f | ||
|
|
36ad1108b4 | ||
|
|
4c04371ea4 | ||
|
|
d3e385c554 | ||
|
|
6afcef9805 | ||
|
|
ed861e230b | ||
|
|
e15ced2922 | ||
|
|
93052e532f | ||
|
|
198d51ddaa | ||
|
|
8730b24def | ||
|
|
f09c0d5998 | ||
|
|
21e4481ab7 |
@@ -13,6 +13,13 @@ _Note: Gaps between patch versions are faulty/broken releases._
|
||||
|
||||
See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog.
|
||||
|
||||
## 5.4.1
|
||||
|
||||
* **Bug Fix**
|
||||
* Add missing `slash` dependency. Thanks [@browncolyn](https://github.com/browncolyn)!
|
||||
* **Polish**
|
||||
* Clean up `shouldIgnore` algorithm to work how you'd expect rather than being a hacky piece of shit.
|
||||
|
||||
## 5.4.0
|
||||
|
||||
* **New Feature**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel-core",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"version": "5.4.0",
|
||||
"version": "5.4.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.3.3",
|
||||
"version": "5.4.0",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"repository": "babel/babel",
|
||||
"preferGlobal": true,
|
||||
"dependencies": {
|
||||
"babel-core": "^5.3.3",
|
||||
"babel-core": "^5.4.0",
|
||||
"chokidar": "^1.0.0",
|
||||
"commander": "^2.6.0",
|
||||
"convert-source-map": "^1.1.0",
|
||||
@@ -17,11 +17,12 @@
|
||||
"lodash": "^3.2.0",
|
||||
"output-file-sync": "^1.1.0",
|
||||
"path-is-absolute": "^1.0.0",
|
||||
"source-map": "^0.4.0"
|
||||
"source-map": "^0.4.0",
|
||||
"slash": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"babel": "./bin/babel/index.js",
|
||||
"babel-node": "./bin/babel-node",
|
||||
"babel-external-helpers": "./bin/babel-external-helpers"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel-runtime",
|
||||
"description": "babel selfContained runtime",
|
||||
"version": "5.3.3",
|
||||
"version": "5.4.0",
|
||||
"license": "MIT",
|
||||
"repository": "babel/babel",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
|
||||
@@ -33,7 +33,7 @@ export function ForOfStatement(node, parent, scope, file) {
|
||||
this.parentPath.replaceWithMultiple(build.node);
|
||||
this.remove();
|
||||
} else {
|
||||
this.replaceWithMultiple(build.node);
|
||||
return build.node;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,15 +95,40 @@ export function booleanify(val: any): boolean {
|
||||
}
|
||||
|
||||
export function shouldIgnore(filename, ignore, only) {
|
||||
if (!ignore.length && !only.length) return false;
|
||||
|
||||
filename = slash(filename);
|
||||
|
||||
var filenames = [];
|
||||
|
||||
// try and match each section of the path
|
||||
var parts = filename.split("/");
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var part = parts[i];
|
||||
if (!part) continue;
|
||||
|
||||
filenames.push(part);
|
||||
filenames.push(parts.slice(0, i + 1).join("/"));
|
||||
}
|
||||
|
||||
if (only.length) {
|
||||
for (var pattern of (only: Array)) {
|
||||
if (pattern.test(filename)) return false;
|
||||
var matches = false;
|
||||
|
||||
for (let filename of (filenames: Array)) {
|
||||
for (var pattern of (only: Array)) {
|
||||
if (pattern.test(filename)) {
|
||||
matches = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
return !matches;
|
||||
} else if (ignore.length) {
|
||||
for (var pattern of (ignore: Array)) {
|
||||
if (pattern.test(filename)) return true;
|
||||
for (let filename of (filenames: Array)) {
|
||||
for (var pattern of (ignore: Array)) {
|
||||
if (pattern.test(filename)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user