Skip to content

fix(text): suppress production deprecation warnings - #751

Open
geoquant wants to merge 2 commits into
cloudflare:mainfrom
geoquant:jonnie/suppress-text-warnings
Open

fix(text): suppress production deprecation warnings#751
geoquant wants to merge 2 commits into
cloudflare:mainfrom
geoquant:jonnie/suppress-text-warnings

Conversation

@geoquant

Copy link
Copy Markdown
Collaborator

Summary

  • define process.env.NODE_ENV as production during Kumo's published JavaScript build
  • preserve development-only deprecated Text heading warnings in source while removing them from production bundles
  • add source coverage for all deprecated heading variants in development and production environments
  • add a post-build regression test that imports the generated Text entry and verifies it does not warn

Context

@cloudflare/kumo@2.12.0 intended to guard deprecated heading1heading3 warnings with process.env.NODE_ENV !== "production". During packaging, that condition was evaluated incorrectly and the published artifact contained an unconditional console.warn.

This fixes the issue at Kumo's package boundary rather than filtering warnings in consumers such as Stratus.

Validation

  • fresh uncached @cloudflare/kumo production build

  • full Kumo unit suite: 1,278 tests passed

  • Kumo lint

  • Kumo typecheck

  • changeset validation

  • verified the emitted production JavaScript contains neither the Text deprecation warning nor process.env.NODE_ENV

  • Reviews

  • bonk has reviewed the change

  • automated review not possible because: this change requires review of build-time environment replacement and generated package behavior

  • Tests

  • Tests included/updated

  • Automated tests not possible - manual testing has been completed as follows: not applicable

  • Additional testing not necessary because: not applicable

@pkg-pr-new

pkg-pr-new Bot commented Aug 27, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@cloudflare/kumo@751

commit: 73f14f2

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Docs Preview

View docs preview

Commit: 73f14f2

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

📐 Bundle Size

Consumer fixtures bundled against packages/kumo/dist (peers external, minified ESM).

Fixture Raw Gzip Brotli
Button (root) 165.2 KB 46.9 KB 40.6 KB
Button (components/button) 165.2 KB 46.9 KB 40.5 KB
Button + Dialog + Select (root) 288.0 KB 82.0 KB 69.0 KB
Button + Dialog + Select (component subpaths) 288.0 KB 82.1 KB 68.9 KB
Chart (root) 209.2 KB 60.3 KB 52.1 KB
Chart (components/chart) 209.2 KB 60.3 KB 52.1 KB
Badge (components/badge) 44.6 KB 11.6 KB 10.0 KB
Flow (components/flow) 206.6 KB 57.2 KB 49.6 KB
Button (primitives/button) 10.2 KB 3.6 KB 3.2 KB
Primitives barrel 604.9 KB 168.3 KB 133.1 KB
Code highlighting (code) 2.07 MB 464.7 KB 346.5 KB

npm tarball: 527 files, 1.44 MB packed, 6.74 MB unpacked.

⚠️ 22 flagged files in tarball (tests / raw scripts)
  • dist/blocks-source/resource-list/resource-list.test.tsx
  • scripts/component-registry/cache.ts
  • scripts/component-registry/discovery.ts
  • scripts/component-registry/example-cleanup.ts
  • scripts/component-registry/index.test.ts
  • scripts/component-registry/index.ts
  • scripts/component-registry/markdown-generator.ts
  • scripts/component-registry/metadata.ts
  • scripts/component-registry/props-filter.ts
  • scripts/component-registry/schema-generator.ts
  • scripts/component-registry/sub-components.ts
  • scripts/component-registry/types.ts
  • scripts/component-registry/utils.ts
  • scripts/component-registry/variant-parser.ts
  • scripts/css-build.ts
  • scripts/generate-primitives.ts
  • scripts/theme-generator/config.ts
  • scripts/theme-generator/generate-css.test.ts
  • scripts/theme-generator/generate-css.ts
  • scripts/theme-generator/index.ts
  • scripts/theme-generator/migrate.ts
  • scripts/theme-generator/types.ts

Report-only: no size thresholds are enforced yet.

