Skip to content

Commit

Permalink
fix: generate script not found with bun and reanimated warnings on ex…
Browse files Browse the repository at this point in the history
…po 52 (#651)

* fix: generate script sometimes not found with bun

* v8.4.3-alpha.0

* fix: reanimated warnings

* v8.4.3-alpha.1

* fix: example app

* fix: remove references to v6 and watcher

* fix: lock
  • Loading branch information
dannyhw authored Nov 19, 2024
1 parent 4c488bb commit 3fbf0c2
Show file tree
Hide file tree
Showing 20 changed files with 175 additions and 795 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/** @type{import("expo/config").ExpoConfig} */
module.exports = {
import type { ExpoConfig } from 'expo/config';

export default {
name: 'Expo Example',
slug: 'expo-example',
web: {
bundler: 'metro',
},
userInterfaceStyle: 'automatic',
};
newArchEnabled: true,
} satisfies ExpoConfig;
20 changes: 10 additions & 10 deletions examples/expo-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expo-example",
"version": "8.4.2",
"version": "8.4.3-alpha.1",
"private": true,
"main": "index.js",
"scripts": {
Expand All @@ -20,30 +20,30 @@
},
"dependencies": {
"@babel/preset-env": "^7.25.4",
"@expo/metro-runtime": "~4.0.0-preview.0",
"@expo/metro-runtime": "~4.0.0",
"@gorhom/bottom-sheet": "^5.0.5",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/datetimepicker": "8.2.0",
"@react-native-community/slider": "4.5.5",
"@storybook/addon-essentials": "^8.4.2",
"@storybook/addon-interactions": "^8.4.2",
"@storybook/addon-links": "^8.4.2",
"@storybook/addon-ondevice-actions": "^8.4.2",
"@storybook/addon-ondevice-backgrounds": "^8.4.2",
"@storybook/addon-ondevice-controls": "^8.4.2",
"@storybook/addon-ondevice-notes": "^8.4.2",
"@storybook/addon-ondevice-actions": "^8.4.3-alpha.1",
"@storybook/addon-ondevice-backgrounds": "^8.4.3-alpha.1",
"@storybook/addon-ondevice-controls": "^8.4.3-alpha.1",
"@storybook/addon-ondevice-notes": "^8.4.3-alpha.1",
"@storybook/addon-react-native-server": "0.0.6",
"@storybook/addon-react-native-web": "^0.0.22",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/blocks": "^8.4.2",
"@storybook/builder-webpack5": "^8.4.2",
"@storybook/global": "^5.0.0",
"@storybook/react": "^8.4.2",
"@storybook/react-native": "^8.4.2",
"@storybook/react-native-theming": "^8.4.2",
"@storybook/react-native": "^8.4.3-alpha.1",
"@storybook/react-native-theming": "^8.4.3-alpha.1",
"@storybook/react-webpack5": "^8.4.2",
"@storybook/test": "^8.4.2",
"expo": "52.0.0-preview.21",
"expo": "~52.0.5",
"history": "^5.3.0",
"querystring": "^0.2.1",
"react": "18.3.1",
Expand All @@ -70,7 +70,7 @@
"babel-loader": "^9.1.3",
"babel-plugin-react-docgen-typescript": "^1.5.1",
"jest": "^29.7.0",
"jest-expo": "~52.0.0-preview.3",
"jest-expo": "~52.0.0",
"metro-react-native-babel-preset": "^0.77.0",
"typescript": "^5.3.3"
}
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"npmClient": "yarn",
"registry": "https://registry.npmjs.org",
"version": "8.4.2"
"version": "8.4.3-alpha.1"
}
2 changes: 1 addition & 1 deletion packages/ondevice-actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-ondevice-actions",
"version": "8.4.2",
"version": "8.4.3-alpha.1",
"description": "Action Logger addon for react-native storybook",
"keywords": [
"storybook"
Expand Down
4 changes: 2 additions & 2 deletions packages/ondevice-backgrounds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-ondevice-backgrounds",
"version": "8.4.2",
"version": "8.4.3-alpha.1",
"description": "A react-native storybook addon to show different backgrounds for your preview",
"keywords": [
"addon",
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@storybook/core": "^8.4.2",
"@storybook/react-native-theming": "^8.4.2"
"@storybook/react-native-theming": "^8.4.3-alpha.1"
},
"devDependencies": {
"typescript": "^5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/ondevice-controls/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-ondevice-controls",
"version": "8.4.2",
"version": "8.4.3-alpha.1",
"description": "Display storybook controls on your device.",
"keywords": [
"addon",
Expand Down Expand Up @@ -32,8 +32,8 @@
"dependencies": {
"@storybook/addon-controls": "^8.4.2",
"@storybook/core": "^8.4.2",
"@storybook/react-native-theming": "^8.4.2",
"@storybook/react-native-ui": "^8.4.2",
"@storybook/react-native-theming": "^8.4.3-alpha.1",
"@storybook/react-native-ui": "^8.4.3-alpha.1",
"deep-equal": "^1.0.1",
"prop-types": "^15.7.2",
"react-native-modal-datetime-picker": "^14.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/ondevice-notes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-ondevice-notes",
"version": "8.4.2",
"version": "8.4.3-alpha.1",
"description": "Write notes for your react-native Storybook stories.",
"keywords": [
"addon",
Expand Down Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@storybook/core": "^8.4.2",
"@storybook/react-native-theming": "^8.4.2",
"@storybook/react-native-theming": "^8.4.3-alpha.1",
"react-native-markdown-display": "^7.0.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-theming/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/react-native-theming",
"version": "8.4.2",
"version": "8.4.3-alpha.1",
"description": "A wrapper library around emotion 11 to provide theming support for react-native storybook",
"keywords": [
"react",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/react-native-ui",
"version": "8.4.2",
"version": "8.4.3-alpha.1",
"description": "ui components for react native storybook",
"keywords": [
"react",
Expand Down Expand Up @@ -60,7 +60,7 @@
"dependencies": {
"@storybook/core": "^8.4.2",
"@storybook/react": "^8.4.2",
"@storybook/react-native-theming": "^8.4.2",
"@storybook/react-native-theming": "^8.4.3-alpha.1",
"fuse.js": "^7.0.0",
"memoizerific": "^1.11.3",
"polished": "^4.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-ui/src/MobileAddonsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const MobileAddonsPanel = forwardRef<MobileAddonsPanelRef, { storyId?: st
return {
maxHeight: height - animatedPosition.value - insets.bottom,
};
}, [animatedPosition.value, height, insets.bottom]);
}, [animatedPosition, height, insets.bottom]);

return (
<BottomSheetModal
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-ui/src/Tree.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const SingleStoryComponents: Story = {
data={{
...{
single: {
tags: [],
type: 'component',
name: 'Single',
id: 'single',
Expand Down
2 changes: 0 additions & 2 deletions packages/react-native/bin/watcher.js

This file was deleted.

12 changes: 6 additions & 6 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/react-native",
"version": "8.4.2",
"version": "8.4.3-alpha.1",
"description": "A better way to develop React Native Components for your app",
"keywords": [
"react",
Expand All @@ -19,13 +19,13 @@
"license": "MIT",
"main": "dist/index.js",
"bin": {
"sb-rn-get-stories": "./bin/get-stories.js",
"sb-rn-watcher": "./bin/watcher.js"
"sb-rn-get-stories": "./bin/get-stories.js"
},
"exports": {
".": "./dist/index.js",
"./metro/withStorybook": "./dist/metro/withStorybook.js",
"./preview": "./dist/preview.js"
"./preview": "./dist/preview.js",
"./scripts/generate": "./scripts/generate.js"
},
"files": [
"bin/**/*",
Expand All @@ -49,8 +49,8 @@
"@storybook/csf": "^0.1.1",
"@storybook/global": "^5.0.0",
"@storybook/react": "^8.4.2",
"@storybook/react-native-theming": "^8.4.2",
"@storybook/react-native-ui": "^8.4.2",
"@storybook/react-native-theming": "^8.4.3-alpha.1",
"@storybook/react-native-ui": "^8.4.3-alpha.1",
"chokidar": "^3.5.1",
"commander": "^8.2.0",
"dedent": "^1.5.1",
Expand Down
Loading

3 comments on commit 3fbf0c2

@trajano
Copy link
Contributor

Choose a reason for hiding this comment

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

@dannyhw Nice, glad to have the watcher removed, it may be better to have it integrated with "metro" to rebuild the file because metro already does watching.

@trajano
Copy link
Contributor

Choose a reason for hiding this comment

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

I would recommend that you just use app.json for the example to keep it simpler, IDEs like VSCode and WebStorm will typecheck it already

@dannyhw
Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah we don’t need the watcher because require.context already reacts to files being added and removed. The watcher has been unused since v7 basically, just cleaning up the code here. WithStorybook now handles generating imports on metro startup.

Please sign in to comment.