@nrwl/storybook 14.2.4 → 14.3.0-beta.2

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.
package/.eslintrc.json CHANGED
@@ -18,6 +18,18 @@
18
18
  "@angular-devkit/architect"
19
19
  ]
20
20
  }
21
+ },
22
+ {
23
+ "files": [
24
+ "./package.json",
25
+ "./generators.json",
26
+ "./executors.json",
27
+ "./migrations.json"
28
+ ],
29
+ "parser": "jsonc-eslint-parser",
30
+ "rules": {
31
+ "@nrwl/nx/nx-plugin-checks": "error"
32
+ }
21
33
  }
22
34
  ],
23
35
  "ignorePatterns": ["!**/*"]
package/CHANGELOG.md CHANGED
@@ -3,6 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [14.2.4](https://github.com/nrwl/nx/compare/14.2.2...14.2.4) (2022-06-09)
6
+ # [14.3.0-beta.2](https://github.com/nrwl/nx/compare/14.2.2...14.3.0-beta.2) (2022-06-11)
7
7
 
8
8
  **Note:** Version bump only for package @nrwl/storybook
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrwl/storybook",
3
- "version": "14.2.4",
3
+ "version": "14.3.0-beta.2",
4
4
  "description": "The Nx Plugin for Storybook that contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -29,14 +29,14 @@
29
29
  "migrations": "./migrations.json"
30
30
  },
31
31
  "dependencies": {
32
- "@nrwl/cypress": "14.2.4",
33
- "@nrwl/devkit": "14.2.4",
34
- "@nrwl/linter": "14.2.4",
35
- "@nrwl/workspace": "14.2.4",
32
+ "@nrwl/cypress": "14.3.0-beta.2",
33
+ "@nrwl/devkit": "14.3.0-beta.2",
34
+ "@nrwl/linter": "14.3.0-beta.2",
35
+ "@nrwl/workspace": "14.3.0-beta.2",
36
36
  "core-js": "^3.6.5",
37
37
  "semver": "7.3.4",
38
38
  "ts-loader": "^9.2.6",
39
39
  "tsconfig-paths-webpack-plugin": "3.5.2"
40
40
  },
41
- "gitHead": "3e3ab094cf1a7cc7c126919622cc7dac011ddd97"
41
+ "gitHead": "0fd3281d3c7dc7c086adfe754ce1be85b0f890bb"
42
42
  }
@@ -28,10 +28,6 @@
28
28
  "type": "string",
29
29
  "description": "The output path of the generated files."
30
30
  },
