babel-source 5.8.9 → 5.8.10

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 +25 -9
  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
- ZmQ0ZTg3MThmZjJkOTE4Yjk5ZjA5Y2RkZjhhYWQ1MWQ0YTViNjFmMg==
4
+ Njk2NWE2NTUwMWJkODI4NDE4M2U3ZjFlNDgwYTI1YTk2M2NmM2VmMA==
5
5
  data.tar.gz: !binary |-
6
- YzY0YjhhMTMwYTg0MzdiNmQ0NjQyNjE5MDhhNDkyZjEwNWQwMjUzYw==
6
+ MmFiZTBhMWM5OGNkYWM0NjhmYjA5Yzc2OTkzMWI3NTgxZjhlZjgzMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTU5MjgzYWUzM2E4NjcxY2U1MTU0ZTA3ODlhY2Q5ZDQ0MWFjZmY1ZmIxNjJj
10
- ODNhM2I4YjdmZjFmZTY4ZjFjZTQ4NjY1MzZlNjE1Y2JjZTdmNGYwYmZlMjc3
11
- MmY1N2IxM2FjZjhkZDI0OTZhNTU5MDFjMzczMTQwYThhNjM1ZGM=
9
+ ODE0NTg1MGE2YjBkZjFlZjZlMmU5ZDUwOGRkZGE5NmEyMTI4Y2MzOTRjZTMx
10
+ ODllNTcwMmI1NDlkOTI5YzU0ODY2NDEzY2E3ODY5OTJiNTI5MWI5Y2RiOGE5
11
+ Mjc3MWI4YTIzNGQ3MjQyODM5MTNjNDUxMWY5N2YzZjQ3MjY2Y2U=
12
12
  data.tar.gz: !binary |-
13
- NTBjNDJlNmYyZmI0MjgzZDIxY2I5NjdkZWFhNDJhYzIyZTY4YmQzZmVhZjRk
14
- Y2U4YWI0MjNmZjk4NzcxOGY4MjYyMjUyOGM5YzZmNTJlZjM2MzllMzQzMjM2
15
- OWQ4ODJkZTY2NzdhMDBkYzhjYzhmODBjMTM1MWRlNDJiNzY3ZDk=
13
+ MTFlNzIzODQ4ODVjNzA5ZmM4N2E0ODM5ZGJhMjFhMmRhM2M3YmMzNGEyMThk
14
+ ZDE2OGM4Y2I5NDM4ZWVhZTQ3M2FlZTkzNTAzNmE0NmYyM2Y4MjVkYmZlZGMy
15
+ MDQ1OGQ4ZGM2OGIxZmJjYTIyODdiZTI0ZTgzMTQzMDA0OGM2MTI=
@@ -9954,9 +9954,8 @@ exports["default"] = function (lines, lineNumber, colNumber) {
9954
9954
 
9955
9955
  colNumber = Math.max(colNumber, 0);
9956
9956
 
9957
- if (opts.highlightCode && _chalk2["default"].supportsColor) {
9958
- lines = highlight(lines);
9959
- }
9957
+ var highlighted = opts.highlightCode && _chalk2["default"].supportsColor;
9958
+ if (highlighted) lines = highlight(lines);
9960
9959
 
9961
9960
  lines = lines.split(NEWLINE);
9962
9961
 
@@ -9968,7 +9967,7 @@ exports["default"] = function (lines, lineNumber, colNumber) {
9968
9967
  end = lines.length;
9969
9968
  }
9970
9969
 
9971
- return _lineNumbers2["default"](lines.slice(start, end), {
9970
+ var frame = _lineNumbers2["default"](lines.slice(start, end), {
9972
9971
  start: start + 1,
9973
9972
  before: " ",
9974
9973
  after: " | ",
@@ -9984,6 +9983,12 @@ exports["default"] = function (lines, lineNumber, colNumber) {
9984
9983
  params.before = params.before.replace(/^./, ">");
9985
9984
  }
9986
9985
  }).join("\n");
9986
+
9987
+ if (highlighted) {
9988
+ frame = _chalk2["default"].reset() + frame;
9989
+ }
9990
+
9991
+ return frame;
9987
9992
  };
9988
9993
 
9989
9994
  module.exports = exports["default"];
@@ -14150,14 +14155,14 @@ var DefaultFormatter = (function () {
14150
14155
  DefaultFormatter.prototype.getModuleName = function getModuleName() {
14151
14156
  var opts = this.file.opts;
14152
14157
  // moduleId is n/a if a `getModuleId()` is provided
14153
- if (opts.moduleId && !opts.getModuleId) {
14158
+ if (opts.moduleId != null && !opts.getModuleId) {
14154
14159
  return opts.moduleId;
14155
14160
  }
14156
14161
 
14157
14162
  var filenameRelative = opts.filenameRelative;
14158
14163
  var moduleName = "";
14159
14164
 
14160
- if (opts.moduleRoot) {
14165
+ if (opts.moduleRoot != null) {
14161
14166
  moduleName = opts.moduleRoot + "/";
14162
14167
  }
14163
14168
 
@@ -14165,7 +14170,7 @@ var DefaultFormatter = (function () {
14165
14170
  return moduleName + opts.filename.replace(/^\//, "");
14166
14171
  }
14167
14172
 
14168
- if (opts.sourceRoot) {
14173
+ if (opts.sourceRoot != null) {
14169
14174
  // remove sourceRoot from filename
14170
14175
  var sourceRootRegEx = new RegExp("^" + opts.sourceRoot + "\/?");
14171
14176
  filenameRelative = filenameRelative.replace(sourceRootRegEx, "");
@@ -19331,6 +19336,18 @@ var memberExpressionOptimisationVisitor = {
19331
19336
 
19332
19337
  state.references.push(this);
19333
19338
  }
19339
+ },
19340
+
19341
+ /**
19342
+ * Deopt on use of a binding identifier with the same name as our rest param.
19343
+ *
19344
+ * See https://github.com/babel/babel/issues/2091
19345
+ */
19346
+
19347
+ BindingIdentifier: function BindingIdentifier(node, parent, scope, state) {
19348
+ if (node.name === state.name) {
19349
+ state.deopted = true;
19350
+ }
19334
19351
  }
19335
19352
  };
19336
19353
 
@@ -29720,7 +29737,6 @@ getBindingIdentifiers.keys = {
29720
29737
  ClassDeclaration: "id",
29721
29738
  ClassExpression: "id",
29722
29739
 
29723
- SpreadElement: "argument",
29724
29740
  RestElement: "argument",
29725
29741
  UpdateExpression: "argument",
29726
29742
 
@@ -68383,7 +68399,7 @@ resolve.relative = function (loc) {
68383
68399
  },{"_process":12,"module":1}],552:[function(require,module,exports){
68384
68400
  module.exports={
68385
68401
  "name": "babel-core",
68386
- "version": "5.8.9",
68402
+ "version": "5.8.10",
68387
68403
  "description": "A compiler for writing next generation JavaScript",
68388
68404
  "author": "Sebastian McKenzie <sebmck@gmail.com>",
68389
68405
  "homepage": "https://babeljs.io/",
@@ -1,7 +1,7 @@
1
1
  module Babel
2
2
  module Source
3
- VERSION = "5.8.9"
4
- DATE = Time.at(1437952469)
3
+ VERSION = "5.8.10"
4
+ DATE = Time.at(1438043324)
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.8.9
4
+ version: 5.8.10
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-07-26 00:00:00.000000000 Z
11
+ date: 2015-07-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: sebmck@gmail.com