Skip to content

Commit

Permalink
Fix #21916 - using uuid library instead of uuid-browser
Browse files Browse the repository at this point in the history
The library uuid-browser doesn't support esm, so the start with webpack fails.
  • Loading branch information
Michal Biroš committed Apr 11, 2023
1 parent bfbd0e0 commit 59c72ce
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
3 changes: 2 additions & 1 deletion code/addons/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@
"react-inspector": "^6.0.0",
"telejson": "^7.0.3",
"ts-dedent": "^2.0.0",
"uuid-browser": "^3.1.0"
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/lodash": "^4.14.167",
"@types/uuid": "^9.0.1",
"typescript": "~4.9.3"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion code/addons/actions/src/runtime/action.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import uuidv4 from 'uuid-browser/v4';
import { v4 as uuidv4 } from 'uuid';
import { addons } from '@storybook/preview-api';
import { EVENT_ID } from '../constants';
import type { ActionDisplay, ActionOptions, HandlerFunction } from '../models';
Expand Down
2 changes: 0 additions & 2 deletions code/addons/actions/src/typings.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion code/lib/builder-vite/src/optimizeDeps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ const INCLUDE_CANDIDATES = [
'ts-dedent',
'unfetch',
'util-deprecate',
'uuid-browser/v4',
'vue',
'warning',
];
Expand Down
26 changes: 18 additions & 8 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5115,6 +5115,7 @@ __metadata:
"@storybook/theming": 7.1.0-alpha.1
"@storybook/types": 7.1.0-alpha.1
"@types/lodash": ^4.14.167
"@types/uuid": ^9.0.1
dequal: ^2.0.2
lodash: ^4.17.21
polished: ^4.2.2
Expand All @@ -5123,7 +5124,7 @@ __metadata:
telejson: ^7.0.3
ts-dedent: ^2.0.0
typescript: ~4.9.3
uuid-browser: ^3.1.0
uuid: ^9.0.0
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
Expand Down Expand Up @@ -8932,6 +8933,13 @@ __metadata:
languageName: node
linkType: hard

"@types/uuid@npm:^9.0.1":
version: 9.0.1
resolution: "@types/uuid@npm:9.0.1"
checksum: 234e14e053504a98532bb5d1490c8d649fe24ae04a94ba042b09b380a900094df1032aa7c3864b74b7a85a0a5e97530b2d1340048ed9d07855140cb99b2cefc8
languageName: node
linkType: hard

"@types/webpack-dev-middleware@npm:^5.3.0":
version: 5.3.0
resolution: "@types/webpack-dev-middleware@npm:5.3.0"
Expand Down Expand Up @@ -30146,13 +30154,6 @@ __metadata:
languageName: node
linkType: hard

"uuid-browser@npm:^3.1.0":
version: 3.1.0
resolution: "uuid-browser@npm:3.1.0"
checksum: bfb6bcc8cc75c1adf776370c4f86d00ee5682f7315c8bccb99938e53dafae189ef6a4dc125e67abd2a2cdfaad6020690fe4cb67dbd5b39f32d3ba75fb713d807
languageName: node
linkType: hard

"uuid@npm:8.3.2, uuid@npm:^8.0.0, uuid@npm:^8.3.2":
version: 8.3.2
resolution: "uuid@npm:8.3.2"
Expand All @@ -30162,6 +30163,15 @@ __metadata:
languageName: node
linkType: hard

"uuid@npm:^9.0.0":
version: 9.0.0
resolution: "uuid@npm:9.0.0"
bin:
uuid: dist/bin/uuid
checksum: 8867e438990d1d33ac61093e2e4e3477a2148b844e4fa9e3c2360fa4399292429c4b6ec64537eb1659c97b2d10db349c673ad58b50e2824a11e0d3630de3c056
languageName: node
linkType: hard

"uvu@npm:^0.5.0":
version: 0.5.6
resolution: "uvu@npm:0.5.6"
Expand Down

0 comments on commit 59c72ce

Please sign in to comment.