31
- "projectBuildConfig": {
32
- "type": "string",
33
- "description": "Workspace project where Storybook reads the Webpack config from."
34
- },
35
31
  "styles": {
36
32
  "type": "array",
37
33
  "description": "Global styles to be included in the build.",
@@ -6,6 +6,5 @@ export interface StorybookConfig {
6
6
  }
7
7
  export interface CommonNxStorybookConfig {
8
8
  uiFramework: '@storybook/angular' | '@storybook/react' | '@storybook/html' | '@storybook/web-components' | '@storybook/vue' | '@storybook/vue3' | '@storybook/svelte' | '@storybook/react-native';
9
- projectBuildConfig?: string;
10
9
  config: StorybookConfig;
11
10
  }
@@ -1,5 +1,6 @@
1
1
  import { ExecutorContext } from '@nrwl/devkit';
2
2
  import 'dotenv/config';
3
+ import ts = require('typescript');
3
4
  import { CommonNxStorybookConfig } from './models';
4
5
  export interface NodePackage {
5
6
  name: string;
@@ -8,3 +9,4 @@ export interface NodePackage {
8
9
  export declare function getStorybookFrameworkPath(uiFramework: any): any;
9
10
  export declare function runStorybookSetupCheck(options: CommonNxStorybookConfig): void;
10
11
  export declare function resolveCommonStorybookOptionMapper(builderOptions: CommonNxStorybookConfig, frameworkOptions: any, context: ExecutorContext): any;
12
+ export declare function findBuilderInMainJsTs(storybookConfig: ts.SourceFile): void;
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveCommonStorybookOptionMapper = exports.runStorybookSetupCheck = exports.getStorybookFrameworkPath = void 0;
3
+ exports.findBuilderInMainJsTs = exports.resolveCommonStorybookOptionMapper = exports.runStorybookSetupCheck = exports.getStorybookFrameworkPath = void 0;
4
4
  const devkit_1 = require("@nrwl/devkit");
5
+ const find_nodes_1 = require("@nrwl/workspace/src/utilities/typescript/find-nodes");
5
6
  require("dotenv/config");
6
7
  const fs_1 = require("fs");
7
8
  const path_1 = require("path");
8
9
  const semver_1 = require("semver");
10
+ const ts = require("typescript");
9
11
  const utilities_1 = require("../utils/utilities");
10
12
  function getStorybookFrameworkPath(uiFramework) {
11
13
  const serverOptionsPaths = {
@@ -47,17 +49,8 @@ function reactWebpack5Check(options) {
47
49
  const storybookConfig = (0, fs_1.readFileSync)(storybookConfigFilePath, {
48
50
  encoding: 'utf8',
49
51
  });
50
- if (!storybookConfig.match(/builder: ('webpack5'|"webpack5"|`webpack5`)/g)) {
51
- // storybook needs to be upgraded to webpack 5
52
- devkit_1.logger.warn(`
53
- It looks like you use Webpack 5 but your Storybook setup is not configured to leverage that
54
- and thus falls back to Webpack 4.
55
- Make sure you upgrade your Storybook config to use Webpack 5.
56
-
57
- - https://gist.github.com/shilman/8856ea1786dcd247139b47b270912324#upgrade
58
-
59
- `);
60
- }
52
+ const source = ts.createSourceFile(storybookConfigFilePath, storybookConfig, ts.ScriptTarget.Latest, true);
53
+ findBuilderInMainJsTs(source);
61
54
  }
62
55
  }
63
56
  function webpackFinalPropertyCheck(options) {
@@ -81,7 +74,7 @@ function webpackFinalPropertyCheck(options) {
81
74
  You have a webpack.config.js files in your Storybook configuration:
82
75
  ${placesToCheck.map((x) => `- "${x.path}"`).join('\n ')}
83
76
 
84
- Consider switching to the "webpackFinal" property declared in "main.js" instead.
77
+ Consider switching to the "webpackFinal" property declared in "main.js" (or "main.ts") instead.
85
78
  ${options.uiFramework === '@storybook/react'
86
79
  ? 'https://nx.dev/storybook/migrate-webpack-final-react'
87
80
  : 'https://nx.dev/storybook/migrate-webpack-final-angular'}
@@ -94,4 +87,34 @@ function resolveCommonStorybookOptionMapper(builderOptions, frameworkOptions, co
94
87
  return storybookOptions;
95
88
  }
96
89
  exports.resolveCommonStorybookOptionMapper = resolveCommonStorybookOptionMapper;
90
+ function findBuilderInMainJsTs(storybookConfig) {
91
+ const importArray = (0, find_nodes_1.findNodes)(storybookConfig, [
92
+ ts.SyntaxKind.PropertyAssignment,
93
+ ]);
94
+ let builderIsSpecified = false;
95
+ importArray.forEach((parent) => {
96
+ var _a, _b;
97
+ const identifier = (0, find_nodes_1.findNodes)(parent, ts.SyntaxKind.Identifier);
98
+ const sbBuilder = (0, find_nodes_1.findNodes)(parent, ts.SyntaxKind.StringLiteral);
99
+ const builderText = (_b = (_a = sbBuilder === null || sbBuilder === void 0 ? void 0 : sbBuilder[0]) === null || _a === void 0 ? void 0 : _a.getText()) !== null && _b !== void 0 ? _b : '';
100
+ if (identifier[0].getText() === 'builder') {
101
+ builderIsSpecified = true;
102
+ if (builderText.includes('webpack') &&
103
+ !builderText.includes('webpack5')) {
104
+ builderIsSpecified = false;
105
+ }
106
+ }
107
+ });
108
+ if (!builderIsSpecified) {
109
+ devkit_1.logger.warn(`
110
+ It looks like you use Webpack 5 but your Storybook setup is not configured to leverage that
111
+ and thus falls back to Webpack 4.
112
+ Make sure you upgrade your Storybook config to use Webpack 5.
113
+
114
+ - https://gist.github.com/shilman/8856ea1786dcd247139b47b270912324#upgrade
115
+
116
+ `);
117
+ }
118
+ }
119
+ exports.findBuilderInMainJsTs = findBuilderInMainJsTs;
97
120
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../packages/storybook/src/executors/utils.ts"],"names":[],"mappings":";;;AAAA,yCAA0E;AAC1E,yBAAuB;AACvB,2BAA8C;AAC9C,+BAA4B;AAC5B,mCAA6B;AAC7B,kDAAwD;AAQxD,SAAgB,yBAAyB,CAAC,WAAW;IACnD,MAAM,kBAAkB,GAAG;QACzB,kBAAkB,EAAE,0CAA0C;QAC9D,iBAAiB,EAAE,yCAAyC;QAC5D,gBAAgB,EAAE,wCAAwC;QAC1D,iBAAiB,EAAE,yCAAyC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I,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,SAAS,EAAE;YACzC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IACE,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAC/B,CAAC,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,EACjC;gBACA,kBAAkB,GAAG,KAAK,CAAC;aAC5B;SACF;IACH,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,kBAAkB,EAAE;QACvB,eAAM,CAAC,IAAI,CAAC;;;;;;;KAOX,CAAC,CAAC;KACJ;AACH,CAAC;AA7BD,sDA6BC"}
@@ -0,0 +1,28 @@
1
+ import { rootMain } from '<%= offsetFromRoot %>../.storybook/main';
2
+ import type { StorybookConfig, Options } from '@storybook/core-common';
3
+
4
+ const config: StorybookConfig = {
5
+ ...rootMain,
6
+ <% if (useWebpack5) { %>
7
+ core: { ...rootMain.core, builder: 'webpack5' },
8
+ <% } %>
9
+
10
+ stories: [
11
+ ...rootMain.stories,
12
+ '../src/app/**/*.stories.mdx',
13
+ '../src/app/**/*.stories.@(js|jsx|ts|tsx)',
14
+ ],
15
+ addons: [...(rootMain.addons || []) <% if(uiFramework === '@storybook/react') { %>, '@nrwl/react/plugins/storybook' <% } %><% if(uiFramework === '@storybook/react-native') { %>, '@storybook/addon-ondevice-actions', '@storybook/addon-ondevice-backgrounds', '@storybook/addon-ondevice-controls', '@storybook/addon-ondevice-notes' <% } %>],
16
+ webpackFinal: async (config, { configType }: Options) => {
17
+ // apply any global webpack configs that might have been specified in .storybook/main.ts
18
+ if (rootMain.webpackFinal) {
19
+ config = await rootMain.webpackFinal(config, { configType } as Options);
20
+ }
21
+
22
+ // add your own webpack tweaks if needed
23
+
24
+ return config;
25
+ },
26
+ };
27
+
28
+ module.exports = config;
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "../tsconfig.json",
3
+ "compilerOptions": {
4
+ "emitDecoratorMetadata": true
5
+ <% if(uiFramework === '@storybook/react') { %>, "outDir": "" <% } %>
6
+ },
7
+ <% if(uiFramework === '@storybook/react') { %>"files": [
8
+ "<%= offsetFromRoot %>../node_modules/@nrwl/react/typings/styled-jsx.d.ts",
9
+ "<%= offsetFromRoot %>../node_modules/@nrwl/react/typings/cssmodule.d.ts",
10
+ "<%= offsetFromRoot %>../node_modules/@nrwl/react/typings/image.d.ts"
11
+ ],<% } %>
12
+ "exclude": ["../**/*.spec.ts" <% if(uiFramework === '@storybook/react') { %>, "../**/*.spec.js", "../**/*.spec.tsx", "../**/*.spec.jsx"<% } %>],
13
+ "include": ["../src/**/*", "*.js", "*.ts" <% if(uiFramework === '@storybook/react-native') { %>, "*.tsx"<% } %>]
14
+ }
@@ -0,0 +1,12 @@
1
+ import type { StorybookConfig } from '@storybook/core-common';
2
+
3
+ export const rootMain: StorybookConfig = {
4
+ stories: [],
5
+ addons: ['@storybook/addon-essentials'],
6
+ // webpackFinal: async (config, { configType }) => {
7
+ // // Make whatever fine-grained changes you need that should apply to all storybook configs
8
+
9
+ // // Return the altered config
10
+ // return config;
11
+ // },
12
+ };
@@ -12,5 +12,4 @@ export interface StorybookConfigureSchema {
12
12
  tsConfiguration?: boolean;
13
13
  cypressDirectory?: string;
14
14
  standaloneConfig?: boolean;
15
- projectBuildConfig?: string;
16
15
  }
@@ -35,10 +35,6 @@
35
35
  "enum": ["eslint", "tslint", "none"],
36
36
  "default": "eslint"
37
37
  },
38
- "projectBuildConfig": {
39
- "description": "Provide a custom projectBuildConfig for the Angular executor. If left blank, Nx will use the default.",
40
- "type": "string"
41
- },
42
38
  "js": {
43
39
  "type": "boolean",
44
40
  "description": "Generate JavaScript story files rather than TypeScript story files.",