From b143cef067209fdfea821068a4de58adadf5422d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 23 Jul 2024 16:44:30 +0200 Subject: [PATCH 1/3] Add all the entrypoints of manager & preview and make the module type module --- code/deprecated/manager/globals.cjs | 1 + code/deprecated/manager/globals.d.ts | 2 ++ code/deprecated/manager/globals.js | 2 +- code/deprecated/manager/package.json | 12 ++++++++++-- code/deprecated/preview/globals.cjs | 1 + code/deprecated/preview/globals.d.ts | 2 ++ code/deprecated/preview/globals.js | 2 +- code/deprecated/preview/package.json | 12 ++++++++++-- 8 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 code/deprecated/manager/globals.cjs create mode 100644 code/deprecated/manager/globals.d.ts create mode 100644 code/deprecated/preview/globals.cjs create mode 100644 code/deprecated/preview/globals.d.ts diff --git a/code/deprecated/manager/globals.cjs b/code/deprecated/manager/globals.cjs new file mode 100644 index 000000000000..d6ee8ec2d144 --- /dev/null +++ b/code/deprecated/manager/globals.cjs @@ -0,0 +1 @@ +module.exports = require('storybook/internal/manager/globals'); diff --git a/code/deprecated/manager/globals.d.ts b/code/deprecated/manager/globals.d.ts new file mode 100644 index 000000000000..a2b581c8ca04 --- /dev/null +++ b/code/deprecated/manager/globals.d.ts @@ -0,0 +1,2 @@ +export * from 'storybook/internal/manager/globals'; +export type * from 'storybook/internal/manager/globals'; diff --git a/code/deprecated/manager/globals.js b/code/deprecated/manager/globals.js index d6ee8ec2d144..0dab1b6906f8 100644 --- a/code/deprecated/manager/globals.js +++ b/code/deprecated/manager/globals.js @@ -1 +1 @@ -module.exports = require('storybook/internal/manager/globals'); +export * from 'storybook/internal/manager/globals'; diff --git a/code/deprecated/manager/package.json b/code/deprecated/manager/package.json index de415ee731cf..315d497d1783 100644 --- a/code/deprecated/manager/package.json +++ b/code/deprecated/manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager", - "version": "8.3.0-alpha.2", + "version": "8.2.5", "description": "Core Storybook UI", "keywords": [ "storybook" @@ -20,6 +20,14 @@ }, "license": "MIT", "sideEffects": false, + "type": "module", + "exports": { + "./globals": { + "type": "./globals.d.ts", + "import": "./globals.js", + "require": "./globals.cjs" + } + }, "files": [ "README.md", "*.js", @@ -28,7 +36,7 @@ "*.d.ts" ], "peerDependencies": { - "storybook": "workspace:^" + "storybook": "^8.2.5" }, "publishConfig": { "access": "public" diff --git a/code/deprecated/preview/globals.cjs b/code/deprecated/preview/globals.cjs new file mode 100644 index 000000000000..91340ce6505b --- /dev/null +++ b/code/deprecated/preview/globals.cjs @@ -0,0 +1 @@ +module.exports = require('storybook/internal/preview/globals'); diff --git a/code/deprecated/preview/globals.d.ts b/code/deprecated/preview/globals.d.ts new file mode 100644 index 000000000000..165a3a44a8fb --- /dev/null +++ b/code/deprecated/preview/globals.d.ts @@ -0,0 +1,2 @@ +export * from 'storybook/internal/preview/globals'; +export type * from 'storybook/internal/preview/globals'; diff --git a/code/deprecated/preview/globals.js b/code/deprecated/preview/globals.js index 91340ce6505b..c04bc1063044 100644 --- a/code/deprecated/preview/globals.js +++ b/code/deprecated/preview/globals.js @@ -1 +1 @@ -module.exports = require('storybook/internal/preview/globals'); +export * from 'storybook/internal/preview/globals'; diff --git a/code/deprecated/preview/package.json b/code/deprecated/preview/package.json index 6f21598fc62b..45a236451fa2 100644 --- a/code/deprecated/preview/package.json +++ b/code/deprecated/preview/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview", - "version": "8.3.0-alpha.2", + "version": "8.2.5", "description": "", "keywords": [ "storybook" @@ -20,6 +20,14 @@ }, "license": "MIT", "sideEffects": false, + "type": "module", + "exports": { + "./globals": { + "type": "./globals.d.ts", + "import": "./globals.js", + "require": "./globals.cjs" + } + }, "files": [ "README.md", "*.js", @@ -28,7 +36,7 @@ "*.d.ts" ], "peerDependencies": { - "storybook": "workspace:^" + "storybook": "^8.2.5" }, "publishConfig": { "access": "public" From 0194358db841783172d3c9eb948f550f588f6452 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 23 Jul 2024 17:11:43 +0200 Subject: [PATCH 2/3] set range in package.json back to workspace --- code/deprecated/manager/package.json | 2 +- code/deprecated/preview/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/deprecated/manager/package.json b/code/deprecated/manager/package.json index 315d497d1783..a3507dd52c6c 100644 --- a/code/deprecated/manager/package.json +++ b/code/deprecated/manager/package.json @@ -36,7 +36,7 @@ "*.d.ts" ], "peerDependencies": { - "storybook": "^8.2.5" + "storybook": "workspace:^" }, "publishConfig": { "access": "public" diff --git a/code/deprecated/preview/package.json b/code/deprecated/preview/package.json index 45a236451fa2..9e5bd66fc059 100644 --- a/code/deprecated/preview/package.json +++ b/code/deprecated/preview/package.json @@ -36,7 +36,7 @@ "*.d.ts" ], "peerDependencies": { - "storybook": "^8.2.5" + "storybook": "workspace:^" }, "publishConfig": { "access": "public" From 1f30459dd5e47ff596a06ec393a45a64fb8a80c4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 23 Jul 2024 17:21:35 +0200 Subject: [PATCH 3/3] fix versions --- code/deprecated/manager/package.json | 2 +- code/deprecated/preview/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/deprecated/manager/package.json b/code/deprecated/manager/package.json index a3507dd52c6c..779cd2f09ba3 100644 --- a/code/deprecated/manager/package.json +++ b/code/deprecated/manager/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/manager", - "version": "8.2.5", + "version": "8.3.0-alpha.2", "description": "Core Storybook UI", "keywords": [ "storybook" diff --git a/code/deprecated/preview/package.json b/code/deprecated/preview/package.json index 9e5bd66fc059..c634a85c29b6 100644 --- a/code/deprecated/preview/package.json +++ b/code/deprecated/preview/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/preview", - "version": "8.2.5", + "version": "8.3.0-alpha.2", "description": "", "keywords": [ "storybook"