refactor: standardize console diagnostics on the [Tasty] prefix - #249
Merged
Conversation
Warnings were emitted under six different prefix conventions ("Tasty: ",
"[tasty] ", "tasty: ", "tastyDebug: ", "[Tasty] " and no prefix at all),
which made tasty output impossible to filter reliably in a browser
console. Everything now uses "[Tasty] ".
Non-fatal diagnostics that still fired in production are now gated behind
process.env.NODE_ENV !== 'production' so a consumer's bundler can strip
them: the #current color-token warning, invalid custom style definitions,
unparseable function tokens, ignored scrollbar="none" tokens, and the
default pipeline warning handler. The gate lives in defaultWarningHandler
rather than emitWarning, so custom handlers registered via
setWarningHandler still receive warnings in production.
Dot-access NODE_ENV is used for the new gates rather than isDevEnv(),
which deliberately uses bracket access to defeat bundler inlining and so
cannot be stripped. Existing isDevEnv()/devMode gates are left untouched;
converting them would flip them to true under NODE_ENV=test and change
test behavior.
Error reporting in SheetManager stays unconditional and only gains the
prefix: the seven catch blocks that swallow an exception, plus the two
style-element-detached reports (the second reworded off its "CRITICAL
DEBUG" phrasing).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L1Ck25U5JmFhVV1ShYd7rm
Contributor
📦 Snapshot releasePublished |
Merged
tenphi
added a commit
that referenced
this pull request
Aug 3, 2026
Resolves src/utils/warnings.ts: takes main's `[Tasty]` PREFIX from #249 (the point of that change) while keeping this branch's removal of the dead `deprecationWarning`, which had zero callers. The `eslint-disable no-console` goes with it — only `console.warn` remains, which the repo's no-console config already allows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warnings were emitted under six different prefix conventions ("Tasty: ", "[tasty] ", "tasty: ", "tastyDebug: ", "[Tasty] " and no prefix at all), which made tasty output impossible to filter reliably in a browser console. Everything now uses "[Tasty] ".
Non-fatal diagnostics that still fired in production are now gated behind process.env.NODE_ENV !== 'production' so a consumer's bundler can strip them: the #current color-token warning, invalid custom style definitions, unparseable function tokens, ignored scrollbar="none" tokens, and the default pipeline warning handler. The gate lives in defaultWarningHandler rather than emitWarning, so custom handlers registered via setWarningHandler still receive warnings in production.
Dot-access NODE_ENV is used for the new gates rather than isDevEnv(), which deliberately uses bracket access to defeat bundler inlining and so cannot be stripped. Existing isDevEnv()/devMode gates are left untouched; converting them would flip them to true under NODE_ENV=test and change test behavior.
Error reporting in SheetManager stays unconditional and only gains the prefix: the seven catch blocks that swallow an exception, plus the two style-element-detached reports (the second reworded off its "CRITICAL DEBUG" phrasing).