lint-staged 15.0.0 → 15.0.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.
@@ -24,7 +24,9 @@ export const makeCmdTasks = async ({ commands, cwd, files, gitDir, shell, verbos
24
24
  for (const cmd of commandArray) {
25
25
  // command function may return array of commands that already include `stagedFiles`
26
26
  const isFn = typeof cmd === 'function'
27
- const resolved = isFn ? await cmd(files) : cmd
27
+
28
+ /** Pass copy of file list to prevent mutation by function from config file. */
29
+ const resolved = isFn ? await cmd([...files]) : cmd
28
30
 
29
31
  const resolvedArray = Array.isArray(resolved) ? resolved : [resolved] // Wrap non-array command as array
30
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lint-staged",
3
- "version": "15.0.0",
3
+ "version": "15.0.1",
4
4
  "description": "Lint files staged by git",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/okonet/lint-staged",
@@ -33,7 +33,7 @@
33
33
  "test:watch": "jest --watch",
34
34
  "version": "npx changeset version",
35
35
  "postversion": "npm i --package-lock-only && git commit -am \"chore(changeset): release\"",
36
- "publish": "npx changeset tag"
36
+ "tag": "npx changeset tag"
37
37
  },
38
38
  "dependencies": {
39
39
  "chalk": "5.3.0",