@depup/lint-staged 16.3.2-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Andrey Okonetchnikov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/MIGRATION.md ADDED
@@ -0,0 +1,72 @@
1
+ ## v16
2
+
3
+ #### Updated Node.js version requirement
4
+
5
+ For version `lint-staged@16.0.0` the lowest supported Node.js version is `20.19.0`, following requirements of `nano-spawn`. Please upgrade your Node.js version.
6
+
7
+ For version `lint-staged@16.1.0` this is lowered to `20.17.0`, again following `nano-spawn`.
8
+
9
+ #### Removed validation for removed advanced configuration file options
10
+
11
+ Advanced configuration options (removed in v9) are no longer validated separately, and might be treated as valid globs for tasks. Please do not try to use advanced config options anymore, they haven't been supported since v8.
12
+
13
+ #### Removed the `--shell` option
14
+
15
+ 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 `"$@"`:
16
+
17
+ ```shell
18
+ # my-script.sh
19
+ #!/bin/bash
20
+
21
+ echo "Staged files: $@"
22
+ ```
23
+
24
+ and
25
+
26
+ ```json
27
+ { "*.js": "my-script.sh" }
28
+ ```
29
+
30
+ If you were using the shell option to avoid passing filenames to tasks, for example `bash -c 'tsc --noEmit'`, use the function syntax instead:
31
+
32
+ ```js
33
+ export default { '*.ts': () => 'tsc --noEmit' }
34
+ ```
35
+
36
+ #### Processes are spawned using `nano-spawn`
37
+
38
+ Processes are spawned using [nano-spawn](https://github.com/sindresorhus/nano-spawn) instead of [execa](https://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:
39
+
40
+ ```json
41
+ {
42
+ "*.js": "node my-js-linter.js"
43
+ }
44
+ ```
45
+
46
+ ## v15
47
+
48
+ - Since `v15.0.0` _lint-staged_ no longer supports Node.js 16. Please upgrade your Node.js version to at least `18.12.0`.
49
+
50
+ ## v14
51
+
52
+ - Since `v14.0.0` _lint-staged_ no longer supports Node.js 14. Please upgrade your Node.js version to at least `16.14.0`.
53
+
54
+ ## v13
55
+
56
+ - Since `v13.0.0` _lint-staged_ no longer supports Node.js 12. Please upgrade your Node.js version to at least `14.13.1`, or `16.0.0` onward.
57
+ - Version `v13.3.0` was incorrectly released including code of version `v14.0.0`. This means the breaking changes of `v14` are also included in `v13.3.0`, the last `v13` version released
58
+
59
+ ## v12
60
+
61
+ - Since `v12.0.0` _lint-staged_ is a pure ESM module, so make sure your Node.js version is at least `12.20.0`, `14.13.1`, or `16.0.0`. Read more about ESM modules from the official [Node.js Documentation site here](https://nodejs.org/api/esm.html#introduction).
62
+
63
+ ## v10
64
+
65
+ - From `v10.0.0` onwards any new modifications to originally staged files will be automatically added to the commit.
66
+ If your task previously contained a `git add` step, please remove this.
67
+ The automatic behaviour ensures there are less race-conditions,
68
+ since trying to run multiple git operations at the same time usually results in an error.
69
+ - From `v10.0.0` onwards, lint-staged uses git stashes to improve speed and provide backups while running.
70
+ Since git stashes require at least an initial commit, you shouldn't run lint-staged in an empty repo.
71
+ - From `v10.0.0` onwards, lint-staged requires Node.js version 10.13.0 or later.
72
+ - From `v10.0.0` onwards, lint-staged will abort the commit if linter tasks undo all staged changes. To allow creating an empty commit, please use the `--allow-empty` option.