cloudflare / vinext

fix(dotenv): load .env files with Next.js precedence (#70)
* feat(cli): load .env files with Next.js precedence * fix(dotenv): address review feedback on .env loading - Document Vite double-loading interaction in loadDotenv JSDoc - Fix escaped dollar sign bug ($100 was not unescaped when $ wasn't followed by a valid variable name) - Add type cast for parseEnv return value - Expand test coverage: loadedEnv assertions, production mode precedence, ${VAR} expansion, escaped dollars, circular refs, missing files, empty result - Add getDotenvFiles unit tests for all three modes - Add 'Prefer Node.js Built-in APIs' guideline to AGENTS.md Co-authored-by: liuxiaopai-ai <liuxiaopai-ai@users.noreply.github.com> * test(dotenv): add cross-file expansion and multi-line value tests Address review suggestions: test that .env can reference vars from higher-priority .env.development.local, and that parseEnv handles quoted multi-line values correctly. --------- Co-authored-by: root <root@localhost.localdomain> Co-authored-by: liuxiaopai-ai <liuxiaopai-ai@users.noreply.github.com>
Steve Faulkner Steve Faulkner committed on Feb 25, 2026, 08:21 PM
Showing 6 changed files +461 additions -1 deletions
Browse files at this commit โ†’