Per-root .env.local loading + require Node >=22#2
Merged
Conversation
A module-level boolean latched after the first loadSecrets call and ignored workspaceRoot thereafter, so a second deploy in the same process (multi-project workspace / watch mode) reused the first root's env and never read its own .env.local. Track loaded files in a Set keyed by the resolved .env.local path so each distinct root loads once. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
engines.node was >=18.13.0 but CI only tests Node 22/24, so the declared floor was unverified, and global fetch (used by the Pull Zone purge) emits an ExperimentalWarning before Node 21. Bump the floor to >=22.0.0 — it matches the CI matrix (declared support is now verified) and fetch is stable there. Update README and CONTRIBUTING to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two more findings from the pre-release review. Each fix is covered by a test driven first (TDD).
Changes
1.
fix(env)—.env.localloaded only for the first workspace rootA module-level boolean latched after the first
loadSecretscall and ignoredworkspaceRootafterwards. In a multi-project workspace (or watch mode) deploying more than once in the same process, the second deploy reused the first root's env and never read its own.env.local. Now keyed by aSetof resolved.env.localpaths, so each distinct root loads once.2.
chore— require Node >=22engines.nodewas>=18.13.0but CI only tests Node 22/24, so the declared floor was unverified, and globalfetch(used by the Pull Zone purge) emits anExperimentalWarningbefore Node 21. Bumped to>=22.0.0: it matches the CI matrix (declared support is now actually verified) andfetchis stable there. README and CONTRIBUTING updated to match.Verification
pnpm test→ 36/36 (+1 new cross-root env test, confirmed RED before the fix).pnpm run typecheckclean,pnpm run build+ dist smoke OK.🤖 Generated with Claude Code