babel-source 5.0.9 → 5.0.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 +24 -11
  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
- OGZjYjZjZjAzNzQ1ZTk5NzNjZjhlNGQyYTg2ZmQ2ZGVkODdjNmNmNw==
4
+ M2UzZDhmMDJmMTQ4NmVjN2I2NTRhOWNkZGFkNmM5ZDNlODM4ZTY1Ng==
5
5
  data.tar.gz: !binary |-
6
- MmQyNmE0ZDRlZWNjODBkYzU3NDRmNmEyYjQ2NjE3ZmU1MzkzZGMzZA==
6
+ NzUzZWQxMGY3YmQ1OTE2NWFhNTczMzgzODMwMGFkY2QxOTQ2ODZlYQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjJhOGE4MTBlNjRhYjVmMGQ2MjRiZTAzNWM3NzYwN2Y3Yzg3ZGQwNjUzMmM4
10
- MzE4OTgzNmQ3MjdkNjY5NTY4NGQxZjE3NzM4ZWU4ZDY4ZTIzYmM2MGI1ZGMw
11
- MzJlZGM5NDkxZWE3ZGVlY2NhYWRlN2VjNjIxNDFiYjcyZTc2MGI=
9
+ MTVmZWQ1Y2U0ZmRjYmJiNTJkOGVjZjk1NDUyNTJlYTdlMjMxOTBiNmUyZTg5
10
+ NzM1NTFlYWIzNmQxNjA0NWM1OGE2ZjBiZWU4YWY0OWEyMWIzNzAxZTlhNmQ5
11
+ ZGI3YjZmZjVlMzNlOTJjNjVkNmEzMjhiZWIyY2MxYmQ2ZGFmMWI=
12
12
  data.tar.gz: !binary |-
13
- MzIzYTcxYzI3MGQxMmRlMWYyN2FiOTNmMjZkNzczNDdmZTc4N2U1OTVmNGI5
14
- ODFhYWJjYmY1NDE2MDNmNzNjYTBkZjEyMWExOWYyZDY1MGRjZmE0ZWI3MTU3
15
- MTk1ZmJiYjlkMmNiN2YwYzMwNzg5MTg5YzNlMDA2NWNmYTUwMWM=
13
+ OTkxMDBlNjk1NDkzMzkwZTliMWE5YjEzNzZlYTM4NjhhYzAzNWZhODNkMjU4
14
+ NTJkODQ3MTE1NzA3OGU1MGY2MWNmYjE1Y2I0NWI4YjkyZTE4ZWVjNGNjMmI3
15
+ YWVhMDVkMTc4ZjMyZDJhNjUzZDIyMjJmZjIzNjk1NDhlYzlhYjU=
data/lib/babel.js CHANGED
@@ -10406,7 +10406,7 @@ var remapVisitor = {
10406
10406
  }
10407
10407
  }
10408
10408
 
