@storybook/angular 8.2.0-alpha.6 → 8.2.0-alpha.8

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.
@@ -13,6 +13,7 @@ export type StorybookBuilderOptions = JsonObject & {
13
13
  enableProdMode?: boolean;
14
14
  styles?: StyleElement[];
15
15
  stylePreprocessorOptions?: StylePreprocessorOptions;
16
+ preserveSymlinks?: boolean;
16
17
  assets?: AssetPattern[];
17
18
  sourceMap?: SourceMapUnion;
18
19
  } & Pick<CLIOptions, 'outputDir' | 'configDir' | 'loglevel' | 'quiet' | 'test' | 'webpackStatsJson' | 'statsJson' | 'disableTelemetry' | 'debugWebpack' | 'previewUrl'>;
@@ -29,6 +30,7 @@ declare const _default: import("@angular-devkit/architect/src/internal").Builder
29
30
  enableProdMode?: boolean | undefined;
30
31
  styles?: StyleElement[] | undefined;
31
32
  stylePreprocessorOptions?: StylePreprocessorOptions | undefined;
33
+ preserveSymlinks?: boolean | undefined;
32
34
  assets?: AssetPattern[] | undefined;
33
35
  sourceMap?: SourceMapUnion | undefined;
34
36
  } & Pick<CLIOptions, "statsJson" | "outputDir" | "configDir" | "loglevel" | "quiet" | "test" | "webpackStatsJson" | "disableTelemetry" | "debugWebpack" | "previewUrl">>;
@@ -24,7 +24,7 @@ const commandBuilder = (options, context) => {
24
24
  outputDir: 'SBCONFIG_OUTPUT_DIR',
25
25
  configDir: 'SBCONFIG_CONFIG_DIR',
26
26
  });
27
- const { browserTarget, stylePreprocessorOptions, styles, configDir, docs, loglevel, test, outputDir, quiet, enableProdMode = true, webpackStatsJson, statsJson, debugWebpack, disableTelemetry, assets, previewUrl, sourceMap = false, } = options;
27
+ const { browserTarget, stylePreprocessorOptions, styles, configDir, docs, loglevel, test, outputDir, quiet, enableProdMode = true, webpackStatsJson, statsJson, debugWebpack, disableTelemetry, assets, previewUrl, sourceMap = false, preserveSymlinks = false, } = options;
28
28
  const standaloneOptions = {
29
29
  packageJson: (0, read_pkg_up_1.sync)({ cwd: __dirname }).packageJson,
30
30
  configDir,
@@ -42,6 +42,7 @@ const commandBuilder = (options, context) => {
42
42
  ...(styles ? { styles } : {}),
43
43
  ...(assets ? { assets } : {}),
44
44
  sourceMap,
45
+ preserveSymlinks,
45
46
  },
46
47
  tsConfig,
47
48
  webpackStatsJson,
@@ -1,7 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * @vitest-environment node
4
- */
5
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
3
  if (k2 === undefined) k2 = k;
7
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -19,6 +19,11 @@
19
19
  "description": "Directory where to store built files.",
20
20
  "default": "storybook-static"
21
21
  },
22
+ "preserveSymlinks": {
23
+ "type": "boolean",
24
+ "description": "Do not use the real path when resolving modules. If true, symlinks are resolved to their real path, if false, symlinks are resolved to their symlinked path.",
25
+ "default": false
26
+ },
22
27
  "configDir": {
23
28
  "type": "string",
24
29
  "description": "Directory where to load Storybook configurations from.",
@@ -12,6 +12,7 @@ export type StorybookBuilderOptions = JsonObject & {
12
12
  styles?: StyleElement[];
13
13
  stylePreprocessorOptions?: StylePreprocessorOptions;
14
14
  assets?: AssetPattern[];
15
+ preserveSymlinks?: boolean;
15
16
  sourceMap?: SourceMapUnion;
16
17
  } & Pick<CLIOptions, 'port' | 'host' | 'configDir' | 'https' | 'sslCa' | 'sslCert' | 'sslKey' | 'smokeTest' | 'ci' | 'quiet' | 'disableTelemetry' | 'initialPath' | 'open' | 'docs' | 'debugWebpack' | 'webpackStatsJson' | 'statsJson' | 'loglevel' | 'previewUrl'>;
17
18
  export type StorybookBuilderOutput = JsonObject & BuilderOutput & {};
@@ -24,6 +25,7 @@ declare const _default: import("@angular-devkit/architect/src/internal").Builder
24
25
  styles?: StyleElement[] | undefined;
25
26
  stylePreprocessorOptions?: StylePreprocessorOptions | undefined;
26
27
  assets?: AssetPattern[] | undefined;
28
+ preserveSymlinks?: boolean | undefined;
27
29
  sourceMap?: SourceMapUnion | undefined;
28
30
  } & Pick<CLIOptions, "docs" | "statsJson" | "configDir" | "loglevel" | "quiet" | "webpackStatsJson" | "disableTelemetry" | "debugWebpack" | "previewUrl" | "port" | "host" | "initialPath" | "https" | "sslCa" | "sslCert" | "sslKey" | "smokeTest" | "open" | "ci">>;
29
31
  export default _default;
@@ -30,7 +30,7 @@ const commandBuilder = (options, context) => {
30
30
  ci: 'CI',
31
31
  });
32
32
  options.port = parseInt(`${options.port}`, 10);
33
- const { browserTarget, stylePreprocessorOptions, styles, ci, configDir, docs, host, https, port, quiet, enableProdMode = false, smokeTest, sslCa, sslCert, sslKey, disableTelemetry, assets, initialPath, open, debugWebpack, loglevel, webpackStatsJson, statsJson, previewUrl, sourceMap = false, } = options;
33
+ const { browserTarget, stylePreprocessorOptions, styles, ci, configDir, docs, host, https, port, quiet, enableProdMode = false, smokeTest, sslCa, sslCert, sslKey, disableTelemetry, assets, initialPath, open, debugWebpack, loglevel, webpackStatsJson, statsJson, previewUrl, sourceMap = false, preserveSymlinks = false, } = options;
34
34
  const standaloneOptions = {
35
35
  packageJson: (0, read_pkg_up_1.sync)({ cwd: __dirname }).packageJson,
36
36
  ci,
@@ -52,6 +52,7 @@ const commandBuilder = (options, context) => {
52
52
  ...(stylePreprocessorOptions ? { stylePreprocessorOptions } : {}),
53
53
  ...(styles ? { styles } : {}),
54
54
  ...(assets ? { assets } : {}),
55
+ preserveSymlinks,
55
56
  sourceMap,
56
57
  },
57
58
  tsConfig,
@@ -1,7 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * @vitest-environment node
4
- */
5
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
3
  if (k2 === undefined) k2 = k;
7
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -19,6 +19,11 @@
19
19
  "type": "string",
20
20
  "description": "The full path for the TypeScript configuration file, relative to the current workspace."
21
21
  },
22
+ "preserveSymlinks": {
23
+ "type": "boolean",
24
+ "description": "Do not use the real path when resolving modules. If true, symlinks are resolved to their real path, if false, symlinks are resolved to their symlinked path.",
25
+ "default": false
26
+ },
22
27
  "port": {
23
28
  "type": "number",
24
29
  "description": "Port to listen on.",
@@ -10,6 +10,7 @@ export type StandaloneOptions = CLIOptions & LoadOptions & BuilderOptions & {
10
10
  stylePreprocessorOptions?: StylePreprocessorOptions;
11
11
  assets?: AssetPattern[];
12
12
  sourceMap?: SourceMapUnion;
13
+ preserveSymlinks?: boolean;
13
14
  };
14
15
  angularBuilderContext?: BuilderContext | null;
15
16
  tsConfig?: string;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ // @vitest-environment happy-dom
2
3
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
4
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
5
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ // @vitest-environment happy-dom
2
3
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
4
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
5
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -10,6 +10,6 @@ export declare const createStorybookWrapperComponent: ({ selector, template, sto
10
10
  storyComponent: Type<unknown> | undefined;
11
11
  styles: string[];
12
12
  moduleMetadata: NgModuleMetadata;
13
- initialProps?: ICollection | undefined;
13
+ initialProps?: ICollection;
14
14
  analyzedMetadata: PropertyExtractor;
15
15
  }) => Type<any>;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ // @vitest-environment happy-dom
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  const rxjs_1 = require("rxjs");
4
5
  const vitest_1 = require("vitest");
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ // @vitest-environment happy-dom
2
3
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
4
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
5
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -11,4 +11,4 @@ export declare function applicationConfig<TArgs = any>(
11
11
  * Set of config options available during the application bootstrap operation.
12
12
  */
13
13
  config: ApplicationConfig): DecoratorFunction<AngularRenderer, TArgs>;
14
- export declare const componentWrapperDecorator: <TArgs = any>(element: Type<unknown> | ((story: string) => string), props?: ICollection | ((storyContext: StoryContext<AngularRenderer, TArgs>) => ICollection) | undefined) => DecoratorFunction<AngularRenderer, TArgs>;
14
+ export declare const componentWrapperDecorator: <TArgs = any>(element: Type<unknown> | ((story: string) => string), props?: ICollection | ((storyContext: StoryContext<AngularRenderer, TArgs>) => ICollection)) => DecoratorFunction<AngularRenderer, TArgs>;
@@ -49,6 +49,9 @@ exports.getWebpackConfig = async (baseConfig, { builderOptions, builderContext }
49
49
  styles: builderOptions.styles
50
50
  ?.map((style) => (typeof style === 'string' ? style : style.input))
51
51
  .filter((style) => typeof style === 'string' || style.inject !== false),
52
+ outputPath: typeof builderOptions.outputPath === 'string'
53
+ ? builderOptions.outputPath
54
+ : builderOptions.outputPath?.base,
52
55
  // Fixed options
53
56
  optimization: false,
54
57
  namedChunks: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/angular",
3
- "version": "8.2.0-alpha.6",
3
+ "version": "8.2.0-alpha.8",
4
4
  "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
5
5
  "keywords": [
6
6
  "storybook",
@@ -37,18 +37,18 @@
37
37
  "prep": "rimraf dist && node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/tsc.ts"
38
38
  },
39
39
  "dependencies": {
40
- "@storybook/builder-webpack5": "8.2.0-alpha.6",
41
- "@storybook/client-logger": "8.2.0-alpha.6",
42
- "@storybook/core-common": "8.2.0-alpha.6",
43
- "@storybook/core-events": "8.2.0-alpha.6",
44
- "@storybook/core-server": "8.2.0-alpha.6",
45
- "@storybook/core-webpack": "8.2.0-alpha.6",
46
- "@storybook/docs-tools": "8.2.0-alpha.6",
40
+ "@storybook/builder-webpack5": "8.2.0-alpha.8",
41
+ "@storybook/client-logger": "8.2.0-alpha.8",
42
+ "@storybook/core-common": "8.2.0-alpha.8",
43
+ "@storybook/core-events": "8.2.0-alpha.8",
44
+ "@storybook/core-server": "8.2.0-alpha.8",
45
+ "@storybook/core-webpack": "8.2.0-alpha.8",
46
+ "@storybook/docs-tools": "8.2.0-alpha.8",
47
47
  "@storybook/global": "^5.0.0",
48
- "@storybook/node-logger": "8.2.0-alpha.6",
49
- "@storybook/preview-api": "8.2.0-alpha.6",
50
- "@storybook/telemetry": "8.2.0-alpha.6",
51
- "@storybook/types": "8.2.0-alpha.6",
48
+ "@storybook/node-logger": "8.2.0-alpha.8",
49
+ "@storybook/preview-api": "8.2.0-alpha.8",
50
+ "@storybook/telemetry": "8.2.0-alpha.8",
51
+ "@storybook/types": "8.2.0-alpha.8",
52
52
  "@types/node": "^18.0.0",
53
53
  "@types/react": "^18.0.37",
54
54
  "@types/react-dom": "^18.0.11",
@@ -80,7 +80,6 @@
80
80
  "@types/cross-spawn": "^6.0.2",
81
81
  "@types/tmp": "^0.2.3",
82
82
  "cross-spawn": "^7.0.3",
83
- "jsdom": "^23.0.1",
84
83
  "tmp": "^0.2.1",
85
84
  "typescript": "^5.3.2",
86
85
  "webpack": "5",
@@ -118,5 +117,5 @@
118
117
  "post": "./scripts/postbuild.js",
119
118
  "tsConfig": "tsconfig.build.json"
120
119
  },
121
- "gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae17"
120
+ "gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae16"
122
121
  }