es-check 7.1.0 → 7.2.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/README.md +14 -2
- package/index.js +8 -1
- package/package.json +18 -17
package/README.md
CHANGED
|
@@ -133,9 +133,21 @@ index.js es-check <ecmaVersion> [files...]
|
|
|
133
133
|
**Not**
|
|
134
134
|
|
|
135
135
|
```sh
|
|
136
|
-
|
|
136
|
+
|
|
137
|
+
--not=target1,target2 An array of file/folder names or globs that you would like to ignore. Defaults to `[]`.
|
|
138
|
+
|
|
137
139
|
```
|
|
138
140
|
|
|
141
|
+
**Files**
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
|
|
145
|
+
--files=target1,target2 An array of file/folder names or globs to test the ECMAScript version against. Alias of [...files] argument.
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
⚠️ **NOTE:** This is primarily intended as a way to override the `files` setting in the `.escheckrc` file for specific invocations. Setting both the `[...files]` argument and `--files` flag is an error.
|
|
150
|
+
|
|
139
151
|
### Global Options
|
|
140
152
|
|
|
141
153
|
```sh
|
|
@@ -203,7 +215,7 @@ ES Check is a small utility using powerful tools that [Isaac Z. Schlueter](https
|
|
|
203
215
|
|
|
204
216
|
## Contributing
|
|
205
217
|
|
|
206
|
-
ES Check has 3 main dependencies: [acorn](https://github.com/ternjs/acorn/), [glob](https://www.npmjs.com/package/glob), and [caporal](https://github.com/mattallty/Caporal.js). To contribute, file an [issue](https://github.com/yowainwright/es-check/issues) or submit a pull request.
|
|
218
|
+
ES Check has 3 main dependencies: [acorn](https://github.com/ternjs/acorn/), [glob](https://www.npmjs.com/package/glob), and [caporal](https://github.com/mattallty/Caporal.js). To contribute, file an [issue](https://github.com/yowainwright/es-check/issues) or submit a pull request. To setup local development, run `./bin/setup.sh` or open the devcontainer in VSCode.
|
|
207
219
|
|
|
208
220
|
### Contributors
|
|
209
221
|
|
package/index.js
CHANGED
|
@@ -30,6 +30,7 @@ program
|
|
|
30
30
|
.argument('[files...]', 'a glob of files to to test the EcmaScript version against')
|
|
31
31
|
.option('--module', 'use ES modules')
|
|
32
32
|
.option('--allow-hash-bang', 'if the code starts with #! treat it as a comment')
|
|
33
|
+
.option('--files <files>', 'a glob of files to to test the EcmaScript version against (alias for [files...])')
|
|
33
34
|
.option('--not <files>', 'folder or file names to skip')
|
|
34
35
|
.option('--no-color', 'disable use of colors in output')
|
|
35
36
|
.option('-v, --verbose', 'verbose mode: will also output debug messages')
|
|
@@ -53,6 +54,11 @@ program
|
|
|
53
54
|
|
|
54
55
|
const configFilePath = path.resolve(process.cwd(), '.escheckrc')
|
|
55
56
|
|
|
57
|
+
if (filesArg && filesArg.length && options.files) {
|
|
58
|
+
logger.error('Cannot pass in both [files...] argument and --files flag at the same time!')
|
|
59
|
+
process.exit(1)
|
|
60
|
+
}
|
|
61
|
+
|
|
56
62
|
/**
|
|
57
63
|
* @note
|
|
58
64
|
* Check for a configuration file.
|
|
@@ -61,7 +67,8 @@ program
|
|
|
61
67
|
*/
|
|
62
68
|
const config = fs.existsSync(configFilePath) ? JSON.parse(fs.readFileSync(configFilePath)) : {}
|
|
63
69
|
const expectedEcmaVersion = ecmaVersionArg ? ecmaVersionArg : config.ecmaVersion
|
|
64
|
-
const files =
|
|
70
|
+
const files =
|
|
71
|
+
filesArg && filesArg.length ? filesArg : options.files ? options.files.split(',') : [].concat(config.files)
|
|
65
72
|
const esmodule = options.module ? options.module : config.module
|
|
66
73
|
const allowHashBang = options.allowHashBang ? options.allowHashBang : config.allowHashBang
|
|
67
74
|
const pathsToIgnore = options.not ? options.not.split(',') : [].concat(config.not || [])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-check",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Checks the ECMAScript version of .js glob against a specified version of ECMAScript with a shell command",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,30 +38,31 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://github.com/yowainwright/es-check#readme",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@commitlint/cli": "
|
|
42
|
-
"@commitlint/config-conventional": "
|
|
43
|
-
"@commitlint/
|
|
44
|
-
"
|
|
41
|
+
"@commitlint/cli": "19.3.0",
|
|
42
|
+
"@commitlint/config-conventional": "19.2.2",
|
|
43
|
+
"@commitlint/format": "^19.3.0",
|
|
44
|
+
"@commitlint/prompt": "19.3.0",
|
|
45
|
+
"assert": "^2.1.0",
|
|
45
46
|
"codecov": "^3.8.3",
|
|
46
|
-
"codependence": "^0.
|
|
47
|
+
"codependence": "^0.3.0",
|
|
47
48
|
"commitizen": "4.3.0",
|
|
48
|
-
"conventional-changelog-cli": "^
|
|
49
|
-
"eslint": "
|
|
50
|
-
"eslint-config-prettier": "
|
|
51
|
-
"husky": "
|
|
49
|
+
"conventional-changelog-cli": "^4.1.0",
|
|
50
|
+
"eslint": "9.1.1",
|
|
51
|
+
"eslint-config-prettier": "9.1.0",
|
|
52
|
+
"husky": "9.0.11",
|
|
52
53
|
"is-ci": "^3.0.1",
|
|
53
|
-
"mocha": "
|
|
54
|
+
"mocha": "10.4.0",
|
|
54
55
|
"nyc": "^15.1.0",
|
|
55
56
|
"path-exists-cli": "^2.0.0",
|
|
56
|
-
"prettier": "2.
|
|
57
|
-
"release-it": "
|
|
57
|
+
"prettier": "3.2.5",
|
|
58
|
+
"release-it": "17.2.0"
|
|
58
59
|
},
|
|
59
60
|
"dependencies": {
|
|
60
|
-
"acorn": "8.
|
|
61
|
-
"commander": "
|
|
62
|
-
"fast-glob": "^3.2
|
|
61
|
+
"acorn": "8.11.3",
|
|
62
|
+
"commander": "12.0.0",
|
|
63
|
+
"fast-glob": "^3.3.2",
|
|
63
64
|
"supports-color": "^8.1.1",
|
|
64
|
-
"winston": "
|
|
65
|
+
"winston": "3.13.0"
|
|
65
66
|
},
|
|
66
67
|
"engines": {
|
|
67
68
|
"node": ">= 4"
|