@putout/operator-match-files 3.4.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/lib/match-files.js +5 -4
- package/package.json +7 -7
package/lib/match-files.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const path = require('node:path');
|
|
4
4
|
|
|
5
5
|
const {parse, print} = require('@putout/engine-parser');
|
|
6
6
|
const {transform} = require('putout/transform');
|
|
@@ -19,6 +19,8 @@ const {
|
|
|
19
19
|
getParentDirectory,
|
|
20
20
|
} = require('@putout/operator-filesystem');
|
|
21
21
|
|
|
22
|
+
const {join} = path;
|
|
23
|
+
|
|
22
24
|
const isObject = (a) => a && typeof a === 'object';
|
|
23
25
|
const {entries} = Object;
|
|
24
26
|
const report = (path, {message}) => message;
|
|
@@ -177,10 +179,9 @@ function parseMatcher(matcher, options) {
|
|
|
177
179
|
if (!filename)
|
|
178
180
|
return matcher.split(' -> ');
|
|
179
181
|
|
|
180
|
-
const ext =
|
|
181
|
-
const shortName = filename.replace(ext, '');
|
|
182
|
+
const {ext, name} = path.parse(filename);
|
|
182
183
|
|
|
183
|
-
matcher = matcher.replaceAll(`__name`,
|
|
184
|
+
matcher = matcher.replaceAll(`__name`, name);
|
|
184
185
|
matcher = matcher.replaceAll(`__ext`, ext);
|
|
185
186
|
|
|
186
187
|
return matcher.split(' -> ');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/operator-match-files",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout operator adds ability to match files to plugins",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"changelog": false,
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "git://github.com/coderaiser/putout.git"
|
|
14
|
+
"url": "git+https://github.com/coderaiser/putout.git"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"test": "madrun test",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@putout/babel": "^2.0.0",
|
|
28
|
-
"@putout/engine-parser": "^
|
|
28
|
+
"@putout/engine-parser": "^11.0.1",
|
|
29
29
|
"@putout/operator-filesystem": "^4.0.0",
|
|
30
30
|
"@putout/operator-json": "^2.0.0"
|
|
31
31
|
},
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
],
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@putout/plugin-nodejs": "*",
|
|
40
|
-
"@putout/test": "^
|
|
41
|
-
"c8": "^
|
|
40
|
+
"@putout/test": "^11.0.0",
|
|
41
|
+
"c8": "^10.0.0",
|
|
42
42
|
"eslint": "^9.0.0",
|
|
43
|
-
"eslint-plugin-putout": "^
|
|
43
|
+
"eslint-plugin-putout": "^23.0.0",
|
|
44
44
|
"lerna": "^6.0.1",
|
|
45
45
|
"madrun": "^10.0.0",
|
|
46
46
|
"montag": "^1.2.1",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"try-catch": "^3.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"putout": ">=
|
|
52
|
+
"putout": ">=36"
|
|
53
53
|
},
|
|
54
54
|
"license": "MIT",
|
|
55
55
|
"engines": {
|