-
Notifications
You must be signed in to change notification settings - Fork 241
chore: Upgrade Storybook to vite #3622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Upgrade Storybook to vite #3622
Conversation
… chore/upgrade-storybook-to-vite # Conflicts: # .nvmrc # modules/docs/lib/MDXElements.tsx # modules/docs/lib/Value.tsx # modules/docs/mdx/14.0-UPGRADE-GUIDE.mdx # modules/styling-transform/package.json # package.json # yarn.lock
| cy.realPress('Tab'); | ||
| cy.focused().should('contain', 'Acknowledge'); | ||
| cy.realPress('Tab'); | ||
| cy.focused().should('contain', 'Cancel'); | ||
| cy.realPress('Tab'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cy.tab doesn't work with something. cy.realPress doesn't return the subject.
| cy.realPress('Tab'); | ||
| .should('contain', 'Cancel') | ||
| .tab() | ||
| .realPress('Tab'); | ||
| .should('contain', 'Delete Item') | ||
| .tab(); | ||
| .realPress('Tab'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| cy.realPress('Tab'); | |
| .should('contain', 'Cancel') | |
| .tab() | |
| .realPress('Tab'); | |
| .should('contain', 'Delete Item') | |
| .tab(); | |
| .realPress('Tab'); | |
| cy.realPress('Tab'); | |
| cy.focused().should('contain', 'Cancel'); | |
| cy.realPress('Tab'); | |
| cy.focused().should('contain', 'Delete Item'); | |
| cy.realPress('Tab'); |
|
future change: Change storybook files to not re exported the renamed story |
|
NB: Update cypress specification path for ` |
Workday/canvas-kit
|
||||||||||||||||||||||||||||||||||||||||
| Project |
Workday/canvas-kit
|
| Branch Review |
chore/upgrade-storybook-to-vite
|
| Run status |
|
| Run duration | 02m 16s |
| Commit |
|
| Committer | Nicholas Boll |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
15
|
|
|
0
|
|
|
802
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
19.4%
|
|
|---|---|
|
|
1527
|
|
|
365
|
Accessibility
99.47%
|
|
|---|---|
|
|
5 critical
5 serious
0 moderate
2 minor
|
|
|
71
|
Co-authored-by: Nicholas Boll <[email protected]>
Co-authored-by: Nicholas Boll <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades Canvas Kit's build infrastructure from Webpack to Vite, Storybook from v7 to v8, and the testing framework from Jest to Vitest. This is a significant modernization effort that impacts configuration files, test files, and the development workflow.
Key Changes:
- Upgraded Storybook from v7.6.20 to v8.4.7 with Vite builder
- Migrated test framework from Jest to Vitest (v4.0.1)
- Upgraded Cypress from v14.5.4 to v15.6.0 with Vite integration
- Upgraded Prettier from v2.2.0 to v3.4.2 with import sorting plugin
- Converted configuration files from CommonJS to ES modules
- Updated all test files to use Vitest APIs instead of Jest
Reviewed changes
Copilot reviewed 242 out of 247 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated dependencies to Storybook v8, Vite v7, Vitest v4, and Prettier v3; added "type": "module" |
| vite.config.ts | New Vite configuration with alias setup for Canvas Kit packages |
| vitest.config.ts | New Vitest configuration with jsdom environment and test patterns |
| vitest.setup.ts | New Vitest setup file replacing jest/setupTests.ts |
| .storybook/main.ts | Migrated from Webpack to Vite builder with custom plugins for documentation |
| cypress.config.ts | Updated Cypress to use Vite dev server instead of Webpack |
| babel.config.js | Simplified to ES module format, removed test-specific configuration |
| Multiple test files | Converted from Jest (jest.fn()) to Vitest (vi.fn()) APIs |
| Multiple MDX files | Added missing Meta imports from @storybook/blocks |
| Utility files | Converted from CommonJS (require) to ES modules (import) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e12ef42 to
ac9845e
Compare
ac9845e to
c8b241a
Compare
mannycarrera4
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NicholasBoll your parting gift. I'll send you a potato soon
Summary
Fixes: #3669
Convert Storybook from webpack to vite
Release Category
Infrastructure
PR Summary: Tooling Infrastructure Upgrade
🔧 Build & Development Tooling
Storybook: v7 → v8 (Webpack → Vite)
Test Runner: Jest → Vitest
Cypress: Webpack → Vite
ESLint: v6 → v9 (Flat Config)
Prettier: v2 → v3
📦 Utility Migration to ES Modules
All utility scripts in /utils/ converted from CommonJS to ES modules: