ipfs / ipfs-webui

A frontend for an IPFS Kubo and IPFS Desktop
https://webui.ipfs.io
MIT License
1.56k stars 490 forks source link

chore: Update storybook #1982

Closed SgtPooki closed 2 years ago

SgtPooki commented 2 years ago

From http://localhost:9009/?path=/settings/about:

Upgrade all Storybook packages to latest:

npx npm-check-updates '/storybook/' -u && npm install

Alternatively, if you're using yarn run the following command, and check all Storybook related packages:

yarn upgrade-interactive --latest

To do

Fixes

Partially fixes

SgtPooki commented 2 years ago

After running npx npm-check-updates '/storybook/' -u && npm install and verifying that npm run build && npm run test:unit succeeds, attempting to run storybook shows we have more work to do:

╰─ ✔ ❯ npm run storybook

> ipfs-webui@2.17.3 storybook
> start-storybook -p 9009 -s public

info @storybook/react v6.5.9
info
(node:52497) DeprecationWarning: --static-dir CLI flag is deprecated, see:

https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated---static-dir-cli-flag
(Use `node --trace-deprecation ...` to show where the warning was created)
info => Loading presets
(node:52497) DeprecationWarning: Configuration files such as "config", "presets" and "addons" are deprecated and will be removed in Storybook 7.0.
Read more about it in the migration guide: https://github.com/storybookjs/storybook/blob/master/MIGRATION.md#to-mainjs-configuration
info => Serving static files from ./public at /
info => Loading custom manager config
info => Using implicit CSS loaders
(node:52497) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/sgtpooki/code/work/protocol.ai/ipfs/webui/node_modules/@playwright/test/package.json.
Update this package.json to use a subpath pattern like "./*".
(node:52497) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/sgtpooki/code/work/protocol.ai/ipfs/webui/node_modules/playwright-chromium/package.json.
Update this package.json to use a subpath pattern like "./*".
info => Loading custom manager config
(node:52497) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss',
you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'.

See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details.
WARN Storybook support for Create React App is now a separate preset.
WARN To use the new preset, install `@storybook/preset-create-react-app` and add it to the list of `addons` in your `.storybook/main.js` config file.
WARN The built-in preset has been disabled in Storybook 6.0.
info => Using default Webpack4 setup
10% building 1/1 modules 0 active/Users/sgtpooki/code/work/protocol.ai/ipfs/webui/node_modules/html-webpack-plugin/lib/webpack5/file-watcher-api.js:13
    mainCompilation.fileSystemInfo.createSnapshot(
                                   ^

TypeError: Cannot read properties of undefined (reading 'createSnapshot')
    at /Users/sgtpooki/code/work/protocol.ai/ipfs/webui/node_modules/html-webpack-plugin/lib/webpack5/file-watcher-api.js:13:36
    at new Promise (<anonymous>)
    at Object.createSnapshot (/Users/sgtpooki/code/work/protocol.ai/ipfs/webui/node_modules/html-webpack-plugin/lib/webpack5/file-watcher-api.js:12:10)
    at /Users/sgtpooki/code/work/protocol.ai/ipfs/webui/node_modules/html-webpack-plugin/lib/cached-child-compiler.js:219:35
SgtPooki commented 2 years ago

Stories by existing sloc:

╰─ ✔ ❯ ls src/**/*.stories.js | xargs -n1 -I% sh -c 'echo "%: " $(sloc -f simple % | grep "Source" | awk -F '\'':'\'' '\''{print $2}'\'')' | sort -k2 -n
src/components/language-selector/LanguageSelector.stories.js:  10
src/settings/editor/JsonEditor.stories.js:  10
src/files/info-boxes/add-files-info/AddFilesInfo.stories.js:  11
src/files/info-boxes/companion-info/CompanionInfo.stories.js:  11
src/loader/ComponentLoader.stories.js:  11
src/status/StatusConnected.stories.js:  11
src/components/identicon/Identicon.stories.js:  14
src/files/explore-form/FilesExploreForm.stories.js:  14
src/files/modals/new-folder-modal/NewFolderModal.stories.js:  14
src/files/modals/pinning-modal/PinningModal.stories.js:  14
src/files/modals/share-modal/ShareModal.stories.js:  14
src/files/modals/rename-modal/RenameModal.stories.js:  15
src/files/info-boxes/InfoBoxes.stories.js:  16
src/files/modals/add-by-path-modal/AddByPathModal.stories.js:  16
src/files/modals/remove-modal/RemoveModal.stories.js:  16
src/components/button/Button.stories.js:  17
src/components/pinning-manager/PinningManager.stories.js:  17
src/components/progress-bar/ProgressBar.stories.js:  17
src/components/cid/Cid.stories.js:  19
src/files/breadcrumbs/Breadcrumbs.stories.js:  19
src/navigation/NavBar.stories.js:  20
src/components/notify/Toast.stories.js:  21
src/files/selected-actions/SelectedActions.stories.js:  23
src/components/checkbox/Checkbox.stories.js:  26
src/icons/Icons.stories.js:  30
src/files/context-menu/ContextMenu.stories.js:  31
src/settings/SettingsPage.stories.js:  31
src/files/files-list/FilesList.stories.js:  91
src/files/file-import-status/FileImportStatus.stories.js:  211
ipfs-gui-bot commented 2 years ago

:tada: This issue has been resolved in version 2.18.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: