Skip to content

Feature/upgrade packages#544

Open
andreasN234 wants to merge 4 commits into
masterfrom
feature/upgrade-packages
Open

Feature/upgrade packages#544
andreasN234 wants to merge 4 commits into
masterfrom
feature/upgrade-packages

Conversation

@andreasN234

Copy link
Copy Markdown

upgrade vite + resolve issues

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the Vite/Storybook toolchain and adjusts config/mocks to accommodate breaking changes from the upgrades.

Changes:

  • Upgraded Vite and related tooling (incl. @vitejs/plugin-react) and bumped Storybook packages.
  • Updated Vite build config to use rolldownOptions and removed a Vite alias override for @viaa/avo2-types.
  • Updated component mock data to avoid Storybook addon-actions usage.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

File Description
vite.config.mts Switches build bundler options key and removes a package alias workaround.
src/components/Header/Header.mock.tsx Removes Storybook actions import and changes the onClickTitle mock handler.
src/components/CTA/CTA.mock.ts Removes Storybook actions usage from CTA mock link handler.
package.json Bumps Vite + Storybook-related devDependencies and removes storybook-addon-jsx.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

...MOCK_HEADER_PROPS,
category: AvoContentTypeEnglish.COLLECTION,
onClickTitle: action('Title clicked'),
onClickTitle: () => { action: 'Title clicked' },

Copilot AI Apr 9, 2026

Copy link

Choose a reason for hiding this comment

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

onClickTitle: () => { action: 'Title clicked' } is a no-op labeled statement (it doesn’t invoke Storybook actions and is confusing/likely to be flagged by linters). Replace with a proper noop (() => {} / () => undefined) or use the Storybook-recommended mock function (e.g. fn() from @storybook/test) if you still want click logging in stories.

Suggested change
onClickTitle: () => { action: 'Title clicked' },
onClickTitle: () => undefined,

Copilot uses AI. Check for mistakes.
Comment thread package.json
"@storybook/react-vite": "10.0.8",
"@storybook/addon-docs": "10.3.4",
"@storybook/react": "10.3.4",
"@storybook/react-vite": "10.3.4",

Copilot AI Apr 9, 2026

Copy link

Choose a reason for hiding this comment

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

Storybook 10.x packages declare a peer dependency on the storybook package. Since storybook isn’t listed in devDependencies, installs rely on peer auto-install behavior and can float to a different patch version (e.g. lockfile resolving 10.3.5 while other Storybook packages are 10.3.4). Add storybook explicitly (and pin it to the same version) to make installs reproducible across package managers/CI.

Suggested change
"@storybook/react-vite": "10.3.4",
"@storybook/react-vite": "10.3.4",
"storybook": "10.3.4",

Copilot uses AI. Check for mistakes.
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