Skip to content

Commit

Permalink
add the globals export on manager, even though this should not be use…
Browse files Browse the repository at this point in the history
…d... the addon-kit uses it
  • Loading branch information
ndelangen committed Jul 18, 2024
1 parent 3590a1c commit cbac722
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 0 deletions.
8 changes: 8 additions & 0 deletions code/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@
"import": "./dist/manager/globals-module-info.js",
"require": "./dist/manager/globals-module-info.cjs"
},
"./manager/globals": {
"types": "./dist/manager/globals.d.ts",
"import": "./dist/manager/globals.js",
"require": "./dist/manager/globals.cjs"
},
"./preview/globals": {
"types": "./dist/preview/globals.d.ts",
"import": "./dist/preview/globals.js",
Expand Down Expand Up @@ -229,6 +234,9 @@
"manager/globals-module-info": [
"./dist/manager/globals-module-info.d.ts"
],
"manager/globals": [
"./dist/manager/globals.d.ts"
],
"preview/globals": [
"./dist/preview/globals.d.ts"
]
Expand Down
1 change: 1 addition & 0 deletions code/core/scripts/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const getEntries = (cwd: string) => {
define('src/docs-tools/index.ts', ['browser', 'node'], true),

define('src/manager/globals-module-info.ts', ['node'], true),
define('src/manager/globals.ts', ['node'], true),
define('src/preview/globals.ts', ['node'], true),
];
};
Expand Down
1 change: 1 addition & 0 deletions code/deprecated/manager/globals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('storybook/internal/manager/globals');
1 change: 1 addition & 0 deletions code/deprecated/preview/globals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('storybook/internal/preview/globals');
1 change: 1 addition & 0 deletions code/lib/cli/core/manager/globals.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@storybook/core/manager/globals');
2 changes: 2 additions & 0 deletions code/lib/cli/core/manager/globals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from '@storybook/core/manager/globals';
export type * from '@storybook/core/manager/globals';
1 change: 1 addition & 0 deletions code/lib/cli/core/manager/globals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@storybook/core/manager/globals';
8 changes: 8 additions & 0 deletions code/lib/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@
"types": "./core/preview/globals.d.ts",
"import": "./core/preview/globals.js",
"require": "./core/preview/globals.cjs"
},
"./internal/manager/globals": {
"types": "./core/manager/globals.d.ts",
"import": "./core/manager/globals.js",
"require": "./core/manager/globals.cjs"
}
},
"main": "dist/index.cjs",
Expand Down Expand Up @@ -219,6 +224,9 @@
"internal/manager-errors": [
"./core/manager-errors.d.ts"
],
"internal/manager/globals": [
"./core/manager/globals.d.ts"
],
"internal/manager/globals-module-info": [
"./core/manager/globals-module-info.d.ts"
],
Expand Down

0 comments on commit cbac722

Please sign in to comment.