@putout/babel 2.5.0 → 2.6.0

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.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [NPMIMGURL]: https://img.shields.io/npm/v/@putout/babel.svg?style=flat&longCache=true
4
4
  [NPMURL]: https://npmjs.org/package/@putout/babel "npm"
5
5
 
6
- **CommonJS** pre-builts of Babel 8: if you want to migrate to [v8](https://github.com/babel/babel/releases/tag/v8.0.0-alpha.5), but cannot support **ESM** right now.
6
+ **CommonJS** pre-builts of Babel 8: if you want to migrate to [v8](https://github.com/babel/babel/releases/tag/v8.0.0-alpha.10), but cannot support **ESM** right now.
7
7
 
8
8
  Usage
9
9
 
package/bundle/index.js CHANGED
@@ -21013,10 +21013,9 @@ function getBindingIdentifiers(node, duplicates, outerOnly, newBindingsOnly) {
21013
21013
  while(search.length){
21014
21014
  var id = search.shift();
21015
21015
  if (!id) continue;
21016
- if (newBindingsOnly && (isAssignmentExpression(id) || isUnaryExpression(id))) {
21016
+ if (newBindingsOnly && (isAssignmentExpression(id) || isUnaryExpression(id) || isUpdateExpression(id))) {
21017
21017
  continue;
21018
21018
  }
21019
- var keys = getBindingIdentifiers.keys[id.type];
21020
21019
  if (isIdentifier(id)) {
21021
21020
  if (duplicates) {
21022
21021
  var _ids = ids[id.name] = ids[id.name] || [];
@@ -21037,10 +21036,11 @@ function getBindingIdentifiers(node, duplicates, outerOnly, newBindingsOnly) {
21037
21036
  search.push(id.id);
21038
21037
  continue;
21039
21038
  }
21040
- if (isFunctionExpression(id)) {
21039
+ if (isFunctionExpression(id) || isClassExpression(id)) {
21041
21040
  continue;
21042
21041
  }
21043
21042
  }
21043
+ var keys = getBindingIdentifiers.keys[id.type];
21044
21044
  if (keys) {
21045
21045
  for(var i = 0; i < keys.length; i++){
21046
21046
  var key = keys[i];
@@ -47574,7 +47574,7 @@ var collectorVisitor = {
47574
47574
  },
47575
47575
  ClassExpression: function ClassExpression(path) {
47576
47576
  if (path.has("id") && !path.get("id").node[NOT_LOCAL_BINDING3]) {
47577
- path.scope.registerBinding("local", path);
47577
+ path.scope.registerBinding("local", path.get("id"), path);
47578
47578
  }
47579
47579
  },
47580
47580
  TSTypeAnnotation: function TSTypeAnnotation(path) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/babel",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Babel 8 in CommonJS",
@@ -44,12 +44,12 @@
44
44
  "commonjs"
45
45
  ],
46
46
  "devDependencies": {
47
- "@babel/code-frame": "^8.0.0-alpha.9",
48
- "@babel/generator": "^8.0.0-alpha.9",
49
- "@babel/parser": "^8.0.0-alpha.9",
50
- "@babel/template": "^8.0.0-alpha.9",
51
- "@babel/traverse": "^8.0.0-alpha.9",
52
- "@babel/types": "^8.0.0-alpha.9",
47
+ "@babel/code-frame": "^8.0.0-alpha.10",
48
+ "@babel/generator": "^8.0.0-alpha.10",
49
+ "@babel/parser": "^8.0.0-alpha.10",
50
+ "@babel/template": "^8.0.0-alpha.10",
51
+ "@babel/traverse": "^8.0.0-alpha.10",
52
+ "@babel/types": "^8.0.0-alpha.10",
53
53
  "@rollup/plugin-alias": "^5.0.0",
54
54
  "@rollup/plugin-commonjs": "^25.0.2",
55
55
  "@rollup/plugin-json": "^6.0.0",