chore: bump up lint-staged version to v17#462
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^16.1.6→^17.0.0Release Notes
lint-staged/lint-staged (lint-staged)
v17.0.2Compare Source
Patch Changes
88670caThanks @iiroj! - Enable immutable GitHub releasesv17.0.1Compare Source
Patch Changes
4a5664bThanks @iiroj! - Adjust GitHub Actions workflow so that automatic publishing works with signed commits.v17.0.0Compare Source
Major Changes
#1745
e244adfThanks @iiroj! - Node.js v20 is no longer supported, and the oldest supported version is now22.22.1, which is an active LTS version at the time of this release. Node.js 20 will be EOL after April 2026. Please upgrade your Node.js version!#1676
0584e0bThanks @outslept! - Lint-staged now tries to verify the installed Git version is at least2.32.0, released in 2021. If you're using an even older Git version, you need to upgrade it before running lint-staged!#1745
2dcc40aThanks @iiroj! - The dependencyyamlis now marked as optional and probably won't be installed by default. If you're using a YAML configuration file you should install the package separately:If you're using
.lintstagedrcas the config file name (without a file extension), it will be treated as a YAML file. If the content is JSON, consider renaming it to.lintstagedrc.jsonto avoid needing to installyaml.Minor Changes
#1748
809d5efThanks @iiroj! - Add new option--hide-allfor hiding all unstaged changes and untracked files, before running tasks. This makes it easier to run tools like Knip which check for unused code. Untracked files are included in the backup stash and restored automatically after running.#1759
f13045aThanks @iiroj! - Update dependencies, includingtinyexec@1.1.1to fix the following issues:#!/usr/bin/env nodeshebang (Prettier, ESLint, for example) were previously spawned using the default Node.js version configured by the version manager (the onewhich nodepoints to) on POSIX systems. Now, they will be spawned with the same version that lint-staged itself was started with.nodeexecutable available inPATHis a symlink pointing to Snap itself. The sandboxing features of Snap prevented lint-staged from spawning scripts with the#!/usr/bin/env nodeshebang, because it meant lint-staged tried to spawn Snap via the symlink. This resulted in anENOENTerror when trying to runprettier, for example. Now, since the realnodeexecutable's directory is available in thePATH, lint-staged will instead spawn the script with the realnodebinary succesfully.#1761
d3251b1Thanks @iiroj! - Lint-staged now runsgit update-index --againafter running tasks, instead ofgit add <originally staged files>. This should improve compatibility when using non-default indexes, for example when committing with a pathspecgit commit -m "message" .instead of adding files to the index.#1745
a9585acThanks @iiroj! - Removecommanderas a dependency and use the built-inparseArgsfromnode:utilto parse CLI flags.Patch Changes
#1755
c82d30bThanks @iiroj! - All tests now pass on the Bun runtime (latest).#1750
a401818Thanks @iiroj! - Remove manual handling forgit stash --keep-indexresurrecting deleted files, because the issue was fixed in Git2.23.0and lint-staged requires at least Git2.32.0.#1771
c4b8936Thanks @iiroj! - Fix documentation about multiple config files and the--cwdoption. When using it, all tasks will be run in the specified directory. For example, to run everything in the actualprocess.cwd(), uselint-staged --cwd=".".v16.4.0Compare Source
Minor Changes
687fc90Thanks @hyperz111! - Replacemicromatchwithpicomatchto reduce dependencies.v16.3.4Compare Source
Patch Changes
9d6e827Thanks @iiroj! - Update dependencies, includingtinyexec@1.0.4to make sure localnode_modules/.binare preferred to global locations (released intinyexec@1.0.3).v16.3.3Compare Source
Patch Changes
0109e8dThanks @iiroj! - Make sure Git's warning about CRLF line-endings doesn't interfere with creating initial backup stash.v16.3.2Compare Source
Patch Changes
2adaf6cThanks @iiroj! - Hide the extracmdwindow on Windows by spawning tasks without thedetachedoption.v16.3.1Compare Source
Patch Changes
cd5d762Thanks @iiroj! - Removenano-spawnas a dependency frompackage.jsonas it was replaced withtinyexecand is no longer used.v16.3.0Compare Source
Minor Changes
#1698
feda37aThanks @iiroj! - Run external processes withtinyexecinstead ofnano-spawn.nano-spawnreplacedexecain lint-staged version 16 to limit the amount of npm dependencies required, but caused some unknown issues related to spawning tasks. Let's hopetinyexecimproves the situation.#1699
1346d16Thanks @iiroj! - Removepidtreeas a dependency. When a task fails, its sub-processes are killed more efficiently via the process group on Unix systems, and thetaskkillcommand on Windows.Patch Changes
87467aaThanks @iiroj! - Incorrect brace expansions like*.{js}(nothing to expand) are detected exhaustively, instead of just a single pass.v16.2.7Compare Source
Patch Changes
ef74c8dThanks @iiroj! - Do not display a "failed to spawn" error message when a task fails normally. This message is reserved for when the task didn't run because spawning it failed.v16.2.6Compare Source
Patch Changes
33d4502Thanks @Adrian-Baran-GY! - Fix problems with--continue-on-erroroption, where tasks might have still been killed (SIGINT) when one of them failed.v16.2.5Compare Source
Patch Changes
9e02d9dThanks @iiroj! - Fix unhandled promise rejection when spawning tasks (instead of the tasks themselves failing). Previously when a task failed to spawn, lint-staged also failed and the backup stash might not have been automatically restored.v16.2.4Compare Source
Patch Changes
#1682
0176038Thanks @iiroj! - Update dependencies, includingnano-spawn@2.0.0with bug fixes.#1671
581a54eThanks @iiroj! - Speed up execution by only importing theyamldepedency if using YAML configuration files.v16.2.3Compare Source
Patch Changes
27cd541Thanks @iiroj! - When using--fail-on-changes, automatically hidden (partially) unstaged changes are no longer counted to make lint-staged fail.v16.2.2Compare Source
Patch Changes
#1667
699f95dThanks @iiroj! - The backup stash will not be dropped when using--fail-on-changesand there are errors. When reverting to original state is disabled (via--no-revertor--fail-on-changes), hidden (partially) unstaged changes are still restored automatically so that it's easier to resolve the situation manually.Additionally, the example for using the backup stash manually now uses the correct backup hash, if available:
v16.2.1Compare Source
Patch Changes
#1664
8277b3bThanks @iiroj! - The built-in TypeScript types have been updated to more closely match the implementation. Notably, the list of staged files supplied to task functions isreadonly string[]and can't be mutated. Thanks @outslept!export default { --- "*": (files: string[]) => void console.log('staged files', files) +++ "*": (files: readonly string[]) => void console.log('staged files', files) }#1654
70b9af3Thanks @iiroj! - This version has been published from GitHub Actions using Trusted Publishing for npm packages.#1659
4996817Thanks @iiroj! - Fix searching configuration files when the working directory is a subdirectory of a git repository, and there arepackage.jsonfiles in the working directory. This situation might happen when running lint-staged for a single package in a monorepo.#1654
7021f0aThanks @iiroj! - Return the caret semver range (^) to direct dependencies so that future patch and minor versions are allowed. This enables projects to better maintain and deduplicate their own transitive dependencies while not requiring direct updates to lint-staged. This was changed in 16.2.0 after the vulnerability issues withchalkanddebug, which were also removed in the same version.Given the recent vulnerabilities in the npm ecosystem, it's best to be very careful when updating dependencies.
v16.2.0Compare Source
Minor Changes
#1615
99eb742Thanks @iiroj! - Added a new option--fail-on-changesto make lint-staged exit with code 1 when tasks modify any files, making theprecommithook fail. This is similar to thegit diff --exit-codeoption. Using this flag also implies the--no-revertflag which means any changes made by tasks will be left in the working tree after failing, so that they can be manually staged and the commit tried again.#1611
cd05fd3Thanks @rlorenzo! - Added a new option--continue-on-errorso that lint-staged will run all tasks to completion even if some of them fail. By default, lint-staded will exit early on the first failure.#1637
82fcc07Thanks @iiroj! - Internal lint-staged errors are now thrown and visible in the console output. Previously they were caught with the process exit code set to 1, but not logged. This happens when, for example, there's a syntax error in the lint-staged configuration file.#1647
a5ecc06Thanks @iiroj! - Remove debug as a dependency due to recent malware issue; read more at debug-js/debug#1005. Because of this, theDEBUGenvironment variable is no longer supported — use the--debugto enable debugging#1636
8db2717Thanks @iiroj! - Added a new option--hide-unstagedso that lint-staged will hide all unstaged changes to tracked files before running tasks. The changes will be applied back after running the tasks. Note that the combination of flags--hide-unstaged --no-hide-partially-stagedisn't meaningful and behaves the same as just--hide-unstaged.Thanks to @ItsNickBarry for the idea and initial implementation in #1552.
#1648
7900b3bThanks @iiroj! - Remove lilconfig to reduce reliance on third-party dependencies. It was used to find possible config files outside of those tracked in Git, including from the parent directories. This behavior has been moved directly into lint-staged and should work about the same.Patch Changes
#1633
7f9e485Thanks @dependabot! - Bumps listr2 from 9.0.3 to 9.0.4.#1626
99d5a9bThanks @iiroj! - Due to recent phishing attacks, for example chalk@5.6.1 was released with malware. To avoid lint-staged's users being at risk the direct dependencies are pinned to exact versions, instead of allowing future patch versions with the caret (^) range.#1588
035bbf2Thanks @outslept! - Increase performance by listing staged files and searching for configuration concurrently.#1645
deba3adThanks @iiroj! - Remove chalk as a dependency due to recent malware issue; read more at chalk/chalk#656.If you are having trouble with ANSI color codes when using lint-staged, you can try setting either
FORCE_COLOR=trueorNO_COLOR=trueenv variables.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.