Skip to content

Commit 416f43f

Browse files
Bump lint-staged from 15.5.2 to 16.0.0 (#773)
Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 15.5.2 to 16.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/lint-staged/lint-staged/releases">lint-staged's releases</a>.</em></p> <blockquote> <h2>v16.0.0</h2> <h3>Major Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/lint-staged/lint-staged/pull/1546">#1546</a> <a href="https://github.com/lint-staged/lint-staged/commit/158d15c9aea0a3a87790ec3766442763cf387dba"><code>158d15c</code></a> Thanks <a href="https://github.com/iiroj"><code>@​iiroj</code></a>! - Processes are spawned using <a href="https://github.com/sindresorhus/nano-spawn">nano-spawn</a> instead of <a href="https://github.com/sindresorhus/execa">execa</a>. If you are using Node.js scripts as tasks, you might need to explicitly run them with <code>node</code>, especially when using Windows:</p> <pre lang="json"><code>{ &quot;*.js&quot;: &quot;node my-js-linter.js&quot; } </code></pre> </li> <li> <p><a href="https://redirect.github.com/lint-staged/lint-staged/pull/1546">#1546</a> <a href="https://github.com/lint-staged/lint-staged/commit/158d15c9aea0a3a87790ec3766442763cf387dba"><code>158d15c</code></a> Thanks <a href="https://github.com/iiroj"><code>@​iiroj</code></a>! - The <code>--shell</code> flag has been removed and <em>lint-staged</em> no longer supports evaluating commands directly via a shell. To migrate existing commands, you can create a shell script and invoke it instead. Lint-staged will pass matched staged files as a list of arguments, accessible via <code>&quot;$@&quot;</code>:</p> <pre lang="shell"><code># my-script.sh #!/bin/bash <p>echo &quot;Staged files: $@&quot;<br /> </code></pre></p> <p>and</p> <pre lang="json"><code>{ &quot;*.js&quot;: &quot;my-script.sh&quot; } </code></pre> <p>If you were using the shell option to avoid passing filenames to tasks, for example <code>bash -c 'tsc --noEmit'</code>, use the function syntax instead:</p> <pre lang="js"><code>export default { '*.ts': () =&gt; 'tsc --noEmit' } </code></pre> </li> <li> <p><a href="https://redirect.github.com/lint-staged/lint-staged/pull/1546">#1546</a> <a href="https://github.com/lint-staged/lint-staged/commit/158d15c9aea0a3a87790ec3766442763cf387dba"><code>158d15c</code></a> Thanks <a href="https://github.com/iiroj"><code>@​iiroj</code></a>! - Validation for deprecated advanced configuration has been removed. The advanced configuration was removed in <em>lint-staged</em> version 9 and until now validation has failed if advanced configuration options were detected. Going forward the entire configuration will be treated with the same logic and if these advanced options are still present, they might be treated as valid globs for staged files instead.</p> </li> <li> <p><a href="https://redirect.github.com/lint-staged/lint-staged/pull/1546">#1546</a> <a href="https://github.com/lint-staged/lint-staged/commit/158d15c9aea0a3a87790ec3766442763cf387dba"><code>158d15c</code></a> Thanks <a href="https://github.com/iiroj"><code>@​iiroj</code></a>! - The lowest supported Node.js version is <code>20.18</code>. Please upgrade your Node.js version.</p> </li> </ul> <h3>Minor Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/lint-staged/lint-staged/pull/1401">#1401</a> <a href="https://github.com/lint-staged/lint-staged/commit/27110ef8ee92c5d104235b4094abb3197b5bf074"><code>27110ef</code></a> Thanks <a href="https://github.com/RohitLuthra19"><code>@​RohitLuthra19</code></a>! - Added support for directly running functions on staged files. To configure a function task, use an object with a title and the task itself:</p> <pre lang="js"><code>export default { '*.js': { title: 'My task', task: async (files) =&gt; { console.log('Staged JS files:', files) }, }, } </code></pre> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md">lint-staged's changelog</a>.</em></p> <blockquote> <h2>16.0.0</h2> <h3>Major Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/lint-staged/lint-staged/pull/1546">#1546</a> <a href="https://github.com/lint-staged/lint-staged/commit/158d15c9aea0a3a87790ec3766442763cf387dba"><code>158d15c</code></a> Thanks <a href="https://github.com/iiroj"><code>@​iiroj</code></a>! - Processes are spawned using <a href="https://github.com/sindresorhus/nano-spawn">nano-spawn</a> instead of <a href="https://github.com/sindresorhus/execa">execa</a>. If you are using Node.js scripts as tasks, you might need to explicitly run them with <code>node</code>, especially when using Windows:</p> <pre lang="json"><code>{ &quot;*.js&quot;: &quot;node my-js-linter.js&quot; } </code></pre> </li> <li> <p><a href="https://redirect.github.com/lint-staged/lint-staged/pull/1546">#1546</a> <a href="https://github.com/lint-staged/lint-staged/commit/158d15c9aea0a3a87790ec3766442763cf387dba"><code>158d15c</code></a> Thanks <a href="https://github.com/iiroj"><code>@​iiroj</code></a>! - The <code>--shell</code> flag has been removed and <em>lint-staged</em> no longer supports evaluating commands directly via a shell. To migrate existing commands, you can create a shell script and invoke it instead. Lint-staged will pass matched staged files as a list of arguments, accessible via <code>&quot;$@&quot;</code>:</p> <pre lang="shell"><code># my-script.sh #!/bin/bash <p>echo &quot;Staged files: $@&quot;<br /> </code></pre></p> <p>and</p> <pre lang="json"><code>{ &quot;*.js&quot;: &quot;my-script.sh&quot; } </code></pre> <p>If you were using the shell option to avoid passing filenames to tasks, for example <code>bash -c 'tsc --noEmit'</code>, use the function syntax instead:</p> <pre lang="js"><code>export default { '*.ts': () =&gt; 'tsc --noEmit' } </code></pre> </li> <li> <p><a href="https://redirect.github.com/lint-staged/lint-staged/pull/1546">#1546</a> <a href="https://github.com/lint-staged/lint-staged/commit/158d15c9aea0a3a87790ec3766442763cf387dba"><code>158d15c</code></a> Thanks <a href="https://github.com/iiroj"><code>@​iiroj</code></a>! - Validation for deprecated advanced configuration has been removed. The advanced configuration was removed in <em>lint-staged</em> version 9 and until now validation has failed if advanced configuration options were detected. Going forward the entire configuration will be treated with the same logic and if these advanced options are still present, they might be treated as valid globs for staged files instead.</p> </li> <li> <p><a href="https://redirect.github.com/lint-staged/lint-staged/pull/1546">#1546</a> <a href="https://github.com/lint-staged/lint-staged/commit/158d15c9aea0a3a87790ec3766442763cf387dba"><code>158d15c</code></a> Thanks <a href="https://github.com/iiroj"><code>@​iiroj</code></a>! - The lowest supported Node.js version is <code>20.18</code>. Please upgrade your Node.js version.</p> </li> </ul> <h3>Minor Changes</h3> <ul> <li> <p><a href="https://redirect.github.com/lint-staged/lint-staged/pull/1401">#1401</a> <a href="https://github.com/lint-staged/lint-staged/commit/27110ef8ee92c5d104235b4094abb3197b5bf074"><code>27110ef</code></a> Thanks <a href="https://github.com/RohitLuthra19"><code>@​RohitLuthra19</code></a>! - Added support for directly running functions on staged files. To configure a function task, use an object with a title and the task itself:</p> <pre lang="js"><code>export default { '*.js': { title: 'My task', task: async (files) =&gt; { console.log('Staged JS files:', files) }, }, } </code></pre> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/lint-staged/lint-staged/commit/dad5490949f31442e7580246a9fad5565257d6cb"><code>dad5490</code></a> chore(changeset): release</li> <li><a href="https://github.com/lint-staged/lint-staged/commit/1c19e82da16db76dbc0b1f5db1dca516753c7c1a"><code>1c19e82</code></a> build(deps): update dependencies and require Node.js 20.18</li> <li><a href="https://github.com/lint-staged/lint-staged/commit/08cf8f54e4c5520790d8f02ca5315d7d1285e414"><code>08cf8f5</code></a> docs: update README.md and bump nano-spawn as major change</li> <li><a href="https://github.com/lint-staged/lint-staged/commit/276dcc8a05dafc1b33041865cc9bb912fbd10e7c"><code>276dcc8</code></a> refactor: simplify config validation</li> <li><a href="https://github.com/lint-staged/lint-staged/commit/d4b7cacfb093bbd5e1a1353047a7b4e2deed0847"><code>d4b7cac</code></a> test: update tests</li> <li><a href="https://github.com/lint-staged/lint-staged/commit/0ee9ab86b1e5ecd515e07e09e5a60932eb791174"><code>0ee9ab8</code></a> fix: update TypeScript type definitions</li> <li><a href="https://github.com/lint-staged/lint-staged/commit/12525b2c66e314bb6d94fdc793d9b953a5f0d5c7"><code>12525b2</code></a> refactor: rename functions</li> <li><a href="https://github.com/lint-staged/lint-staged/commit/541c35312a47106faaf861c96ec4affcac216e47"><code>541c353</code></a> refactor: separate &quot;make cmd tasks&quot; and &quot;make function tasks&quot;</li> <li><a href="https://github.com/lint-staged/lint-staged/commit/27110ef8ee92c5d104235b4094abb3197b5bf074"><code>27110ef</code></a> feat: added support for custom configuration</li> <li><a href="https://github.com/lint-staged/lint-staged/commit/52366f9f3bee04319b6d0856cac55ee8d9e9f94a"><code>52366f9</code></a> ci: update Node.js versions used in CI</li> <li>Additional commits viewable in <a href="https://github.com/lint-staged/lint-staged/compare/v15.5.2...v16.0.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=lint-staged&package-manager=npm_and_yarn&previous-version=15.5.2&new-version=16.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
1 parent e025e43 commit 416f43f

File tree

2 files changed

+21
-91
lines changed

2 files changed

+21
-91
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"jest": "^29.7.0",
5454
"jest-junit": "^16.0.0",
5555
"license-checker-rseidelsohn": "^4.4.2",
56-
"lint-staged": "^15.5.2",
56+
"lint-staged": "^16.0.0",
5757
"lodash": "^4.17.21",
5858
"nodemon": "^3.1.10",
5959
"prettier": "^3.5.3",

yarn.lock

Lines changed: 20 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ __metadata:
824824
jest: "npm:^29.7.0"
825825
jest-junit: "npm:^16.0.0"
826826
license-checker-rseidelsohn: "npm:^4.4.2"
827-
lint-staged: "npm:^15.5.2"
827+
lint-staged: "npm:^16.0.0"
828828
lodash: "npm:^4.17.21"
829829
nodemon: "npm:^3.1.10"
830830
prettier: "npm:^3.5.3"
@@ -2673,23 +2673,6 @@ __metadata:
26732673
languageName: node
26742674
linkType: hard
26752675

2676-
"execa@npm:^8.0.1":
2677-
version: 8.0.1
2678-
resolution: "execa@npm:8.0.1"
2679-
dependencies:
2680-
cross-spawn: "npm:^7.0.3"
2681-
get-stream: "npm:^8.0.1"
2682-
human-signals: "npm:^5.0.0"
2683-
is-stream: "npm:^3.0.0"
2684-
merge-stream: "npm:^2.0.0"
2685-
npm-run-path: "npm:^5.1.0"
2686-
onetime: "npm:^6.0.0"
2687-
signal-exit: "npm:^4.1.0"
2688-
strip-final-newline: "npm:^3.0.0"
2689-
checksum: 2c52d8775f5bf103ce8eec9c7ab3059909ba350a5164744e9947ed14a53f51687c040a250bda833f906d1283aa8803975b84e6c8f7a7c42f99dc8ef80250d1af
2690-
languageName: node
2691-
linkType: hard
2692-
26932676
"exit@npm:^0.1.2":
26942677
version: 0.1.2
26952678
resolution: "exit@npm:0.1.2"
@@ -3011,13 +2994,6 @@ __metadata:
30112994
languageName: node
30122995
linkType: hard
30132996

3014-
"get-stream@npm:^8.0.1":
3015-
version: 8.0.1
3016-
resolution: "get-stream@npm:8.0.1"
3017-
checksum: 5c2181e98202b9dae0bb4a849979291043e5892eb40312b47f0c22b9414fc9b28a3b6063d2375705eb24abc41ecf97894d9a51f64ff021511b504477b27b4290
3018-
languageName: node
3019-
linkType: hard
3020-
30212997
"get-symbol-description@npm:^1.0.2":
30222998
version: 1.0.2
30232999
resolution: "get-symbol-description@npm:1.0.2"
@@ -3250,13 +3226,6 @@ __metadata:
32503226
languageName: node
32513227
linkType: hard
32523228

3253-
"human-signals@npm:^5.0.0":
3254-
version: 5.0.0
3255-
resolution: "human-signals@npm:5.0.0"
3256-
checksum: 5a9359073fe17a8b58e5a085e9a39a950366d9f00217c4ff5878bd312e09d80f460536ea6a3f260b5943a01fe55c158d1cea3fc7bee3d0520aeef04f6d915c82
3257-
languageName: node
3258-
linkType: hard
3259-
32603229
"husky@npm:^9.1.7":
32613230
version: 9.1.7
32623231
resolution: "husky@npm:9.1.7"
@@ -3564,13 +3533,6 @@ __metadata:
35643533
languageName: node
35653534
linkType: hard
35663535

3567-
"is-stream@npm:^3.0.0":
3568-
version: 3.0.0
3569-
resolution: "is-stream@npm:3.0.0"
3570-
checksum: eb2f7127af02ee9aa2a0237b730e47ac2de0d4e76a4a905a50a11557f2339df5765eaea4ceb8029f1efa978586abe776908720bfcb1900c20c6ec5145f6f29d8
3571-
languageName: node
3572-
linkType: hard
3573-
35743536
"is-string@npm:^1.0.5, is-string@npm:^1.0.7":
35753537
version: 1.0.7
35763538
resolution: "is-string@npm:1.0.7"
@@ -4324,37 +4286,37 @@ __metadata:
43244286
languageName: node
43254287
linkType: hard
43264288

4327-
"lint-staged@npm:^15.5.2":
4328-
version: 15.5.2
4329-
resolution: "lint-staged@npm:15.5.2"
4289+
"lint-staged@npm:^16.0.0":
4290+
version: 16.0.0
4291+
resolution: "lint-staged@npm:16.0.0"
43304292
dependencies:
43314293
chalk: "npm:^5.4.1"
43324294
commander: "npm:^13.1.0"
43334295
debug: "npm:^4.4.0"
4334-
execa: "npm:^8.0.1"
43354296
lilconfig: "npm:^3.1.3"
4336-
listr2: "npm:^8.2.5"
4297+
listr2: "npm:^8.3.3"
43374298
micromatch: "npm:^4.0.8"
4299+
nano-spawn: "npm:^1.0.0"
43384300
pidtree: "npm:^0.6.0"
43394301
string-argv: "npm:^0.3.2"
4340-
yaml: "npm:^2.7.0"
4302+
yaml: "npm:^2.7.1"
43414303
bin:
43424304
lint-staged: bin/lint-staged.js
4343-
checksum: 618386254600ada3af3672486a9d082250108245e7c0863d9dfe0a21e7764e3b2eb6416b0f8970e548f4e9d368637331598b27df5a1306925feabbaf16a667e1
4305+
checksum: 8778dbe7892bbf14e378d612d1649c1e3df38a8ddf14cf35962b6e8a962be72efb1ebb48a697e38366be97d25b8d2599cad3c26ac5afc0d0460452484e27924d
43444306
languageName: node
43454307
linkType: hard
43464308

4347-
"listr2@npm:^8.2.5":
4348-
version: 8.2.5
4349-
resolution: "listr2@npm:8.2.5"
4309+
"listr2@npm:^8.3.3":
4310+
version: 8.3.3
4311+
resolution: "listr2@npm:8.3.3"
43504312
dependencies:
43514313
cli-truncate: "npm:^4.0.0"
43524314
colorette: "npm:^2.0.20"
43534315
eventemitter3: "npm:^5.0.1"
43544316
log-update: "npm:^6.1.0"
43554317
rfdc: "npm:^1.4.1"
43564318
wrap-ansi: "npm:^9.0.0"
4357-
checksum: f5a9599514b00c27d7eb32d1117c83c61394b2a985ec20e542c798bf91cf42b19340215701522736f5b7b42f557e544afeadec47866e35e5d4f268f552729671
4319+
checksum: 0792f8a7fd482fa516e21689e012e07081cab3653172ca606090622cfa0024c784a1eba8095a17948a0e9a4aa98a80f7c9c90f78a0dd35173d6802f9cc123a82
43584320
languageName: node
43594321
linkType: hard
43604322

@@ -4522,13 +4484,6 @@ __metadata:
45224484
languageName: node
45234485
linkType: hard
45244486

4525-
"mimic-fn@npm:^4.0.0":
4526-
version: 4.0.0
4527-
resolution: "mimic-fn@npm:4.0.0"
4528-
checksum: de9cc32be9996fd941e512248338e43407f63f6d497abe8441fa33447d922e927de54d4cc3c1a3c6d652857acd770389d5a3823f311a744132760ce2be15ccbf
4529-
languageName: node
4530-
linkType: hard
4531-
45324487
"mimic-function@npm:^5.0.0":
45334488
version: 5.0.1
45344489
resolution: "mimic-function@npm:5.0.1"
@@ -4670,6 +4625,13 @@ __metadata:
46704625
languageName: node
46714626
linkType: hard
46724627

4628+
"nano-spawn@npm:^1.0.0":
4629+
version: 1.0.1
4630+
resolution: "nano-spawn@npm:1.0.1"
4631+
checksum: e03edc6971f653bc4651f2413b2011772a7c18797c0a4e986ff8eaea3adf4f017697d4d494ffb4ba6bce907b42abbeb0f7f681dbf336c84a324c940fb64c1dec
4632+
languageName: node
4633+
linkType: hard
4634+
46734635
"natural-compare-lite@npm:^1.4.0":
46744636
version: 1.4.0
46754637
resolution: "natural-compare-lite@npm:1.4.0"
@@ -4802,15 +4764,6 @@ __metadata:
48024764
languageName: node
48034765
linkType: hard
48044766

4805-
"npm-run-path@npm:^5.1.0":
4806-
version: 5.1.0
4807-
resolution: "npm-run-path@npm:5.1.0"
4808-
dependencies:
4809-
path-key: "npm:^4.0.0"
4810-
checksum: ff6d77514489f47fa1c3b1311d09cd4b6d09a874cc1866260f9dea12cbaabda0436ed7f8c2ee44d147bf99a3af29307c6f63b0f83d242b0b6b0ab25dff2629e3
4811-
languageName: node
4812-
linkType: hard
4813-
48144767
"object-inspect@npm:^1.13.1, object-inspect@npm:^1.9.0":
48154768
version: 1.13.1
48164769
resolution: "object-inspect@npm:1.13.1"
@@ -4890,15 +4843,6 @@ __metadata:
48904843
languageName: node
48914844
linkType: hard
48924845

4893-
"onetime@npm:^6.0.0":
4894-
version: 6.0.0
4895-
resolution: "onetime@npm:6.0.0"
4896-
dependencies:
4897-
mimic-fn: "npm:^4.0.0"
4898-
checksum: 4eef7c6abfef697dd4479345a4100c382d73c149d2d56170a54a07418c50816937ad09500e1ed1e79d235989d073a9bade8557122aee24f0576ecde0f392bb6c
4899-
languageName: node
4900-
linkType: hard
4901-
49024846
"onetime@npm:^7.0.0":
49034847
version: 7.0.0
49044848
resolution: "onetime@npm:7.0.0"
@@ -5016,13 +4960,6 @@ __metadata:
50164960
languageName: node
50174961
linkType: hard
50184962

5019-
"path-key@npm:^4.0.0":
5020-
version: 4.0.0
5021-
resolution: "path-key@npm:4.0.0"
5022-
checksum: 794efeef32863a65ac312f3c0b0a99f921f3e827ff63afa5cb09a377e202c262b671f7b3832a4e64731003fa94af0263713962d317b9887bd1e0c48a342efba3
5023-
languageName: node
5024-
linkType: hard
5025-
50264963
"path-parse@npm:^1.0.7":
50274964
version: 1.0.7
50284965
resolution: "path-parse@npm:1.0.7"
@@ -5821,13 +5758,6 @@ __metadata:
58215758
languageName: node
58225759
linkType: hard
58235760

5824-
"strip-final-newline@npm:^3.0.0":
5825-
version: 3.0.0
5826-
resolution: "strip-final-newline@npm:3.0.0"
5827-
checksum: a771a17901427bac6293fd416db7577e2bc1c34a19d38351e9d5478c3c415f523f391003b42ed475f27e33a78233035df183525395f731d3bfb8cdcbd4da08ce
5828-
languageName: node
5829-
linkType: hard
5830-
58315761
"strip-json-comments@npm:^3.1.1":
58325762
version: 3.1.1
58335763
resolution: "strip-json-comments@npm:3.1.1"
@@ -6414,7 +6344,7 @@ __metadata:
64146344
languageName: node
64156345
linkType: hard
64166346

6417-
"yaml@npm:^2.7.0, yaml@npm:^2.7.1":
6347+
"yaml@npm:^2.7.1":
64186348
version: 2.7.1
64196349
resolution: "yaml@npm:2.7.1"
64206350
bin:

0 commit comments

Comments
 (0)