@storybook/core-server 6.5.0-alpha.2 → 6.5.0-alpha.6
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/dist/cjs/build-dev.js +2 -2
- package/dist/cjs/utils/StoryIndexGenerator.js +1 -2
- package/dist/cjs/utils/watch-story-specifiers.js +5 -3
- package/dist/esm/build-dev.js +2 -2
- package/dist/esm/utils/StoryIndexGenerator.js +1 -1
- package/dist/esm/utils/watch-story-specifiers.js +5 -3
- package/dist/modern/build-dev.js +2 -2
- package/dist/modern/utils/StoryIndexGenerator.js +1 -1
- package/dist/modern/utils/watch-story-specifiers.js +5 -3
- package/package.json +13 -13
package/dist/cjs/build-dev.js
CHANGED
|
@@ -131,11 +131,11 @@ async function buildDevStandalone(options) {
|
|
|
131
131
|
if (options.smokeTest) {
|
|
132
132
|
// @ts-ignore
|
|
133
133
|
var managerWarnings = managerStats && managerStats.toJson().warnings || [];
|
|
134
|
-
if (managerWarnings.length > 0) _nodeLogger.logger.warn(`manager: ${managerWarnings}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
134
|
+
if (managerWarnings.length > 0) _nodeLogger.logger.warn(`manager: ${JSON.stringify(managerWarnings, null, 2)}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
135
135
|
// @ts-ignore
|
|
136
136
|
|
|
137
137
|
var previewWarnings = previewStats && previewStats.toJson().warnings || [];
|
|
138
|
-
if (previewWarnings.length > 0) _nodeLogger.logger.warn(`preview: ${previewWarnings}`);
|
|
138
|
+
if (previewWarnings.length > 0) _nodeLogger.logger.warn(`preview: ${JSON.stringify(previewWarnings, null, 2)}`);
|
|
139
139
|
process.exit(managerWarnings.length > 0 || previewWarnings.length > 0 && !options.ignorePreview ? 1 : 0);
|
|
140
140
|
return;
|
|
141
141
|
} // Get package name and capitalize it e.g. @storybook/react -> React
|
|
@@ -200,8 +200,7 @@ class StoryIndexGenerator {
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
invalidate(specifier, importPath, removed) {
|
|
203
|
-
var absolutePath = _path.default.resolve(this.options.workingDir, importPath);
|
|
204
|
-
|
|
203
|
+
var absolutePath = (0, _slash.default)(_path.default.resolve(this.options.workingDir, importPath));
|
|
205
204
|
var pathToEntries = this.storyIndexEntries.get(specifier);
|
|
206
205
|
|
|
207
206
|
if (removed) {
|
|
@@ -79,11 +79,13 @@ function watchStorySpecifiers(specifiers, options, onInvalidate) {
|
|
|
79
79
|
// (where the last bit depends on `files`).
|
|
80
80
|
var dirGlob = _path.default.join(options.workingDir, importPath, '**', // files can be e.g. '**/foo/*/*.js' so we just want the last bit,
|
|
81
81
|
// because the directoru could already be within the files part (e.g. './x/foo/bar')
|
|
82
|
-
_path.default.basename(specifier.files));
|
|
82
|
+
_path.default.basename(specifier.files)); // glob only supports forward slashes
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
|
|
85
|
+
var files = await (0, _globby.default)(dirGlob.replace(/\\/g, '/'));
|
|
85
86
|
files.forEach(function (filePath) {
|
|
86
|
-
var fileImportPath = toImportPath(
|
|
87
|
+
var fileImportPath = toImportPath( // use posix path separators even on windows
|
|
88
|
+
_path.default.relative(options.workingDir, filePath).replace(/\\/g, '/'));
|
|
87
89
|
|
|
88
90
|
if (specifier.importPathMatcher.exec(fileImportPath)) {
|
|
89
91
|
onInvalidate(specifier, fileImportPath, removed);
|
package/dist/esm/build-dev.js
CHANGED
|
@@ -105,11 +105,11 @@ export async function buildDevStandalone(options) {
|
|
|
105
105
|
if (options.smokeTest) {
|
|
106
106
|
// @ts-ignore
|
|
107
107
|
var managerWarnings = managerStats && managerStats.toJson().warnings || [];
|
|
108
|
-
if (managerWarnings.length > 0) logger.warn(`manager: ${managerWarnings}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
108
|
+
if (managerWarnings.length > 0) logger.warn(`manager: ${JSON.stringify(managerWarnings, null, 2)}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
109
109
|
// @ts-ignore
|
|
110
110
|
|
|
111
111
|
var previewWarnings = previewStats && previewStats.toJson().warnings || [];
|
|
112
|
-
if (previewWarnings.length > 0) logger.warn(`preview: ${previewWarnings}`);
|
|
112
|
+
if (previewWarnings.length > 0) logger.warn(`preview: ${JSON.stringify(previewWarnings, null, 2)}`);
|
|
113
113
|
process.exit(managerWarnings.length > 0 || previewWarnings.length > 0 && !options.ignorePreview ? 1 : 0);
|
|
114
114
|
return;
|
|
115
115
|
} // Get package name and capitalize it e.g. @storybook/react -> React
|
|
@@ -175,7 +175,7 @@ export class StoryIndexGenerator {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
invalidate(specifier, importPath, removed) {
|
|
178
|
-
var absolutePath = path.resolve(this.options.workingDir, importPath);
|
|
178
|
+
var absolutePath = slash(path.resolve(this.options.workingDir, importPath));
|
|
179
179
|
var pathToEntries = this.storyIndexEntries.get(specifier);
|
|
180
180
|
|
|
181
181
|
if (removed) {
|
|
@@ -65,10 +65,12 @@ export function watchStorySpecifiers(specifiers, options, onInvalidate) {
|
|
|
65
65
|
// (where the last bit depends on `files`).
|
|
66
66
|
var dirGlob = path.join(options.workingDir, importPath, '**', // files can be e.g. '**/foo/*/*.js' so we just want the last bit,
|
|
67
67
|
// because the directoru could already be within the files part (e.g. './x/foo/bar')
|
|
68
|
-
path.basename(specifier.files));
|
|
69
|
-
|
|
68
|
+
path.basename(specifier.files)); // glob only supports forward slashes
|
|
69
|
+
|
|
70
|
+
var files = await glob(dirGlob.replace(/\\/g, '/'));
|
|
70
71
|
files.forEach(function (filePath) {
|
|
71
|
-
var fileImportPath = toImportPath(path
|
|
72
|
+
var fileImportPath = toImportPath( // use posix path separators even on windows
|
|
73
|
+
path.relative(options.workingDir, filePath).replace(/\\/g, '/'));
|
|
72
74
|
|
|
73
75
|
if (specifier.importPathMatcher.exec(fileImportPath)) {
|
|
74
76
|
onInvalidate(specifier, fileImportPath, removed);
|
package/dist/modern/build-dev.js
CHANGED
|
@@ -105,11 +105,11 @@ export async function buildDevStandalone(options) {
|
|
|
105
105
|
if (options.smokeTest) {
|
|
106
106
|
// @ts-ignore
|
|
107
107
|
var managerWarnings = managerStats && managerStats.toJson().warnings || [];
|
|
108
|
-
if (managerWarnings.length > 0) logger.warn(`manager: ${managerWarnings}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
108
|
+
if (managerWarnings.length > 0) logger.warn(`manager: ${JSON.stringify(managerWarnings, null, 2)}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
109
109
|
// @ts-ignore
|
|
110
110
|
|
|
111
111
|
var previewWarnings = previewStats && previewStats.toJson().warnings || [];
|
|
112
|
-
if (previewWarnings.length > 0) logger.warn(`preview: ${previewWarnings}`);
|
|
112
|
+
if (previewWarnings.length > 0) logger.warn(`preview: ${JSON.stringify(previewWarnings, null, 2)}`);
|
|
113
113
|
process.exit(managerWarnings.length > 0 || previewWarnings.length > 0 && !options.ignorePreview ? 1 : 0);
|
|
114
114
|
return;
|
|
115
115
|
} // Get package name and capitalize it e.g. @storybook/react -> React
|
|
@@ -175,7 +175,7 @@ export class StoryIndexGenerator {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
invalidate(specifier, importPath, removed) {
|
|
178
|
-
var absolutePath = path.resolve(this.options.workingDir, importPath);
|
|
178
|
+
var absolutePath = slash(path.resolve(this.options.workingDir, importPath));
|
|
179
179
|
var pathToEntries = this.storyIndexEntries.get(specifier);
|
|
180
180
|
|
|
181
181
|
if (removed) {
|
|
@@ -65,10 +65,12 @@ export function watchStorySpecifiers(specifiers, options, onInvalidate) {
|
|
|
65
65
|
// (where the last bit depends on `files`).
|
|
66
66
|
var dirGlob = path.join(options.workingDir, importPath, '**', // files can be e.g. '**/foo/*/*.js' so we just want the last bit,
|
|
67
67
|
// because the directoru could already be within the files part (e.g. './x/foo/bar')
|
|
68
|
-
path.basename(specifier.files));
|
|
69
|
-
|
|
68
|
+
path.basename(specifier.files)); // glob only supports forward slashes
|
|
69
|
+
|
|
70
|
+
var files = await glob(dirGlob.replace(/\\/g, '/'));
|
|
70
71
|
files.forEach(function (filePath) {
|
|
71
|
-
var fileImportPath = toImportPath(path
|
|
72
|
+
var fileImportPath = toImportPath( // use posix path separators even on windows
|
|
73
|
+
path.relative(options.workingDir, filePath).replace(/\\/g, '/'));
|
|
72
74
|
|
|
73
75
|
if (specifier.importPathMatcher.exec(fileImportPath)) {
|
|
74
76
|
onInvalidate(specifier, fileImportPath, removed);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/core-server",
|
|
3
|
-
"version": "6.5.0-alpha.
|
|
3
|
+
"version": "6.5.0-alpha.6",
|
|
4
4
|
"description": "Storybook framework-agnostic API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@discoveryjs/json-ext": "^0.5.3",
|
|
44
|
-
"@storybook/builder-webpack4": "6.5.0-alpha.
|
|
45
|
-
"@storybook/core-client": "6.5.0-alpha.
|
|
46
|
-
"@storybook/core-common": "6.5.0-alpha.
|
|
47
|
-
"@storybook/core-events": "6.5.0-alpha.
|
|
44
|
+
"@storybook/builder-webpack4": "6.5.0-alpha.6",
|
|
45
|
+
"@storybook/core-client": "6.5.0-alpha.6",
|
|
46
|
+
"@storybook/core-common": "6.5.0-alpha.6",
|
|
47
|
+
"@storybook/core-events": "6.5.0-alpha.6",
|
|
48
48
|
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
|
49
|
-
"@storybook/csf-tools": "6.5.0-alpha.
|
|
50
|
-
"@storybook/manager-webpack4": "6.5.0-alpha.
|
|
51
|
-
"@storybook/node-logger": "6.5.0-alpha.
|
|
49
|
+
"@storybook/csf-tools": "6.5.0-alpha.6",
|
|
50
|
+
"@storybook/manager-webpack4": "6.5.0-alpha.6",
|
|
51
|
+
"@storybook/node-logger": "6.5.0-alpha.6",
|
|
52
52
|
"@storybook/semver": "^7.3.2",
|
|
53
|
-
"@storybook/store": "6.5.0-alpha.
|
|
53
|
+
"@storybook/store": "6.5.0-alpha.6",
|
|
54
54
|
"@types/node": "^14.0.10 || ^16.0.0",
|
|
55
55
|
"@types/node-fetch": "^2.5.7",
|
|
56
56
|
"@types/pretty-hrtime": "^1.0.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"x-default-browser": "^0.4.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@storybook/builder-webpack5": "6.5.0-alpha.
|
|
89
|
+
"@storybook/builder-webpack5": "6.5.0-alpha.6",
|
|
90
90
|
"@types/compression": "^1.7.0",
|
|
91
91
|
"@types/ip": "^1.1.0",
|
|
92
92
|
"@types/serve-favicon": "^2.5.2",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
"jest-specific-snapshot": "^4.0.0"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@storybook/builder-webpack5": "6.5.0-alpha.
|
|
98
|
-
"@storybook/manager-webpack5": "6.5.0-alpha.
|
|
97
|
+
"@storybook/builder-webpack5": "6.5.0-alpha.6",
|
|
98
|
+
"@storybook/manager-webpack5": "6.5.0-alpha.6",
|
|
99
99
|
"react": "^16.8.0 || ^17.0.0",
|
|
100
100
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
101
101
|
},
|
|
@@ -113,6 +113,6 @@
|
|
|
113
113
|
"publishConfig": {
|
|
114
114
|
"access": "public"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "f2ec6752a3e940f99ead3ab721b513e5d1b76e17",
|
|
117
117
|
"sbmodern": "dist/modern/index.js"
|
|
118
118
|
}
|