Skip to content

feat: report shadowing node via PLUGIN.shadowHints - #48

Merged
linghengqian merged 2 commits into
mainfrom
feat/nodejs-shadow-hints
Nov 10, 2026
Merged

linghengqian merged 2 commits into
mainfrom
feat/nodejs-shadow-hints

Conversation

@linghengqian

Copy link
Copy Markdown
Member

Replace the PreUse PATH scan Note with PLUGIN.shadowHints.

On vfox 1.1.0+ the core warns itself and appends the plugin hint, so the plugin's own Note duplicated it for the same problem (version-fox/vfox#737, section 2). The plugin now declares PLUGIN.shadowHints (pnpm match, message and docs/pnpm.md link) and keeps its own Note for vfox before 1.1.0 only, which ignores the new metadata field (detected via RUNTIME.version in util.supports_shadow_hints).

  • metadata.lua: add PLUGIN.shadowHints
  • lib/util.lua: add supports_shadow_hints(), mark shadowing_node() as legacy path
  • hooks/pre_use.lua: stay quiet on vfox 1.1.0+, keep Note on older vfox
  • tests/hooks_test.lua: cover old quiet/note paths, version gate and shadowHints metadata
  • docs: pnpm, troubleshooting, development, changes (EN + zh-CN) with Unreleased marks

Refs version-fox/vfox#737

@linghengqian
linghengqian force-pushed the feat/nodejs-shadow-hints branch 2 times, most recently from 6d04ea2 to 8cd299c Compare November 10, 2026 02:55
@linghengqian linghengqian added the enhancement New feature or request label Nov 10, 2026
@linghengqian
linghengqian force-pushed the feat/nodejs-shadow-hints branch from 8cd299c to 776d7e4 Compare November 10, 2026 03:08
@linghengqian
linghengqian force-pushed the feat/nodejs-shadow-hints branch from 776d7e4 to 4ae1518 Compare November 10, 2026 03:18
…talls

Scan nvm, mise, asdf and Homebrew Cellar directories with a working
node in them, plus the winget directory on Windows, and report each
under the plain release number the binary prints. Shims, pnpm's
global runtime and copies without a versioned home are skipped.

Refs version-fox/vfox#737
@linghengqian
linghengqian merged commit 7099467 into main Nov 10, 2026
13 checks passed
@linghengqian
linghengqian deleted the feat/nodejs-shadow-hints branch November 10, 2026 04:08
linghengqian added a commit that referenced this pull request Nov 10, 2026
Release 0.5.5 is published, so the pages stop marking its behavior as
newer than the last release. This is the procedure of "Releasing" in
docs/development.md, in English and Chinese:

- changes.md: "Unreleased" becomes "0.5.5 (2026-11-10)", both entries
  get their pull request (#48), the sentence about the newest release
  "at the time of writing" goes, and "the new docs/managers.md"
  becomes "docs/managers.md".
- README, README_CN: the paragraph that explains "Unreleased" goes.
- managers, pnpm, troubleshooting: the "Unreleased: release 0.5.4 ..."
  remarks go. The Note row and the Warnings section now describe the
  two vfox generations without the marker.
- scenarios.md: the outputs are from "the code that became release
  0.5.5", and the shadowing bullet warns on both vfox generations
  with links to pnpm.md and managers.md, including link --detect.
- mirror.md: the User-Agent example is vfox-nodejs/0.5.5.
- source-build.md: the example URL of a released zip is 0.5.5.
- Historical "Before 0.5.4" / "Since 0.5.4" sentences stay.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant