Skip to content

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

Open
geoquant wants to merge 1 commit into
cloudflare:mainfrom
geoquant:jonnie/suppress-text-warnings
Open

fix(text): suppress production deprecation warnings#751
geoquant wants to merge 1 commit 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: 562052a

@github-actions

Copy link
Copy Markdown
Contributor

Docs Preview

View docs preview

Commit: 562052a

@github-actions

Copy link
Copy Markdown
Contributor

📐 Bundle Size

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

Fixture Raw Gzip Brotli
Button (root) 168.3 KB 47.5 KB 41.1 KB
Button (components/button) 168.3 KB 47.5 KB 41.1 KB
Button + Dialog + Select (root) 289.3 KB 82.3 KB 69.2 KB
Button + Dialog + Select (component subpaths) 289.4 KB 82.5 KB 69.3 KB
Chart (root) 209.6 KB 60.2 KB 51.9 KB
Chart (components/chart) 209.6 KB 60.2 KB 52.0 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) 9.7 KB 3.5 KB 3.1 KB
Primitives barrel 621.3 KB 170.6 KB 134.1 KB
Code highlighting (code) 2.07 MB 465.4 KB 347.0 KB

npm tarball: 516 files, 1.42 MB packed, 6.71 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: 562052a0

@github-actions

Copy link
Copy Markdown
Contributor
Visual Regression Report — 32 changed, 13 unchanged

32 screenshot(s) with visual changes:

Button / Variant: Secondary

411 px (0.46%) changed

Before After Diff
Before After Diff

Button / Variant: Outline

82 px (0.09%) changed

Before After Diff
Before After Diff

Button / With Icon

819 px (0.92%) changed

Before After Diff
Before After Diff

Button / Icon Only

112 px (0.13%) changed

Before After Diff
Before After Diff

Button / Loading State

1,652 px (1.87%) changed

Before After Diff
Before After Diff

Button / Disabled State

117 px (0.13%) changed

Before After Diff
Before After Diff

Button / Title

1,150 px (1.3%) changed

Before After Diff
Before After Diff

Button / Link as Button

820 px (0.93%) changed

Before After Diff
Before After Diff

Button / Link with Tooltip

579 px (0.65%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Actions

354 px (0.4%) changed

Before After Diff
Before After Diff

Dialog / Dialog Basic

401 px (0.45%) changed

Before After Diff
Before After Diff

Dialog / Dialog Sizes

964 px (1.09%) changed

Before After Diff
Before After Diff

Dialog / Dialog Alert

912 px (1.03%) changed

Before After Diff
Before After Diff

Dialog / Dialog Confirmation

1,228 px (1.39%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Select

568 px (0.64%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Dropdown

487 px (0.55%) changed

Before After Diff
Before After Diff

Dialog (Open)

0 px (0%) changed

Before After Diff
Before After Diff

Select / Select Basic

91 px (0.1%) changed

Before After Diff
Before After Diff

Select / Select Sizes

2,500 px (1.54%) changed

Before After Diff
Before After Diff

Select / Select Placement

3,530 px (2.44%) changed

Before After Diff
Before After Diff

Select / Select Dynamic Placement

4,237 px (4.07%) changed

Before After Diff
Before After Diff

Select / Select Without Label

719 px (0.81%) changed

Before After Diff
Before After Diff

Select / Select With Description

1,687 px (1.62%) changed

Before After Diff
Before After Diff

Select / Select Placeholder

977 px (1.1%) changed

Before After Diff
Before After Diff

Select / Select With Tooltip

1,031 px (1.16%) changed

Before After Diff
Before After Diff

Select / Select Custom Rendering

1,449 px (1.64%) 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 Disabled Options

1,217 px (1.37%) changed

Before After Diff
Before After Diff

Select / Select Disabled Items

931 px (1.05%) changed

Before After Diff
Before After Diff

Select / Select Grouped With Disabled

1,497 px (1.69%) changed

Before After Diff
Before After Diff

Select (Open)

2,483 px (0.01%) changed

Before After Diff
Before After Diff
13 screenshot(s) unchanged
  • Button / Basic
  • Button / Variant: Primary
  • Button / Variant: Ghost
  • Button / Variant: Destructive
  • Button / Variant: Secondary Destructive
  • Button / Sizes
  • Button / Disabled Link
  • Dialog / Custom Max Width
  • Dialog / Dialog With Combobox
  • Select / Select With Error
  • Select / Select Complex
  • Select / Select Grouped
  • Select / Select Long List

Generated by Kumo Visual Regression

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