babel-source 4.4.4 → 4.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/babel.js +10 -40
  3. data/lib/babel/source.rb +2 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzY5ZTE0ZGU5YTdhMDRjZGRhYmEzYThlNmM1OTgxNjMzY2Q2MDg1OQ==
4
+ MWVkNDM4MjE4M2IzZDZkNDIwYTllYzQxNTFkZWEyNmU1NzFjYzMyOQ==
5
5
  data.tar.gz: !binary |-
6
- ODY4Y2ZkZmFiYWIzY2VjNTcxODI1YTEwNjE4ODVmMjM3NzdjOGU1Zg==
6
+ YjQ2ODc1MjA1N2FjNzc2OWIwZDQ5ZWExZWZiMGE1ZTM5YmQzODMxOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- N2YyOTlmMDdhYWJiM2MzMjM4OTAyOTVkZWY1MmE0Y2JiYTM3MmZkNzg2Y2Zm
10
- ZjRiYjUzMDMyMWJlNzA4ZTk3ZTI4MzBjNDI2Nzg3NGI0NDBmZWRkY2VjMjgz
11
- NWU4ZmYzNGRhN2U5YzExMTdjM2FlMWE5ZGFkZjU4NTI2MTYzYzM=
9
+ ODUwNjlhZWNlYzJiM2FmOGQ4NjY1MTk4MTdkYjRjNWFhZDc0MGIyMDk2MjYx
10
+ NWM2ZWE4NDQ4Y2NmMGY5ZTIyNGY3MTNkODYwMTJiMWIyOGY3NTBiYjE0MTU3
11
+ ZDExOGIxMTM2ZjBhNjEyNDBlMGYyZjA4OGE5YTNlYWVlMjBjZTc=
12
12
  data.tar.gz: !binary |-
13
- NWE0YTgyN2JiNWI4NzhjOWExYzk0Y2FiNWE1OTA2YmU0YTI1ZWEyZWNiNmU4
14
- MWY2MzEwMmZlMjQyNjM1Yjc4NGIwZDQ1ZWFlYWIzMGM3NDY2ZDY2MTFhNTMz
15
- ODk3N2FkYTg1MGMwOThmYzM0MDU5Y2VjMTkzYWFmYzIxM2E5YmQ=
13
+ NjJjYjZlZTRjMTc5ZWQ0NjVmNmY2M2M0M2E5OTk0Y2U2YWQ4ZmNkMzQ3Zjc2
14
+ Y2NiZmM4OTEzZDUxNGE0ZWFiNjQ1ZDI4ZmJkZDRjMzBmNGY2NzgxN2U5ZDM3
15
+ MGFjNmViY2U5YTMzYmU1ZjIwMThhMGFmOWVmOTg4ZTY1YWRmNWU=
data/lib/babel.js CHANGED
@@ -3571,49 +3571,20 @@ var visitor = {
3571
3571
  if (localDeclar !== state.outerDeclar) return;
3572
3572
 
3573
3573
  state.selfReference = true;
3574
- state.references.push(this);
3575
-
3576
- if (t.isPattern(parent) || t.isAssignmentExpression(parent) || t.isUpdateExpression(parent)) {
3577
- state.selfAssignment = true;
3578
- }
3579
- }
3580
- };
3581
-
3582
- var wrapIncludesSelfReference = function (state, method, id, scope) {
3583
- var outerId = scope.generateUidIdentifier("getOuter");
3584
- var outerIdCall = t.callExpression(outerId, []);
3585
-
3586
- for (var i = 0; i < state.references.length; i++) {
3587
- state.references[i].replaceNode(outerIdCall);
3574
+ this.stop();
3588
3575
  }
3589
-
3590
- method.id = id;
3591
-
3592
- return util.template("named-function", {
3593
- GET_OUTER_ID: outerId,
3594
- FUNCTION_ID: id,
3595
- FUNCTION: method
3596
- });
3597
- };
3598
-
3599
- var wrapIncludesSelfAssignment = function (state, method, id, scope) {
3600
- var templateName = "property-method-assignment-wrapper";
3601
- if (method.generator) templateName += "-generator";
3602
- return util.template(templateName, {
3603
- FUNCTION: method,
3604
- FUNCTION_ID: id,
3605
- FUNCTION_KEY: scope.generateUidIdentifier(id.name),
3606
- WRAPPER_KEY: scope.generateUidIdentifier(id.name + "Wrapper")
3607
- });
3608
3576
  };
3609
3577
 
3610
3578
  var wrap = function (state, method, id, scope) {
3611
3579
  if (state.selfReference) {
3612
- if (state.selfAssignment) {
3613
- return wrapIncludesSelfAssignment(state, method, id, scope);
3614
- } else {
3615
- return wrapIncludesSelfReference(state, method, id, scope);
3616
- }
3580
+ var templateName = "property-method-assignment-wrapper";
3581
+ if (method.generator) templateName += "-generator";
3582
+ return util.template(templateName, {
3583
+ FUNCTION: method,
3584
+ FUNCTION_ID: id,
3585
+ FUNCTION_KEY: scope.generateUidIdentifier(id.name),
3586
+ WRAPPER_KEY: scope.generateUidIdentifier(id.name + "Wrapper")
3587
+ });
3617
3588
  } else {
3618
3589
  method.id = id;
3619
3590
  return method;
@@ -3648,7 +3619,6 @@ var visit = function (node, name, scope) {
3648
3619
  // this isn't to the spec and they've invented this behaviour which is
3649
3620
  // **extremely** annoying so we avoid setting the name if it has a param
3650
3621
  // with the same id
3651
- state.selfAssignment = true;
3652
3622
  state.selfReference = true;
3653
3623
  } else {
3654
3624
  // otherwise it's defined somewhere in scope like:
@@ -43301,7 +43271,7 @@ module.exports = function (str) {
43301
43271
  module.exports={
43302
43272
  "name": "babel",
43303
43273
  "description": "Turn ES6 code into readable vanilla ES5 with source maps",
43304
- "version": "4.4.4",
43274
+ "version": "4.4.5",
43305
43275
  "author": "Sebastian McKenzie <sebmck@gmail.com>",
43306
43276
  "homepage": "https://babeljs.io/",
43307
43277
  "repository": "babel/babel",
data/lib/babel/source.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Babel
2
2
  module Source
3
- VERSION = "4.4.4"
4
- DATE = Time.at(1424605802)
3
+ VERSION = "4.4.5"
4
+ DATE = Time.at(1424607961)
5
5
  PATH = File.expand_path("../..", __FILE__)
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: babel-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.4
4
+ version: 4.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian McKenzie