#1823ee156cc - The chunking of tasks based on maximum command line argument length has been re-implemented to be more precise. Now the chunking happens based on the final generated command string, instead of just the list of staged files like previously. This benefits mainly Windows platforms and function commands like:
/** @type {import('lint-staged').Configuration} */
export default {
"*.ts": () => "tsc", // Run "tsc" when any TS file is changed (for entire project)
};
Where the spawned command is literally "tsc" without any extra arguments. Previously, this was still chunked when a lot of files were staged. Now, it probably won't be chunked because the length of the command is just three letters.
Also, native JavaScript/Node.js function tasks won't be chunked at all, when previously they were run multiple times when chunked:
<h1>npm</h1>
<h2>lint-staged</h2>
<ul>
<li> ^17.1.0 => ^17.1.1 (vscodestat)</li>
</ul>
> <h3>Minor Changes</h3>
> <ul>
> <li><p><a href="https://github.com/lint-staged/lint-staged/pull/1823">#1823</a> <a href="https://github.com/lint-staged/lint-staged/commit/ee156cc7039494f1db11f389b1233c78f588238c"><code>ee156cc</code></a> - The chunking of tasks based on maximum command line argument length has been re-implemented to be more precise. Now the chunking happens based on the final generated command string, instead of just the list of staged files like previously. This benefits mainly Windows platforms and function commands like:</p>
> <pre><code class="language-js">/** @type {import('lint-staged').Configuration} */
> export default {
> "*.ts": () => "tsc", // Run "tsc" when any TS file is changed (for entire project)
> };
> </code></pre>
> <p>Where the spawned command is literally <code>"tsc"</code> without any extra arguments. Previously, this was still chunked when a lot of files were staged. Now, it probably won't be chunked because the length of the command is just three letters.</p>
> <p>Also, native JavaScript/Node.js function tasks won't be chunked at all, when previously they were run multiple times when chunked:</p>
> <pre><code class="language-js">/** @type {import('lint-staged').Configuration} */
> export default {
> "*.js": {
> title: "Log staged JS files to console",
> task: async (files) => {
> console.log("Staged JS files:", files);
> },
> },
> };
> </code></pre>
> </li>
> </ul>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
npm
lint-staged