@putout/plugin-putout 23.5.0 → 23.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.
@@ -1,13 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  const {types, operator} = require('putout');
4
- const {getBindingPath} = operator;
5
4
  const {
6
- ObjectPattern,
5
+ objectPattern,
7
6
  isIdentifier,
8
- ObjectProperty,
7
+ objectProperty,
9
8
  } = types;
10
9
 
10
+ const {getBindingPath} = operator;
11
+
11
12
  const SHORTHAND = true;
12
13
  const COMPUTED = false;
13
14
 
@@ -18,10 +19,10 @@ module.exports.report = ({node}) => {
18
19
 
19
20
  module.exports.fix = ({path, node}) => {
20
21
  const [first] = path.node.params;
21
- const property = ObjectProperty(node, node, COMPUTED, SHORTHAND);
22
+ const property = objectProperty(node, node, COMPUTED, SHORTHAND);
22
23
 
23
24
  if (isIdentifier(first)) {
24
- path.node.params[0] = ObjectPattern([property]);
25
+ path.node.params[0] = objectPattern([property]);
25
26
  return;
26
27
  }
27
28
 
package/lib/index.js CHANGED
@@ -61,6 +61,7 @@ const applyVars = require('./apply-vars');
61
61
  const declareTemplateVariables = require('./declare-template-variables');
62
62
  const declarePathVariable = require('./declare-path-variable');
63
63
  const applyParens = require('./apply-parens');
64
+ const applyLowercaseToNodeBuilders = require('./apply-lowercase-to-node-builders');
64
65
 
65
66
  module.exports.rules = {
66
67
  'apply-processors-destructuring': applyProcessorsDestructuring,
@@ -124,4 +125,5 @@ module.exports.rules = {
124
125
  'declare-template-variables': declareTemplateVariables,
125
126
  'declare-path-variable': declarePathVariable,
126
127
  'apply-parens': applyParens,
128
+ 'apply-lowercase-to-node-builders': applyLowercaseToNodeBuilders,
127
129
  };
@@ -16,10 +16,10 @@ const TRANSFORM = `
16
16
  `;
17
17
 
18
18
  const {
19
- Identifier,
20
19
  isIdentifier,
21
20
  isObjectExpression,
22
21
  isMemberExpression,
22
+ identifier,
23
23
  } = types;
24
24
 
25
25
  module.exports.report = () => 'Move require on top level';
@@ -65,7 +65,7 @@ function declareRequire({__a, __b}, path) {
65
65
  const name = justCamelCase(shortName);
66
66
 
67
67
  const requireNode = buildRequire({
68
- NAME: Identifier(name),
68
+ NAME: identifier(name),
69
69
  REQUIRE: __b,
70
70
  });
71
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout",
3
- "version": "23.5.0",
3
+ "version": "23.6.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps with plugins development",
@@ -45,12 +45,12 @@
45
45
  "@putout/eslint-flat": "^2.0.0",
46
46
  "@putout/plugin-nodejs": "*",
47
47
  "@putout/plugin-tape": "*",
48
- "@putout/test": "^11.0.0",
48
+ "@putout/test": "^12.0.0",
49
49
  "c8": "^10.0.0",
50
50
  "chalk": "^5.3.0",
51
51
  "eslint": "^9.0.0",
52
52
  "eslint-plugin-n": "^17.0.0",
53
- "eslint-plugin-putout": "^24.0.0",
53
+ "eslint-plugin-putout": "^25.0.1",
54
54
  "madrun": "^10.0.0",
55
55
  "montag": "^1.2.1",
56
56
  "nodemon": "^3.0.1",