@d-zero/lint-staged-config 5.0.0-alpha.73 → 5.0.0-alpha.75

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -3
  2. package/package.json +3 -7
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import path from 'node:path';
2
- import micromatch from 'micromatch';
3
2
  import { commands } from './commands.js';
4
3
  import { defaultMapping } from './default-mapping.js';
5
4
  /**
@@ -33,7 +32,7 @@ export default function (dirOptions, mapping) {
33
32
  .resolve(baseDir, '**', `{*.${ext},.*.${ext}}`)
34
33
  .replaceAll(path.sep, '/');
35
34
  const files = allStagedFiles.map((f) => f.replaceAll(path.sep, '/'));
36
- let targetFiles = micromatch(files, pattern);
35
+ let targetFiles = files.filter((file) => path.matchesGlob(file, pattern));
37
36
  if (ignore) {
38
37
  for (const ignoreMap of ignore) {
39
38
  const ignorePattern = typeof ignoreMap === 'string' ? ignoreMap : ignoreMap[commandType];
@@ -49,7 +48,7 @@ export default function (dirOptions, mapping) {
49
48
  }
50
49
  return path.isAbsolute(p) ? p : path.resolve(baseDir, p);
51
50
  });
52
- targetFiles = micromatch.not(targetFiles, absIgnorePatterns);
51
+ targetFiles = targetFiles.filter((file) => !absIgnorePatterns.some((pattern) => path.matchesGlob(file, pattern)));
53
52
  }
54
53
  }
55
54
  if (targetFiles.length <= 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d-zero/lint-staged-config",
3
- "version": "5.0.0-alpha.73",
3
+ "version": "5.0.0-alpha.75",
4
4
  "description": "Configurations of lint-staged",
5
5
  "repository": "https://github.com/d-zero-dev/linters.git",
6
6
  "author": "D-ZERO Co., Ltd.",
@@ -23,11 +23,7 @@
23
23
  "build": "tsc"
24
24
  },
25
25
  "dependencies": {
26
- "lint-staged": "16.2.4",
27
- "micromatch": "4.0.8"
26
+ "lint-staged": "16.2.7"
28
27
  },
29
- "devDependencies": {
30
- "@types/micromatch": "4.0.9"
31
- },
32
- "gitHead": "a4e8a1e38c0ea98ebc77bdadf0c4890a072c7cd0"
28
+ "gitHead": "736d3b0a9e0b37ef8987c9bb478925f464fc917c"
33
29
  }