Skip to content

ci: stop setup-node caching in the tool-only lint and fmt jobs - #73

Merged
bryanfawcett merged 1 commit into
mainfrom
ci/setup-node-no-pm-cache
Oct 2, 2026
Merged

bryanfawcett merged 1 commit into
mainfrom
ci/setup-node-no-pm-cache

Conversation

@bryanfawcett

Copy link
Copy Markdown
Member

lint / prettier, lint / markdownlint and vite-plus / fmt use Node only to run a tool installed into a temp prefix; they never install the repo's dependencies.

setup-node v5 and later turn the npm cache on automatically when package.json pins packageManager to npm. If the repo has no lockfile, the step then fails with:

Dependencies lock file is not found … Supported file patterns: package-lock.json,npm-shrinkwrap.json,yarn.lock

The Vite+ adoption pins packageManager, so every lockfile-less repo failed all three jobs on its adoption PR, two of them required checks: nyuchi/api-gateway#136, nyuchi/demo-repository#5 and nyuchi/Paynow-NodeJS-SDK#1.

This sets package-manager-cache: false on those three setup-node steps. There is nothing to cache in these jobs, so it costs nothing elsewhere. The check/test/build jobs use setup-vp, which handles caching itself, and are unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq

prettier, markdownlint and vite-plus / fmt use Node only to run a tool
installed into a temp prefix. setup-node v5+ turns its npm cache on when
package.json pins packageManager to npm, and fails when the repo has no
lockfile ("Dependencies lock file is not found"). Pinning
packageManager is part of the Vite+ adoption, so lockfile-less repos
(api-gateway, demo-repository, Paynow-NodeJS-SDK) failed all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq
@bryanfawcett
bryanfawcett merged commit fad2d71 into main Oct 2, 2026
20 checks passed
@bryanfawcett
bryanfawcett deleted the ci/setup-node-no-pm-cache branch October 2, 2026 18:21
bryanfawcett added a commit to nyuchi/Paynow-NodeJS-SDK that referenced this pull request Oct 2, 2026
nyuchi/.github#73 stops setup-node caching in the tool-only jobs, which
failed here because packageManager is pinned and there is no lockfile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq
bryanfawcett added a commit to nyuchi/Paynow-NodeJS-SDK that referenced this pull request Oct 2, 2026
* build: adopt the Vite+ contract with type checking on

vite.config.ts carries the org format settings and turns on type-aware
linting and type checking. vp test replaces jest, whose ts-jest preset was
never installed, so the tests had not run. tsconfig drops the options
TypeScript 7 removed (baseUrl, a non-relative paths entry, target es5),
sets rootDir to keep the dist layout, and states strict: false and the
node types, which TypeScript 7 no longer defaults. dist/ is untouched and
excluded from fmt and lint. Sources are reformatted by vp fmt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq

* ci: re-run the lint and Vite+ jobs on the fixed shared workflows

nyuchi/.github#73 stops setup-node caching in the tool-only jobs, which
failed here because packageManager is pinned and there is no lockfile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq

* docs: fix the README's markdownlint findings

MD030 (two spaces after the list markers) and MD014 ($ prompts on
commands with no output).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq

* fix: email validation without exponential backtracking

The reformat made CodeQL report the existing js/redos alert on
isValidEmail as new. The rewritten pattern accepts the same language
(300,000 random strings agree) without the nested optional quantifier,
and addresses over 254 characters (the SMTP limit) are refused before
the regex runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHjaH1Vt2dVLWU68iz8tFq

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant