@modern-js/storybook-builder 0.0.0-next-20231204061803 → 0.0.0-next-20231206164920

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -260,7 +260,7 @@ function applyExternals(builderConfig) {
260
260
  }
261
261
  }, {
262
262
  output: {
263
- externals: import_globals.globals
263
+ externals: import_globals.globalsNameReferenceMap
264
264
  }
265
265
  });
266
266
  builderConfig.output = config.output;
@@ -48,7 +48,7 @@ const entries = async (_, options) => {
48
48
  if (options.configType === "DEVELOPMENT") {
49
49
  result.push(...[
50
50
  `${require.resolve("webpack-hot-middleware/client")}?reload=true&quiet=false&noInfo=${options.quiet}`,
51
- bundler === "rspack" ? require.resolve("@rspack/dev-client/react-refresh-entry") : null
51
+ bundler === "rspack" ? require.resolve("@rspack/plugin-react-refresh/react-refresh-entry") : null
52
52
  ].filter(Boolean));
53
53
  }
54
54
  result.push(getStoriesConfigPath(process.cwd()));
@@ -16,7 +16,7 @@ import {
16
16
  readTemplate,
17
17
  loadPreviewOrConfigFile
18
18
  } from "@storybook/core-common";
19
- import { globals } from "@storybook/preview/globals";
19
+ import { globalsNameReferenceMap } from "@storybook/preview/globals";
20
20
  import { unplugin as csfPlugin } from "@storybook/csf-plugin";
21
21
  import { minimatch } from "minimatch";
22
22
  import {
@@ -268,7 +268,7 @@ function applyExternals(builderConfig) {
268
268
  },
269
269
  {
270
270
  output: {
271
- externals: globals
271
+ externals: globalsNameReferenceMap
272
272
  }
273
273
  }
274
274
  );
@@ -14,7 +14,7 @@ const entries = async (_, options) => {
14
14
  result.push(
15
15
  ...[
16
16
  `${require.resolve("webpack-hot-middleware/client")}?reload=true&quiet=false&noInfo=${options.quiet}`,
17
- bundler === "rspack" ? require.resolve("@rspack/dev-client/react-refresh-entry") : null
17
+ bundler === "rspack" ? require.resolve("@rspack/plugin-react-refresh/react-refresh-entry") : null
18
18
  ].filter(Boolean)
19
19
  );
20
20
  }
@@ -2,4 +2,4 @@
2
2
  import type { Plugin } from '@modern-js/runtime';
3
3
  import type { IConfig } from '../type';
4
4
  export declare const WrapProviders: (storyFn: any, config: IConfig) => JSX.Element;
5
- export declare const resolvePlugins: (runtime: IConfig['modernConfigRuntime']) => Plugin[];
5
+ export declare const resolvePlugins: (runtime: IConfig['modernConfigRuntime']) => Plugin[];
@@ -1 +1 @@
1
- export declare const ADDON_ID = "storybook/modern-runtime";
1
+ export declare const ADDON_ID = "storybook/modern-runtime";
@@ -1,2 +1,2 @@
1
1
  declare const _default: {};
2
- export default _default;
2
+ export default _default;
@@ -1 +1 @@
1
- export declare const decorators: import("@storybook/types").DecoratorFunction[];
1
+ export declare const decorators: import("@storybook/types").DecoratorFunction[];
@@ -1,4 +1,4 @@
1
1
  export interface IConfig {
2
- modernConfigRuntime: any;
3
- modernConfigDesignToken: any;
4
- }
2
+ modernConfigRuntime: any;
3
+ modernConfigDesignToken: any;
4
+ }
@@ -1,2 +1,2 @@
1
1
  import { DecoratorFunction } from '@storybook/types';
2
- export declare const withPluginRuntime: DecoratorFunction;
2
+ export declare const withPluginRuntime: DecoratorFunction;
@@ -4,4 +4,4 @@ export type StorybookBuilder = RawStorybookBuilder<BuilderOptions, Stats>;
4
4
  export declare const getConfig: StorybookBuilder['getConfig'];
5
5
  export declare const build: StorybookBuilder['build'];
6
6
  export declare const start: StorybookBuilder['start'];
7
- export declare const bail: () => Promise<void>;
7
+ export declare const bail: () => Promise<void>;
@@ -1,4 +1,4 @@
1
1
  import type { Options } from '@storybook/types';
2
2
  import type { Compiler } from '@modern-js/builder-shared/webpack-dev-middleware';
3
3
  import type { BuilderOptions } from './types';
4
- export declare function getCompiler(cwd: string, builderOptions: BuilderOptions, options: Options): Promise<Compiler>;
4
+ export declare function getCompiler(cwd: string, builderOptions: BuilderOptions, options: Options): Promise<Compiler>;
@@ -11,4 +11,4 @@
11
11
  import type { NodePath } from 'ast-types/lib/node-path';
12
12
  import type { Importer } from 'react-docgen/dist/parse';
13
13
  import type Documentation from 'react-docgen/dist/Documentation';
14
- export default function actualNameHandler(documentation: Documentation, path: NodePath, importer: Importer): void;
14
+ export default function actualNameHandler(documentation: Documentation, path: NodePath, importer: Importer): void;
@@ -2,8 +2,8 @@ import type { Options } from '@storybook/types';
2
2
  import { RspackConfig } from '@modern-js/builder-rspack-provider';
3
3
  import { WebpackChain } from '@modern-js/builder-webpack-provider';
4
4
  export type DocgenOptions = {
5
- reactDocgen?: 'react-docgen' | 'react-docgen-typescript' | false;
6
- reactDocgenTypescriptOptions?: any;
5
+ reactDocgen?: 'react-docgen' | 'react-docgen-typescript' | false;
6
+ reactDocgenTypescriptOptions?: any;
7
7
  };
8
8
  export declare function applyDocgenWebpack(chain: WebpackChain, options: Options): Promise<void>;
9
- export declare function applyDocgenRspack(config: RspackConfig, options: Options): Promise<void>;
9
+ export declare function applyDocgenRspack(config: RspackConfig, options: Options): Promise<void>;
@@ -1,2 +1,2 @@
1
1
  declare function docLoader(this: any, source: string, map: string, data: any): Promise<void>;
2
- export default docLoader;
2
+ export default docLoader;
@@ -1,10 +1,6 @@
1
- declare const _default: ({
2
- source,
3
- map,
4
- filename
5
- }: {
6
- source: string;
7
- map: string;
8
- filename: string;
1
+ declare const _default: ({ source, map, filename, }: {
2
+ source: string;
3
+ map: string;
4
+ filename: string;
9
5
  }) => string[] | null;
10
- export default _default;
6
+ export default _default;
@@ -1,3 +1,3 @@
1
1
  export { start, build, bail, getConfig } from './build';
2
2
  export * from './types';
3
- export declare const corePresets: string[];
3
+ export declare const corePresets: string[];
@@ -3,4 +3,4 @@ import type { Options } from '@storybook/types';
3
3
  import type { BuilderPluginAPI as WebpackAPI } from '@modern-js/builder-webpack-provider';
4
4
  import type { BuilderPluginAPI as RspackAPI } from '@modern-js/builder-rspack-provider';
5
5
  export declare function finalize(): Promise<void>;
6
- export declare const pluginStorybook: (cwd: string, options: Options) => BuilderPlugin<WebpackAPI | RspackAPI>;
6
+ export declare const pluginStorybook: (cwd: string, options: Options) => BuilderPlugin<WebpackAPI | RspackAPI>;
@@ -2,4 +2,4 @@ import type { Options } from '@storybook/types';
2
2
  import { BuilderConfig } from './types';
3
3
  export declare const previewMainTemplate: () => string;
4
4
  export declare const entries: (_: unknown, options: Options) => Promise<string[]>;
5
- export declare const modern: (builderConfig: BuilderConfig, options: Options) => BuilderConfig;
5
+ export declare const modern: (builderConfig: BuilderConfig, options: Options) => BuilderConfig;
@@ -5,11 +5,11 @@ export type BundlerType = 'webpack' | 'rspack';
5
5
  export type { WebpackBuilderConfig, RspackBuilderConfig };
6
6
  export type AllBuilderConfig = WebpackBuilderConfig | RspackBuilderConfig;
7
7
  export type BuilderOptions = {
8
- bundler?: BundlerType;
9
- builderConfig?: AllBuilderConfig;
10
- configPath?: string;
8
+ bundler?: BundlerType;
9
+ builderConfig?: AllBuilderConfig;
10
+ configPath?: string;
11
11
  };
12
12
  export type BuilderConfig = AllBuilderConfig & {
13
- builderPlugins?: BuilderPlugin[];
13
+ builderPlugins?: BuilderPlugin[];
14
14
  };
15
- export { defineConfig } from '@modern-js/builder/cli';
15
+ export { defineConfig } from '@modern-js/builder/cli';
@@ -12,4 +12,4 @@ export declare function getAbsolutePath<I extends string>(input: I): I;
12
12
  export declare function maybeGetAbsolutePath<I extends string>(input: I): I | false;
13
13
  export declare function runWithErrorMsg<T>(op: () => Promise<T>, msg: string): Promise<T | undefined>;
14
14
  export declare function isDev(): boolean;
15
- export declare function getConfigFileName(): string;
15
+ export declare function getConfigFileName(): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/storybook-builder",
3
- "version": "0.0.0-next-20231204061803",
3
+ "version": "0.0.0-next-20231206164920",
4
4
  "description": "modern.js support for storybook",
5
5
  "repository": {
6
6
  "type": "git",
@@ -51,18 +51,18 @@
51
51
  },
52
52
  "license": "MIT",
53
53
  "dependencies": {
54
- "@rspack/dev-client": "0.4.1",
55
- "@storybook/components": "^7.5.1",
56
- "@storybook/core-common": "^7.5.1",
57
- "@storybook/csf-plugin": "^7.5.1",
58
- "@storybook/global": "^5.0.0",
59
- "@storybook/mdx1-csf": "^1.0.0",
60
- "@storybook/mdx2-csf": "^1.1.0",
61
- "@storybook/preview": "^7.5.1",
62
- "@storybook/preview-api": "^7.5.1",
54
+ "@rspack/plugin-react-refresh": "0.4.2",
55
+ "@storybook/components": "~7.6.1",
56
+ "@storybook/core-common": "~7.6.1",
57
+ "@storybook/csf-plugin": "~7.6.1",
58
+ "@storybook/global": "~5.0.0",
59
+ "@storybook/mdx1-csf": "~1.0.0",
60
+ "@storybook/mdx2-csf": "~1.1.0",
61
+ "@storybook/preview": "~7.6.1",
62
+ "@storybook/preview-api": "~7.6.1",
63
63
  "@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.0c3f3b7.0",
64
- "@storybook/router": "^7.5.1",
65
- "@storybook/theming": "^7.5.1",
64
+ "@storybook/router": "~7.6.1",
65
+ "@storybook/theming": "~7.6.1",
66
66
  "ast-types": "^0.14.2",
67
67
  "minimatch": "^9.0.3",
68
68
  "react-docgen": "6.0.0-alpha.3",
@@ -71,26 +71,26 @@
71
71
  "serve-static": "^1.14.1",
72
72
  "tinypool": "^0.8.0",
73
73
  "webpack-hot-middleware": "^2.25.4",
74
- "@modern-js/core": "0.0.0-next-20231204061803",
75
- "@modern-js/builder-shared": "0.0.0-next-20231204061803",
76
- "@modern-js/builder": "0.0.0-next-20231204061803",
77
- "@modern-js/runtime": "0.0.0-next-20231204061803",
78
- "@modern-js/utils": "0.0.0-next-20231204061803"
74
+ "@modern-js/builder": "0.0.0-next-20231206164920",
75
+ "@modern-js/builder-shared": "0.0.0-next-20231206164920",
76
+ "@modern-js/runtime": "0.0.0-next-20231206164920",
77
+ "@modern-js/core": "0.0.0-next-20231206164920",
78
+ "@modern-js/utils": "0.0.0-next-20231206164920"
79
79
  },
80
80
  "devDependencies": {
81
- "@storybook/types": "^7.5.1",
81
+ "@storybook/types": "~7.6.1",
82
82
  "@types/babel__core": "^7.20.1",
83
83
  "@types/serve-static": "^1.13.10",
84
84
  "@types/webpack-hot-middleware": "^2.25.6",
85
85
  "typescript": "^5.2.2",
86
- "@modern-js/builder-rspack-provider": "0.0.0-next-20231204061803",
87
- "@modern-js/core": "0.0.0-next-20231204061803",
88
- "@modern-js/builder-webpack-provider": "0.0.0-next-20231204061803",
89
- "@scripts/build": "0.0.0-next-20231204061803"
86
+ "@modern-js/builder-rspack-provider": "0.0.0-next-20231206164920",
87
+ "@modern-js/builder-webpack-provider": "0.0.0-next-20231206164920",
88
+ "@modern-js/core": "0.0.0-next-20231206164920",
89
+ "@scripts/build": "0.0.0-next-20231206164920"
90
90
  },
91
91
  "peerDependencies": {
92
- "@modern-js/builder-webpack-provider": "0.0.0-next-20231204061803",
93
- "@modern-js/builder-rspack-provider": "0.0.0-next-20231204061803"
92
+ "@modern-js/builder-webpack-provider": "0.0.0-next-20231206164920",
93
+ "@modern-js/builder-rspack-provider": "0.0.0-next-20231206164920"
94
94
  },
95
95
  "peerDependenciesMeta": {
96
96
  "@modern-js/builder-webpack-provider": {