@jslint-org/jslint 2024.3.26 → 2024.11.24
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/CHANGELOG.md +9 -0
- package/README.md +32 -32
- package/jslint.mjs +38 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
- jslint - add new warning requiring paren around plus-separated concatenations.
|
|
8
8
|
- jslint - try to improve parser to be able to parse jquery.js without stopping.
|
|
9
9
|
|
|
10
|
+
# v2024.11.24
|
|
11
|
+
- jslint - bugfix - Fix optional dynamic-property/function-call not recognized.
|
|
12
|
+
- quickstart - bugfix - Fix broken quickstart-jslint-in-codemirror demo.
|
|
13
|
+
- ci - Update shell-function shHttpFileServer() to auto-serve /index.html, when url-path is root /.
|
|
14
|
+
|
|
15
|
+
# v2024.6.28
|
|
16
|
+
- coverage - Fix coverage-function v8CoverageReportCreate() throwing error EINVAL in latest nodejs-security-patch, when running win32-coverage with npm.cmd.
|
|
17
|
+
- jslint - Remove unnecessary shell-function shCurlExe().
|
|
18
|
+
|
|
10
19
|
# v2024.3.26
|
|
11
20
|
- ci - Add shell-functions shGitPullrequestCleanup(), shGitPullrequest() to automatically cleanup or create-and-push github-pull-commit to origin/alpha.
|
|
12
21
|
- jslint - Allow destructuring-assignment after function-definition.
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ Douglas Crockford <douglas@crockford.com>
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
# Status
|
|
6
|
-
| Branch | [master<br>(v2024.
|
|
6
|
+
| Branch | [master<br>(v2024.11.24)](https://github.com/jslint-org/jslint/tree/master) | [beta<br>(Web Demo)](https://github.com/jslint-org/jslint/tree/beta) | [alpha<br>(Development)](https://github.com/jslint-org/jslint/tree/alpha) |
|
|
7
7
|
|--:|:--:|:--:|:--:|
|
|
8
8
|
| CI | [](https://github.com/jslint-org/jslint/actions?query=branch%3Amaster) | [](https://github.com/jslint-org/jslint/actions?query=branch%3Abeta) | [](https://github.com/jslint-org/jslint/actions?query=branch%3Aalpha) |
|
|
9
9
|
| Coverage | [](https://jslint-org.github.io/jslint/branch-master/.artifact/coverage/index.html) | [](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage/index.html) | [](https://jslint-org.github.io/jslint/branch-alpha/.artifact/coverage/index.html) |
|
|
@@ -402,7 +402,7 @@ import jslint from "../jslint.mjs";
|
|
|
402
402
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/codemirror.css">
|
|
403
403
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/addon/lint/lint.css">
|
|
404
404
|
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/codemirror.js"></script>
|
|
405
|
-
<script defer src="https://codemirror.
|
|
405
|
+
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/mode/javascript/javascript.js"></script>
|
|
406
406
|
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/addon/lint/lint.js"></script>
|
|
407
407
|
|
|
408
408
|
<!-- Assets from jslint. -->
|
|
@@ -917,13 +917,13 @@ eval("1"); //jslint-ignore-line
|
|
|
917
917
|
<br><br>
|
|
918
918
|
### pull-request merge
|
|
919
919
|
- find highest issue-number at https://github.com/jslint-org/jslint/issues/, https://github.com/jslint-org/jslint/pulls/, and add +1 to it for PR-xxx
|
|
920
|
-
-
|
|
920
|
+
- `shGitPullrequest beta beta`
|
|
921
921
|
- verify ci-success for origin-branch-alpha
|
|
922
|
-
- https://github.com/kaizhu256/jslint/actions
|
|
923
|
-
-
|
|
922
|
+
- https://github.com/kaizhu256/jslint/actions
|
|
923
|
+
- `git push upstream alpha -f`
|
|
924
924
|
- verify ci-success for upstream-branch-alpha
|
|
925
|
-
- https://github.com/jslint-org/jslint/actions
|
|
926
|
-
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-p2024.
|
|
925
|
+
- https://github.com/jslint-org/jslint/actions
|
|
926
|
+
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-p2024.11.24
|
|
927
927
|
- click `Create pull request`
|
|
928
928
|
- input `Add your description here...` with:
|
|
929
929
|
```
|
|
@@ -932,7 +932,7 @@ Fixes #xxx.
|
|
|
932
932
|
|
|
933
933
|
This PR will ...
|
|
934
934
|
|
|
935
|
-
|
|
935
|
+
This PR will additionally:
|
|
936
936
|
- <secondary-commit-message>
|
|
937
937
|
...
|
|
938
938
|
|
|
@@ -945,25 +945,25 @@ this PR will additionally:
|
|
|
945
945
|
- wait awhile before continuing ...
|
|
946
946
|
- click `Rebase and merge`
|
|
947
947
|
- verify ci-success for upstream-branch-beta
|
|
948
|
-
- https://github.com/jslint-org/jslint/actions
|
|
949
|
-
-
|
|
948
|
+
- https://github.com/jslint-org/jslint/actions
|
|
949
|
+
- `shGitPullrequestCleanup`
|
|
950
950
|
- verify ci-success for origin-branch-alpha
|
|
951
|
-
- https://github.com/kaizhu256/jslint/actions
|
|
952
|
-
-
|
|
951
|
+
- https://github.com/kaizhu256/jslint/actions
|
|
952
|
+
- `git push upstream alpha -f`
|
|
953
953
|
- verify ci-success for upstream-branch-alpha
|
|
954
|
-
- https://github.com/jslint-org/jslint/actions
|
|
954
|
+
- https://github.com/jslint-org/jslint/actions
|
|
955
955
|
- click `Delete branch`
|
|
956
956
|
|
|
957
957
|
|
|
958
958
|
<br><br>
|
|
959
959
|
### branch-master commit
|
|
960
|
-
-
|
|
960
|
+
- `shGitPullrequest master beta`
|
|
961
961
|
- verify ci-success for origin-branch-alpha
|
|
962
|
-
- https://github.com/kaizhu256/jslint/actions
|
|
963
|
-
-
|
|
962
|
+
- https://github.com/kaizhu256/jslint/actions
|
|
963
|
+
- `git push upstream alpha -f`
|
|
964
964
|
- verify ci-success for upstream-branch-alpha
|
|
965
|
-
- https://github.com/jslint-org/jslint/actions
|
|
966
|
-
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-v2024.
|
|
965
|
+
- https://github.com/jslint-org/jslint/actions
|
|
966
|
+
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-v2024.11.24
|
|
967
967
|
- click `Create pull request`
|
|
968
968
|
- input `Add a title` with: `# v20yy.mm.dd`
|
|
969
969
|
- input `Add a description` with:
|
|
@@ -978,27 +978,27 @@ this PR will additionally:
|
|
|
978
978
|
- wait awhile before continuing ...
|
|
979
979
|
- click `Rebase and merge`
|
|
980
980
|
- verify ci-success for upstream-branch-beta
|
|
981
|
-
- https://github.com/jslint-org/jslint/actions
|
|
982
|
-
-
|
|
981
|
+
- https://github.com/jslint-org/jslint/actions
|
|
982
|
+
- `shGitPullrequestCleanup`
|
|
983
983
|
- verify ci-success for origin-branch-alpha
|
|
984
|
-
- https://github.com/kaizhu256/jslint/actions
|
|
985
|
-
-
|
|
984
|
+
- https://github.com/kaizhu256/jslint/actions
|
|
985
|
+
- `git push upstream alpha -f`
|
|
986
986
|
- verify ci-success for upstream-branch-alpha
|
|
987
|
-
- https://github.com/jslint-org/jslint/actions
|
|
987
|
+
- https://github.com/jslint-org/jslint/actions
|
|
988
988
|
- click `Delete branch`
|
|
989
|
-
-
|
|
989
|
+
- `git push origin beta:master`
|
|
990
990
|
- verify ci-success for origin-branch-master
|
|
991
|
-
- https://github.com/kaizhu256/jslint/actions
|
|
992
|
-
-
|
|
991
|
+
- https://github.com/kaizhu256/jslint/actions
|
|
992
|
+
- `git push upstream beta:master`
|
|
993
993
|
- verify ci-success for upstream-branch-master
|
|
994
|
-
- https://github.com/jslint-org/jslint/actions
|
|
994
|
+
- https://github.com/jslint-org/jslint/actions
|
|
995
995
|
|
|
996
996
|
|
|
997
997
|
<br><br>
|
|
998
998
|
### branch-master publish
|
|
999
|
-
-
|
|
999
|
+
- `git push upstream beta:master`
|
|
1000
1000
|
- verify ci-success for upstream-branch-master
|
|
1001
|
-
- https://github.com/jslint-org/jslint/actions
|
|
1001
|
+
- https://github.com/jslint-org/jslint/actions
|
|
1002
1002
|
- goto https://github.com/jslint-org/jslint/releases/new
|
|
1003
1003
|
- input `Choose a tag` with: `v20yy.mm.dd`
|
|
1004
1004
|
- click `Create new tag: v20yy.mm.dd on publish`
|
|
@@ -1016,7 +1016,7 @@ this PR will additionally:
|
|
|
1016
1016
|
- click `Preview` and review
|
|
1017
1017
|
- click `Publish release`
|
|
1018
1018
|
- verify ci-success for upstream-branch-publish
|
|
1019
|
-
- https://github.com/jslint-org/jslint/actions
|
|
1019
|
+
- https://github.com/jslint-org/jslint/actions
|
|
1020
1020
|
- verify email-notification `Successfully published @jslint-org/jslint@20yy.mm.dd`
|
|
1021
1021
|
|
|
1022
1022
|
|
|
@@ -1024,10 +1024,10 @@ this PR will additionally:
|
|
|
1024
1024
|
### vscode-jslint publish
|
|
1025
1025
|
- goto https://github.com/jslint-org/jslint/tree/gh-pages/branch-beta/.artifact/jslint_wrapper_vscode
|
|
1026
1026
|
- click `vscode-jslint-20yy.mm.dd.vsix`
|
|
1027
|
-
- click `
|
|
1027
|
+
- click `Raw` to download
|
|
1028
1028
|
- goto https://marketplace.visualstudio.com/manage/publishers/jslint
|
|
1029
1029
|
- right-click `Update`
|
|
1030
|
-
-
|
|
1030
|
+
- upload downloaded file `vscode-jslint-20yy.mm.dd.vsix`
|
|
1031
1031
|
- click 'Upload'
|
|
1032
1032
|
- verify email-notification `[Succeeded] Extension publish on Visual Studio Marketplace - vscode-jslint`
|
|
1033
1033
|
|
package/jslint.mjs
CHANGED
|
@@ -125,8 +125,8 @@
|
|
|
125
125
|
process_env, process_exit, promises, property, property_dict, push, quote,
|
|
126
126
|
ranges, readFile, readdir, readonly, recursive, reduce, repeat, replace,
|
|
127
127
|
resolve, result, reverse, role, round, scriptId, search, set, shebang,
|
|
128
|
-
shift, signature, single, slice, some, sort, source, spawn, splice,
|
|
129
|
-
stack, stack_trace, start, startOffset, startsWith, statement,
|
|
128
|
+
shell, shift, signature, single, slice, some, sort, source, spawn, splice,
|
|
129
|
+
split, stack, stack_trace, start, startOffset, startsWith, statement,
|
|
130
130
|
statement_prv, stdio, stop, stop_at, stringify, subscript, switch,
|
|
131
131
|
syntax_dict, tenure, test, test_cause, test_internal_error, this, thru,
|
|
132
132
|
toLocaleString, toString, token, token_global, token_list, token_nxt,
|
|
@@ -163,7 +163,7 @@ let jslint_charset_ascii = (
|
|
|
163
163
|
+ "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
|
|
164
164
|
+ "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
|
|
165
165
|
);
|
|
166
|
-
let jslint_edition = "v2024.
|
|
166
|
+
let jslint_edition = "v2024.11.24";
|
|
167
167
|
let jslint_export; // The jslint object to be exported.
|
|
168
168
|
let jslint_fudge = 1; // Fudge starting line and starting
|
|
169
169
|
// ... column to 1.
|
|
@@ -4698,8 +4698,7 @@ function jslint_phase3_parse(state) {
|
|
|
4698
4698
|
|
|
4699
4699
|
function infix_option_chain(left) {
|
|
4700
4700
|
const the_token = token_now;
|
|
4701
|
-
let name;
|
|
4702
|
-
name = token_nxt;
|
|
4701
|
+
let name = token_nxt;
|
|
4703
4702
|
if (
|
|
4704
4703
|
(
|
|
4705
4704
|
left.id !== "(string)"
|
|
@@ -4733,6 +4732,18 @@ function jslint_phase3_parse(state) {
|
|
|
4733
4732
|
|
|
4734
4733
|
check_left(left, the_token);
|
|
4735
4734
|
}
|
|
4735
|
+
|
|
4736
|
+
// Issue #468 - Fix optional dynamic-property/function-call not recognized.
|
|
4737
|
+
|
|
4738
|
+
if (name.id === "[" || name.id === "(") {
|
|
4739
|
+
test_cause("dyn_prop_or_call");
|
|
4740
|
+
|
|
4741
|
+
// test_cause:
|
|
4742
|
+
// ["aa?.(bb)", "infix_option_chain", "dyn_prop_or_call", "", 0]
|
|
4743
|
+
// ["aa?.[bb]", "infix_option_chain", "dyn_prop_or_call", "", 0]
|
|
4744
|
+
|
|
4745
|
+
return left;
|
|
4746
|
+
}
|
|
4736
4747
|
if (!name.identifier) {
|
|
4737
4748
|
|
|
4738
4749
|
// test_cause:
|
|
@@ -11285,24 +11296,37 @@ function sentinel() {}
|
|
|
11285
11296
|
}
|
|
11286
11297
|
}));
|
|
11287
11298
|
exitCode = await new Promise(function (resolve) {
|
|
11288
|
-
|
|
11289
|
-
(
|
|
11290
|
-
processArgv[0] === "npm"
|
|
11299
|
+
let processArgv0 = processArgv[0];
|
|
11291
11300
|
|
|
11292
11301
|
// If win32 environment, then replace program npm with npm.cmd.
|
|
11293
11302
|
// Coverage-hack - Ugly-hack to get test-coverage under both win32 and linux.
|
|
11294
11303
|
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11304
|
+
if (processArgv0 === "npm") {
|
|
11305
|
+
processArgv0 = process.platform.replace(
|
|
11306
|
+
"win32",
|
|
11307
|
+
"npm.cmd"
|
|
11308
|
+
).replace(
|
|
11309
|
+
process.platform,
|
|
11310
|
+
"npm"
|
|
11311
|
+
);
|
|
11312
|
+
}
|
|
11313
|
+
moduleChildProcess.spawn(
|
|
11314
|
+
processArgv0,
|
|
11301
11315
|
processArgv.slice(1),
|
|
11302
11316
|
{
|
|
11303
11317
|
env: Object.assign({}, process.env, {
|
|
11304
11318
|
NODE_V8_COVERAGE: coverageDir
|
|
11305
11319
|
}),
|
|
11320
|
+
|
|
11321
|
+
// PR-465
|
|
11322
|
+
// https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
|
|
11323
|
+
// Node.js will now error with EINVAL if a .bat or .cmd file is passed to
|
|
11324
|
+
// child_process.spawn and child_process.spawnSync without the shell option set.
|
|
11325
|
+
|
|
11326
|
+
shell: (
|
|
11327
|
+
processArgv0.endsWith(".bat")
|
|
11328
|
+
|| processArgv0.endsWith(".cmd")
|
|
11329
|
+
),
|
|
11306
11330
|
stdio: ["ignore", 1, 2]
|
|
11307
11331
|
}
|
|
11308
11332
|
).on("exit", resolve);
|
package/package.json
CHANGED