Skip to content

v0.4.4

Choose a tag to compare

@github-actions github-actions released this 08 Jul 17:49
0155610

A patch release that restores Next.js/Bun migration parity for .env-file mode selection, plus documentation updates.

NODE_ENV is a clamped fallback for env-file mode selection

APP_ENV remains the primary, framework-neutral selector for which .env.[mode] files load. When APP_ENV is unset, NODE_ENV now acts as a fallback — but only for the three canonical values development, production, and test, matching Next.js and Bun. Any other NODE_ENV value (a NODE_ENV=staging) is ignored for file selection; use APP_ENV for arbitrary modes.

APP_ENV=staging nub server.ts      # reads .env.staging*
NODE_ENV=production nub server.ts  # APP_ENV unset → reads .env.production*
NODE_ENV=staging nub server.ts     # not canonical → reads only .env, .env.local

The clamp restores migration parity for projects that select env files via NODE_ENV=production/development/test, without reintroducing the footgun where an unrecognized NODE_ENV value silently flips a framework into development mode. Nub still never sets NODE_ENV, and a .env file that assigns NODE_ENV still has that key ignored on load. (#387)

Documentation and site

The Nub 0.4.3 release post landed (#385), long OG-card titles were sized down to clear the footer (#386), and the global virtual store post's phantom-dependency table and headings were tightened.

What's Changed

  • feat(env): clamped NODE_ENV fallback for .env-file mode selection (#387)
  • site: step long OG title sizes down further so they clear the footer (#386)
  • blog: v0.4.3 release post (#385)

Full Changelog: v0.4.3...v0.4.4