@putout/operator-match-files 11.1.0 → 12.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.
@@ -40,8 +40,8 @@ export const matchFiles = (options) => {
40
40
  };
41
41
  };
42
42
 
43
- function fix(inputFile, {dirPath, matchInputFilename, outputFilename, matchedJS, matchedAST, options, rawOptions}) {
44
- transform(matchedAST, matchedJS, options);
43
+ function fix(inputFile, {dirPath, matchInputFilename, outputFilename, matchedAST, options, rawOptions}) {
44
+ transform(matchedAST, options);
45
45
 
46
46
  const matchedJSON = magicPrint(outputFilename, matchedAST, rawOptions);
47
47
  const outputFile = getOutputFile({
@@ -110,7 +110,7 @@ const createScan = ({files, exclude, defaultFilename}) => (mainPath, {push, prog
110
110
  const [matchedJS, matchedAST] = magicParse(inputFilename, fileContent);
111
111
 
112
112
  const options = parseOptions(inputFilename, rawOptions);
113
- const places = findPlaces(matchedAST, matchedJS, options);
113
+ const places = findPlaces(matchedAST, options);
114
114
 
115
115
  if (!places.length)
116
116
  continue;
@@ -140,7 +140,7 @@ function magicParse(name, content) {
140
140
  return [js, ast];
141
141
  }
142
142
 
143
- if (/\.(c|m)?ts(x)?$/.test(name)) {
143
+ if (/\.[cm]?ts(x)?$/.test(name)) {
144
144
  const ast = parse(content, {
145
145
  isTS: true,
146
146
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/operator-match-files",
3
- "version": "11.1.0",
3
+ "version": "12.0.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout operator adds ability to match files to plugins",
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "@putout/babel": "^5.0.0",
28
28
  "@putout/engine-parser": "^15.0.1",
29
- "@putout/operator-filesystem": "^10.0.0",
29
+ "@putout/operator-filesystem": "^11.0.0",
30
30
  "@putout/operator-json": "^3.0.0"
31
31
  },
32
32
  "keywords": [
@@ -40,16 +40,16 @@
40
40
  "@putout/plugin-nodejs": "*",
41
41
  "@putout/test": "^15.0.0",
42
42
  "c8": "^10.0.0",
43
- "eslint": "^10.0.0-alpha.0",
44
- "eslint-plugin-putout": "^30.0.0",
45
- "madrun": "^12.0.0",
43
+ "eslint": "^10.0.0",
44
+ "eslint-plugin-putout": "^31.0.0",
45
+ "madrun": "^13.0.0",
46
46
  "montag": "^1.2.1",
47
47
  "nodemon": "^3.0.1",
48
48
  "supertape": "^12.0.0",
49
49
  "try-catch": "^4.0.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "putout": ">=41"
52
+ "putout": ">=42"
53
53
  },
54
54
  "license": "MIT",
55
55
  "engines": {