Skip to content

fix: follow .nvmrc/.node-version both ways on vfox 1.1.0, drop the env-state workaround; docs - #50

Merged
linghengqian merged 1 commit into
mainfrom
fix/46-nvmrc-cd-cache
Nov 10, 2026
Merged

linghengqian merged 1 commit into
mainfrom
fix/46-nvmrc-cd-cache

Conversation

@linghengqian

Copy link
Copy Markdown
Member

vfox 1.1.0 tracks version files in its env cache (version-fox/vfox#745, fixed by version-fox/vfox#748), so this removes the workaround from #44 and documents the fixed behavior.

  • hooks/parse_legacy_file.lua, lib/util.lua: drop util.forget_env_state and its call.
  • tests/hooks_test.lua: drop its tests and the __VFOX_CURTMPPATH hiding; tests/e2e/windows/verify.go: update the remark.
  • docs (EN+ZH): nvmrc.md, scenarios.md, development.md, changes.md (Unreleased), troubleshooting.md, README.md, README_CN.md. Needs vfox >= 1.1.0 for cd switching; older vfox applies the file at shell start only.

Verified with the vfox 1.1.0 release binary against plugin 0.5.3 and this branch (both without the workaround): cd into .nvmrc/.node-version dirs, between two such dirs, in-place edits, and cd out to a plain dir all switch, settling to cached output afterwards.

  • hook tests: 80 passed, 0 failed; gofmt, go vet, stylua clean.

Fixes #46

…v-state workaround; docs

vfox 1.1.0 tracks version files in its env cache (version-fox/vfox#745,
fixed by version-fox/vfox#748), so ParseLegacyFile no longer removes
env-state.json: cd in, cd out and in-place edits all switch, and idle
prompts reuse the cached output. On older vfox the file only applies at
shell start.

Fixes #46
@linghengqian linghengqian added the bug Something isn't working label Nov 10, 2026
@linghengqian
linghengqian merged commit 85f35ec into main Nov 10, 2026
13 checks passed
@linghengqian
linghengqian deleted the fix/46-nvmrc-cd-cache branch November 10, 2026 05:45
linghengqian added a commit that referenced this pull request Nov 10, 2026
Release 0.5.6 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.6 (2026-11-10)", the entry
  gets its pull request (#50), the sentence about the newest release
  "at the time of writing" goes.
- README, README_CN: the paragraph that explains "Unreleased" goes.
- nvmrc, scenarios: the "Unreleased: release 0.5.5 ..." remarks go.
  The scenarios outputs are from "the code that became release
  0.5.6", and the replayed table is from "release 0.5.6".
- mirror.md: the User-Agent example is vfox-nodejs/0.5.6.
- source-build.md: the example URL of a released zip is 0.5.6.
- Historical "Before 0.5.4" / "Release 0.5.5 ..." sentences stay.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track version-fox/vfox#745: .nvmrc and .node-version are not applied after a cd

1 participant