From b530e1a04080e9d2acc6dda2c39d7fc149369fe3 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 3 Nov 2022 08:39:54 -0400 Subject: [PATCH 1/4] Remove unnecessary root re-exports --- code/addons/a11y/manager.js | 1 - code/addons/a11y/preview.js | 1 - code/addons/actions/manager.js | 1 - code/addons/actions/preview.js | 1 - code/addons/backgrounds/manager.js | 1 - code/addons/backgrounds/preview.js | 1 - code/addons/controls/manager.js | 1 - code/addons/highlight/preview.js | 1 - code/addons/interactions/manager.js | 1 - code/addons/interactions/preview.js | 1 - code/addons/jest/manager.js | 1 - code/addons/links/manager.js | 1 - code/addons/links/preview.js | 1 - code/addons/links/react.d.ts | 2 -- code/addons/links/react.js | 3 --- code/addons/measure/manager.js | 1 - code/addons/measure/preview.js | 1 - code/addons/outline/manager.js | 1 - code/addons/outline/preview.js | 1 - code/addons/storysource/preset.js | 1 - code/addons/storysource/register.js | 1 - code/addons/toolbars/manager.js | 1 - code/addons/viewport/manager.js | 1 - code/lib/api/shortcut.js | 1 - code/lib/router/utils.js | 1 - code/lib/theming/create.d.ts | 1 - code/lib/theming/create.js | 1 - code/renderers/html/preview.js | 1 - code/renderers/preact/preview.js | 1 - code/renderers/react/preview.js | 1 - code/renderers/server/preview.js | 1 - code/renderers/svelte/preview.js | 1 - code/renderers/vue/preview.js | 1 - code/renderers/vue3/preview.js | 1 - code/renderers/web-components/preview.js | 1 - 35 files changed, 38 deletions(-) delete mode 100644 code/addons/a11y/manager.js delete mode 100644 code/addons/a11y/preview.js delete mode 100644 code/addons/actions/manager.js delete mode 100644 code/addons/actions/preview.js delete mode 100644 code/addons/backgrounds/manager.js delete mode 100644 code/addons/backgrounds/preview.js delete mode 100644 code/addons/controls/manager.js delete mode 100644 code/addons/highlight/preview.js delete mode 100644 code/addons/interactions/manager.js delete mode 100644 code/addons/interactions/preview.js delete mode 100644 code/addons/jest/manager.js delete mode 100644 code/addons/links/manager.js delete mode 100644 code/addons/links/preview.js delete mode 100644 code/addons/links/react.d.ts delete mode 100644 code/addons/links/react.js delete mode 100644 code/addons/measure/manager.js delete mode 100644 code/addons/measure/preview.js delete mode 100644 code/addons/outline/manager.js delete mode 100644 code/addons/outline/preview.js delete mode 100644 code/addons/storysource/preset.js delete mode 100644 code/addons/storysource/register.js delete mode 100644 code/addons/toolbars/manager.js delete mode 100644 code/addons/viewport/manager.js delete mode 100644 code/lib/api/shortcut.js delete mode 100644 code/lib/router/utils.js delete mode 100644 code/lib/theming/create.d.ts delete mode 100644 code/lib/theming/create.js delete mode 100644 code/renderers/html/preview.js delete mode 100644 code/renderers/preact/preview.js delete mode 100644 code/renderers/react/preview.js delete mode 100644 code/renderers/server/preview.js delete mode 100644 code/renderers/svelte/preview.js delete mode 100644 code/renderers/vue/preview.js delete mode 100644 code/renderers/vue3/preview.js delete mode 100644 code/renderers/web-components/preview.js diff --git a/code/addons/a11y/manager.js b/code/addons/a11y/manager.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/a11y/manager.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/addons/a11y/preview.js b/code/addons/a11y/preview.js deleted file mode 100644 index 8de14d30fdfa..000000000000 --- a/code/addons/a11y/preview.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/preview'; diff --git a/code/addons/actions/manager.js b/code/addons/actions/manager.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/actions/manager.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/addons/actions/preview.js b/code/addons/actions/preview.js deleted file mode 100644 index 49ad602f79f4..000000000000 --- a/code/addons/actions/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/preview'; diff --git a/code/addons/backgrounds/manager.js b/code/addons/backgrounds/manager.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/backgrounds/manager.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/addons/backgrounds/preview.js b/code/addons/backgrounds/preview.js deleted file mode 100644 index 49ad602f79f4..000000000000 --- a/code/addons/backgrounds/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/preview'; diff --git a/code/addons/controls/manager.js b/code/addons/controls/manager.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/controls/manager.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/addons/highlight/preview.js b/code/addons/highlight/preview.js deleted file mode 100644 index f7dfc599138c..000000000000 --- a/code/addons/highlight/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/highlight'; diff --git a/code/addons/interactions/manager.js b/code/addons/interactions/manager.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/interactions/manager.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/addons/interactions/preview.js b/code/addons/interactions/preview.js deleted file mode 100644 index 48714cc6fba3..000000000000 --- a/code/addons/interactions/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/preset/preview'; diff --git a/code/addons/jest/manager.js b/code/addons/jest/manager.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/jest/manager.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/addons/links/manager.js b/code/addons/links/manager.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/links/manager.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/addons/links/preview.js b/code/addons/links/preview.js deleted file mode 100644 index 49ad602f79f4..000000000000 --- a/code/addons/links/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/preview'; diff --git a/code/addons/links/react.d.ts b/code/addons/links/react.d.ts deleted file mode 100644 index bdca492fe003..000000000000 --- a/code/addons/links/react.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/react'; -export { default } from './dist/react'; diff --git a/code/addons/links/react.js b/code/addons/links/react.js deleted file mode 100644 index 685845b5dceb..000000000000 --- a/code/addons/links/react.js +++ /dev/null @@ -1,3 +0,0 @@ -import LinkTo from './dist/react'; - -export default LinkTo; diff --git a/code/addons/measure/manager.js b/code/addons/measure/manager.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/measure/manager.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/addons/measure/preview.js b/code/addons/measure/preview.js deleted file mode 100644 index 49ad602f79f4..000000000000 --- a/code/addons/measure/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/preview'; diff --git a/code/addons/outline/manager.js b/code/addons/outline/manager.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/outline/manager.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/addons/outline/preview.js b/code/addons/outline/preview.js deleted file mode 100644 index 48714cc6fba3..000000000000 --- a/code/addons/outline/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/preset/preview'; diff --git a/code/addons/storysource/preset.js b/code/addons/storysource/preset.js deleted file mode 100644 index dd83b37f74cb..000000000000 --- a/code/addons/storysource/preset.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/preset'; diff --git a/code/addons/storysource/register.js b/code/addons/storysource/register.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/storysource/register.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/addons/toolbars/manager.js b/code/addons/toolbars/manager.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/toolbars/manager.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/addons/viewport/manager.js b/code/addons/viewport/manager.js deleted file mode 100644 index 8a2eae4ffce1..000000000000 --- a/code/addons/viewport/manager.js +++ /dev/null @@ -1 +0,0 @@ -import './dist/manager'; diff --git a/code/lib/api/shortcut.js b/code/lib/api/shortcut.js deleted file mode 100644 index 9fb9988699cd..000000000000 --- a/code/lib/api/shortcut.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/shortcut'; diff --git a/code/lib/router/utils.js b/code/lib/router/utils.js deleted file mode 100644 index e4ddc9027ee3..000000000000 --- a/code/lib/router/utils.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/index'; diff --git a/code/lib/theming/create.d.ts b/code/lib/theming/create.d.ts deleted file mode 100644 index f48ee303c354..000000000000 --- a/code/lib/theming/create.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/create'; diff --git a/code/lib/theming/create.js b/code/lib/theming/create.js deleted file mode 100644 index 59ea6440e27a..000000000000 --- a/code/lib/theming/create.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/create'); diff --git a/code/renderers/html/preview.js b/code/renderers/html/preview.js deleted file mode 100644 index fe48d8883ba4..000000000000 --- a/code/renderers/html/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/config'; diff --git a/code/renderers/preact/preview.js b/code/renderers/preact/preview.js deleted file mode 100644 index fe48d8883ba4..000000000000 --- a/code/renderers/preact/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/config'; diff --git a/code/renderers/react/preview.js b/code/renderers/react/preview.js deleted file mode 100644 index f00f03b4e2e4..000000000000 --- a/code/renderers/react/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/config.mjs'; diff --git a/code/renderers/server/preview.js b/code/renderers/server/preview.js deleted file mode 100644 index fe48d8883ba4..000000000000 --- a/code/renderers/server/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/config'; diff --git a/code/renderers/svelte/preview.js b/code/renderers/svelte/preview.js deleted file mode 100644 index f00f03b4e2e4..000000000000 --- a/code/renderers/svelte/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/config.mjs'; diff --git a/code/renderers/vue/preview.js b/code/renderers/vue/preview.js deleted file mode 100644 index fe48d8883ba4..000000000000 --- a/code/renderers/vue/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/config'; diff --git a/code/renderers/vue3/preview.js b/code/renderers/vue3/preview.js deleted file mode 100644 index f00f03b4e2e4..000000000000 --- a/code/renderers/vue3/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/config.mjs'; diff --git a/code/renderers/web-components/preview.js b/code/renderers/web-components/preview.js deleted file mode 100644 index fe48d8883ba4..000000000000 --- a/code/renderers/web-components/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/config'; From cc9a1ccaf1b1291b20483e45d33aae5e7c54d1e0 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 3 Nov 2022 10:20:15 -0400 Subject: [PATCH 2/4] Use typesVersions to point to type definition files --- code/lib/theming/package.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/lib/theming/package.json b/code/lib/theming/package.json index d22d00a5b794..7d88623e641d 100644 --- a/code/lib/theming/package.json +++ b/code/lib/theming/package.json @@ -36,6 +36,16 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "create": [ + "dist/create.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", From 6facf594cfb891180233bbb9f93a933046eb4a18 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sun, 20 Nov 2022 17:53:45 -0500 Subject: [PATCH 3/4] Remove crutch files from addon-docs. --- code/addons/docs/package.json | 23 +++++++++++++---------- code/addons/docs/preset.js | 1 - code/addons/docs/preview.js | 1 - 3 files changed, 13 insertions(+), 12 deletions(-) delete mode 100644 code/addons/docs/preset.js delete mode 100644 code/addons/docs/preview.js diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index e6cfee21fb79..0bf68ec14804 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -40,16 +40,6 @@ "import": "./dist/preset.mjs", "types": "./dist/preset.d.ts" }, - "./dist/preview": { - "require": "./dist/preview.js", - "import": "./dist/preview.mjs", - "types": "./dist/preview.d.ts" - }, - "./dist/preset": { - "require": "./dist/preset.js", - "import": "./dist/preset.mjs", - "types": "./dist/preset.d.ts" - }, "./svelte/HOC.svelte": "./svelte/HOC.svelte", "./ember": "./ember/index.js", "./ember/index.js": "./ember/index.js", @@ -62,6 +52,19 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ], + "preset": [ + "dist/preset.d.ts" + ] + } + }, "files": [ "dist/**/*", "angular/**/*", diff --git a/code/addons/docs/preset.js b/code/addons/docs/preset.js deleted file mode 100644 index a83f95279e7f..000000000000 --- a/code/addons/docs/preset.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/preset'); diff --git a/code/addons/docs/preview.js b/code/addons/docs/preview.js deleted file mode 100644 index 49ad602f79f4..000000000000 --- a/code/addons/docs/preview.js +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/preview'; From 6218ab2cacf02bf407371a8951819cd9bf408fd6 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sun, 20 Nov 2022 20:01:48 -0500 Subject: [PATCH 4/4] Fix path to docs preset & preview --- code/addons/essentials/src/docs/preset.ts | 3 +-- code/addons/essentials/src/docs/preview.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/code/addons/essentials/src/docs/preset.ts b/code/addons/essentials/src/docs/preset.ts index dca808a37dd7..f97114783e13 100644 --- a/code/addons/essentials/src/docs/preset.ts +++ b/code/addons/essentials/src/docs/preset.ts @@ -1,2 +1 @@ -/* eslint-disable import/export */ -export * from '@storybook/addon-docs/dist/preset'; +export * from '@storybook/addon-docs/preset'; diff --git a/code/addons/essentials/src/docs/preview.ts b/code/addons/essentials/src/docs/preview.ts index 176a03c1f83f..68ad94fc557c 100644 --- a/code/addons/essentials/src/docs/preview.ts +++ b/code/addons/essentials/src/docs/preview.ts @@ -1 +1 @@ -export * from '@storybook/addon-docs/dist/preview'; +export * from '@storybook/addon-docs/preview';