Skip to content

Per-root .env.local loading + require Node >=22#2

Merged
agarciar merged 2 commits into
mainfrom
fix/node-floor-and-dotenv-roots
May 25, 2026
Merged

Per-root .env.local loading + require Node >=22#2
agarciar merged 2 commits into
mainfrom
fix/node-floor-and-dotenv-roots

Conversation

@agarciar

Copy link
Copy Markdown
Contributor

Two more findings from the pre-release review. Each fix is covered by a test driven first (TDD).

Changes

1. fix(env).env.local loaded only for the first workspace root
A module-level boolean latched after the first loadSecrets call and ignored workspaceRoot afterwards. 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 a Set of resolved .env.local paths, so each distinct root loads once.

2. chore — require Node >=22
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. Bumped to >=22.0.0: it matches the CI matrix (declared support is now actually verified) and fetch is stable there. README and CONTRIBUTING updated to match.

Verification

  • pnpm test36/36 (+1 new cross-root env test, confirmed RED before the fix).
  • pnpm run typecheck clean, pnpm run build + dist smoke OK.

🤖 Generated with Claude Code

agarciar and others added 2 commits May 25, 2026 12:04
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>
@agarciar agarciar merged commit 9f7b677 into main May 25, 2026
7 checks passed
@agarciar agarciar deleted the fix/node-floor-and-dotenv-roots branch May 25, 2026 10:11
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