@nx/storybook 23.1.0 → 23.1.1

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.
@@ -76,9 +76,9 @@ async function configurationGeneratorInternal(tree, rawSchema) {
76
76
  (0, util_functions_1.configureTsSolutionConfig)(tree, schema);
77
77
  (0, util_functions_1.updateLintConfig)(tree, schema);
78
78
  (0, util_functions_1.addBuildStorybookToCacheableOperations)(tree);
79
- (0, util_functions_1.addStorybookToNamedInputs)(tree);
79
+ (0, util_functions_1.addStorybookToNamedInputs)(tree, schema);
80
80
  if (!hasPlugin) {
81
- (0, util_functions_1.addStorybookToTargetDefaults)(tree);
81
+ (0, util_functions_1.addStorybookToTargetDefaults)(tree, schema);
82
82
  }
83
83
  let devDeps = {};
84
84
  if (!hasPlugin || schema.addExplicitTargets) {
@@ -17,8 +17,8 @@ export declare function configureTsSolutionConfig(tree: Tree, schema: StorybookC
17
17
  */
18
18
  export declare function updateLintConfig(tree: Tree, schema: StorybookConfigureSchema): void;
19
19
  export declare function normalizeSchema(schema: StorybookConfigureSchema): StorybookConfigureSchema;
20
- export declare function addStorybookToNamedInputs(tree: Tree): void;
21
- export declare function addStorybookToTargetDefaults(tree: Tree, setCache?: boolean): void;
20
+ export declare function addStorybookToNamedInputs(tree: Tree, schema: StorybookConfigureSchema): void;
21
+ export declare function addStorybookToTargetDefaults(tree: Tree, schema: StorybookConfigureSchema, setCache?: boolean): void;
22
22
  export declare function createProjectStorybookDir(tree: Tree, projectName: string, uiFramework: UiFramework, js: boolean, tsConfiguration: boolean, root: string, projectType: string, projectIsRootProjectInStandaloneWorkspace: boolean, interactionTests: boolean, mainDir?: string, isNextJs?: boolean, usesSwc?: boolean, usesVite?: boolean, viteConfigFilePath?: string, hasPlugin?: boolean, viteConfigFileName?: string, usesReactNative?: boolean): void;
23
23
  export declare function getTsConfigPath(tree: Tree, projectName: string, path?: string): string;
24
24
  export declare function addBuildStorybookToCacheableOperations(tree: Tree): void;
@@ -353,7 +353,7 @@ function normalizeSchema(schema) {
353
353
  ...schema,
354
354
  };
355
355
  }
356
- function addStorybookToNamedInputs(tree) {
356
+ function addStorybookToNamedInputs(tree, schema) {
357
357
  const nxJson = (0, devkit_1.readNxJson)(tree);
358
358
  if (nxJson.namedInputs) {
359
359
  const hasProductionFileset = !!nxJson.namedInputs?.production;
@@ -364,14 +364,15 @@ function addStorybookToNamedInputs(tree) {
364
364
  if (!nxJson.namedInputs.production.includes('!{projectRoot}/.storybook/**/*')) {
365
365
  nxJson.namedInputs.production.push('!{projectRoot}/.storybook/**/*');
366
366
  }
367
- if (!nxJson.namedInputs.production.includes('!{projectRoot}/tsconfig.storybook.json')) {
367
+ if (schema.uiFramework !== '@storybook/angular' &&
368
+ !nxJson.namedInputs.production.includes('!{projectRoot}/tsconfig.storybook.json')) {
368
369
  nxJson.namedInputs.production.push('!{projectRoot}/tsconfig.storybook.json');
369
370
  }
370
371
  }
371
372
  (0, devkit_1.updateNxJson)(tree, nxJson);
372
373
  }
373
374
  }
374
- function addStorybookToTargetDefaults(tree, setCache = true) {
375
+ function addStorybookToTargetDefaults(tree, schema, setCache = true) {
375
376
  const nxJson = (0, devkit_1.readNxJson)(tree) ?? {};
376
377
  const existing = (0, internal_2.findTargetDefault)(nxJson.targetDefaults, {
377
378
  target: 'build-storybook',
@@ -391,7 +392,8 @@ function addStorybookToTargetDefaults(tree, setCache = true) {
391
392
  const negatedIndex = inputs.indexOf('!{projectRoot}/.storybook/**/*');
392
393
  if (negatedIndex !== -1)
393
394
  inputs.splice(negatedIndex, 1);
394
- if (!inputs.includes('{projectRoot}/tsconfig.storybook.json')) {
395
+ if (schema.uiFramework !== '@storybook/angular' &&
396
+ !inputs.includes('{projectRoot}/tsconfig.storybook.json')) {
395
397
  inputs.push('{projectRoot}/tsconfig.storybook.json');
396
398
  }
397
399
  (0, internal_2.upsertTargetDefault)(tree, nxJson, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/storybook",
3
- "version": "23.1.0",
3
+ "version": "23.1.1",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "files": [
@@ -92,18 +92,18 @@
92
92
  "@phenomnomnominal/tsquery": "~6.2.0",
93
93
  "semver": "^7.6.3",
94
94
  "tslib": "^2.3.0",
95
- "@nx/devkit": "23.1.0",
96
- "@nx/cypress": "23.1.0",
97
- "@nx/eslint": "23.1.0",
98
- "@nx/js": "23.1.0"
95
+ "@nx/devkit": "23.1.1",
96
+ "@nx/cypress": "23.1.1",
97
+ "@nx/js": "23.1.1",
98
+ "@nx/eslint": "23.1.1"
99
99
  },
100
100
  "devDependencies": {
101
101
  "storybook": "9.0.6",
102
- "nx": "23.1.0"
102
+ "nx": "23.1.1"
103
103
  },
104
104
  "peerDependencies": {
105
105
  "storybook": ">=8.0.0 <11.0.0",
106
- "@nx/web": "23.1.0"
106
+ "@nx/web": "23.1.1"
107
107
  },
108
108
  "peerDependenciesMeta": {
109
109
  "@nx/web": {