Skip to content

fix: env vars - #44

Merged
brunozoric merged 5 commits into
mainfrom
bruno/fix/env-vars
Sep 8, 2026
Merged

fix: env vars#44
brunozoric merged 5 commits into
mainfrom
bruno/fix/env-vars

Conversation

@brunozoric

@brunozoric brunozoric commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • writeEnv now supports both .env.example formats: {{TOKEN}} placeholders (substituted as before) and plain KEY=value lines (parsed and replaced for known keys). Comments, blank lines, and unknown keys are preserved.
  • Falls back to the built-in template when no .env.example exists — no more crash on older scaffolded projects.
  • The scaffolded .env.example template uses plain KEY=value format — readable as-is for manual copy, and the wizard fills in values automatically.

Test plan

  • Verify yarn transfer wizard completes the env-setup path on a project with a plain KEY=value .env.example
  • Verify yarn transfer wizard completes on a project with no .env.example (built-in template)
  • Verify yarn transfer wizard completes on a project with a {{TOKEN}} .env.example
  • Run yarn full — all tests pass

🤖 Generated with Claude Code

brunozoric and others added 5 commits September 8, 2026 11:18
…placeholders

Older scaffolded projects have a plain .env.example without {{TOKEN}}
placeholders. The wizard now silently falls back to the built-in template
instead of throwing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The wizard substitutes these placeholders when writing .env. Old projects
with plain KEY=value format now silently fall back to the built-in template.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
writeEnv now handles both formats: {{TOKEN}} placeholders (substituted
as before) and plain KEY=value lines (parsed and replaced for known keys).
Comments, blank lines, and unknown keys are preserved. Falls back to the
built-in template when no .env.example exists.

The scaffolded .env.example uses plain format — readable as-is for manual
copy, and the wizard fills in values automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests for plain KEY=value format: all known keys replaced, comments and
blank lines preserved, empty values produce KEY= lines. Existing {{TOKEN}}
format tests unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@brunozoric
brunozoric merged commit b4c7028 into main Sep 8, 2026
5 checks passed
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