Skip to content

fix(build): preserve consumer environment checks - #374

Merged
tenphi merged 2 commits into
mainfrom
codex/fix-production-diagnostics
Oct 7, 2026
Merged

tenphi merged 2 commits into
mainfrom
codex/fix-production-diagnostics

Conversation

@tenphi

@tenphi tenphi commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Tasty's browser-targeted package build folded NODE_ENV to "development", enabling development diagnostics and instrumentation in production consumers. Preserve the environment checks in the published package with an explicit self-definition of process.env.NODE_ENV, leaving the consuming app's bundler or runtime to resolve it.

The runtime debug controls were introduced deliberately, and the SSR diagnostic was added with the global CSS deduplication fix. Keep both source implementations unchanged: normal production startup is quiet, while development and an explicit TASTY_DEBUG flag retain their diagnostics. Includes a patch changeset.

Regression coverage checks emitted code in fresh development, production, and test processes, then bundles and minifies a production browser consumer to verify that TASTY_DEBUG survives optimization with and without a process shim. The check fails against the original package, which reports devMode: true under NODE_ENV=production.

Validation:

  • pnpm typecheck, pnpm lint, pnpm format:check
  • pnpm build, pnpm size (all existing limits pass)
  • pnpm test: 109 files and 2,563 tests pass
  • pnpm knip, pnpm check:test-only, pnpm check:build
  • pnpm check:react-compat: packed runtime and declarations pass with React 18.3.1 and 19.1.1 in development and production, using Node 22
  • Fresh minified production bundles in Chromium: no diagnostics by default; the recipe and SSR diagnostics return with TASTY_DEBUG; the SSR token appears once and resolves to the expected computed padding in both process-shim variants

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

📦 Snapshot release

Published 0.0.0-snapshot.5d03240.

pnpm add @tenphi/tasty@0.0.0-snapshot.5d03240

@tenphi tenphi changed the title fix: respect consumer environment and silence SSR reuse fix(build): preserve consumer environment checks Oct 7, 2026
@tenphi
tenphi merged commit 19b3932 into main Oct 7, 2026
6 of 7 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 7, 2026

This branch is being deployed

1 in progress deployment
release — e939c2fd Deployed Oct 7, 2026 by tenphi via Build & snapshot release #1055
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