From 0154d1a03c162f1869b2c26fca4f9ad9f603274c Mon Sep 17 00:00:00 2001 From: Jamie Henson Date: Tue, 12 Mar 2024 15:00:23 +0000 Subject: [PATCH] chore: don't allow SB version ads or telemetry --- .storybook/main.js | 54 ++++++++++++++++++++++++++-------------------- package.json | 2 +- yarn.lock | 7 +++++- 3 files changed, 38 insertions(+), 25 deletions(-) diff --git a/.storybook/main.js b/.storybook/main.js index 072d4059d..8d3979fd4 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,4 +1,4 @@ -const path = require('path'); +const path = require("path"); /** @type { import('@storybook/react-webpack5').StorybookConfig } */ const config = { @@ -9,33 +9,38 @@ const config = { "@storybook/addon-onboarding", "@storybook/addon-interactions", "@storybook/addon-styling-webpack", - ({ + { name: "@storybook/addon-styling-webpack", options: { - rules: [{ - test: /\.css$/, - sideEffects: true, - use: [ - require.resolve("style-loader"), - { - loader: require.resolve("css-loader"), - options: { - - importLoaders: 1, + rules: [ + { + test: /\.css$/, + sideEffects: true, + use: [ + require.resolve("style-loader"), + { + loader: require.resolve("css-loader"), + options: { + importLoaders: 1, + }, }, - }, { - loader: require.resolve("postcss-loader"), - options: { - postcssOptions: { - config: path.resolve(__dirname, "postcss.storybook.config.js"), - } + { + loader: require.resolve("postcss-loader"), + options: { + postcssOptions: { + config: path.resolve( + __dirname, + "postcss.storybook.config.js" + ), + }, + }, }, - }, - ], - },], - } - }) + ], + }, + ], + }, + }, ], framework: { name: "@storybook/react-webpack5", @@ -48,5 +53,8 @@ const config = { docs: { autodocs: "tag", }, + core: { + disableTelemetry: true, + }, }; export default config; diff --git a/package.json b/package.json index 68317d75e..de935ab89 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "update:all": "./scripts/update-dependents.sh", "pre-release": "./scripts/pre-release.sh", "release": "./scripts/release.sh", - "storybook": "storybook dev -p 6006", + "storybook": "storybook dev -p 6006 --no-version-updates", "build-storybook": "storybook build" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 49376743a..e433a3b97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4523,11 +4523,16 @@ resolved "https://registry.yarnpkg.com/@storybook/mdx2-csf/-/mdx2-csf-1.1.0.tgz#97f6df04d0bf616991cc1005a073ac004a7281e5" integrity sha512-TXJJd5RAKakWx4BtpwvSNdgTDkKM6RkXU8GK34S/LhidQ5Pjz3wcnqb0TxEkfhK/ztbP8nKHqXFwLfa2CYkvQw== -"@storybook/node-logger@7.6.4", "@storybook/node-logger@^7.0.12": +"@storybook/node-logger@7.6.4": version "7.6.4" resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-7.6.4.tgz#e471ee117bbd329522113dd98e5a42e83e259f9c" integrity sha512-GDkEnnDj4Op+PExs8ZY/P6ox3wg453CdEIaR8PR9TxF/H/T2fBL6puzma3hN2CMam6yzfAL8U+VeIIDLQ5BZdQ== +"@storybook/node-logger@^7.0.12": + version "7.6.17" + resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-7.6.17.tgz#2747cee5395c3644408df2423d98502663c4bcf6" + integrity sha512-w59MQuXhhUNrUVmVkXhMwIg2nvFWjdDczLTwYLorhfsE36CWeUOY5QCZWQy0Qf/h+jz8Uo7Evy64qn18v9C4wA== + "@storybook/postinstall@7.6.4": version "7.6.4" resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-7.6.4.tgz#baefcec351ac79ee711ad27b65bf1ec28e545da6"