@putout/babel 2.5.0 → 2.7.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.11), 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];
@@ -36171,10 +36171,12 @@ var ExpressionParser = /*#__PURE__*/ function(LValParser) {
36171
36171
  {
36172
36172
  key: "parseRegExpLiteral",
36173
36173
  value: function parseRegExpLiteral(value1) {
36174
- var node = this.parseLiteral(value1.value, "RegExpLiteral");
36174
+ var node = this.startNode();
36175
+ this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
36175
36176
  node.pattern = value1.pattern;
36176
36177
  node.flags = value1.flags;
36177
- return node;
36178
+ this.next();
36179
+ return this.finishNode(node, "RegExpLiteral");
36178
36180
  }
36179
36181
  },
36180
36182
  {
@@ -47574,7 +47576,7 @@ var collectorVisitor = {
47574
47576
  },
47575
47577
  ClassExpression: function ClassExpression(path) {
47576
47578
  if (path.has("id") && !path.get("id").node[NOT_LOCAL_BINDING3]) {
47577
- path.scope.registerBinding("local", path);
47579
+ path.scope.registerBinding("local", path.get("id"), path);
47578
47580
  }
47579
47581
  },
47580
47582
  TSTypeAnnotation: function TSTypeAnnotation(path) {
@@ -48005,7 +48007,7 @@ var _Scope = /*#__PURE__*/ function() {
48005
48007
  this.checkBlockScopedCollisions(local, kind, name, id);
48006
48008
  }
48007
48009
  if (local) {
48008
- this.registerConstantViolation(bindingPath);
48010
+ local.reassign(bindingPath);
48009
48011
  } else {
48010
48012
  this.bindings[name] = new Binding({
48011
48013
  identifier: id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/babel",
3
- "version": "2.5.0",
3
+ "version": "2.7.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.11",
48
+ "@babel/generator": "^8.0.0-alpha.11",
49
+ "@babel/parser": "^8.0.0-alpha.11",
50
+ "@babel/template": "^8.0.0-alpha.11",
51
+ "@babel/traverse": "^8.0.0-alpha.11",
52
+ "@babel/types": "^8.0.0-alpha.11",
53
53
  "@rollup/plugin-alias": "^5.0.0",
54
54
  "@rollup/plugin-commonjs": "^25.0.2",
55
55
  "@rollup/plugin-json": "^6.0.0",
@@ -58,10 +58,10 @@
58
58
  "@swc/core": "^1.3.101",
59
59
  "@types/node": "^20.8.6",
60
60
  "acorn-stage3": "^4.0.0",
61
- "c8": "^9.1.0",
61
+ "c8": "^10.1.2",
62
62
  "check-dts": "^0.8.0",
63
63
  "eslint": "^9.4.0",
64
- "eslint-plugin-n": "^16.0.1",
64
+ "eslint-plugin-n": "^17.9.0",
65
65
  "eslint-plugin-putout": "^22.0.0",
66
66
  "globals": "^15.0.0",
67
67
  "madrun": "^10.0.0",