diff --git a/.circleci/config.yml b/.circleci/config.yml index bcd401d34623..73a8a258d311 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -155,7 +155,7 @@ jobs: yarn local-registry --publish - report-workflow-on-failure - store_artifacts: - path: bench/esbuild-metafiles + path: code/bench/esbuild-metafiles - save_cache: name: Save Yarn cache key: build-yarn-2-cache-v4--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} diff --git a/.gitignore b/.gitignore index acfc54475076..f0ad86dc47c4 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ test-results /repros /sandbox /bench +/code/bench .verdaccio-cache .next /.npmrc diff --git a/code/.storybook/bench.stories.tsx b/code/.storybook/bench.stories.tsx index 7d834af51fe7..d13557cee9bc 100644 --- a/code/.storybook/bench.stories.tsx +++ b/code/.storybook/bench.stories.tsx @@ -5,9 +5,9 @@ import type { Meta } from '@storybook/react'; // @ts-expect-error - TS doesn't know about import.meta.glob from Vite const allMetafiles = import.meta.glob( [ - '../../bench/esbuild-metafiles/**/*.json', + '../bench/esbuild-metafiles/**/*.json', // the core metafile is too big to be loaded automatically in the iframe - '!../../bench/esbuild-metafiles/core/core.json', + '!../bench/esbuild-metafiles/core/core.json', ], { // eagerly loading is not ideal because it imports all metafiles upfront, @@ -17,7 +17,7 @@ const allMetafiles = import.meta.glob( } ); -const METAFILES_DIR = '../../bench/esbuild-metafiles/'; +const METAFILES_DIR = '../bench/esbuild-metafiles/'; const PACKAGES_WITHOUT_ORG = ['storybook', 'sb', 'create-storybook']; // allows the metafile path to be used in the URL hash diff --git a/code/core/scripts/prep.ts b/code/core/scripts/prep.ts index 72407d816f25..b01a8603ba3d 100644 --- a/code/core/scripts/prep.ts +++ b/code/core/scripts/prep.ts @@ -309,7 +309,7 @@ async function run() { }); } else { // repo root/bench/esbuild-metafiles/core - const metafilesDir = join(__dirname, '..', '..', '..', 'bench', 'esbuild-metafiles', 'core'); + const metafilesDir = join(__dirname, '..', '..', 'bench', 'esbuild-metafiles', 'core'); if (existsSync(metafilesDir)) { await rm(metafilesDir, { recursive: true }); } diff --git a/code/nx.json b/code/nx.json index a34b471c624e..2f726cea4387 100644 --- a/code/nx.json +++ b/code/nx.json @@ -52,7 +52,7 @@ "{workspaceRoot}/../scripts/prepare/{bundle,addon-bundle,esm-bundle}.ts" ], "dependsOn": ["^build"], - "outputs": ["{projectRoot}/dist", "{workspaceRoot}/../bench/esbuild-metafiles/{projectName}"], + "outputs": ["{projectRoot}/dist", "{workspaceRoot}/bench/esbuild-metafiles/{projectName}"], "cache": true }, "test": { diff --git a/scripts/prepare/addon-bundle.ts b/scripts/prepare/addon-bundle.ts index c62b92046f90..fa5e14a0e4c4 100755 --- a/scripts/prepare/addon-bundle.ts +++ b/scripts/prepare/addon-bundle.ts @@ -70,6 +70,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => { __dirname, '..', '..', + 'code', 'bench', 'esbuild-metafiles', name.replace('@storybook/', '') diff --git a/scripts/prepare/bundle.ts b/scripts/prepare/bundle.ts index d5722cb2d513..4651774257c8 100755 --- a/scripts/prepare/bundle.ts +++ b/scripts/prepare/bundle.ts @@ -59,6 +59,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => { __dirname, '..', '..', + 'code', 'bench', 'esbuild-metafiles', name.replace('@storybook', '')