Skip to content

Commit 91e991c

Browse files
committed
Upgrade Storybook
1 parent c3cc212 commit 91e991c

2 files changed

Lines changed: 20 additions & 19 deletions

File tree

storybook/.storybook-rn/storybook.requires.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const normalizedStories = [
2525
declare global {
2626
var view: View;
2727
var STORIES: typeof normalizedStories;
28+
var STORYBOOK_WEBSOCKET: { host: string; port: number } | undefined;
2829
}
2930

3031

@@ -33,21 +34,22 @@ const annotations = [
3334
require("@storybook/react-native/preview")
3435
];
3536

36-
global.STORIES = normalizedStories;
37+
globalThis.STORIES = normalizedStories;
38+
3739

3840
// @ts-ignore
3941
module?.hot?.accept?.();
4042

4143

4244

43-
if (!global.view) {
44-
global.view = start({
45+
if (!globalThis.view) {
46+
globalThis.view = start({
4547
annotations,
4648
storyEntries: normalizedStories,
4749

4850
});
4951
} else {
50-
updateView(global.view, annotations, normalizedStories);
52+
updateView(globalThis.view, annotations, normalizedStories);
5153
}
5254

53-
export const view: View = global.view;
55+
export const view: View = globalThis.view;

storybook/package.json

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@react-native-async-storage/async-storage": "2.2.0",
1818
"@react-native-community/datetimepicker": "8.4.4",
1919
"expo": "^54",
20-
"expo-constants": "~18.0.11",
20+
"expo-constants": "~18.0.13",
2121
"expo-font": "~14.0.10",
2222
"expo-image": "~3.0.11",
2323
"expo-linking": "~8.0.10",
@@ -30,7 +30,7 @@
3030
"react-dom": "19.1.0",
3131
"react-native": "0.81.5",
3232
"react-native-gesture-handler": "2.28.0",
33-
"react-native-reanimated": "~4.1.3",
33+
"react-native-reanimated": "~4.1.6",
3434
"react-native-safe-area-context": "5.6.2",
3535
"react-native-screens": "4.16.0",
3636
"react-native-svg": "15.12.1",
@@ -39,22 +39,21 @@
3939
},
4040
"devDependencies": {
4141
"@chromatic-com/storybook": "^4.0.1",
42-
"@storybook/addon-docs": "10.1.11",
43-
"@storybook/addon-ondevice-actions": "10.1.1",
44-
"@storybook/addon-ondevice-backgrounds": "10.1.1",
45-
"@storybook/addon-ondevice-controls": "10.1.1",
46-
"@storybook/addon-ondevice-notes": "10.1.1",
47-
"@storybook/react": "10.1.11",
48-
"@storybook/react-native": "10.1.1",
49-
"@storybook/react-native-web-vite": "10.1.1",
50-
"@types/node": "^22",
42+
"@storybook/addon-docs": "10.2.8",
43+
"@storybook/addon-ondevice-actions": "10.2.1",
44+
"@storybook/addon-ondevice-backgrounds": "10.2.1",
45+
"@storybook/addon-ondevice-controls": "10.2.1",
46+
"@storybook/addon-ondevice-notes": "10.2.1",
47+
"@storybook/react": "10.2.8",
48+
"@storybook/react-native": "10.2.1",
49+
"@storybook/react-native-web-vite": "10.2.8",
5150
"babel-plugin-module-resolver": "^5.0.2",
5251
"babel-plugin-transform-remove-console": "^6.9.4",
5352
"jest": "^29.6.3",
5453
"prettier": "2.8.8",
55-
"react-native-svg-transformer": "1.5.1",
56-
"storybook": "10.1.11",
57-
"vite": "7.3.0",
54+
"react-native-svg-transformer": "1.5.3",
55+
"storybook": "10.2.8",
56+
"vite": "7.3.1",
5857
"vite-plugin-svgr": "^4.5.0"
5958
}
6059
}

0 commit comments

Comments
 (0)