babel-source 5.4.0 → 5.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/babel.js +41 -13
  3. data/lib/babel/source.rb +2 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDJkZWEyZWE2NmE3YWZiOWYwYWQ5NjJhODgyYmVmZTE4ZjNmOTM0Mg==
4
+ NjllOThhMDEzYWZjMzU0ZTliMTc3Yjc4MGY3MTJjY2FiYjQyY2Q0YQ==
5
5
  data.tar.gz: !binary |-
6
- M2RjNjI2ODA4ZWE0MDI4NGZlODVlOTYwMjlmNWE2MWY5MDA4MjgwOQ==
6
+ YTI4ODYwNTBjNmUzMzhmODVjMjZhMjZjZjZmY2ExMDM5OGE4NDhmZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- N2E1MGY2MDEyNjJiNTQyZjljMzMxMDdhZDUxZjE1ZTY1MDQ1YTFhOTYzNzA2
10
- MTA3OTNmMGE2Y2Q3MDQ3NmFjNzM5ZjBlOGVhMDdkMjRjM2VmMmQ4NmMxMTlk
11
- MTU3OTZkMWY0MjJiYmY3MzJiYWZmMTQxYTFkOWI2ZTY4NDEzMmQ=
9
+ ZDA4MjVlNGIwZjNlMzE1OTBmOTBiM2I3MDVmMTQ5Yjk2NTdjY2NhYjY2YjUy
10
+ NmZkZjM3MzJhOWVlZDA5ZGU2Mzg2Y2ZjNTYxNWM1YTliYWE4MTc0NzJjNjVh
11
+ NGI1YTk3YzI3MzdhZWZjODQxY2ZiYzAzZGNjMDQ2MDM0NzNjNTU=
12
12
  data.tar.gz: !binary |-
13
- NjNiYTEzODY3OGI4NWFiZWZkYTBhMzI4OGY0OTIwMzg0MDQxNjA3ODFhNmM2
14
- YWNkZDlmMGUwYmQ2OGUxM2MxNWQ2NjYzYzQ2MWRjYjc3OTUzOWM1NjMzYzQ0
15
- MmVlYzQ3MDAwN2IzYmJjOTg4MTU4YTc5ZWVmNjg0ZjFkMTk5Njc=
13
+ YzdiNzY2YzJmNWI3MjQxYjlhNzlkMTJhZjJmZDVjODFkNDUzNzA3NmI5NDg0
14
+ MmMxNWE3ZDg1OTc3NGQ4ZWFhYmM3NDIyN2U5ZGI5MDk1MWNkNmM3NzM1NjQ0
15
+ Y2QzOGRhM2NhYmFhNzNmMDlhYTU2MDRkNzBhZGU5MTQ3MjliMjk=
@@ -14268,7 +14268,7 @@ function ForOfStatement(node, parent, scope, file) {
14268
14268
  this.parentPath.replaceWithMultiple(build.node);
14269
14269
  this.remove();
14270
14270
  } else {
14271
- this.replaceWithMultiple(build.node);
14271
+ return build.node;
14272
14272
  }
14273
14273
  }
14274
14274
 
@@ -22873,21 +22873,49 @@ function booleanify(val) {
22873
22873
  }
22874
22874
 
22875
22875
  function shouldIgnore(filename, ignore, only) {
22876
+ if (!ignore.length && !only.length) return false;
22877
+
22876
22878
  filename = (0, _slash2["default"])(filename);
22879
+
22880
+ var filenames = [];
22881
+
22882
+ // try and match each section of the path
22883
+ var parts = filename.split("/");
22884
+ for (var i = 0; i < parts.length; i++) {
22885
+ var part = parts[i];
22886
+ if (!part) continue;
22887
+
22888
+ filenames.push(part);
22889
+ filenames.push(parts.slice(0, i + 1).join("/"));
22890
+ }
22891
+
22877
22892
  if (only.length) {
22878
- var _arr = only;
22893
+ var matches = false;
22879
22894
 
22895
+ var _arr = filenames;
22880
22896
  for (var _i = 0; _i < _arr.length; _i++) {
22881
- var pattern = _arr[_i];
22882
- if (pattern.test(filename)) return false;
22897
+ var _filename = _arr[_i];var _arr2 = only;
22898
+
22899
+ for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
22900
+ var pattern = _arr2[_i2];
22901
+ if (pattern.test(_filename)) {
22902
+ matches = true;
22903
+ break;
22904
+ }
22905
+ }
22883
22906
  }
22884
- return true;
22907
+
22908
+ return !matches;
22885
22909
  } else if (ignore.length) {
22886
- var _arr2 = ignore;
22910
+ var _arr3 = filenames;
22887
22911
 
22888
- for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
22889
- var pattern = _arr2[_i2];
22890
- if (pattern.test(filename)) return true;
22912
+ for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
22913
+ var _filename2 = _arr3[_i3];var _arr4 = ignore;
22914
+
22915
+ for (var _i4 = 0; _i4 < _arr4.length; _i4++) {
22916
+ var pattern = _arr4[_i4];
22917
+ if (pattern.test(_filename2)) return true;
22918
+ }
22891
22919
  }
22892
22920
  }
22893
22921
 
@@ -22946,10 +22974,10 @@ function loadTemplates() {
22946
22974
  throw new ReferenceError(messages.get("missingTemplatesDirectory"));
22947
22975
  }
22948
22976
 
22949
- var _arr3 = _fs2["default"].readdirSync(templatesLoc);
22977
+ var _arr5 = _fs2["default"].readdirSync(templatesLoc);
22950
22978
 
22951
- for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
22952
- var name = _arr3[_i3];
22979
+ for (var _i5 = 0; _i5 < _arr5.length; _i5++) {
22980
+ var name = _arr5[_i5];
22953
22981
  if (name[0] === ".") return;
22954
22982
 
22955
22983
  var key = _path2["default"].basename(name, _path2["default"].extname(name));
@@ -86164,7 +86192,7 @@ module.exports = function (str) {
86164
86192
  module.exports={
86165
86193
  "name": "babel-core",
86166
86194
  "description": "Turn ES6 code into readable vanilla ES5 with source maps",
86167
- "version": "5.4.0",
86195
+ "version": "5.4.1",
86168
86196
  "author": "Sebastian McKenzie <sebmck@gmail.com>",
86169
86197
  "homepage": "https://babeljs.io/",
86170
86198
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  module Babel
2
2
  module Source
3
- VERSION = "5.4.0"
4
- DATE = Time.at(1431646182)
3
+ VERSION = "5.4.1"
4
+ DATE = Time.at(1431651618)
5
5
  PATH = File.expand_path("../..", __FILE__)
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: babel-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian McKenzie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-14 00:00:00.000000000 Z
11
+ date: 2015-05-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: sebmck@gmail.com