From 3fbf0c24e7cf41c3db25ec1a77a8be0da3e40e2c Mon Sep 17 00:00:00 2001 From: Daniel Williams Date: Tue, 19 Nov 2024 20:00:17 +0000 Subject: [PATCH] fix: generate script not found with bun and reanimated warnings on expo 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 --- .../{app.config.js => app.config.ts} | 8 +- examples/expo-example/package.json | 20 +- lerna.json | 2 +- packages/ondevice-actions/package.json | 2 +- packages/ondevice-backgrounds/package.json | 4 +- packages/ondevice-controls/package.json | 6 +- packages/ondevice-notes/package.json | 4 +- packages/react-native-theming/package.json | 2 +- packages/react-native-ui/package.json | 4 +- .../react-native-ui/src/MobileAddonsPanel.tsx | 2 +- packages/react-native-ui/src/Tree.stories.tsx | 1 + packages/react-native/bin/watcher.js | 2 - packages/react-native/package.json | 12 +- .../scripts/__snapshots__/loader.test.js.snap | 211 ---------------- packages/react-native/scripts/get-stories.js | 9 +- packages/react-native/scripts/handle-args.js | 2 +- packages/react-native/scripts/loader.js | 185 -------------- packages/react-native/scripts/loader.test.js | 179 -------------- packages/react-native/scripts/watcher.js | 84 ------- yarn.lock | 231 +++++++++++------- 20 files changed, 175 insertions(+), 795 deletions(-) rename examples/expo-example/{app.config.js => app.config.ts} (51%) delete mode 100755 packages/react-native/bin/watcher.js delete mode 100644 packages/react-native/scripts/__snapshots__/loader.test.js.snap delete mode 100644 packages/react-native/scripts/loader.js delete mode 100644 packages/react-native/scripts/loader.test.js delete mode 100644 packages/react-native/scripts/watcher.js diff --git a/examples/expo-example/app.config.js b/examples/expo-example/app.config.ts similarity index 51% rename from examples/expo-example/app.config.js rename to examples/expo-example/app.config.ts index 16e5bc13c1..e0f18d0359 100644 --- a/examples/expo-example/app.config.js +++ b/examples/expo-example/app.config.ts @@ -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; diff --git a/examples/expo-example/package.json b/examples/expo-example/package.json index 775814bb54..7e770e2be5 100644 --- a/examples/expo-example/package.json +++ b/examples/expo-example/package.json @@ -1,6 +1,6 @@ { "name": "expo-example", - "version": "8.4.2", + "version": "8.4.3-alpha.1", "private": true, "main": "index.js", "scripts": { @@ -20,7 +20,7 @@ }, "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", @@ -28,10 +28,10 @@ "@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", @@ -39,11 +39,11 @@ "@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", @@ -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" } diff --git a/lerna.json b/lerna.json index 59bfdac124..f434016fe3 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { "npmClient": "yarn", "registry": "https://registry.npmjs.org", - "version": "8.4.2" + "version": "8.4.3-alpha.1" } \ No newline at end of file diff --git a/packages/ondevice-actions/package.json b/packages/ondevice-actions/package.json index 8a450755fe..7d2872f31c 100644 --- a/packages/ondevice-actions/package.json +++ b/packages/ondevice-actions/package.json @@ -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" diff --git a/packages/ondevice-backgrounds/package.json b/packages/ondevice-backgrounds/package.json index 37d63e52b2..81d0752275 100644 --- a/packages/ondevice-backgrounds/package.json +++ b/packages/ondevice-backgrounds/package.json @@ -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", @@ -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" diff --git a/packages/ondevice-controls/package.json b/packages/ondevice-controls/package.json index 0ff22596cc..7333821c93 100644 --- a/packages/ondevice-controls/package.json +++ b/packages/ondevice-controls/package.json @@ -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", @@ -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", diff --git a/packages/ondevice-notes/package.json b/packages/ondevice-notes/package.json index 4774a9a1c0..5caaf74070 100644 --- a/packages/ondevice-notes/package.json +++ b/packages/ondevice-notes/package.json @@ -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", @@ -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": { diff --git a/packages/react-native-theming/package.json b/packages/react-native-theming/package.json index 3b24c1807e..ab66b4b5e8 100644 --- a/packages/react-native-theming/package.json +++ b/packages/react-native-theming/package.json @@ -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", diff --git a/packages/react-native-ui/package.json b/packages/react-native-ui/package.json index 5f7abccad9..0b00f33df8 100644 --- a/packages/react-native-ui/package.json +++ b/packages/react-native-ui/package.json @@ -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", @@ -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", diff --git a/packages/react-native-ui/src/MobileAddonsPanel.tsx b/packages/react-native-ui/src/MobileAddonsPanel.tsx index 327d9fbba2..24c740313e 100644 --- a/packages/react-native-ui/src/MobileAddonsPanel.tsx +++ b/packages/react-native-ui/src/MobileAddonsPanel.tsx @@ -50,7 +50,7 @@ export const MobileAddonsPanel = forwardRef addDecorator(decorator)); - } - - if (parameters) { - addParameters(parameters); - } - - - - try { - argsEnhancers.forEach(enhancer => addArgsEnhancer(enhancer)); - } catch{} - - - - const getStories=() => { - return {"./scripts/mocks/file-extensions/FakeStory.stories.tsx": require("./FakeStory.stories.tsx")}; - } - - configure(getStories, module, false) - - - " -`; - -exports[`loader writeRequires when there is a configuration object writes the story imports 1`] = ` -" - /* do not change this file, it is auto generated by storybook. */ - - import { configure, addDecorator, addParameters, addArgsEnhancer } from '@storybook/react-native/V6'; - - global.STORIES = [{"titlePrefix":"ComponentsPrefix","files":"**/*.stories.tsx","directory":"./scripts/mocks/configuration-objects/components","importPathMatcher":"^\\\\.[\\\\\\\\/](?:scripts\\\\/mocks\\\\/configuration-objects\\\\/components(?:\\\\/(?!\\\\.)(?:(?:(?!(?:^|\\\\/)\\\\.).)*?)\\\\/|\\\\/|$)(?!\\\\.)(?=.)[^/]*?\\\\.stories\\\\.tsx)$"}] - - import "@storybook/addon-ondevice-notes/register"; -import "@storybook/addon-ondevice-controls/register"; -import "@storybook/addon-ondevice-backgrounds/register"; -import "@storybook/addon-ondevice-actions/register"; - - import { argsEnhancers } from "@storybook/addon-actions/dist/preview" - - - import { decorators, parameters } from './preview'; - - if (decorators) { - decorators.forEach((decorator) => addDecorator(decorator)); - } - - if (parameters) { - addParameters(parameters); - } - - - - try { - argsEnhancers.forEach(enhancer => addArgsEnhancer(enhancer)); - } catch{} - - - - const getStories=() => { - return {"./scripts/mocks/configuration-objects/components/FakeStory.stories.tsx": require("./components/FakeStory.stories.tsx")}; - } - - configure(getStories, module, false) - - - " -`; - -exports[`loader writeRequires when there is a story glob and exclude paths globs writes the story imports 1`] = ` -" - /* do not change this file, it is auto generated by storybook. */ - - import { configure, addDecorator, addParameters, addArgsEnhancer } from '@storybook/react-native/V6'; - - global.STORIES = [{"titlePrefix":"","directory":"./scripts/mocks/exclude-config-files","files":"**/*.stories.tsx","importPathMatcher":"^\\\\.[\\\\\\\\/](?:scripts\\\\/mocks\\\\/exclude-config-files(?:\\\\/(?!\\\\.)(?:(?:(?!(?:^|\\\\/)\\\\.).)*?)\\\\/|\\\\/|$)(?!\\\\.)(?=.)[^/]*?\\\\.stories\\\\.tsx)$"}] - - import "@storybook/addon-ondevice-notes/register"; -import "@storybook/addon-ondevice-controls/register"; -import "@storybook/addon-ondevice-backgrounds/register"; -import "@storybook/addon-ondevice-actions/register"; - - import { argsEnhancers } from "@storybook/addon-actions/dist/preview" - - - import { decorators, parameters } from './preview'; - - if (decorators) { - decorators.forEach((decorator) => addDecorator(decorator)); - } - - if (parameters) { - addParameters(parameters); - } - - - - try { - argsEnhancers.forEach(enhancer => addArgsEnhancer(enhancer)); - } catch{} - - - - const getStories=() => { - return {"./scripts/mocks/exclude-config-files/include-components/FakeStory.stories.tsx": require("./include-components/FakeStory.stories.tsx")}; - } - - configure(getStories, module, false) - - - " -`; - -exports[`loader writeRequires when there is a story glob writes the story imports 1`] = ` -" - /* do not change this file, it is auto generated by storybook. */ - - import { configure, addDecorator, addParameters, addArgsEnhancer } from '@storybook/react-native/V6'; - - global.STORIES = [{"titlePrefix":"","directory":"./scripts/mocks/all-config-files","files":"FakeStory.stories.tsx","importPathMatcher":"^\\\\.[\\\\\\\\/](?:scripts\\\\/mocks\\\\/all-config-files\\\\/FakeStory\\\\.stories\\\\.tsx)$"}] - - import "@storybook/addon-ondevice-notes/register"; -import "@storybook/addon-ondevice-controls/register"; -import "@storybook/addon-ondevice-backgrounds/register"; -import "@storybook/addon-ondevice-actions/register"; - - import { argsEnhancers } from "@storybook/addon-actions/dist/preview" - - - import { decorators, parameters } from './preview'; - - if (decorators) { - decorators.forEach((decorator) => addDecorator(decorator)); - } - - if (parameters) { - addParameters(parameters); - } - - - - try { - argsEnhancers.forEach(enhancer => addArgsEnhancer(enhancer)); - } catch{} - - - - const getStories=() => { - return {"./scripts/mocks/all-config-files/FakeStory.stories.tsx": require("./FakeStory.stories.tsx")}; - } - - configure(getStories, module, false) - - - " -`; - -exports[`loader writeRequires when there is no preview does not add preview related stuff 1`] = ` -" - /* do not change this file, it is auto generated by storybook. */ - - import { configure, addDecorator, addParameters, addArgsEnhancer } from '@storybook/react-native/V6'; - - global.STORIES = [{"titlePrefix":"","directory":"./scripts/mocks/no-preview","files":"FakeStory.stories.tsx","importPathMatcher":"^\\\\.[\\\\\\\\/](?:scripts\\\\/mocks\\\\/no-preview\\\\/FakeStory\\\\.stories\\\\.tsx)$"}] - - import "@storybook/addon-ondevice-notes/register"; -import "@storybook/addon-ondevice-controls/register"; -import "@storybook/addon-ondevice-backgrounds/register"; -import "@storybook/addon-ondevice-actions/register"; - - import { argsEnhancers } from "@storybook/addon-actions/dist/preview" - - - - - try { - argsEnhancers.forEach(enhancer => addArgsEnhancer(enhancer)); - } catch{} - - - - const getStories=() => { - return {"./scripts/mocks/no-preview/FakeStory.stories.tsx": require("./FakeStory.stories.tsx")}; - } - - configure(getStories, module, false) - - - " -`; diff --git a/packages/react-native/scripts/get-stories.js b/packages/react-native/scripts/get-stories.js index cd82088e27..62bbceb245 100644 --- a/packages/react-native/scripts/get-stories.js +++ b/packages/react-native/scripts/get-stories.js @@ -1,10 +1,5 @@ const { getArguments } = require('./handle-args'); const args = getArguments(); -if (args.v6Store) { - const { writeRequires } = require('./loader'); - writeRequires(args); -} else { - const { generate } = require('./generate'); - generate(args); -} +const { generate } = require('./generate'); +generate(args); diff --git a/packages/react-native/scripts/handle-args.js b/packages/react-native/scripts/handle-args.js index 3b637e9eae..c051b5ddea 100644 --- a/packages/react-native/scripts/handle-args.js +++ b/packages/react-native/scripts/handle-args.js @@ -2,7 +2,7 @@ function getArguments() { const { program } = require('commander'); program - .description('Getter and watcher for react native storybook') + .description('Generator for the storybook.requires file used in react native storybook') .option( '-c, --config-path ', 'The path to your config folder relative to your project-dir', diff --git a/packages/react-native/scripts/loader.js b/packages/react-native/scripts/loader.js deleted file mode 100644 index 8dc8edd896..0000000000 --- a/packages/react-native/scripts/loader.js +++ /dev/null @@ -1,185 +0,0 @@ -const path = require('path'); -const fs = require('fs'); -const glob = require('glob'); -const prettier = require('prettier'); -const { normalizeStories } = require('@storybook/core/common'); -const { - toRequireContext, - getFilePathExtension, - getMain, - ensureRelativePathHasDot, - getPreviewExists, -} = require('./common'); - -const cwd = process.cwd(); - -// TODO check if we need clearDecorators(); - -// we clear decorators as a workaround for global decorators getting infinitely applied on HMR -const previewImports = ` - import { decorators, parameters } from './preview'; - - if (decorators) { - decorators.forEach((decorator) => addDecorator(decorator)); - } - - if (parameters) { - addParameters(parameters); - } -`; - -function normalizeExcludePaths(paths) { - // automatically convert a string to an array of a single string - if (typeof paths === 'string') { - return [paths]; - } - - // ensure the paths is an array and if any items exists, they are strings - if (Array.isArray(paths) && paths.every((p) => typeof p === 'string')) { - return paths; - } - - // when the paths aren't a string or an (empty) array of strings, return - return undefined; -} - -function writeRequires({ configPath, absolute = false, v6RequireContext = false }) { - const storybookRequiresLocation = path.resolve(cwd, configPath, 'storybook.requires.js'); - - const mainImport = getMain({ configPath }); - - const main = mainImport.default ?? mainImport; - - const reactNativeOptions = main.reactNativeOptions; - - const excludePaths = reactNativeOptions && reactNativeOptions.excludePaths; - - const normalizedExcludePaths = normalizeExcludePaths(excludePaths); - - const storiesSpecifiers = normalizeStories(main.stories, { - configDir: configPath, - workingDir: cwd, - }); - - let configure = ''; - - if (v6RequireContext) { - const contexts = storiesSpecifiers.map((specifier) => { - const { path: p, recursive: r, match: m } = toRequireContext(specifier); - - const pathToStory = ensureRelativePathHasDot(path.relative(configPath, p)); - - return `require.context('${pathToStory}', ${r}, ${m})`; - }); - - configure = ` - const stories = [${contexts.join(',')}]; - - configure(stories, module, false) - `; - } else { - const storyRequires = storiesSpecifiers.reduce((acc, specifier) => { - const paths = glob - .sync(specifier.files, { - cwd: path.resolve(cwd, specifier.directory), - absolute, - // default to always ignore (exclude) anything in node_modules - ignore: - normalizedExcludePaths !== undefined ? normalizedExcludePaths : ['**/node_modules'], - }) - .map((storyPath) => { - const pathWithDirectory = path.join(specifier.directory, storyPath); - - const requirePath = absolute - ? storyPath - : ensureRelativePathHasDot(path.relative(configPath, pathWithDirectory)); - - const absolutePath = absolute ? requirePath : path.resolve(configPath, requirePath); - - const pathRelativeToCwd = path.relative(cwd, absolutePath); - - const normalizePathForWindows = (str) => - path.sep === '\\' ? str.replace(/\\/g, '/') : str; - - return `"./${normalizePathForWindows( - pathRelativeToCwd - )}": require("${normalizePathForWindows(requirePath)}")`; - }); - return [...acc, ...paths]; - }, []); - - const path_obj_str = `{${storyRequires.join(',')}}`; - - configure = ` - const getStories=() => { - return ${path_obj_str}; - } - - configure(getStories, module, false) - `; - } - - fs.writeFileSync(storybookRequiresLocation, ''); - - const previewExists = getPreviewExists({ configPath }); - - let previewJs = previewExists ? previewImports : ''; - - const registerAddons = main.addons?.map((addon) => `import "${addon}/register";`).join('\n'); - - let enhancersImport = ''; - - let enhancers = ''; - - // TODO: implement presets or something similar - if (main.addons?.includes('@storybook/addon-ondevice-actions')) { - enhancersImport = 'import { argsEnhancers } from "@storybook/addon-actions/dist/preview"'; - - // try/catch is a temporary fix for https://github.com/storybookjs/react-native/issues/327 until a fix is found - enhancers = ` - try { - argsEnhancers.forEach(enhancer => addArgsEnhancer(enhancer)); - } catch{} - `; - } - - const normalizedStories = storiesSpecifiers.map((specifier) => ({ - ...specifier, - importPathMatcher: specifier.importPathMatcher.source, - })); - - const globalStories = `global.STORIES = ${JSON.stringify(normalizedStories)}`; - - const fileContent = ` - /* do not change this file, it is auto generated by storybook. */ - - import { configure, addDecorator, addParameters, addArgsEnhancer } from '@storybook/react-native/V6'; - - ${globalStories} - - ${registerAddons} - - ${enhancersImport} - - ${previewJs} - - ${enhancers} - - ${configure} - - `; - - const formattedFileContent = prettier.format(fileContent, { parser: 'babel' }); - - fs.writeFileSync(storybookRequiresLocation, formattedFileContent, { - encoding: 'utf8', - flag: 'w', - }); -} - -module.exports = { - writeRequires, - getMain, - getPreviewExists, - getFilePathExtension, -}; diff --git a/packages/react-native/scripts/loader.test.js b/packages/react-native/scripts/loader.test.js deleted file mode 100644 index 0ec1ad8e37..0000000000 --- a/packages/react-native/scripts/loader.test.js +++ /dev/null @@ -1,179 +0,0 @@ -const path = require('path'); -const { writeRequires, getMain, getPreviewExists } = require('./loader'); - -let pathMock; -let fileContentMock; - -jest.mock('fs', () => ({ - ...jest.requireActual('fs'), - writeFileSync: (filePath, fileContent, opts) => { - pathMock = filePath; - fileContentMock = fileContent; - }, -})); - -jest.mock('prettier', () => ({ - format(s, opts) { - return s; - }, -})); - -describe('loader', () => { - describe('getMain', () => { - it('should return the main js default export as an object', () => { - const main = getMain({ configPath: path.resolve(__dirname, 'mocks/all-config-files') }); - expect(main).toEqual({ - stories: ['./FakeStory.stories.tsx'], - addons: [ - '@storybook/addon-ondevice-notes', - '@storybook/addon-ondevice-controls', - '@storybook/addon-ondevice-backgrounds', - '@storybook/addon-ondevice-actions', - ], - }); - }); - - it('should also work with relative paths', () => { - // relative from where the command is run - const main = getMain({ configPath: './scripts/mocks/all-config-files' }); - expect(main).toEqual({ - stories: ['./FakeStory.stories.tsx'], - addons: [ - '@storybook/addon-ondevice-notes', - '@storybook/addon-ondevice-controls', - '@storybook/addon-ondevice-backgrounds', - '@storybook/addon-ondevice-actions', - ], - }); - }); - it('should work for any supported file extension', () => { - const main = getMain({ configPath: './scripts/mocks/file-extensions' }); - expect(main).toEqual({ - stories: ['./FakeStory.stories.tsx'], - addons: [ - '@storybook/addon-ondevice-notes', - '@storybook/addon-ondevice-controls', - '@storybook/addon-ondevice-backgrounds', - '@storybook/addon-ondevice-actions', - ], - }); - }); - }); - - describe('getPreviewExists', () => { - const supportedExtensions = ['js', 'jsx', 'ts', 'tsx']; - describe('when using a relative path', () => { - it('should return true if the preview exists', () => { - supportedExtensions.forEach((ext) => { - expect(getPreviewExists({ configPath: `scripts/mocks/preview-files/${ext}` })).toBe(true); - }); - }); - - it('should return false if the preview does not exist', () => { - expect(getPreviewExists({ configPath: './scripts/mocks/no-preview' })).toBe(false); - }); - - it('should return false if the preview does not match any of supportedExtensions values', () => { - expect(getPreviewExists({ configPath: './scripts/mocks/wrong-extension-preview' })).toBe( - false - ); - }); - }); - - describe('when using an absolute path', () => { - it('should return true if the preview exists', () => { - supportedExtensions.forEach((ext) => { - expect( - getPreviewExists({ - configPath: path.resolve(__dirname, `mocks/preview-files/${ext}`), - }) - ).toBe(true); - }); - }); - - it('should return false if the preview does not exist', () => { - expect(getPreviewExists({ configPath: path.resolve(__dirname, 'mocks/no-preview') })).toBe( - false - ); - }); - - it('should return false if the preview does not match any of supportedExtensions values', () => { - expect( - getPreviewExists({ configPath: path.resolve(__dirname, 'mocks/wrong-extension-preview') }) - ).toBe(false); - }); - }); - }); - - describe('writeRequires', () => { - describe('when there is a story glob', () => { - it('writes the story imports', () => { - writeRequires({ configPath: 'scripts/mocks/all-config-files' }); - expect(pathMock).toEqual( - path.resolve(__dirname, 'mocks/all-config-files/storybook.requires.js') - ); - expect(fileContentMock).toMatchSnapshot(); - }); - }); - - describe('when there are different file extensions', () => { - it('writes the story imports', () => { - writeRequires({ configPath: 'scripts/mocks/file-extensions' }); - expect(pathMock).toEqual( - path.resolve(__dirname, 'mocks/file-extensions/storybook.requires.js') - ); - expect(fileContentMock).toMatchSnapshot(); - }); - }); - - describe('when there is a story glob and exclude paths globs', () => { - it('writes the story imports', () => { - writeRequires({ configPath: 'scripts/mocks/exclude-config-files' }); - expect(pathMock).toEqual( - path.resolve(__dirname, 'mocks/exclude-config-files/storybook.requires.js') - ); - - expect(fileContentMock).toContain('include-components/FakeStory.stories.tsx'); - expect(fileContentMock).not.toContain('exclude-components/FakeStory.stories.tsx'); - - expect(fileContentMock).toMatchSnapshot(); - }); - }); - - describe('when there is no story glob or addons', () => { - it('throws an error', () => { - expect(() => writeRequires({ configPath: 'scripts/mocks/blank-config' })).toThrow(); - }); - }); - - describe('when there is no preview', () => { - it('does not add preview related stuff', () => { - writeRequires({ configPath: 'scripts/mocks/no-preview' }); - expect(pathMock).toEqual(path.resolve(__dirname, 'mocks/no-preview/storybook.requires.js')); - expect(fileContentMock).toMatchSnapshot(); - }); - }); - - describe('when the absolute option is true', () => { - it('should write absolute paths to the requires file', () => { - writeRequires({ configPath: 'scripts/mocks/all-config-files', absolute: true }); - expect(pathMock).toEqual( - path.resolve(__dirname, 'mocks/all-config-files/storybook.requires.js') - ); - expect(fileContentMock).toContain( - path.resolve(__dirname, 'mocks/all-config-files/FakeStory.stories.tsx') - ); - }); - }); - - describe('when there is a configuration object', () => { - it('writes the story imports', () => { - writeRequires({ configPath: 'scripts/mocks/configuration-objects' }); - expect(pathMock).toEqual( - path.resolve(__dirname, 'mocks/configuration-objects/storybook.requires.js') - ); - expect(fileContentMock).toMatchSnapshot(); - }); - }); - }); -}); diff --git a/packages/react-native/scripts/watcher.js b/packages/react-native/scripts/watcher.js deleted file mode 100644 index 13023bb099..0000000000 --- a/packages/react-native/scripts/watcher.js +++ /dev/null @@ -1,84 +0,0 @@ -const chokidar = require('chokidar'); -const path = require('path'); - -const { writeRequires, getMain, getFilePathExtension } = require('./loader'); - -const { getArguments } = require('./handle-args'); - -const args = getArguments(); - -if (!args.v6Store) { - console.log( - "in v7 you don't need the watcher anymore, if you are using v6 compat mode then pass the -v6 flag" - ); - - process.exit(0); -} - -const log = console.log.bind(console); - -const mainExt = getFilePathExtension(args, 'main'); -const previewExt = getFilePathExtension(args, 'preview'); - -const watchPaths = [`./main.${mainExt}`]; - -if (previewExt) { - watchPaths.push(`./preview.${previewExt}`); -} - -console.log(watchPaths); - -const updateRequires = (event, watchPath) => { - if (typeof watchPath === 'string') { - log(`event ${event} for file ${path.basename(watchPath)}`); - } - writeRequires(args); -}; - -const globs = getMain(args).stories; -// directory -// files -const globsStrings = globs.map((g) => { - if (typeof g === 'string') return g; - if (g.directory && g.files) { - return `${g.directory}/${g.files}`; - } -}); - -chokidar - .watch(watchPaths, { cwd: args.configPath }) - .on('change', (watchPath) => updateRequires('change', watchPath)); - -let isReady = false; - -chokidar - .watch(globsStrings, { cwd: args.configPath }) - .on('ready', () => { - log('Watcher is ready, performing initial write'); - writeRequires(args); - log('Waiting for changes, press r to manually re-write'); - isReady = true; - }) - .on('add', (watchPath) => { - if (isReady) { - updateRequires('add', watchPath); - } - }) - .on('unlink', (watchPath) => { - if (isReady) { - updateRequires('unlink', watchPath); - } - }); - -const readline = require('readline'); -readline.emitKeypressEvents(process.stdin); -process.stdin.setRawMode(true); -process.stdin.on('keypress', (str, key) => { - if (key.ctrl && key.name === 'c') { - process.exit(); - } - if (key.name === 'r') { - log('Detected "r" keypress, rewriting story imports...'); - writeRequires(args); - } -}); diff --git a/yarn.lock b/yarn.lock index 277d0a1519..4e923f4409 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3063,9 +3063,9 @@ __metadata: languageName: node linkType: hard -"@expo/cli@npm:0.20.1": - version: 0.20.1 - resolution: "@expo/cli@npm:0.20.1" +"@expo/cli@npm:0.21.2": + version: 0.21.2 + resolution: "@expo/cli@npm:0.21.2" dependencies: "@0no-co/graphql.web": "npm:^1.0.8" "@babel/runtime": "npm:^7.20.0" @@ -3076,7 +3076,7 @@ __metadata: "@expo/env": "npm:~0.4.0" "@expo/image-utils": "npm:^0.6.0" "@expo/json-file": "npm:^9.0.0" - "@expo/metro-config": "npm:~0.19.0-preview.2" + "@expo/metro-config": "npm:~0.19.0" "@expo/osascript": "npm:^2.0.31" "@expo/package-manager": "npm:^1.5.0" "@expo/plist": "npm:^0.2.0" @@ -3125,7 +3125,7 @@ __metadata: resolve-from: "npm:^5.0.0" resolve.exports: "npm:^2.0.2" semver: "npm:^7.6.0" - send: "npm:^0.18.0" + send: "npm:^0.19.0" slugify: "npm:^1.3.4" source-map-support: "npm:~0.5.21" stacktrace-parser: "npm:^0.1.10" @@ -3140,7 +3140,7 @@ __metadata: ws: "npm:^8.12.1" bin: expo-internal: build/bin/cli - checksum: 10/79cdf5cf45c3953664188cbe09013a33f2307be3f4d833ffcaa45fb2632a29b00876741d2c692a69007764e702f7dfc6d0e7bb742b60e599e83d642e21aabd13 + checksum: 10/fe442d2138e6d8de6a8339d67fd39062be2917a6660ed4186f50afb76a695751fa552202cb8713231cce979b7a2f26fd2b68cb6e6ce103a90cfa2085e8e034e6 languageName: node linkType: hard @@ -3154,11 +3154,11 @@ __metadata: languageName: node linkType: hard -"@expo/config-plugins@npm:9.0.6": - version: 9.0.6 - resolution: "@expo/config-plugins@npm:9.0.6" +"@expo/config-plugins@npm:9.0.9": + version: 9.0.9 + resolution: "@expo/config-plugins@npm:9.0.9" dependencies: - "@expo/config-types": "npm:^52.0.0-preview.0" + "@expo/config-types": "npm:^52.0.0" "@expo/json-file": "npm:~9.0.0" "@expo/plist": "npm:^0.2.0" "@expo/sdk-runtime-versions": "npm:^1.0.0" @@ -3172,7 +3172,7 @@ __metadata: slugify: "npm:^1.6.6" xcode: "npm:^3.0.1" xml2js: "npm:0.6.0" - checksum: 10/3c1f709cf63428dd625b6fd828b7643ef7b70f2b8b531146f28d67fe052001e1f798a952d661f3f5ff5b5d2e4e766ff9772f48eb4c8db4e9f5718f7d929e6395 + checksum: 10/e0f5cec54999e6cd46f435d0996c294072716ce7efe553679fec4fcbf63d65f151e37fd50ff9f459c5db4edda095d25dcaa12cc6872aa45ada5a9128c34ee31d languageName: node linkType: hard @@ -3220,6 +3220,13 @@ __metadata: languageName: node linkType: hard +"@expo/config-types@npm:^52.0.0": + version: 52.0.1 + resolution: "@expo/config-types@npm:52.0.1" + checksum: 10/9c35fc88dfa9075c6f5584f3887a85646a81439e4b9bdddc64a1f055e7fcd42908b0b33054a1fb407fd525dcb9ed8b786c1b2b403196d6ca5ce9a51e76379e8b + languageName: node + linkType: hard + "@expo/config-types@npm:^52.0.0-preview.0": version: 52.0.0-preview.1 resolution: "@expo/config-types@npm:52.0.0-preview.1" @@ -3227,13 +3234,13 @@ __metadata: languageName: node linkType: hard -"@expo/config@npm:10.0.2, @expo/config@npm:~10.0.2": - version: 10.0.2 - resolution: "@expo/config@npm:10.0.2" +"@expo/config@npm:10.0.3": + version: 10.0.3 + resolution: "@expo/config@npm:10.0.3" dependencies: "@babel/code-frame": "npm:~7.10.4" "@expo/config-plugins": "npm:~9.0.0" - "@expo/config-types": "npm:^52.0.0-preview.0" + "@expo/config-types": "npm:^52.0.0" "@expo/json-file": "npm:^9.0.0" deepmerge: "npm:^4.3.1" getenv: "npm:^1.0.0" @@ -3244,7 +3251,7 @@ __metadata: semver: "npm:^7.6.0" slugify: "npm:^1.3.4" sucrase: "npm:3.35.0" - checksum: 10/13df32bb75b77a5781390dad2a2a9dfdd5c5b2217bf0b0df99a811170dcbaf874539b96eb01562e0caba1b09fa5bb01ddbbabbc95484689d31ea7aecc90f6317 + checksum: 10/f84be296fd6ab2ac721601ad1bfbff8f7ef1a96a3641515a23e71543e11c578fbaa87dbd896756c55a4f0d8767e560703b1d85ac45c1bac3aaf948c99fe8b20f languageName: node linkType: hard @@ -3269,6 +3276,27 @@ __metadata: languageName: node linkType: hard +"@expo/config@npm:~10.0.2": + version: 10.0.2 + resolution: "@expo/config@npm:10.0.2" + dependencies: + "@babel/code-frame": "npm:~7.10.4" + "@expo/config-plugins": "npm:~9.0.0" + "@expo/config-types": "npm:^52.0.0-preview.0" + "@expo/json-file": "npm:^9.0.0" + deepmerge: "npm:^4.3.1" + getenv: "npm:^1.0.0" + glob: "npm:^10.4.2" + require-from-string: "npm:^2.0.2" + resolve-from: "npm:^5.0.0" + resolve-workspace-root: "npm:^2.0.0" + semver: "npm:^7.6.0" + slugify: "npm:^1.3.4" + sucrase: "npm:3.35.0" + checksum: 10/13df32bb75b77a5781390dad2a2a9dfdd5c5b2217bf0b0df99a811170dcbaf874539b96eb01562e0caba1b09fa5bb01ddbbabbc95484689d31ea7aecc90f6317 + languageName: node + linkType: hard + "@expo/devcert@npm:^1.1.2": version: 1.1.4 resolution: "@expo/devcert@npm:1.1.4" @@ -3362,9 +3390,9 @@ __metadata: languageName: node linkType: hard -"@expo/metro-config@npm:0.19.0-preview.3": - version: 0.19.0-preview.3 - resolution: "@expo/metro-config@npm:0.19.0-preview.3" +"@expo/metro-config@npm:0.19.3": + version: 0.19.3 + resolution: "@expo/metro-config@npm:0.19.3" dependencies: "@babel/core": "npm:^7.20.0" "@babel/generator": "npm:^7.20.5" @@ -3384,13 +3412,13 @@ __metadata: minimatch: "npm:^3.0.4" postcss: "npm:~8.4.32" resolve-from: "npm:^5.0.0" - checksum: 10/51c50544dae5632eb00d2de8fb7b0c46d637adb72acde1708a839ff5c70e096c8216406a1d625870ae1659409b0faf10075e0efa6da1daa6afdf36703294f8cc + checksum: 10/890b7a7f20b90d06b3d5e647f9aeacb0661adefb0634ca82294dd29e88793c7d39eaa4954c4c4885cca09b7edd3eb17178f415a9e247c3d8447ac8fe143c3ccc languageName: node linkType: hard -"@expo/metro-config@npm:~0.19.0-preview.2": - version: 0.19.0-preview.2 - resolution: "@expo/metro-config@npm:0.19.0-preview.2" +"@expo/metro-config@npm:~0.19.0": + version: 0.19.2 + resolution: "@expo/metro-config@npm:0.19.2" dependencies: "@babel/core": "npm:^7.20.0" "@babel/generator": "npm:^7.20.5" @@ -3410,16 +3438,16 @@ __metadata: minimatch: "npm:^3.0.4" postcss: "npm:~8.4.32" resolve-from: "npm:^5.0.0" - checksum: 10/b7f73b791a787eafc3db3bcafbd4eebfa939fec1892daa272a6bbdb1b65f4a28a6c31ec5261db329927ef6f8318ec2aacc3d9e6bc1ff588d5a0cd36ec9839d58 + checksum: 10/542ae6461a2b123d00f93daa7de388e0263f995219764c33a7cb3d9d7d71d4e0415a5d8e978ad06cd9f3587e569fdbc8e579004aab059fa1232c984544c3ed50 languageName: node linkType: hard -"@expo/metro-runtime@npm:~4.0.0-preview.0": - version: 4.0.0-preview.0 - resolution: "@expo/metro-runtime@npm:4.0.0-preview.0" +"@expo/metro-runtime@npm:~4.0.0": + version: 4.0.0 + resolution: "@expo/metro-runtime@npm:4.0.0" peerDependencies: react-native: "*" - checksum: 10/1f9a169a51fd2d29544461f5271c266a567074fefed0d8a1221149941b5c448b0358c941a4ec9aef43b04dff0f1ef4a3186181894b10b74b998c3335c77126a9 + checksum: 10/2f5bd81e4d0735dc9b99ac4f35169969eb9dc303669ddc3158f670a3c36115f87d479a6fda11c1d5acab551f1015a32271c83001e8874493f0ec58c02f8ddbf3 languageName: node linkType: hard @@ -5140,7 +5168,7 @@ __metadata: languageName: node linkType: hard -"@storybook/addon-ondevice-actions@npm:^8.4.2, @storybook/addon-ondevice-actions@workspace:packages/ondevice-actions": +"@storybook/addon-ondevice-actions@npm:^8.4.3-alpha.1, @storybook/addon-ondevice-actions@workspace:packages/ondevice-actions": version: 0.0.0-use.local resolution: "@storybook/addon-ondevice-actions@workspace:packages/ondevice-actions" dependencies: @@ -5155,12 +5183,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/addon-ondevice-backgrounds@npm:^8.4.2, @storybook/addon-ondevice-backgrounds@workspace:packages/ondevice-backgrounds": +"@storybook/addon-ondevice-backgrounds@npm:^8.4.3-alpha.1, @storybook/addon-ondevice-backgrounds@workspace:packages/ondevice-backgrounds": version: 0.0.0-use.local resolution: "@storybook/addon-ondevice-backgrounds@workspace:packages/ondevice-backgrounds" dependencies: "@storybook/core": "npm:^8.4.2" - "@storybook/react-native-theming": "npm:^8.4.2" + "@storybook/react-native-theming": "npm:^8.4.3-alpha.1" typescript: "npm:^5.3.3" peerDependencies: react: "*" @@ -5168,14 +5196,14 @@ __metadata: languageName: unknown linkType: soft -"@storybook/addon-ondevice-controls@npm:^8.4.2, @storybook/addon-ondevice-controls@workspace:packages/ondevice-controls": +"@storybook/addon-ondevice-controls@npm:^8.4.3-alpha.1, @storybook/addon-ondevice-controls@workspace:packages/ondevice-controls": version: 0.0.0-use.local resolution: "@storybook/addon-ondevice-controls@workspace:packages/ondevice-controls" dependencies: "@storybook/addon-controls": "npm:^8.4.2" "@storybook/core": "npm:^8.4.2" - "@storybook/react-native-theming": "npm:^8.4.2" - "@storybook/react-native-ui": "npm:^8.4.2" + "@storybook/react-native-theming": "npm:^8.4.3-alpha.1" + "@storybook/react-native-ui": "npm:^8.4.3-alpha.1" cross-env: "npm:^7.0.3" deep-equal: "npm:^1.0.1" prop-types: "npm:^15.7.2" @@ -5192,12 +5220,12 @@ __metadata: languageName: unknown linkType: soft -"@storybook/addon-ondevice-notes@npm:^8.4.2, @storybook/addon-ondevice-notes@workspace:packages/ondevice-notes": +"@storybook/addon-ondevice-notes@npm:^8.4.3-alpha.1, @storybook/addon-ondevice-notes@workspace:packages/ondevice-notes": version: 0.0.0-use.local resolution: "@storybook/addon-ondevice-notes@workspace:packages/ondevice-notes" dependencies: "@storybook/core": "npm:^8.4.2" - "@storybook/react-native-theming": "npm:^8.4.2" + "@storybook/react-native-theming": "npm:^8.4.3-alpha.1" react-native-markdown-display: "npm:^7.0.2" typescript: "npm:^5.3.3" peerDependencies: @@ -5506,7 +5534,7 @@ __metadata: languageName: node linkType: hard -"@storybook/react-native-theming@npm:^8.4.2, @storybook/react-native-theming@workspace:packages/react-native-theming": +"@storybook/react-native-theming@npm:^8.4.3-alpha.1, @storybook/react-native-theming@workspace:packages/react-native-theming": version: 0.0.0-use.local resolution: "@storybook/react-native-theming@workspace:packages/react-native-theming" dependencies: @@ -5520,13 +5548,13 @@ __metadata: languageName: unknown linkType: soft -"@storybook/react-native-ui@npm:^8.4.2, @storybook/react-native-ui@workspace:packages/react-native-ui": +"@storybook/react-native-ui@npm:^8.4.3-alpha.1, @storybook/react-native-ui@workspace:packages/react-native-ui": version: 0.0.0-use.local resolution: "@storybook/react-native-ui@workspace:packages/react-native-ui" dependencies: "@storybook/core": "npm:^8.4.2" "@storybook/react": "npm:^8.4.2" - "@storybook/react-native-theming": "npm:^8.4.2" + "@storybook/react-native-theming": "npm:^8.4.3-alpha.1" "@types/jest": "npm:^29.4.3" "@types/react": "npm:~18.3.12" babel-jest: "npm:^29.7.0" @@ -5550,7 +5578,7 @@ __metadata: languageName: unknown linkType: soft -"@storybook/react-native@npm:^8.4.2, @storybook/react-native@workspace:packages/react-native": +"@storybook/react-native@npm:^8.4.3-alpha.1, @storybook/react-native@workspace:packages/react-native": version: 0.0.0-use.local resolution: "@storybook/react-native@workspace:packages/react-native" dependencies: @@ -5558,8 +5586,8 @@ __metadata: "@storybook/csf": "npm:^0.1.1" "@storybook/global": "npm:^5.0.0" "@storybook/react": "npm:^8.4.2" - "@storybook/react-native-theming": "npm:^8.4.2" - "@storybook/react-native-ui": "npm:^8.4.2" + "@storybook/react-native-theming": "npm:^8.4.3-alpha.1" + "@storybook/react-native-ui": "npm:^8.4.3-alpha.1" "@types/jest": "npm:^29.4.3" "@types/react": "npm:~18.3.12" babel-jest: "npm:^29.7.0" @@ -5592,7 +5620,6 @@ __metadata: react-native-safe-area-context: "*" bin: sb-rn-get-stories: ./bin/get-stories.js - sb-rn-watcher: ./bin/watcher.js languageName: unknown linkType: soft @@ -7214,9 +7241,9 @@ __metadata: languageName: node linkType: hard -"babel-preset-expo@npm:~12.0.0-preview.5": - version: 12.0.0-preview.5 - resolution: "babel-preset-expo@npm:12.0.0-preview.5" +"babel-preset-expo@npm:~12.0.0": + version: 12.0.0 + resolution: "babel-preset-expo@npm:12.0.0" dependencies: "@babel/plugin-proposal-decorators": "npm:^7.12.9" "@babel/plugin-transform-export-namespace-from": "npm:^7.22.11" @@ -7235,7 +7262,7 @@ __metadata: optional: true react-compiler-runtime: optional: true - checksum: 10/70c8aea646ae91e4b6dde992420f31c155f1e79950797d45167a86186c1075658d9c67278afdb748fce208e23ebe01cd22ba745b8eace3a0b90fb5c577e01031 + checksum: 10/9efa358bb7e56e9d7f0abcef35551ec334a1d72444f53008e2209196aec3c1f1738e2fc7e4a1f55ea420991dc8d9db9fc15f6c25771075b4f913c0073e616f89 languageName: node linkType: hard @@ -9925,9 +9952,9 @@ __metadata: languageName: node linkType: hard -"expo-asset@npm:~11.0.0": - version: 11.0.0 - resolution: "expo-asset@npm:11.0.0" +"expo-asset@npm:~11.0.1": + version: 11.0.1 + resolution: "expo-asset@npm:11.0.1" dependencies: "@expo/image-utils": "npm:^0.6.0" expo-constants: "npm:~17.0.0" @@ -9937,7 +9964,7 @@ __metadata: expo: "*" react: "*" react-native: "*" - checksum: 10/46a2a6d69f78aa61f058fcd78858dce61c373b333778a5f01aac2e7c810f69d1ba84d3a67dac004f779ed8423b373acd654bff8df9fb4f22d050f5c45f55af8d + checksum: 10/1b1d28048e224d4899fe27e55e650a0a9a2cafb02afb3c2f1d58f4be032fdbaafebe8157dc734503ee7fc84e8f1aec3481aded9f61eaeeaecb4f4ab06d335524 languageName: node linkType: hard @@ -9954,6 +9981,19 @@ __metadata: languageName: node linkType: hard +"expo-constants@npm:~17.0.2": + version: 17.0.2 + resolution: "expo-constants@npm:17.0.2" + dependencies: + "@expo/config": "npm:~10.0.0" + "@expo/env": "npm:~0.4.0" + peerDependencies: + expo: "*" + react-native: "*" + checksum: 10/0f80837d98a6a3fd24ac368f6ec83f94e01d1ce027d5996749a4783e3360a35395d91912a53c25fd2c90ac3e75f229eef0eca5a672a66d3dbada39bf67527ed8 + languageName: node + linkType: hard + "expo-example@workspace:examples/expo-example": version: 0.0.0-use.local resolution: "expo-example@workspace:examples/expo-example" @@ -9961,7 +10001,7 @@ __metadata: "@babel/core": "npm:^7.24.0" "@babel/plugin-proposal-export-namespace-from": "npm:^7.18.9" "@babel/preset-env": "npm:^7.25.4" - "@expo/metro-runtime": "npm:~4.0.0-preview.0" + "@expo/metro-runtime": "npm:~4.0.0" "@gorhom/bottom-sheet": "npm:^5.0.5" "@react-native-async-storage/async-storage": "npm:1.23.1" "@react-native-community/datetimepicker": "npm:8.2.0" @@ -9970,10 +10010,10 @@ __metadata: "@storybook/addon-essentials": "npm:^8.4.2" "@storybook/addon-interactions": "npm:^8.4.2" "@storybook/addon-links": "npm:^8.4.2" - "@storybook/addon-ondevice-actions": "npm:^8.4.2" - "@storybook/addon-ondevice-backgrounds": "npm:^8.4.2" - "@storybook/addon-ondevice-controls": "npm:^8.4.2" - "@storybook/addon-ondevice-notes": "npm:^8.4.2" + "@storybook/addon-ondevice-actions": "npm:^8.4.3-alpha.1" + "@storybook/addon-ondevice-backgrounds": "npm:^8.4.3-alpha.1" + "@storybook/addon-ondevice-controls": "npm:^8.4.3-alpha.1" + "@storybook/addon-ondevice-notes": "npm:^8.4.3-alpha.1" "@storybook/addon-react-native-server": "npm:0.0.6" "@storybook/addon-react-native-web": "npm:^0.0.22" "@storybook/addon-webpack5-compiler-babel": "npm:^3.0.3" @@ -9981,8 +10021,8 @@ __metadata: "@storybook/builder-webpack5": "npm:^8.4.2" "@storybook/global": "npm:^5.0.0" "@storybook/react": "npm:^8.4.2" - "@storybook/react-native": "npm:^8.4.2" - "@storybook/react-native-theming": "npm:^8.4.2" + "@storybook/react-native": "npm:^8.4.3-alpha.1" + "@storybook/react-native-theming": "npm:^8.4.3-alpha.1" "@storybook/react-webpack5": "npm:^8.4.2" "@storybook/test": "npm:^8.4.2" "@testing-library/react-native": "npm:12.4.3" @@ -9991,10 +10031,10 @@ __metadata: "@types/ws": "npm:^8.5.10" babel-loader: "npm:^9.1.3" babel-plugin-react-docgen-typescript: "npm:^1.5.1" - expo: "npm:52.0.0-preview.21" + expo: "npm:~52.0.5" history: "npm:^5.3.0" jest: "npm:^29.7.0" - jest-expo: "npm:~52.0.0-preview.3" + jest-expo: "npm:~52.0.0" metro-react-native-babel-preset: "npm:^0.77.0" querystring: "npm:^0.2.1" react: "npm:18.3.1" @@ -10013,13 +10053,15 @@ __metadata: languageName: unknown linkType: soft -"expo-file-system@npm:~18.0.0": - version: 18.0.0 - resolution: "expo-file-system@npm:18.0.0" +"expo-file-system@npm:~18.0.3": + version: 18.0.3 + resolution: "expo-file-system@npm:18.0.3" + dependencies: + web-streams-polyfill: "npm:^3.3.2" peerDependencies: expo: "*" react-native: "*" - checksum: 10/51234fe9e34c54ed9801670906745526b4b26974e7b6363b9c84899d02d9fc3dad465472a1a1726eb4133db64c3c7b761473f1f828840dc0412d1ae1d5cd82ed + checksum: 10/f97f199a2d0e4c4354dbf4f33b3d7dc6c0c26bf0c83640c4ad83f6fd29fc2b639ec251d3fa79bcd2aef0f8fdcda511d9cd41bfd802a417f8715099f3a325f58b languageName: node linkType: hard @@ -10045,9 +10087,9 @@ __metadata: languageName: node linkType: hard -"expo-modules-autolinking@npm:2.0.0-preview.3": - version: 2.0.0-preview.3 - resolution: "expo-modules-autolinking@npm:2.0.0-preview.3" +"expo-modules-autolinking@npm:2.0.2": + version: 2.0.2 + resolution: "expo-modules-autolinking@npm:2.0.2" dependencies: "@expo/spawn-async": "npm:^1.7.2" chalk: "npm:^4.1.0" @@ -10059,37 +10101,38 @@ __metadata: resolve-from: "npm:^5.0.0" bin: expo-modules-autolinking: bin/expo-modules-autolinking.js - checksum: 10/12a7a82e17b9dedb41e1110444000312e0b3f450d839d528182a87730406d95687cb76d9a9786f5f36096b24d97fba76a0b58d57afd81898e8f5a24bcd672293 + checksum: 10/8eac2313fc8e0fe30e4a3a2d9bbfa85cb525d2b43a04898b4c395d4ce66a1b57567d79689cbbf90e038279b8bd077323c120288b724788c1b6265b4ce39cf79c languageName: node linkType: hard -"expo-modules-core@npm:2.0.0-preview.9": - version: 2.0.0-preview.9 - resolution: "expo-modules-core@npm:2.0.0-preview.9" +"expo-modules-core@npm:2.0.2": + version: 2.0.2 + resolution: "expo-modules-core@npm:2.0.2" dependencies: invariant: "npm:^2.2.4" - checksum: 10/3f898011fe4142dfe9437a855438baa87b14f8aa983fc9637db6f2e4d3f22bb2fd3370012dd267ff760857db6cc980dfa68be25ae94de875cc1e8d824f61c311 + checksum: 10/b3f07b7936efba61b6b31d01dd8834a364e4fac7ad15bcdbc0d7c91af8746a40718a89d58eb8328a72ebdb50ecc39eb48bbbcc49c274846d7be2d3234bc9ba86 languageName: node linkType: hard -"expo@npm:52.0.0-preview.21": - version: 52.0.0-preview.21 - resolution: "expo@npm:52.0.0-preview.21" +"expo@npm:~52.0.5": + version: 52.0.5 + resolution: "expo@npm:52.0.5" dependencies: "@babel/runtime": "npm:^7.20.0" - "@expo/cli": "npm:0.20.1" - "@expo/config": "npm:10.0.2" - "@expo/config-plugins": "npm:9.0.6" + "@expo/cli": "npm:0.21.2" + "@expo/config": "npm:10.0.3" + "@expo/config-plugins": "npm:9.0.9" "@expo/fingerprint": "npm:0.11.2" - "@expo/metro-config": "npm:0.19.0-preview.3" + "@expo/metro-config": "npm:0.19.3" "@expo/vector-icons": "npm:^14.0.0" - babel-preset-expo: "npm:~12.0.0-preview.5" - expo-asset: "npm:~11.0.0" - expo-file-system: "npm:~18.0.0" + babel-preset-expo: "npm:~12.0.0" + expo-asset: "npm:~11.0.1" + expo-constants: "npm:~17.0.2" + expo-file-system: "npm:~18.0.3" expo-font: "npm:~13.0.1" expo-keep-awake: "npm:~14.0.1" - expo-modules-autolinking: "npm:2.0.0-preview.3" - expo-modules-core: "npm:2.0.0-preview.9" + expo-modules-autolinking: "npm:2.0.2" + expo-modules-core: "npm:2.0.2" fbemitter: "npm:^3.0.0" web-streams-polyfill: "npm:^3.3.2" whatwg-url-without-unicode: "npm:8.0.0-3" @@ -10108,7 +10151,7 @@ __metadata: optional: true bin: expo: bin/cli - checksum: 10/3f212c6cd114f25105f90c4593d242f1f50bac02ed38a8aae42323b8624b545b4894ae32e5cc8e42ceefa2fd41a172a97579c30a1003d440dc6d5ea9d5e695ab + checksum: 10/33eeb53c5be6070847cf3b2d296496c879b142b14d75568f6e87cfbe221b5cedbdaeb5b6fc211888b073b75eb333a5ed6d53beca7b75441a31de9ec12535c036 languageName: node linkType: hard @@ -12352,9 +12395,9 @@ __metadata: languageName: node linkType: hard -"jest-expo@npm:~52.0.0-preview.3": - version: 52.0.0-preview.3 - resolution: "jest-expo@npm:52.0.0-preview.3" +"jest-expo@npm:~52.0.0": + version: 52.0.0 + resolution: "jest-expo@npm:52.0.0" dependencies: "@expo/config": "npm:~10.0.0" "@expo/json-file": "npm:^9.0.0" @@ -12378,7 +12421,7 @@ __metadata: react-native: "*" bin: jest: bin/jest.js - checksum: 10/c50ae843274ec2f2ed40fc84762b30fb6a59ac9cf5c527195da5c330cbd5e5ebec8d4a451da4a5277c30225c6aabcac897f2171b2592437688d0f080402db4fc + checksum: 10/2b1c8a847b30c63c3a7d9ef346880de5482fc39f8648f5608e17c3d48703c85be0b230f140c3161e251595b558c5119d0d5a97677c266a4d0d3486929799cea0 languageName: node linkType: hard @@ -16994,14 +17037,14 @@ __metadata: languageName: node linkType: hard -"send@npm:^0.18.0": - version: 0.18.0 - resolution: "send@npm:0.18.0" +"send@npm:^0.19.0": + version: 0.19.1 + resolution: "send@npm:0.19.1" dependencies: debug: "npm:2.6.9" depd: "npm:2.0.0" destroy: "npm:1.2.0" - encodeurl: "npm:~1.0.2" + encodeurl: "npm:~2.0.0" escape-html: "npm:~1.0.3" etag: "npm:~1.8.1" fresh: "npm:0.5.2" @@ -17011,7 +17054,7 @@ __metadata: on-finished: "npm:2.4.1" range-parser: "npm:~1.2.1" statuses: "npm:2.0.1" - checksum: 10/ec66c0ad109680ad8141d507677cfd8b4e40b9559de23191871803ed241718e99026faa46c398dcfb9250676076573bd6bfe5d0ec347f88f4b7b8533d1d391cb + checksum: 10/360bf50a839c7bbc181f67c3a0f3424a7ad8016dfebcd9eb90891f4b762b4377da14414c32250d67b53872e884171c27469110626f6c22765caa7c38c207ee1d languageName: node linkType: hard