Skip to content

refactor(env): share .nvmrc line parsing between reading and pinning - #3125

Open
liangmiQwQ wants to merge 3 commits into
voidzero-dev:mainfrom
liangmiQwQ:refactor/nvmrc-parser
Open

liangmiQwQ wants to merge 3 commits into
voidzero-dev:mainfrom
liangmiQwQ:refactor/nvmrc-parser

Conversation

@liangmiQwQ

@liangmiQwQ liangmiQwQ commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

The .nvmrc line rules (strip # comments, skip blank and key=value lines, reject multiple declarations) were written twice: once in read_nvmrc_file and once in nvmrc_version_span for vp env pin, with a comment asking them to stay in sync.

This PR moves those rules into a single nvmrc_version_spans iterator in vp_js_runtime that yields the byte range of each version declaration. Reading builds on it through a new pure parse_nvmrc_content, and pinning uses the same ranges to replace the version in place. The content cases in test_read_nvmrc_file now run against the pure parser without temp files.

No behavior changes.

🤖 Generated with Claude Code

@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T15:13:09.771782Z bbdb0ac Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: bbdb0ac470

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@liangmiQwQ
liangmiQwQ marked this pull request as ready for review October 19, 2026 21:57

This branch has not been deployed

No deployments
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