Commit: 73f14f21

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor
Visual Regression Report — 34 changed, 11 unchanged

34 screenshot(s) with visual changes:

Button / Variant: Primary

181 px (0.2%) changed

Before After Diff
Before After Diff

Button / Variant: Destructive

898 px (1.01%) changed

Before After Diff
Before After Diff

Button / Variant: Outline

196 px (0.22%) changed

Before After Diff
Before After Diff

Button / Sizes

1,292 px (1.46%) changed

Before After Diff
Before After Diff

Button / With Icon

806 px (0.91%) changed

Before After Diff
Before After Diff

Button / Icon Only

112 px (0.13%) changed

Before After Diff
Before After Diff

Button / Loading State

180 px (0.2%) changed

Before After Diff
Before After Diff

Button / Title

848 px (0.96%) changed

Before After Diff
Before After Diff

Button / Link as Button

820 px (0.93%) changed

Before After Diff
Before After Diff

Button / Disabled Link

1,011 px (1.14%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Actions

362 px (0.41%) changed

Before After Diff
Before After Diff

Dialog / Dialog Basic

404 px (0.46%) changed

Before After Diff
Before After Diff

Dialog / Dialog Sizes

3,059 px (3.45%) changed

Before After Diff
Before After Diff

Dialog / Dialog Confirmation

2,073 px (2.34%) changed

Before After Diff
Before After Diff

Dialog / Custom Max Width

1,041 px (1.18%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Combobox

383 px (0.43%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Dropdown

386 px (0.44%) changed

Before After Diff
Before After Diff

Dialog (Open)

0 px (0%) changed

Before After Diff
Before After Diff

Select / Select Sizes

2,862 px (1.76%) changed

Before After Diff
Before After Diff

Select / Select Placement

4,303 px (2.97%) changed

Before After Diff
Before After Diff

Select / Select Dynamic Placement

2,688 px (2.58%) changed

Before After Diff
Before After Diff

Select / Select Without Label

664 px (0.75%) changed

Before After Diff
Before After Diff

Select / Select With Description

1,932 px (1.86%) changed

Before After Diff
Before After Diff

Select / Select With Tooltip

196 px (0.22%) changed

Before After Diff
Before After Diff

Select / Select Custom Rendering

1,289 px (1.46%) changed

Before After Diff
Before After Diff

Select / Select Loading

0 px (0%) changed

Before After Diff
Before After Diff

Select / Select Multiple

938 px (1.06%) changed

Before After Diff
Before After Diff

Select / Select Complex

1,279 px (1.23%) changed

Before After Diff
Before After Diff

Select / Select Disabled Options

1,217 px (1.37%) changed

Before After Diff
Before After Diff

Select / Select Disabled Items

735 px (0.83%) changed

Before After Diff
Before After Diff

Select / Select Grouped

885 px (1%) changed

Before After Diff
Before After Diff

Select / Select Grouped With Disabled

190 px (0.21%) changed

Before After Diff
Before After Diff

Select / Select Long List

2,050 px (1.97%) changed

Before After Diff
Before After Diff

Select (Open)

1,183 px (0%) changed

Before After Diff
Before After Diff
11 screenshot(s) unchanged
  • Button / Basic
  • Button / Variant: Secondary
  • Button / Variant: Ghost
  • Button / Variant: Secondary Destructive
  • Button / Disabled State
  • Button / Link with Tooltip
  • Dialog / Dialog Alert
  • Dialog / Dialog With Select
  • Select / Select Basic
  • Select / Select With Error
  • Select / Select Placeholder

Generated by Kumo Visual Regression

@mattrothenberg

Copy link
Copy Markdown
Collaborator

/bonk thoroughly review and approve

@ask-bonk

ask-bonk Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@rozenmd
rozenmd force-pushed the jonnie/suppress-text-warnings branch from 0992e3f to ae0fc24 Compare September 9, 2026 16:52
@rozenmd

rozenmd commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

/bonk give this PR a review

@ask-bonk

ask-bonk Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@rozenmd

rozenmd commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

/bonk do a quick pass

@ask-bonk

ask-bonk Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

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.

3 participants