Skip to content

CI, .env loading, NODE_ENV flags, cleanup - #7

Open
webbertakken wants to merge 12 commits into
mainfrom
feat/ci-env-cleanup
Open

CI, .env loading, NODE_ENV flags, cleanup#7
webbertakken wants to merge 12 commits into
mainfrom
feat/ci-env-cleanup

Conversation

@webbertakken

Copy link
Copy Markdown
Owner

What

  • CI: add GitHub Actions workflow (typecheck + tests) on PRs and pushes to main, Node 18/20/22 via corepack pnpm with cache.
  • --production / --development: set NODE_ENV for the wrapped script. Flag beats ambient; passing both errors. Added a -- separator so script args pass through verbatim; envoke flags are never forwarded.
  • .env loading (via dotenv): reads .env* from repo root + cwd (deduped). Precedence: real env > flag NODE_ENV > cwd files > root files; within a dir .env.[mode].local > .env.[mode] > .env.local > .env. Real env is never overwritten; mode files load only when NODE_ENV is known.
  • Docs: README documents both features; completed ## Todo removed.
  • Cleanup: drop stale yarn.lock + .yarnrc.yml, fix prepublishOnly to pnpm, bump 0.2.0.

Testing

  • pnpm typecheck && pnpm build && pnpm test green (exit-codes, flags, dotenv suites).
  • Workflow smoke-tested locally with act (job succeeded).

Note

0.2.0 is not published in this PR; tagging/publish happens after merge.

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