@putout/plugin-gitignore 3.1.0 β†’ 4.0.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/plugin-gitignore.svg?style=flat&longCache=true
4
4
  [NPMURL]: https://npmjs.org/package/@putout/plugin-gitignore"npm"
5
5
 
6
- 🐊[`Putout`](https://github.com/coderaiser/putout) plugin helps with 🐊[`Putout`](https://github.com/coderaiser/putout) plugins development.
6
+ 🐊[**Putout**](https://github.com/coderaiser/putout) plugin helps with 🐊[**Putout**](https://github.com/coderaiser/putout) plugins development.
7
7
 
8
8
  ## Install
9
9
 
@@ -13,7 +13,7 @@ npm i @putout/plugin-gitignore -D
13
13
 
14
14
  ## Rules
15
15
 
16
- By default, all files enebled, if you want disable some of them use `dissmiss` property:
16
+ By default, all files enebled, if you want disable some of them use `dismiss` property:
17
17
 
18
18
  ```json
19
19
  {
package/lib/gitignore.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const {types} = require('putout');
3
+ const {types, operator} = require('putout');
4
+ const {__ignore} = operator;
4
5
  const {StringLiteral} = types;
5
6
  const getValue = ({value}) => value;
6
7
 
@@ -18,8 +19,8 @@ module.exports.match = ({options}) => {
18
19
  const newNames = filterNames(names, dismiss);
19
20
 
20
21
  return {
21
- '__putout_processor_ignore(__a)': ({__a}) => {
22
- const list = __a.elements.map(getValue);
22
+ [__ignore]: ({__array}) => {
23
+ const list = __array.elements.map(getValue);
23
24
 
24
25
  for (const name of newNames) {
25
26
  if (!list.includes(name))
@@ -36,12 +37,12 @@ module.exports.replace = ({options}) => {
36
37
  const newNames = filterNames(names, dismiss);
37
38
 
38
39
  return {
39
- '__putout_processor_ignore(__a)': ({__a}, path) => {
40
- const list = __a.elements.map(getValue);
40
+ [__ignore]: ({__array}, path) => {
41
+ const list = __array.elements.map(getValue);
41
42
 
42
43
  for (const name of newNames) {
43
44
  if (!list.includes(name))
44
- __a.elements.push(StringLiteral(name));
45
+ __array.elements.push(StringLiteral(name));
45
46
  }
46
47
 
47
48
  return path;
@@ -61,4 +62,3 @@ function filterNames(names, dismiss) {
61
62
 
62
63
  return newNames;
63
64
  }
64
-
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@putout/plugin-gitignore",
3
- "version": "3.1.0",
3
+ "version": "4.0.0",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
- "description": "putout plugin helps with .gitignore",
6
+ "description": "🐊Putout plugin helps with .gitignore",
7
7
  "homepage": "https://github.com/coderaiser/putout/tree/master/packages/plugin-gitignore#readme",
8
8
  "main": "lib/gitignore.js",
9
9
  "release": false,
@@ -31,21 +31,21 @@
31
31
  "gitignore"
32
32
  ],
33
33
  "devDependencies": {
34
- "@putout/test": "^4.0.0",
35
- "c8": "^7.5.0",
34
+ "@putout/test": "^7.0.0",
35
+ "c8": "^8.0.0",
36
36
  "eslint": "^8.0.1",
37
- "eslint-plugin-node": "^11.0.0",
38
- "eslint-plugin-putout": "^12.0.0",
39
- "lerna": "^4.0.0",
40
- "madrun": "^8.0.1",
41
- "nodemon": "^2.0.1"
37
+ "eslint-plugin-n": "^16.0.0",
38
+ "eslint-plugin-putout": "^21.0.0",
39
+ "lerna": "^6.0.1",
40
+ "madrun": "^9.0.0",
41
+ "nodemon": "^3.0.1"
42
42
  },
43
43
  "peerDependencies": {
44
- "putout": ">=14"
44
+ "putout": ">=33"
45
45
  },
46
46
  "license": "MIT",
47
47
  "engines": {
48
- "node": ">=14"
48
+ "node": ">=16"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"