Skip to content

Ci add missing node version spec to enforce consistency with package.json#418

Open
clintjeff2 wants to merge 2 commits into
Bitcoindefi:mainfrom
clintjeff2:CI-add-missing-Node-version-spec-to-enforce-consistency-with-package.json-#224
Open

Ci add missing node version spec to enforce consistency with package.json#418
clintjeff2 wants to merge 2 commits into
Bitcoindefi:mainfrom
clintjeff2:CI-add-missing-Node-version-spec-to-enforce-consistency-with-package.json-#224

Conversation

@clintjeff2

Copy link
Copy Markdown
Contributor

Motivation

  • The repository declared @types/node: "^22" and is tested locally with Node 22, but CI used Node 20 which caused install/test mismatches and CI failures.
  • Documenting and enforcing the Node runtime prevents future CI failures and ensures contributors use the correct Node version.

Description

  • Add engines.node: ">=22.0.0" to package.json to declare the required Node runtime.
  • Update .github/workflows/ci.yml to use node-version: 22 for the CI setup-node step.
  • Add .nvmrc with 22 so nvm users pick Node 22 automatically.
  • Add .node-version with 22 for tools that read that file (Volta, nodenv, etc.).

Testing

  • Ran a quick verification script node -e "..." that checks package.json.engines.node, .nvmrc, .node-version, and that the CI workflow contains node-version: 22, and it exited successfully.
  • Ran git diff --check and found no whitespace or diff issues.

Closes #224

@sonarqubecloud

Copy link
Copy Markdown

@clintjeff2

Copy link
Copy Markdown
Contributor Author

@leocagli, review and merge.

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.

CI: add missing Node version spec to enforce consistency with package.json

1 participant