10409
- if (t.isAssignmentExpression(node)) {
10409
+ if (t.isAssignmentExpression(node) && !node._ignoreModulesRemap) {
10410
10410
  var exported = formatter.getExport(node.left, scope);
10411
10411
  if (exported) {
10412
10412
  this.skip();
@@ -12430,7 +12430,7 @@ var collectPropertyReferencesVisitor = {
12430
12430
  }
12431
12431
 
12432
12432
  if (this.isReferenced() && scope.getBinding(node.name) === state.scope.getBinding(node.name)) {
12433
- state.references[node.name] = true;;
12433
+ state.references[node.name] = true;
12434
12434
  }
12435
12435
  }
12436
12436
  }
@@ -12572,18 +12572,31 @@ var ClassTransformer = (function () {
12572
12572
 
12573
12573
  this.buildBody();
12574
12574
 
12575
- constructorBody.body.unshift(t.expressionStatement(t.callExpression(file.addHelper("class-call-check"), [t.thisExpression(), classRef])));
12575
+ var decorators = this.node.decorators;
12576
+ var classCheckRef = classRef;
12577
+
12578
+ if (decorators) {
12579
+ classCheckRef = this.scope.generateUidIdentifier(classRef);
12580
+ }
12581
+
12582
+ constructorBody.body.unshift(t.expressionStatement(t.callExpression(file.addHelper("class-call-check"), [t.thisExpression(), classCheckRef])));
12576
12583
 
12577
12584
  //
12578
12585
 
12579
- var decorators = this.node.decorators;
12580
12586
  if (decorators) {
12587
+ if (this.className) {
12588
+ body.push(t.variableDeclaration("var", [t.variableDeclarator(classCheckRef, classRef)]));
12589
+ }
12590
+
12581
12591
  for (var i = 0; i < decorators.length; i++) {
12582
12592
  var decorator = decorators[i];
12583
- body.push(util.template("class-decorator", {
12593
+
12594
+ var decoratorNode = util.template("class-decorator", {
12584
12595
  DECORATOR: decorator.expression,
12585
12596
  CLASS_REF: classRef
12586
- }, true));
12597
+ }, true);
12598
+ decoratorNode.expression._ignoreModulesRemap = true;
12599
+ body.push(decoratorNode);
12587
12600
  }
12588
12601
  }
12589
12602
 
@@ -20272,8 +20285,8 @@ module.exports={
20272
20285
  "CallExpression": ["callee", "arguments"],
20273
20286
  "CatchClause": ["param", "body"],
20274
20287
  "ClassBody": ["body"],
20275
- "ClassDeclaration": ["id", "body", "superClass", "typeParameters", "superTypeParameters", "implements"],
20276
- "ClassExpression": ["id", "body", "superClass", "typeParameters", "superTypeParameters", "implements"],
20288
+ "ClassDeclaration": ["id", "body", "superClass", "typeParameters", "superTypeParameters", "implements", "decorators"],
20289
+ "ClassExpression": ["id", "body", "superClass", "typeParameters", "superTypeParameters", "implements", "decorators"],
20277
20290
  "ComprehensionBlock": ["left", "right", "body"],
20278
20291
  "ComprehensionExpression": ["filter", "blocks", "body"],
20279
20292
  "ConditionalExpression": ["test", "consequent", "alternate"],
@@ -20301,12 +20314,12 @@ module.exports={
20301
20314
  "LogicalExpression": ["left", "right"],
20302
20315
  "MemberExpression": ["object", "property"],
20303
20316
  "MetaProperty": ["meta", "property"],
20304
- "MethodDefinition": ["key", "value"],
20317
+ "MethodDefinition": ["key", "value", "decorators"],
20305
20318
  "NewExpression": ["callee", "arguments"],
20306
20319
  "ObjectExpression": ["properties"],
20307
20320
  "ObjectPattern": ["properties", "typeAnnotation"],
20308
20321
  "Program": ["body"],
20309
- "Property": ["key", "value"],
20322
+ "Property": ["key", "value", "decorators"],
20310
20323
  "RestElement": ["argument", "typeAnnotation"],
20311
20324
  "ReturnStatement": ["argument"],
20312
20325
  "SequenceExpression": ["expressions"],
@@ -49760,7 +49773,7 @@ module.exports = function (str) {
49760
49773
  module.exports={
49761
49774
  "name": "babel-core",
49762
49775
  "description": "Turn ES6 code into readable vanilla ES5 with source maps",
49763
- "version": "5.0.9",
49776
+ "version": "5.0.10",
49764
49777
  "author": "Sebastian McKenzie <sebmck@gmail.com>",
49765
49778
  "homepage": "https://babeljs.io/",
49766
49779
  "repository": "babel/babel",
data/lib/babel/source.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Babel
2
2
  module Source
3
- VERSION = "5.0.9"
4
- DATE = Time.at(1428326938)
3
+ VERSION = "5.0.10"
4
+ DATE = Time.at(1428437065)
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.0.9
4
+ version: 5.0.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-04-06 00:00:00.000000000 Z
11
+ date: 2015-04-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: sebmck@gmail.com