- #1463
b69ce2d
Thanks @iiroj! - Set the maximum number of event listeners to the number of tasks. This should silence the console warningMaxListenersExceededWarning: Possible EventEmitter memory leak detected
.
-
f0480f0
Thanks @iiroj! - In the previous version the nativegit rev-parse --show-toplevel
command was taken into use for resolving the current git repo root. This version switched the--show-toplevel
flag with--show-cdup
, because on Git installed via MSYS2 the former was returning absolute paths that do not work with Node.jschild_process
. The new flag returns a path relative to the working directory, avoiding the issue.The GitHub Actions workflow has been updated to install Git via MSYS2, to ensure better future compatibility; using the default Git binary in the GitHub Actions runner was working correctly even with MSYS2.
- #1440
a51be80
Thanks @iiroj! - In the previous version the nativegit rev-parse --show-toplevel
command was taken into use for resolving the current git repo root. This version drops the--path-format=absolute
option to support earlier git versions since it's also the default behavior. If you are still having trouble, please try upgradinggit
to the latest version.
- #1433
119adb2
Thanks @iiroj! - Use native "git rev-parse" commands to determine git repo root directory and the .git config directory, instead of using custom logic. This hopefully makes path resolution more robust on non-POSIX systems.
-
#1424
31a1f95
Thanks @iiroj! - Allow approximately equivalent versions of direct dependencies by using the "~" character in the version ranges. This means a more recent patch version of a dependency is allowed if available. -
#1423
91abea0
Thanks @iiroj! - Improve error logging when failing to read or parse a configuration file
- #1391
fdcdad4
Thanks @iiroj! - Lint-staged no longer tries to load configuration from files that are not checked out. This might happen when using sparse-checkout.
- #1387
e4023f6
Thanks @iiroj! - Ignore stdin of spawned commands so that they don't get stuck waiting. Until now, lint-staged has used the default settings to spawn linter commands. This means thestdin
of the spawned commands has accepted input, and essentially gotten stuck waiting. Now thestdin
is ignored and commands will no longer get stuck. If you relied on this behavior, please open a new issue and describe how; the behavior has not been intended.
- #1371
f3378be
Thanks @iiroj! - Using the--no-stash
flag no longer discards all unstaged changes to partially staged files, which resulted in inadvertent data loss. This fix is available with a new flag--no-hide-partially-staged
that is automatically enabled when--no-stash
is used.
-
#1368
777d4e9
Thanks @iiroj! - To improve performance, only uselilconfig
when searching for config files outside the git repo. In the regular case, lint-staged finds the config files from the Git index and loads them directly. -
#1373
85eb0dd
Thanks @iiroj! - When determining git directory, usefs.realpath()
only for symlinks. It looks likefs.realpath()
changes some Windows mapped network filepaths unexpectedly, causing issues.
- #1344
0423311
Thanks @danielbayley! - Add support for loading configuration frompackage.yaml
andpackage.yml
files, supported bypnpm
.
- #1339
8e82364
Thanks @iiroj! - Update dependencies, including listr2@7.0.2 to fix an upstream issue affecting lint-staged.
- #1217
d2e6f8b
Thanks @louneskmt! - Previously it was possible for a function task to mutate the list of staged files passed to the function, and accidentally affect the generation of other tasks. This is now fixed by passing a copy of the original file list instead.
-
#1322
66b93aa
Thanks @iiroj! - Require at least Node.js 18.12.0This release drops support for Node.js 16, which is EOL after 2023-09-11. Please upgrade your Node.js to the latest version.
Additionally, all dependencies have been updated to their latest versions.
v14.0.1 - 21 Aug 2023
v14.0.0 - 13 Aug 2023
- Please upgrade your Node.js version to at least
16.14.0
.
v13.3.0 - 13 Aug 2023
- dependencies: update most dependencies (7443870)
- detect duplicate redundant braces in pattern (d895aa8)
- dependencies: update
listr2@6.6.0
(09844ca)
v13.2.3 - 28 Jun 2023
- the
--diff
option implies--no-stash
(66a716d)
v13.2.2 - 26 Apr 2023
v13.2.1 - 07 Apr 2023
v13.2.0 - 10 Mar 2023
- dependencies: replace
colorette
withchalk
for better color support detection (f598725) - use index-based stash references for improved MSYS2 compatibility (#1270) (60fcd99)
v13.1.2 - 13 Feb 2023
v13.1.1 - 07 Feb 2023
- allow re-enabling
--stash
when using the--diff
option (99390c3)
v13.1.0 - 04 Dec 2022
v13.0.4 - 25 Nov 2022
v13.0.3 - 24 Jun 2022
v13.0.2 - 16 Jun 2022
- use new
--diff
and--diff-filter
options when checking task modifications (1a5a66a)
v13.0.1 - 08 Jun 2022
- correct spelling of "0 files" (f27f1d4)
- suppress error from
process.kill
when killing tasks on failure (f2c6bdd) - deps: update pidtree@^0.6.0 to fix screen size error in WSL (1a77e42)
- ignore "No matching pid found" error (cb8a432)
- prevent possible race condition when killing tasks on failure (bc92aff)
- use
EventsEmitter
instead ofsetInterval
for killing tasks on failure (c508b46)
v13.0.0 - 01 Jun 2022
- remove support for Node.js 12 (5fb6df9)
lint-staged
will no longer support Node.js 12, which is EOL since 30 April 2022
v12.5.0 - 31 May 2022
- include all files when using
--config <path>
(641d1c2) - skip backup stash when using the
--diff
option (d4da24d)
- add
--diff-filter
option for overriding list of (staged) files (753ef72) - add
--diff
option for overriding list of (staged) files (35fcce9)
v12.4.3 - 30 May 2022
- deps: downgrade yaml@1.10.2 to support Node.js 12 (383a96e)
- deps: update commander@^9.2.0 (22ebf52)
- deps: update yaml@^2.0.1 (ec73af0)
v12.4.2 - 24 May 2022
- correctly handle --max-arg-length cli option (1db5f26)
v12.4.1 - 26 Apr 2022
- correctly handle symlinked config files (b3f63ec)
v12.4.0 - 20 Apr 2022
- handle empty input by returning empty array from
parseGitZOutput
(a118817) - limit configuration discovery to cwd (d8fdf1d)
- restore functionality of parent globs for a single configuration file (877ab4c)
- expose
--max-arg-length
cli option (e8291b0)
v12.3.8 - 15 Apr 2022
- avoid passing unexpected arguments from forEach to process.kill() (1b1f0e4)
- clear execution interruption interval on first catch (46952cb)
v12.3.7 - 17 Mar 2022
- improve renderer logic for
--silent
andFORCE_COLOR
settings (d327873)
v12.3.6 - 16 Mar 2022
v12.3.5 - 05 Mar 2022
- search all configs regardless of staged files (4b605cd)
v12.3.4 - 13 Feb 2022
v12.3.3 - 01 Feb 2022
v12.3.2 - 26 Jan 2022
- handle symlinked .git directories (3a897ff)
v12.3.1 - 23 Jan 2022
- deps: update dependencies (f190fc3)
v12.3.0 - 23 Jan 2022
- add
--cwd
option for overriding task directory (62b5b83)
v12.2.2 - 20 Jan 2022
- always search config from
cwd
first (4afcda5)
v12.2.1 - 19 Jan 2022
- only throw if no configurations were found (36b9546)
v12.2.0 - 18 Jan 2022
- make console task titles more explicit (1c94c27)
- support multiple configuration files (90d1035)
v12.1.7 - 07 Jan 2022
v12.1.6 - 07 Jan 2022
- always run non-git tasks in the current working directory (893f3d7)
v12.1.5 - 02 Jan 2022
- search configuration starting from explicit cwd option (c7ea359)
- using
--debug
option enables debug mode (5cceeb6)
v12.1.4 - 24 Dec 2021
v12.1.3 - 18 Dec 2021
- deps: remove enquirer because it's now optional by listr2 (96a1a29)
v12.1.2 - 22 Nov 2021
- fix Windows JS config loading by using file:// URLs (f20ddf9)
- fix YAML config loading (0082ec2)
- improve error logging in loadConfig (e7b6412)
v12.1.1 - 21 Nov 2021
- await for dynamic import promise when loading JS config (e96b6d9)
v12.1.0 - 21 Nov 2021
- allow loading
.js
config file with ESM syntax (410c3ba) - replace
cosmiconfig
withlilconfig
+yaml
to reduce dependencies (e7f9fa0) - support loading
.mjs
config (8d3b176)
v12.0.3 - 18 Nov 2021
- install
enquirer
(e01585f)
v12.0.2 - 14 Nov 2021
v12.0.1 - 13 Nov 2021
- read version number from lint-staged package.json instead of package.json in cwd (#1043) (#1044) (9f9213d)
v12.0.0 - 13 Nov 2021
- lint-staged is now a pure ESM module, and thus
requires Node.js version
^12.20.0 || ^14.13.1 || >=16.0.0
.
To update your Node.js integration, please use:
// const lintStaged = require('lint-staged')
import lintStaged from 'lint-staged'
v11.3.0-beta.2 - 30 Oct 2021
- correctly import
js-yaml
to fix yaml config loading (#1033) (612d806) - detect git repo root correctly on cygwin (#1026) (f291824), closes #1025
- remove dangling chars from git dir (#1028) (11c004e), closes #1027
- revert back to
cosmiconfig
fromlilconfig
(#1035) (e035b80), closes #1033 #981 - unbreak windows by correctly normalizing cwd (#1029) (f861d8d)
v11.2.6 - 26 Oct 2021
v11.2.5 - 26 Oct 2021
v11.2.4 - 23 Oct 2021
v11.2.3 - 10 Oct 2021
v11.2.2 - 09 Oct 2021
v11.2.1 - 09 Oct 2021
v11.3.0-beta.1 - 04 Oct 2021
- add
--no-stash
as hidden option for backwards-compatibility (73db492) - do not apply empty patch (a7c1c0b)
- do not use
fs/promises
for Node.js 12 compatibility (c99a6a1) - restore original state when preventing an empty commit (f7ef8ef)
- restore previous order of jobs (ba62b22)
- do not use a git stash for better performance (ff0cc0d)
- further optimize by reusing previous job (3066a35)
- re-use figures from listr2 and remove
log-symbols
(5240c26) - replace
chalk
withcolorette
andsupports-color
(4de4cda)
v11.2.0 - 04 Oct 2021
v11.2.0-beta.1 - 02 Oct 2021
- add
--no-stash
as hidden option for backwards-compatibility (73db492) - do not apply empty patch (a7c1c0b)
- do not use
fs/promises
for Node.js 12 compatibility (c99a6a1) - restore original state when preventing an empty commit (f7ef8ef)
- restore previous order of jobs (ba62b22)
- do not use a git stash for better performance (ff0cc0d)
- further optimize by reusing previous job (3066a35)
- re-use figures from listr2 and remove
log-symbols
(5240c26) - replace
chalk
withcolorette
andsupports-color
(4de4cda)
v11.1.2 - 06 Aug 2021
v11.1.1 - 24 Jul 2021
v11.1.0 - 22 Jul 2021
v11.0.1 - 13 Jul 2021
v11.0.0 - 07 May 2021
- bump Node.js version requirement to 12.13.0 (852aa6e)
- Node.js 12 LTS 'Erbium' is now the minimum required version
v10.5.4 - 05 Feb 2021
v10.5.3 - 04 Dec 2020
v10.5.2 - 24 Nov 2020
v10.5.1 - 31 Oct 2020
v10.5.0 - 26 Oct 2020
v10.4.2 - 17 Oct 2020
v10.4.1 - 16 Oct 2020
v10.4.0 - 16 Sep 2020
v10.3.0 - 03 Sep 2020
v10.2.13 - 25 Aug 2020
v10.2.12 - 25 Aug 2020
- always use the default short diff format for submodules #902 (c7923ad)
- ensure supportsColor.level exists before stringifying it (aa9898e)
v10.2.11 - 17 Jun 2020
v10.2.10 - 12 Jun 2020
v10.2.9 - 04 Jun 2020
v10.2.8 - 03 Jun 2020
v10.2.7 - 29 May 2020
- use machine output to avoid escaped and quoted filenames (ea80a3d)
v10.2.6 - 22 May 2020
v10.2.5 - 22 May 2020
v10.2.4 - 18 May 2020
v10.2.3 - 18 May 2020
- update listr2@2.0.1 (157ad3e)
v10.2.2 - 01 May 2020
v10.2.1 - 30 Apr 2020
- normalize chunked paths even when maxArgLength is not set (ba67f48)
- resolve matched files to cwd instead of gitDir before adding (defe045)
v10.2.0 - 28 Apr 2020
- all lint-staged output respects the
quiet
option (aba3421) - do not show incorrect error when verbose and no output (b8df31a)
- log task output after running listr to keep everything (d69c65b)
- use test renderer during tests and when TERM=dumb (16848d8)
- add
--verbose
to show output even when tasks succeed (85de3a3) - allow specifying
cwd
using the Node.js API (a3bd9d7) - replace listr with listr2 and print errors inline (8f32a3e)
v10.1.7 - 21 Apr 2020
- use stash create/store to prevent files from disappearing from disk (c9adca5)
v10.1.6 - 19 Apr 2020
- deps: update dependencies (e093b1d)
v10.1.5 - 18 Apr 2020
- pass correct path to unstaged patch during cleanup (6066b07)
v10.1.4 - 17 Apr 2020
- allow lint-staged to run on empty git repo by disabling backup (0bf1fb0)
v10.1.3 - 09 Apr 2020
- only run git add on staged files matched to a task (d39573b)
- run
git add
for staged file chunks serially (69acfa3)
v10.1.2 - 05 Apr 2020
v10.1.1 - 31 Mar 2020
v10.1.0 - 30 Mar 2020
- do not return string from runAll, add info symbol to "No staged files found." message (1e7298a)
- force src and dst prefixes in diff to work around local diff.noprefix setting (7f2ef33)
- unset GIT_LITERAL_PATHSPECS env variable before running (a653c55)
- add
--no-stash
option to disable the backup stash, and not revert in case of errors (c386e4c) - only hide/restore unstaged modifications to partially staged files (52125a9)
v10.0.10 - 29 Mar 2020
- support non-ASCII filenames when git is configured with
core.quotepath on
(2cb26a6)
v10.0.9 - 24 Mar 2020
- use
path.join
andnormalize
to improve msys compatibility in resolveGitRepo (1ad263a)
v10.0.8 - 25 Feb 2020
- do not drop backup stash when reverting to original state fails (f589336)
- evaluate functional configuration only once (abe4b92)
v10.0.7 - 31 Jan 2020
v10.0.6 - 30 Jan 2020
v10.0.5 - 30 Jan 2020
v10.0.4 - 29 Jan 2020
v10.0.3 - 27 Jan 2020
v10.0.2 - 22 Jan 2020
- only warn about git add when it's the exact command (24febb3)
- parse command string with string-argv unless --shell is used (4cb4dde)
- print a better warning when the initial commit is missing (293547d)
v10.0.1 - 20 Jan 2020
v10.0.0 - 19 Jan 2020
- add all modified files to git index with
git add .
(bf532c2) - automatically add modifications only to originally staged files (083b8e7)
- better workaround for git stash --keep-index bug (f3ae378)
- correctly leave only staged files for running tasks (cfde9ca)
- correctly recover when unstaged changes cannot be restored (d091f71)
- correctly restore untracked files from backup stash (c7d0592)
- error handling skips dropping backup stash after internal git errors (30b4809)
- fail with a message when backup stash is missing (1b64239)
- gitWorkflow handles active merge mode (2f1e886)
- handle git MERGE_* files separately; improve error handling (da22cf2)
- improve debug logging (f88e226)
- keep untracked files around by backing them up (fc03fdc)
- max arg length is by default half of the allowed to prevent edge cases (80406c2)
- prevent Listr from hiding git add warning (cce9809)
- restore metadata about git merge before running tasks (f8ddfc2)
- retry failing apply with 3-way merge (76cb08f)
- support binary files (7b3a334)
- try applying unstaged changes before handling errors (357934f)
- update warning about git add, and to README (6467a66)
- workaround for stashing deleted files for git < 2.23 (1a87333)
- automatically stage task modifications (74ed28d)
- bump Node.js version dependency to at least 10.13.0 (#747) (814b9df)
- split tasks into chunks to support shells with limited max argument length (#732) (cb43872)
- support async function tasks (20d5c5d)
- throw error to prevent empty commits unless --allow-empty is used (#762) (8bdeec0)
- use git stashes for gitWorkflow (40a5db1)
- warn when task contains "git add" (5208399)
- Previously, lint-staged would allow empty commits in the situation where a linter task like "prettier --write" reverts all staged changes automatically. Now the default behaviour is to throw an error with a helpful warning message. The --allow empty option can be used to allow empty commits, or
allowEmpty: true
for the Node.js API. - Node.js v8 is no longer supported because it will reach EOL on 2019-12-31
- Prior to version 10, tasks had to manually include
git add
as the final step. This behavior has been integrated into lint-staged itself in order to prevent race conditions with multiple tasks editing the same files. If lint-staged detectsgit add
in task configurations, it will show a warning in the console. Please removegit add
from your configuration after upgrading.
v10.0.0-beta.15 - 08 Jan 2020
- Previously, lint-staged would allow empty commits in the situation where a linter task like "prettier --write" reverts all staged changes automatically. Now the default behaviour is to throw an error with a helpful warning message. The --allow empty option can be used to allow empty commits, or
allowEmpty: true
for the Node.js API.
v10.0.0-beta.14 - 24 Dec 2019
- error handling skips dropping backup stash after internal git errors (30b4809)
v10.0.0-beta.13 - 20 Dec 2019
- handle git MERGE_* files separately; improve error handling (da22cf2)
v10.0.0-beta.12 - 18 Dec 2019
- support async function tasks (20d5c5d)
v10.0.0-beta.11 - 17 Dec 2019
- fail with a message when backup stash is missing (1b64239)
v10.0.0-beta.10 - 17 Dec 2019
- correctly recover when unstaged changes cannot be restored (d091f71)
v10.0.0-beta.9 - 16 Dec 2019
- restore metadata about git merge before running tasks (f8ddfc2)
v10.0.0-beta.8 - 14 Dec 2019
- better workaround for git stash --keep-index bug (f3ae378)
v10.0.0-beta.7 - 05 Dec 2019
- automatically add modifications only to originally staged files (083b8e7)
- Node.js v8 is no longer supported because it will reach EOL on 2019-12-31
v10.0.0-beta.6 - 27 Nov 2019
- add support for concurrent CLI option (6af8307)
v10.0.0-beta.5 - 27 Nov 2019
- improve debug logging (f88e226)
- max arg length is by default half of the allowed to prevent edge cases (80406c2)
v9.5.0 - 27 Nov 2019
- add support for concurrent CLI option (6af8307)
v10.0.0-beta.4 - 20 Nov 2019
v10.0.0-beta.3 - 14 Nov 2019
- support binary files (7b3a334)
v10.0.0-beta.2 - 14 Nov 2019
- correctly leave only staged files for running tasks (cfde9ca)
- Revert "fix: no need to run
git clean -df
since untracked changes are stashed" (e58ebbf)
v10.0.0-beta.1 - 14 Nov 2019
- add all modified files to git index with
git add .
(bf532c2) - correctly restore untracked files from backup stash (c7d0592)
- gitWorkflow handles active merge mode (2f1e886)
- keep untracked files around by backing them up (fc03fdc)
- no need to run
git clean -df
since untracked changes are stashed (869bac6) - prevent Listr from hiding git add warning (cce9809)
- retry failing apply with 3-way merge (76cb08f)
- try applying unstaged changes before handling errors (357934f)
- update warning about git add, and to README (6467a66)
- workaround for stashing deleted files for git < 2.23 (1a87333)
- automatically stage task modifications (74ed28d)
- use git stashes for gitWorkflow (40a5db1)
- warn when task contains "git add" (5208399)
- Prior to version 10, tasks had to manually include
git add
as the final step. This behavior has been integrated into lint-staged itself in order to prevent race conditions with multiple tasks editing the same files. If lint-staged detectsgit add
in task configurations, it will show a warning in the console. Please removegit add
from your configuration after upgrading.
v9.4.3 - 13 Nov 2019
v9.5.0-beta.2 (v9.5.0-beta.2@beta) - 03 Nov 2019
- no need to run
git clean -df
since untracked changes are stashed (bbfae43) - update warning about git add, and to README (4fe53ef)
- Prior to version 10, tasks had to manually include
git add
as the final step. This behavior has been integrated into lint-staged itself in order to prevent race conditions with multiple tasks editing the same files. If lint-staged detectsgit add
in task configurations, it will show a warning in the console. Please removegit add
from your configuration after upgrading.
v9.5.0-beta.1 (v9.5.0-beta.1@beta) - 31 Oct 2019
- correctly restore untracked files from backup stash (0111f48)
- gitWorkflow handles active merge mode (959d9d9)
- keep untracked files around by backing them up (d20c5be)
- prevent Listr from hiding git add warning (2b57db0)
- retry failing apply with 3-way merge (30939b9)
- try applying unstaged changes before handling errors (080f1c6)
- workaround for stashing deleted files for git < 2.23 (50afea0)
- automatically stage task modifications (7d0379d)
- use git stashes for gitWorkflow (bfd2adc)
- warn when task contains "git add" (4014f3c)
v9.4.2 - 08 Oct 2019
- create fn title with mock file list of correct length (8c3ca58)
v9.4.1 - 01 Oct 2019
v9.4.0 - 26 Sep 2019
v9.3.0 - 22 Sep 2019
- allow to pass config instead of configPath (14c46d2)
v9.2.5 - 27 Aug 2019
- validateConfig validates function task return values (d8fad78)
v9.2.4 - 25 Aug 2019
- include renames when getting list of staged files (2243a83)
v9.2.3 - 17 Aug 2019
- don't normalize path gitDir path for better Windows compatibility (eb3fa83)
- generateTasks handles parent dir globs correctly (82b5182)
- normalize gitDir path to posix using normalize-path (f485e51)
v9.2.2 - 17 Aug 2019
- apply patch only if there's a diff (e70e08f)
v9.2.1 - 25 Jul 2019
- pin commitizen@3.1.2 to support node 8 (ee774e3)
- pin cz-conventional-changelog@2.1.0 to support node 8 (e879b6a)
- remove empty spaces from warning (6126b72)
v9.2.0 - 10 Jul 2019
- add --relative option for controlling file paths (242deb5)
v9.1.0 - 06 Jul 2019
- snapshot with fully-resolved path name (b1a08b8)
- make node-api accessible (ca37906)
v9.0.2 - 03 Jul 2019
- run all commands returned by function linters (0dd0c94)
v9.0.1 - 02 Jul 2019
v9.0.0 - 01 Jul 2019
- parse titles for function linters (e24aaf2)
- remove advanced configuration options (04190c8)
- remove support for chunking (2ca9050)
- use execa's shell option to run commands (bed9127)
- add --shell and --quiet flags (ecf9227)
- add deprecation error for advanced configuration (4bef26e)
- support function linter returning array of commands (36e54a2)
- support functions as linter commands (f76c0d1)
- The advanced configuration options have been deprecated in favour of the simple format
- Local commands are no longer resolved by lint-staged, but execa will do this instead. In effect, there are no longer pretty error messages when commands are not found.
- Very long arguments strings are no longer chunked on Windows. Function linters should be used instead to customise this behaviour.
v8.2.1 - 13 Jun 2019
v8.2.0 - 06 Jun 2019
- normalize gitDir path for Windows compatibility (90e343b)
- throw error in runAll if outside git directory (6ac666d)
v8.1.7 - 15 May 2019
v8.1.6 - 03 May 2019
v8.1.5 - 01 Mar 2019
v8.1.4 - 14 Feb 2019
v8.1.3 - 02 Feb 2019
v8.1.2 - 02 Feb 2019
v8.1.1 - 28 Jan 2019
v8.1.0 - 21 Nov 2018
v8.0.5 - 17 Nov 2018
v8.0.4 - 31 Oct 2018
- package: update staged-git-files to version 1.1.2 (ce434d3)
v8.0.3 - 30 Oct 2018
v8.0.2 - 29 Oct 2018
v8.0.1 - 29 Oct 2018
v8.0.0 - 29 Oct 2018
- Node >= 8.6 is required
v7.3.0 - 20 Sep 2018
v7.2.2 - 12 Aug 2018
v7.2.1 - 12 Aug 2018
v7.2.0 - 11 Jun 2018
v7.1.3 - 01 Jun 2018
v7.1.2 - 21 May 2018
- package: Update cosmiconfig to version 5.0.2 (#444) (2fc7aa3), closes #441
- package: Update listr to version 0.14.1 (#445) (a56d7c9), closes #426
- Add .lintstagedrc.js to list of config files to search (9e27620)
v7.1.1 - 18 May 2018
v7.1.0 - 07 May 2018
v7.0.5 - 26 Apr 2018
v7.0.4 - 05 Apr 2018
v7.0.3 - 03 Apr 2018
- Fix cli-command-parser to parse arguments for execa (b4fbc3b), closes #419
- Use double quotes to make command work on Windows (06635c6)
v7.0.2 - 01 Apr 2018
v7.0.1 - 30 Mar 2018
- package: update staged-git-files to version 1.1.1 (31176c9)
v7.0.0 - 21 Feb 2018
- package: Bump dependencies (267ff0f)
-
Requires Node.js v6 or later.
-
Remove implicit support for running npm scripts.
Consider example
lint-staged
config:{ "name": "My project", "version": "0.1.0", "scripts": { "my-custom-script": "linter --arg1 --arg2", "precommit": "lint-staged" }, "lint-staged": { "*.js": ["my-custom-script", "git add"] } }
The list of commands should be changed to the following:
"*.js": ["npm run my-custom-script --", "git add"]
-
The following
minimatch
options are not supported inmicromatch
:
v6.1.1 - 16 Feb 2018
- package: Update staged-git-files to version 1.0.0 (677e860)
v6.1.0 - 26 Jan 2018
v6.0.1 - 19 Jan 2018
- package: update cosmiconfig to version 4.0.0 (80596c3)
v6.0.0 - 01 Dec 2017
verbose
config option has been deprecated and is superseded by the command line option--debug
.
v5.0.0 - 11 Nov 2017
gitDir
option deprecated and will be ignored. Additionally, glob patterns for linters should not be relative to the git root directory.
Consider a project with the following file structure:
`-- packages
|-- prj
| |-- package.json
| |-- src
| | `-- index.js
| `-- yarn.lock
`-- prj-2
`-- file
With lint-staged@4.3.0
, the config would need to be something like this:
gitDir: ../..
linters:
packages/prj/src/*.js:
- eslint --fix
- git add
With lint-staged@5
, this simplifies to:
linters:
src/*.js:
- eslint --fix
- git add
diff
view
@@ -1,5 +1,4 @@
-gitDir: ../..
linters:
- packages/prj/src/*.js:
+ src/*.js:
- eslint --fix
- git add
v4.3.0 - 18 Oct 2017
v4.2.3 - 25 Sep 2017
v4.2.2 - 22 Sep 2017
v4.2.1 - 15 Sep 2017
v4.2.0 - 15 Sep 2017
v4.1.3 - 07 Sep 2017
v4.1.2 - 06 Sep 2017
v4.1.1 - 06 Sep 2017
v4.1.0 - 04 Sep 2017
v4.0.4 - 24 Aug 2017
v4.0.3 - 06 Aug 2017
v4.0.2 - 17 Jul 2017
v4.0.1 - 06 Jul 2017
v4.0.0 - 18 Jun 2017
This might affect existing setups which depend on the --
argument.
(ad265664)
v3.6.1 - 10 Jun 2017
v3.6.0 - 01 Jun 2017
v3.5.1 - 29 May 2017
v3.5.0 - 25 May 2017
v3.4.2 - 17 May 2017
v3.4.1 - 28 Apr 2017
v3.4.0 - 13 Mar 2017
v3.3.2 - 13 Mar 2017
- Remove unnecessary
which
dependency and code block in findBin.js (3acd6c7b)
v3.3.1 - 19 Feb 2017
- concurrent: Wait for all tasks to finish before showing errors (5a44bea4, closes #86)
- package: update listr to version 0.11.0 (3c75c16b)
v3.3.0 - 30 Jan 2017
- gitDir: Run
npm run
scripts in the current working directory instead of git directory. (9c45d8ee, closes #122)
- verbose: Add verbose option (9dae19f9)
v3.2.9 - 30 Jan 2017
- concurrent: Fix
concurrent: false
could not be set using config (22a1d774)
v3.2.8 - 24 Jan 2017
- windows: Do not reuse execa options object for runners since it breaks on Windows (#124) (be8aa3f0, closes #114)
v3.2.7 - 18 Jan 2017
v3.2.6 - 09 Jan 2017
v3.2.5 - 30 Dec 2016
v3.2.4 - 19 Dec 2016
v3.2.3 - 14 Dec 2016
v3.2.2 - 07 Dec 2016
- [fix]: Force colors only when running in TTY (#108)
- [docs]: Added npm version badge
v3.2.1 - 04 Nov 2016
- [fix]: Added
{ dot: true }
to allow more complex globs with dots in path (#93) - [docs] Simpler pattern for matching js/jsx in the README.
- [docs] Be more specific about where to put
pre-commit
in the installation instructions. (#87) - [chore]: Added commitizen conventional changelog (#92)
- [chore] update eslint to version 3.9.1 (#88)
- [chore]: update listr to version 0.7.0 (#85)
- [chore]: Removed unused dev dependencies.
v3.2.0 - 18 Oct 2016
- [feature] Support rc files extensions (
.json
,.yml
etc) as they aren't supported by default
v3.1.1 - 17 Oct 2016
- [fix] Properly resolve paths when the git directory differs from the current working directory. #78
- [fix] Fixed
TypeError: Path must be a string. Received undefined
whengitDir
isn't defined in the config.
v3.1.0 - 13 Oct 2016
- Split code into smaller modules + added tests for them. Closes #68
- Support for different configs via https://github.com/davidtheclark/cosmiconfig. Closes #64
- Run separate linters concurrently by default
- Added concurrent option to the config. Closes #63
- Switched to https://github.com/okonet/eslint-config-okonet
- lint-staged now work from sub-directories. #65 by @TheWolfNL
- Output both
stdout
andstderr
in case of error. Closes #66
v3.0.3 - 22 Sep 2016
- Added
FORCE_COLOR
env variable to force colors for packages that depend on https://www.npmjs.com/package/supports-color. Closes #50
v3.0.2 - 12 Sep 2016
- Removed unused dependecies
v3.0.1 - 08 Sep 2016
- Switched to listr. Simplified code and more beautiful output.
- Switched to execa. Should fix #30
- Use ES2015. Dropped support for Node < 4.x
- Support commands with arguments in the lint-staged config. Closes #47
- Support binaries from $PATH. Closes #47
- Removed
--color
option from runner. You should pass arguments yourself.
v2.0.3 - 02 Aug 2016
v2.0.2 - 11 Jul 2016
- Fixes an error when running a config with just one task (#28). #27 @Anber.
- Beautiful string representation for multiple linters in case of error.
- Added tests to getLintersAsString.
v2.0.1 - 08 Jul 2016
- When on of the sequential tasks fails, exit the process. Closes #26
v2.0.0 - 08 Jul 2016
- Support for sequences of commands. Needs config update! #25 @okonet
- Allow adding files to the commit after running a task. #16 @okonet
v1.0.2 - 30 Jun 2016
- Fixed path resolution to the app root on Windows. #19 by
v1.0.1 - 07 Jun 2016
- Fixed support of local npm scripts from package.json
v1.0.0 - 07 Jun 2016
- Complete re-write using Node.js API to fix #5, #6, #7, #8
- Switched to staged-git-files that supports git filter. Exclude deleted files. Closes #12
v0.2.2 - 02 May 2016
- Switch to bin/bash and fix file existncy check #9 @fubhy
- Switch to
$(npm bin)
instead of hardcoding path #9 @fubhy - Updated flow installation instructions @okonet
v0.2.1 - 02 May 2016
v0.2.0 - 02 May 2016
- Added more linters: flow, JSCS @okonet
- Better console output when no binary is found @okonet
- Better README @okonet
v0.1.1 - 02 May 2016
- Initial release