@storybook/angular 7.0.25 → 7.0.27
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/preset.js
CHANGED
|
@@ -8,10 +8,13 @@ exports.addons = [
|
|
|
8
8
|
require.resolve('./server/framework-preset-angular-ivy'),
|
|
9
9
|
require.resolve('./server/framework-preset-angular-docs'),
|
|
10
10
|
];
|
|
11
|
-
const previewAnnotations = (entries = []) =>
|
|
12
|
-
...entries,
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
const previewAnnotations = (entries = [], options) => {
|
|
12
|
+
const annotations = [...entries, require.resolve('./client/config')];
|
|
13
|
+
if (options.configType === 'PRODUCTION') {
|
|
14
|
+
annotations.unshift(require.resolve('./client/preview-prod'));
|
|
15
|
+
}
|
|
16
|
+
return annotations;
|
|
17
|
+
};
|
|
15
18
|
exports.previewAnnotations = previewAnnotations;
|
|
16
19
|
const core = async (config, options) => {
|
|
17
20
|
const framework = await options.presets.apply('framework');
|
package/dist/preset.mjs
CHANGED
|
@@ -5,10 +5,13 @@ export const addons = [
|
|
|
5
5
|
require.resolve('./server/framework-preset-angular-ivy'),
|
|
6
6
|
require.resolve('./server/framework-preset-angular-docs'),
|
|
7
7
|
];
|
|
8
|
-
export const previewAnnotations = (entries = []) =>
|
|
9
|
-
...entries,
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
export const previewAnnotations = (entries = [], options) => {
|
|
9
|
+
const annotations = [...entries, require.resolve('./client/config')];
|
|
10
|
+
if (options.configType === 'PRODUCTION') {
|
|
11
|
+
annotations.unshift(require.resolve('./client/preview-prod'));
|
|
12
|
+
}
|
|
13
|
+
return annotations;
|
|
14
|
+
};
|
|
12
15
|
export const core = async (config, options) => {
|
|
13
16
|
const framework = await options.presets.apply('framework');
|
|
14
17
|
return {
|
|
@@ -22,9 +22,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
exports.webpack = exports.runNgcc = void 0;
|
|
27
30
|
const path = __importStar(require("path"));
|
|
31
|
+
const fs_1 = __importDefault(require("fs"));
|
|
28
32
|
/**
|
|
29
33
|
* Source : https://github.com/angular/angular-cli/blob/ebccb5de4a455af813c5e82483db6af20666bdbd/packages/angular_devkit/build_angular/src/utils/load-esm.ts#L23
|
|
30
34
|
* This uses a dynamic import to load a module which may be ESM.
|
|
@@ -68,10 +72,13 @@ const runNgcc = async () => {
|
|
|
68
72
|
};
|
|
69
73
|
exports.runNgcc = runNgcc;
|
|
70
74
|
const webpack = async (webpackConfig, options) => {
|
|
71
|
-
const
|
|
75
|
+
const packageJsonPath = require.resolve('@angular/core/package.json');
|
|
76
|
+
const packageJson = JSON.parse(fs_1.default.readFileSync(packageJsonPath, 'utf8'));
|
|
77
|
+
const VERSION = packageJson.version;
|
|
72
78
|
const framework = await options.presets.apply('framework');
|
|
73
79
|
const angularOptions = (typeof framework === 'object' ? framework.options : {});
|
|
74
|
-
const
|
|
80
|
+
const angularMajorVersion = VERSION.split('.')[0];
|
|
81
|
+
const isAngular16OrNewer = parseInt(angularMajorVersion, 10) >= 16;
|
|
75
82
|
// Default to true, if undefined
|
|
76
83
|
if (angularOptions.enableIvy === false) {
|
|
77
84
|
return webpackConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/angular",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.27",
|
|
4
4
|
"description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
"prep": "../../../scripts/prepare/tsc.ts"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@storybook/builder-webpack5": "7.0.
|
|
40
|
-
"@storybook/cli": "7.0.
|
|
41
|
-
"@storybook/client-logger": "7.0.
|
|
42
|
-
"@storybook/core-client": "7.0.
|
|
43
|
-
"@storybook/core-common": "7.0.
|
|
44
|
-
"@storybook/core-events": "7.0.
|
|
45
|
-
"@storybook/core-server": "7.0.
|
|
46
|
-
"@storybook/core-webpack": "7.0.
|
|
47
|
-
"@storybook/docs-tools": "7.0.
|
|
39
|
+
"@storybook/builder-webpack5": "7.0.27",
|
|
40
|
+
"@storybook/cli": "7.0.27",
|
|
41
|
+
"@storybook/client-logger": "7.0.27",
|
|
42
|
+
"@storybook/core-client": "7.0.27",
|
|
43
|
+
"@storybook/core-common": "7.0.27",
|
|
44
|
+
"@storybook/core-events": "7.0.27",
|
|
45
|
+
"@storybook/core-server": "7.0.27",
|
|
46
|
+
"@storybook/core-webpack": "7.0.27",
|
|
47
|
+
"@storybook/docs-tools": "7.0.27",
|
|
48
48
|
"@storybook/global": "^5.0.0",
|
|
49
|
-
"@storybook/manager-api": "7.0.
|
|
50
|
-
"@storybook/node-logger": "7.0.
|
|
51
|
-
"@storybook/preview-api": "7.0.
|
|
52
|
-
"@storybook/telemetry": "7.0.
|
|
53
|
-
"@storybook/types": "7.0.
|
|
49
|
+
"@storybook/manager-api": "7.0.27",
|
|
50
|
+
"@storybook/node-logger": "7.0.27",
|
|
51
|
+
"@storybook/preview-api": "7.0.27",
|
|
52
|
+
"@storybook/telemetry": "7.0.27",
|
|
53
|
+
"@storybook/types": "7.0.27",
|
|
54
54
|
"@types/node": "^16.0.0",
|
|
55
55
|
"@types/react": "^16.14.34",
|
|
56
56
|
"@types/react-dom": "^16.9.14",
|