Skip to content

Conversation

@mannycarrera4
Copy link
Contributor

@mannycarrera4 mannycarrera4 commented Jan 30, 2026

Summary

Fixes: #1234

Release Category

Components

Release Note

When we merged this PR to upgrade Storybook and support ESM, our release broke here.

  • sb extract isn't even referenced in Storybook docs. We used extract to generate a stories.json which isn't a thing anymore based on the docs here. TIL storybook build will create a index.json in favor of a stories.json
  • Because the storybook build alway failed, it never got to the yarn build step. Running locally, this failed with a few errors because certain modules/packages weren't fully set up to support ESM, the docs package being one of them.
  • Removed "type": "module" from root package.json, docs, and styling packages
    • Added "type": "module" to CSS-only packages (canvas-kit-css, canvas-kit-labs-css, canvas-kit-preview-css)
    • Created .mjs versions of build utilities for proper ESM/CJS interop

This PR updates files and packages to ensure storybook gets built and our code gets built.


Checklist

For the Reviewer

  • PR title is short and descriptive
  • PR summary describes the change (Fixes/Resolves linked correctly)
  • PR Release Notes describes additional information useful to call out in a release message or removed if not applicable
  • Breaking Changes provides useful information to upgrade to this code or removed if not applicable

Where Should the Reviewer Start?

Areas for Feedback? (optional)

  • Code
  • Documentation
  • Testing
  • Codemods

Testing Manually

Screenshots or GIFs (if applicable)

Thank You Gif (optional)

@alanbsmith alanbsmith changed the title fix: Update files to make buil pass fix: Update files to make build pass Jan 30, 2026
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const require = createRequire(import.meta.url);

// // we use TS files, so tell node to register them
Copy link
Member

@alanbsmith alanbsmith Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// // we use TS files, so tell node to register them
// We use TS files, so tell node to register them

@cypress
Copy link

cypress bot commented Jan 30, 2026

Workday/canvas-kit    Run #10152

Run Properties:  status check passed Passed #10152  •  git commit e4e7a8a53c ℹ️: Merge 2a5fc1472f235f6367080124b27c87cbdd7b2fb9 into 026e6f12bc4b5a62b3c4c614101a...
Project Workday/canvas-kit
Branch Review mc-fix-build-major
Run status status check passed Passed #10152
Run duration 02m 17s
Commit git commit e4e7a8a53c ℹ️: Merge 2a5fc1472f235f6367080124b27c87cbdd7b2fb9 into 026e6f12bc4b5a62b3c4c614101a...
Committer Manuel Carrera
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 15
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 802
View all changes introduced in this branch ↗︎
UI Coverage  19.52%
  Untested elements 1515  
  Tested elements 365  
Accessibility  99.47%
  Failed rules  5 critical   5 serious   0 moderate   2 minor
  Failed elements 71  

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.

2 participants