Skip to content

Commit 464c90e

Browse files
chore(deps): update dependency lint-staged to v16 (#312)
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [lint-staged](https://redirect.github.com/lint-staged/lint-staged) | [`15.2.10` -> `16.1.2`](https://renovatebot.com/diffs/npm/lint-staged/15.2.10/16.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/lint-staged/16.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/lint-staged/15.2.10/16.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>lint-staged/lint-staged (lint-staged)</summary> ### [`v16.1.2`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1612) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v16.1.1...v16.1.2) ##### Patch Changes - [#&#8203;1570](https://redirect.github.com/lint-staged/lint-staged/pull/1570) [`a7c0c88`](https://redirect.github.com/lint-staged/lint-staged/commit/a7c0c88bcfe94e695528cb33e69fea58586691fc) Thanks [@&#8203;ItsNickBarry](https://redirect.github.com/ItsNickBarry)! - When using `--diff-filter` with the `D` option to include deleted staged files, *lint-staged* no longer tries to stage the deleted files, unless they're no longer deleted. Previously this caused an error from `git add` like `fatal: pathspec 'deleted-file' did not match any files`. - [`38f942e`](https://redirect.github.com/lint-staged/lint-staged/commit/38f942ecc456355d5f12af68db1696f3411f65c2) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Removed an extraneous log entry that printed `shouldHidePArtiallyStagedFiles` to console output. ### [`v16.1.1`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1611) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v16.1.0...v16.1.1) ##### Patch Changes - [#&#8203;1565](https://redirect.github.com/lint-staged/lint-staged/pull/1565) [`3686977`](https://redirect.github.com/lint-staged/lint-staged/commit/3686977ccdadf70b709c16c0346ef6c2b18e2376) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - *Lint-staged* now explicitly warns about potential data loss when using `--no-stash`. - [#&#8203;1571](https://redirect.github.com/lint-staged/lint-staged/pull/1571) [`02299a9`](https://redirect.github.com/lint-staged/lint-staged/commit/02299a9e4f98a05c13beb27f3596af73aaa8c150) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Function tasks (introduced in v16.0.0) only received the staged files matching the conpmnfigured glob, instead of all staged files. - [#&#8203;1563](https://redirect.github.com/lint-staged/lint-staged/pull/1563) [`bc61c74`](https://redirect.github.com/lint-staged/lint-staged/commit/bc61c74383b6d100c55b8d275b979d583ffbe5a1) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - This version fixes incorrect behavior where unstaged changes were committed when using the `--no-stash` option. This happened because `--no-stash` implied `--no-hide-partially-staged`, meaning unstaged changes to files which also had other staged changes were added to the commit by *lint-staged*; this is no longer the case. The previous (incorrect) behavior can still be achieved by using both options `--no-stash --no-hide-partially-staged` at the same time. ### [`v16.1.0`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1610) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v16.0.0...v16.1.0) ##### Minor Changes - [#&#8203;1536](https://redirect.github.com/lint-staged/lint-staged/pull/1536) [`e729daa`](https://redirect.github.com/lint-staged/lint-staged/commit/e729daa3b3ae28e613f63e730652dbfad5d1c594) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - A new flag `--no-revert` has been introduced for when task modifications should be applied to the index before aborting the commit in case of errors. By default, *lint-staged* will clear all task modifications and revert to the original state. - [#&#8203;1550](https://redirect.github.com/lint-staged/lint-staged/pull/1550) [`b27fa3f`](https://redirect.github.com/lint-staged/lint-staged/commit/b27fa3fecb75bcdcaa4bcd483c9d5c0755a22607) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - *Lint-staged* now ignores symlinks and leaves them out from the list of staged files. ##### Patch Changes - [#&#8203;1558](https://redirect.github.com/lint-staged/lint-staged/pull/1558) [`c37dc38`](https://redirect.github.com/lint-staged/lint-staged/commit/c37dc38dddbdebc41df4dbd909d79c98c3f69eb3) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - The minimum required Node.js version is lowered to `20.17` following [[email protected]](https://redirect.github.com/sindresorhus/nano-spawn/releases/tag/v1.0.2). ### [`v16.0.0`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1600) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.5.2...v16.0.0) ##### Major Changes - [#&#8203;1546](https://redirect.github.com/lint-staged/lint-staged/pull/1546) [`158d15c`](https://redirect.github.com/lint-staged/lint-staged/commit/158d15c9aea0a3a87790ec3766442763cf387dba) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Processes are spawned using [nano-spawn](https://redirect.github.com/sindresorhus/nano-spawn) instead of [execa](https://redirect.github.com/sindresorhus/execa). If you are using Node.js scripts as tasks, you might need to explicitly run them with `node`, especially when using Windows: ```json { "*.js": "node my-js-linter.js" } ``` - [#&#8203;1546](https://redirect.github.com/lint-staged/lint-staged/pull/1546) [`158d15c`](https://redirect.github.com/lint-staged/lint-staged/commit/158d15c9aea0a3a87790ec3766442763cf387dba) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - The `--shell` flag has been removed and *lint-staged* 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 `"$@&#8203;"`: ```shell ``` ### [`v15.5.2`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1552) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.5.1...v15.5.2) ##### Patch Changes - [#&#8203;1544](https://redirect.github.com/lint-staged/lint-staged/pull/1544) [`5561321`](https://redirect.github.com/lint-staged/lint-staged/commit/556132176afce1701b4766c00ffd23159d437cb4) Thanks [@&#8203;YimingIsCOLD](https://redirect.github.com/YimingIsCOLD)! - Correctly handle colon (`:`) characters in staged filenames. ### [`v15.5.1`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1551) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.5.0...v15.5.1) ##### Patch Changes - [#&#8203;1533](https://redirect.github.com/lint-staged/lint-staged/pull/1533) [`5d53534`](https://redirect.github.com/lint-staged/lint-staged/commit/5d535349958a939cd17d87180196bb2b9dfc452b) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Improve listing of staged files so that *lint-staged* doesn't crash when encountering an uninitialized submodule. This should result in less errors like: ✖ Failed to get staged files! ### [`v15.5.0`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1550) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.4.3...v15.5.0) ##### Minor Changes - [#&#8203;1526](https://redirect.github.com/lint-staged/lint-staged/pull/1526) [`630af5f`](https://redirect.github.com/lint-staged/lint-staged/commit/630af5fb48ed43eb6ccaefa7a9d9612309023b6f) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Lint-staged no longer resets to the original state when preventing an empty git commit. This happens when your configured tasks reset all the staged changes, typically when trying to commit formatting changes which conflict with your linter setup like ESLint or Prettier. ##### Example with Prettier By default Prettier [prefers double quotes](https://prettier.io/docs/rationale#strings). ##### Previously 1. Stage `file.js` with only double quotes `"` changed to `'` 2. Run `git commit -am "I don't like double quotes"` 3. *Lint-staged* runs `prettier --write file.js`, converting all the `'` back to `"` 4. Because there are now no changes, *lint-staged* fails, cancels the commit, and resets back to the original state 5. Commit was not done, original state is restored and single quotes `'` are staged ##### Now 1. Stage `file.js` with only double-quotes `"` changed to `'` 2. Run `git commit -am "I don't like double quotes"` 3. *Lint-staged* runs `prettier --write file.js`, converting all the `'` back to `"` 4. Because there are now no changes, *lint-staged* fails and cancels the commit 5. Commit was not done, and there are no staged changes ### [`v15.4.3`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1543) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.4.2...v15.4.3) ##### Patch Changes - [#&#8203;1512](https://redirect.github.com/lint-staged/lint-staged/pull/1512) [`cbfed1d`](https://redirect.github.com/lint-staged/lint-staged/commit/cbfed1dfd2465c4198c692955281f0836600bea1) Thanks [@&#8203;tarik02](https://redirect.github.com/tarik02)! - Adjust TypeScript types for the default export so that it can be used as a value without error TS2693. ### [`v15.4.2`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1542) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.4.1...v15.4.2) ##### Patch Changes - [#&#8203;1509](https://redirect.github.com/lint-staged/lint-staged/pull/1509) [`8827ebf`](https://redirect.github.com/lint-staged/lint-staged/commit/8827ebf29dc8f25149a36450b4a0023425202e18) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Change *lint-staged*'s dependencies to use [caret (`^`) ranges](https://docs.npmjs.com/cli/v6/using-npm/semver#caret-ranges-123-025-004) instead of [tilde (`~`)](https://docs.npmjs.com/cli/v6/using-npm/semver#tilde-ranges-123-12-1). This makes it easier for package managers to perform dependency management when minor-level updates are also permitted instead of just patch-level. ### [`v15.4.1`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1541) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.4.0...v15.4.1) ##### Patch Changes - [#&#8203;1504](https://redirect.github.com/lint-staged/lint-staged/pull/1504) [`1c7a45e`](https://redirect.github.com/lint-staged/lint-staged/commit/1c7a45ed2c7fee9d5f55337be16a51e4c9b240e1) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Default TypeScript config filenames match JS equivalents. - [#&#8203;1504](https://redirect.github.com/lint-staged/lint-staged/pull/1504) [`9cc18c9`](https://redirect.github.com/lint-staged/lint-staged/commit/9cc18c9debb185490f9ae4f9c1d21ec8c2587393) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Add missing conditional exports syntax for TypeScript types. ### [`v15.4.0`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1540) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.3.0...v15.4.0) ##### Minor Changes - [#&#8203;1500](https://redirect.github.com/lint-staged/lint-staged/pull/1500) [`a8ec1dd`](https://redirect.github.com/lint-staged/lint-staged/commit/a8ec1ddb587d2c1c2420dbb4baff8160f0ac46c9) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - *Lint-staged* now provides TypeScript types for the configuration and main Node.js API. You can use the JSDoc syntax in your JS configuration files: ```js /** * @&#8203;filename: lint-staged.config.js * @&#8203;type {import('lint-staged').Configuration} */ export default { '*': 'prettier --write', } ``` It's also possible to use the `.ts` file extension for the configuration if your Node.js version supports it. The `--experimental-strip-types` flag was introduced in [Node.js v22.6.0](https://redirect.github.com/nodejs/node/releases/tag/v22.6.0) and unflagged in [v23.6.0](https://redirect.github.com/nodejs/node/releases/tag/v23.6.0), enabling Node.js to execute TypeScript files without additional configuration. ```shell export NODE_OPTIONS="--experimental-strip-types" npx lint-staged --config lint-staged.config.ts ``` ##### Patch Changes - [#&#8203;1501](https://redirect.github.com/lint-staged/lint-staged/pull/1501) [`9b79364`](https://redirect.github.com/lint-staged/lint-staged/commit/9b793640e1f87b46e4f40fcfc1ecf9d6f6013ac9) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Handle possible failures when logging user shell for debug info. ### [`v15.3.0`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#1530) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.2.11...v15.3.0) ##### Minor Changes - [#&#8203;1495](https://redirect.github.com/lint-staged/lint-staged/pull/1495) [`e69da9e`](https://redirect.github.com/lint-staged/lint-staged/commit/e69da9e614db2d45f56e113d45d5ec0157813423) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Added more info to the debug logs so that "environment" info doesn't need to be added separately to GitHub issues. - [#&#8203;1493](https://redirect.github.com/lint-staged/lint-staged/pull/1493) [`fa0fe98`](https://redirect.github.com/lint-staged/lint-staged/commit/fa0fe98104f8885f673b98b8b49ae586de699c5e) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Added more help messages around the automatic `git stash` that *lint-staged* creates as a backup (by default). The console output also displays the short git *hash* of the stash so that it's easier to recover lost files in case some fatal errors are encountered, or the process is killed before completing. For example: % npx lint-staged ✔ Backed up original state in git stash (20addf8) ✔ Running tasks for staged files... ✔ Applying modifications from tasks... ✔ Cleaning up temporary files... where the backup can be seen with `git show 20addf8`, or `git stash list`: % git stash list stash@{0}: lint-staged automatic backup (20addf8) ### [`v15.2.11`](https://redirect.github.com/lint-staged/lint-staged/blob/HEAD/CHANGELOG.md#15211) [Compare Source](https://redirect.github.com/lint-staged/lint-staged/compare/v15.2.10...v15.2.11) ##### Patch Changes - [#&#8203;1484](https://redirect.github.com/lint-staged/lint-staged/pull/1484) [`bcfe309`](https://redirect.github.com/lint-staged/lint-staged/commit/bcfe309fca88aedf42b6a321383de49eb361c5a0) Thanks [@&#8203;wormsik](https://redirect.github.com/wormsik)! - Escape paths containing spaces when using the "shell" option. - [#&#8203;1487](https://redirect.github.com/lint-staged/lint-staged/pull/1487) [`7dd8caa`](https://redirect.github.com/lint-staged/lint-staged/commit/7dd8caa8f80fe1a6ce40939c1224b6774000775a) Thanks [@&#8203;iiroj](https://redirect.github.com/iiroj)! - Do not treat submodule root paths as "staged files". This caused *lint-staged* to fail to a Git error when only updating the revision of a submodule. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/andipaetzold/react-firehooks). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS40MC4wIiwidXBkYXRlZEluVmVyIjoiNDEuNDAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 577a5a4 commit 464c90e

File tree

2 files changed

+95
-288
lines changed

2 files changed

+95
-288
lines changed

0 commit comments

Comments
 (0)