Repository navigation
fix(deps): bump @sasjs/lint to 4.3.1 - #1496
Conversation
Picks up the three false positives reported in #1481, which are fixed in sasjs/lint#257 and released as 4.3.1: - a macro invoked inside the argument of `%str` / `%nrstr` now counts as used, so `sasjs lint fix` no longer deletes a declaration the file depends on. The masked argument is scanned for `%name` tokens only, so a quote or comment marker inside it cannot swallow the invocations that follow. - a mistyped entry tag (`@il`, `@l1`, `@1i`) is read as an entry, so a typo no longer hides the declarations below it, and the formatter repairs the tag. Unrelated tags (`@example`, `@param`) end the list and leave the section rewritable. - `<h4> Other Macros </h4>` is no longer read. It is not a SASjs header section - the compiler's dependency headers are `SAS Macros`, `SAS Includes`, `Binary Files`, `Data Inputs` and `Data Outputs` - and `ignoredMacros` is the setting for a macro with no file to point at. A file that listed a macro there now reports it. The peer range moves with the devDependency, so a project resolves 4.3.1 through `sasjs lint`. Verified through the CLI itself on the header from #1481: `sasjs lint find` reports no macro diagnostics, and `sasjs lint fix` writes `@li mf_getvalue.sas` back while keeping the `%str`-masked `psmf_getuserrole` entry.
There was a problem hiding this comment.
Reviewed the full diff: @sasjs/lint 4.3.0 -> 4.3.1 bump in package.json plus the matching lockfile entry (devDependency, peer range, resolved/integrity updated). No source changes.
- package.json:97 - "@sasjs/lint": "^4.3.1" keeps a caret range on a dependency this PR changes, while every other entry in the manifest is pinned exactly and .npmrc sets save-exact=true. Pin to "4.3.1" so a later install cannot silently drift. The peerDependencies entry at package.json:127 can stay ranged - loose peer ranges are the normal convention there.
Hardening passed: .npmrc has ignore-scripts=true and save-exact=true, lockfile is committed and in sync, CI uses npm ci and runs npm audit --omit=dev --audit-level=low as a hard step. This repo releases from semantic-release on main and "fix(deps): ..." is a valid patch-driving subject. Checks were still pending at review time.
1 finding above for review.
Coverage reportTotal coverage
Show files with reduced coverage 🔻Reduced coverage
Report generated by 🧪jest coverage report action from c2578d7 |
Closes #1481.
Bumps
@sasjs/lintfrom 4.3.0 to 4.3.1 in both places it is declared - the devDependency (the CLI's own specs) and the peerDependency (what a user's project resolves when it runssasjs lint).What arrives with 4.3.1 (sasjs/lint#257)
%str-masked invocation was counted as unused. A macro invoked inside%str/%nrstris now a use, sosasjs lint fixno longer deletes a declaration the file depends on. The masked argument is scanned for%nametokens only, never as code, so a quote or comment marker inside it cannot open a string and swallow the invocations that follow.@il(and@l1,@1i) is read as an entry, so a typo cannot truncate the list, and the formatter writes the tag back as@li. Unrelated tags (@example,@param) end the list and leave the section rewritable.webout. Already covered byignoredMacrossince 4.3.0; unchanged.4.3.1 also removes
<h4> Other Macros </h4>from the reader. It is not a SASjs header section - the compiler's dependency headers areSAS Macros,SAS Includes,Binary Files,Data InputsandData Outputs, and the word appears in no file in core, cli, utils, adapter, the extension or server. It entered lint with its own macro rules as an escape hatch, whichignoredMacroscovers. A file that listed a macro under that heading now reports it, and the fix points atSAS MacrosorignoredMacros.Verified through the CLI
On the header from #1481 (
@il mf_getvalue.sasplus a%str-masked%psmf_getuserrole()), using this build:Gates:
npm run buildclean,npm run lintclean,npm audit --omit=dev0 vulnerabilities,node release/audit.mjspasses on its documented exemptions (3).