Skip to content

feat(checks): hint engine-strict when engines.node is set - #6

Open
knownshah wants to merge 1 commit into
terngg:mainfrom
knownshah:feat/engine-strict-hint
Open

knownshah wants to merge 1 commit into
terngg:mainfrom
knownshah:feat/engine-strict-hint

Conversation

@knownshah

Copy link
Copy Markdown

Summary

When package.json defines engines.node and .npmrc does not enable engine-strict=true, tern doctor now surfaces an informational hint so installs fail fast on mismatched Node versions.

Changes

  • src/checks/node-version.ts — detect engines.node, parse .npmrc for engine-strict=true, attach hint when missing
  • tests/checks/node-version.test.ts — three new cases (hint when missing, no hint when present, no hint without engines)

Type of Change

  • New feature

Validation

  • pnpm typecheck — pass
  • pnpm format:check — pass
  • pnpm lint — pass
  • pnpm test — 105/105 passed
  • pnpm build — pass

Closes #2

When package.json defines engines.node and .npmrc does not enable
engine-strict=true, surface an informational doctor hint so installs
fail fast on mismatched Node versions.

Closes terngg#2
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.

feat(checks): Add engine-strict recommendation when engines.node is configured

1 participant