diff --git a/.ci.sh b/.ci.sh index 11a58bef5..f889d5cc6 100644 --- a/.ci.sh +++ b/.ci.sh @@ -441,7 +441,7 @@ import moduleFs from "fs"; "type": "git", "url": "https://github.com/jslint-org/jslint.git" }, - "version": "2024.10.1" + "version": "2024.11.1" }, undefined, 4) } ].map(async function ({ diff --git a/CHANGELOG.md b/CHANGELOG.md index 87e776611..b89d59821 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ - jslint - add new warning requiring paren around plus-separated concatenations. - jslint - try to improve parser to be able to parse jquery.js without stopping. -# v2024.10.1 +# v2024.11.1-beta +- bugfix - Fix optional dynamic-property/function not recognized. - ci - Update shell-function shHttpFileServer() to auto-serve /index.html, when url-path is root /. # v2024.6.28 diff --git a/README.md b/README.md index 1540182d8..d3c21f7fc 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Douglas Crockford # Status -| Branch | [master
(v2024.10.1)](https://github.com/jslint-org/jslint/tree/master) | [beta
(Web Demo)](https://github.com/jslint-org/jslint/tree/beta) | [alpha
(Development)](https://github.com/jslint-org/jslint/tree/alpha) | +| Branch | [master
(v2024.6.28)](https://github.com/jslint-org/jslint/tree/master) | [beta
(Web Demo)](https://github.com/jslint-org/jslint/tree/beta) | [alpha
(Development)](https://github.com/jslint-org/jslint/tree/alpha) | |--:|:--:|:--:|:--:| | CI | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jslint-org/jslint/actions?query=branch%3Amaster) | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=beta)](https://github.com/jslint-org/jslint/actions?query=branch%3Abeta) | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=alpha)](https://github.com/jslint-org/jslint/actions?query=branch%3Aalpha) | | Coverage | [![coverage](https://jslint-org.github.io/jslint/branch-master/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-master/.artifact/coverage/index.html) | [![coverage](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage/index.html) | [![coverage](https://jslint-org.github.io/jslint/branch-alpha/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-alpha/.artifact/coverage/index.html) | @@ -923,7 +923,7 @@ eval("1"); //jslint-ignore-line - `git push upstream alpha -f` - verify ci-success for upstream-branch-alpha - https://github.com/jslint-org/jslint/actions -- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-p2024.6.23 +- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-p2024.11.9 - click `Create pull request` - input `Add your description here...` with: ``` diff --git a/jslint.mjs b/jslint.mjs index 5bfa6812b..74572b281 100644 --- a/jslint.mjs +++ b/jslint.mjs @@ -163,7 +163,7 @@ let jslint_charset_ascii = ( + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~\u007f" ); -let jslint_edition = "v2024.10.1"; +let jslint_edition = "v2024.11.1-beta"; let jslint_export; // The jslint object to be exported. let jslint_fudge = 1; // Fudge starting line and starting // ... column to 1. @@ -4698,8 +4698,7 @@ function jslint_phase3_parse(state) { function infix_option_chain(left) { const the_token = token_now; - let name; - name = token_nxt; + let name = token_nxt; if ( ( left.id !== "(string)" @@ -4733,6 +4732,18 @@ function jslint_phase3_parse(state) { check_left(left, the_token); } + +// PR-xxx - Fix issue #468 - optional dynamic-property/function not recognized. + + if (name.id === "[" || name.id === "(") { + test_cause("dyn_prop_or_func"); + +// test_cause: +// ["aa?.(aa)", "infix_option_chain", "dyn_prop_or_func", "", 0] +// ["aa?.[aa]", "infix_option_chain", "dyn_prop_or_func", "", 0] + + return left; + } if (!name.identifier) { // test_cause: diff --git a/package.json b/package.json index 23aa08f74..cb6f8a257 100644 --- a/package.json +++ b/package.json @@ -35,5 +35,5 @@ "shCiArtifactUpload": 1, "shCiPublishNpm": 1, "type": "module", - "version": "2024.10.1" + "version": "2024.11.1-beta" }