@depup/lint-staged 16.3.4-depup.0 → 16.4.0-depup.1

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
@@ -13,16 +13,19 @@ npm install @depup/lint-staged
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [lint-staged](https://www.npmjs.com/package/lint-staged) @ 16.3.4 |
17
- | Processed | 2026-03-14 |
16
+ | Original | [lint-staged](https://www.npmjs.com/package/lint-staged) @ 16.4.0 |
17
+ | Processed | 2026-04-07 |
18
18
  | Smoke test | passed |
19
- | Deps updated | 1 |
19
+ | Deps updated | 4 |
20
20
 
21
21
  ## Dependency Changes
22
22
 
23
23
  | Dependency | From | To |
24
24
  |------------|------|-----|
25
25
  | listr2 | ^9.0.5 | ^10.2.1 |
26
+ | picomatch | ^4.0.3 | ^4.0.4 |
27
+ | tinyexec | ^1.0.4 | ^1.1.1 |
28
+ | yaml | ^2.8.2 | ^2.8.3 |
26
29
 
27
30
  ---
28
31
 
package/changes.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "bumped": {
3
+ "listr2": {
4
+ "from": "^9.0.5",
5
+ "to": "^10.2.1"
6
+ },
7
+ "picomatch": {
8
+ "from": "^4.0.3",
9
+ "to": "^4.0.4"
10
+ },
11
+ "tinyexec": {
12
+ "from": "^1.0.4",
13
+ "to": "^1.1.1"
14
+ },
15
+ "yaml": {
16
+ "from": "^2.8.2",
17
+ "to": "^2.8.3"
18
+ }
19
+ },
20
+ "timestamp": "2026-04-07T16:32:54.966Z",
21
+ "totalUpdated": 4
22
+ }
@@ -1,8 +1,7 @@
1
1
  import path from 'node:path'
2
2
 
3
- import micromatch from 'micromatch'
4
-
5
3
  import { createDebug } from './debug.js'
4
+ import { matchFiles } from './matchFiles.js'
6
5
  import { normalizePath } from './normalizePath.js'
7
6
 
8
7
  const debugLog = createDebug('lint-staged:generateTasks')
@@ -30,36 +29,15 @@ export const generateTasks = ({ config, cwd = process.cwd(), files, relative = f
30
29
 
31
30
  // Only worry about children of the CWD unless the pattern explicitly
32
31
  // specifies that it concerns a parent directory.
33
- const filteredFiles = relativeFiles.filter((file) => {
32
+ const includedFiles = relativeFiles.filter((file) => {
34
33
  if (isParentDirPattern) return true
35
34
  return !file.filepath.startsWith('..') && !path.isAbsolute(file.filepath)
36
35
  })
37
36
 
38
- const matches = micromatch(
39
- filteredFiles.map((file) => file.filepath),
40
- pattern,
41
- {
42
- cwd,
43
- dot: true,
44
- // If the pattern doesn't look like a path, enable `matchBase` to
45
- // match against filenames in every directory. This makes `*.js`
46
- // match both `test.js` and `subdirectory/test.js`.
47
- matchBase: !pattern.includes('/'),
48
- posixSlashes: true,
49
- strictBrackets: true,
50
- }
51
- )
52
-
53
- const fileList = filteredFiles.flatMap((file) =>
54
- matches.includes(file.filepath)
55
- ? [
56
- {
57
- filepath: normalizePath(relative ? file.filepath : path.resolve(cwd, file.filepath)),
58
- status: file.status,
59
- },
60
- ]
61
- : []
62
- )
37
+ const fileList = matchFiles(includedFiles, pattern, cwd).map((file) => ({
38
+ filepath: normalizePath(relative ? file.filepath : path.resolve(cwd, file.filepath)),
39
+ status: file.status,
40
+ }))
63
41
 
64
42
  const task = { pattern, commands, fileList }
65
43
  debugLog('Generated task: \n%O', task)
@@ -0,0 +1,22 @@
1
+ import picomatch from 'picomatch'
2
+
3
+ /**
4
+ * Match list of files against a pattern.
5
+ *
6
+ * @param {string} pattern
7
+ * @param {import('./getStagedFiles.js').StagedFile[]} files
8
+ */
9
+ export const matchFiles = (files, pattern, cwd = process.cwd()) => {
10
+ const isMatch = picomatch(pattern, {
11
+ cwd,
12
+ dot: true,
13
+ // If the pattern doesn't look like a path, enable `matchBase` to
14
+ // match against filenames in every directory. This makes `*.js`
15
+ // match both `test.js` and `subdirectory/test.js`.
16
+ matchBase: !pattern.includes('/'),
17
+ posixSlashes: true,
18
+ strictBrackets: true,
19
+ })
20
+
21
+ return files.filter((file) => isMatch(file.filepath))
22
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depup/lint-staged",
3
- "version": "16.3.4-depup.0",
4
- "description": "[DepUp] Lint files staged by git",
3
+ "version": "16.4.0-depup.1",
4
+ "description": "Lint files staged by git (with updated dependencies)",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -37,7 +37,9 @@
37
37
  "files": [
38
38
  "bin/",
39
39
  "lib/",
40
- "MIGRATION.md"
40
+ "MIGRATION.md",
41
+ "changes.json",
42
+ "README.md"
41
43
  ],
42
44
  "scripts": {
43
45
  "lint": "eslint",
@@ -50,10 +52,10 @@
50
52
  "dependencies": {
51
53
  "commander": "^14.0.3",
52
54
  "listr2": "^10.2.1",
53
- "micromatch": "^4.0.8",
55
+ "picomatch": "^4.0.4",
54
56
  "string-argv": "^0.3.2",
55
- "tinyexec": "^1.0.4",
56
- "yaml": "^2.8.2"
57
+ "tinyexec": "^1.1.1",
58
+ "yaml": "^2.8.3"
57
59
  },
58
60
  "devDependencies": {
59
61
  "@changesets/changelog-github": "0.6.0",
@@ -78,10 +80,12 @@
78
80
  "vitest": "4.0.18"
79
81
  },
80
82
  "keywords": [
81
- "depup",
82
- "dependency-bumped",
83
- "updated-deps",
84
83
  "lint-staged",
84
+ "depup",
85
+ "updated-dependencies",
86
+ "security",
87
+ "latest",
88
+ "patched",
85
89
  "lint",
86
90
  "git",
87
91
  "staged",
@@ -99,12 +103,24 @@
99
103
  "listr2": {
100
104
  "from": "^9.0.5",
101
105
  "to": "^10.2.1"
106
+ },
107
+ "picomatch": {
108
+ "from": "^4.0.3",
109
+ "to": "^4.0.4"
110
+ },
111
+ "tinyexec": {
112
+ "from": "^1.0.4",
113
+ "to": "^1.1.1"
114
+ },
115
+ "yaml": {
116
+ "from": "^2.8.2",
117
+ "to": "^2.8.3"
102
118
  }
103
119
  },
104
- "depsUpdated": 1,
120
+ "depsUpdated": 4,
105
121
  "originalPackage": "lint-staged",
106
- "originalVersion": "16.3.4",
107
- "processedAt": "2026-03-14T08:12:15.870Z",
122
+ "originalVersion": "16.4.0",
123
+ "processedAt": "2026-04-07T16:33:03.928Z",
108
124
  "smokeTest": "passed"
109
125
  }
110
126
  }