italia / design-react-kit

Il toolkit React conforme alle linee guida di design per i siti internet e i servizi digitali della PA.
https://italia.github.io/design-react-kit/
BSD 3-Clause "New" or "Revised" License
152 stars 80 forks source link

feat: upgrade storybook #1029

Closed Virtute90 closed 3 months ago

Virtute90 commented 4 months ago

Ref PR: #1001

PR Checklist

Short description of what this resolves:

Attempting to update the storybook to the latest version. The storybook application starts but from a syntax error, I think generated by babel:

WARN 🚨 SyntaxError: Unexpected token ':'
SyntaxError: Unexpected token ':'
    at eval (<anonymous>)
    at getStorySortParameter (./node_modules/@storybook/csf-tools/dist/index.js:32:1817)
    at StoryIndexGenerator.getStorySortParameter (./node_modules/@storybook/core-server/dist/index.js:60:6283)
    at async StoryIndexGenerator.sortStories (./node_modules/@storybook/core-server/dist/index.js:60:3279)
    at async StoryIndexGenerator.getIndex (./node_modules/@storybook/core-server/dist/index.js:60:4169)
    at async extractStoriesJson (./node_modules/@storybook/core-server/dist/index.js:51:4623)
    at async Promise.all (index 3)
    at async buildStaticStandalone (./node_modules/@storybook/core-server/dist/index.js:61:2295)
    at async withTelemetry (./node_modules/@storybook/core-server/dist/index.js:65:3948)
    at async build (./node_modules/@storybook/cli/dist/generate.js:514:1059)
WARN 🚨 SyntaxError: Unexpected token ':'

the offending file is not specified so I was unable to fix the problem. There are also other warnings to check:

WARN export 'DropdownMenuProps' (reexported as 'DropdownMenuProps') was not found in './Dropdown/DropdownMenu' (possible exports: DropdownMenu)
WARN export 'DropdownToggleProps' (reexported as 'DropdownToggleProps') was not found in './Dropdown/DropdownToggle' (possible exports: DropdownToggle)
WARN export 'DropdownProps' (reexported as 'DropdownProps') was not found in './Dropdown/Dropdown' (possible exports: Dropdown)

I created a new configuration file but left the previous one. I deleted obsolete or non-obsolete packages that were no longer used.

Changes proposed in this Pull Request:

Commands executed: npx storybook@latest upgrade rename all stories.mdx files to .mdx

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
design-react-kit ❌ Failed (Inspect) Mar 11, 2024 3:16pm