@storybook/core-common 6.4.9 → 6.4.14
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/utils/envs.js +6 -2
- package/dist/cjs/utils/paths.js +2 -2
- package/dist/cjs/utils/to-require-context.js +1 -1
- package/dist/esm/utils/envs.js +6 -2
- package/dist/esm/utils/paths.js +2 -2
- package/dist/esm/utils/to-require-context.js +1 -1
- package/dist/modern/utils/envs.js +6 -2
- package/dist/modern/utils/paths.js +2 -2
- package/dist/modern/utils/to-require-context.js +1 -1
- package/dist/ts3.4/utils/paths.d.ts +1 -1
- package/dist/ts3.9/utils/paths.d.ts +1 -1
- package/package.json +3 -3
package/dist/cjs/utils/envs.js
CHANGED
|
@@ -71,10 +71,14 @@ var stringifyProcessEnvs = function (raw) {
|
|
|
71
71
|
}, {
|
|
72
72
|
// Default fallback
|
|
73
73
|
'process.env.XSTORYBOOK_EXAMPLE_APP': '""'
|
|
74
|
-
}); // support destructuring like
|
|
74
|
+
}); // FIXME: something like this is necessary to support destructuring like:
|
|
75
|
+
//
|
|
75
76
|
// const { foo } = process.env;
|
|
77
|
+
//
|
|
78
|
+
// However, it also means that process.env.foo = 'bar' will fail, so removing this:
|
|
79
|
+
//
|
|
80
|
+
// envs['process.env'] = JSON.stringify(raw);
|
|
76
81
|
|
|
77
|
-
envs['process.env'] = JSON.stringify(raw);
|
|
78
82
|
return envs;
|
|
79
83
|
};
|
|
80
84
|
|
package/dist/cjs/utils/paths.js
CHANGED
|
@@ -50,9 +50,9 @@ var nodePathsToArray = function (nodePath) {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
exports.nodePathsToArray = nodePathsToArray;
|
|
53
|
-
var relativePattern = /^\.{1,2}[/\\]/;
|
|
53
|
+
var relativePattern = /^\.{1,2}([/\\]|$)/;
|
|
54
54
|
/**
|
|
55
|
-
* Ensures that a path starts with `./` or
|
|
55
|
+
* Ensures that a path starts with `./` or `../`, or is entirely `.` or `..`
|
|
56
56
|
*/
|
|
57
57
|
|
|
58
58
|
function normalizeStoryPath(filename) {
|
|
@@ -15,7 +15,7 @@ var toRequireContext = function (specifier) {
|
|
|
15
15
|
var match = (0, _globToRegexp.globToRegexp)(`./${files}`);
|
|
16
16
|
return {
|
|
17
17
|
path: directory,
|
|
18
|
-
recursive:
|
|
18
|
+
recursive: files.includes('**') || files.split('/').length > 1,
|
|
19
19
|
match: match
|
|
20
20
|
};
|
|
21
21
|
};
|
package/dist/esm/utils/envs.js
CHANGED
|
@@ -57,9 +57,13 @@ export var stringifyProcessEnvs = function (raw) {
|
|
|
57
57
|
}, {
|
|
58
58
|
// Default fallback
|
|
59
59
|
'process.env.XSTORYBOOK_EXAMPLE_APP': '""'
|
|
60
|
-
}); // support destructuring like
|
|
60
|
+
}); // FIXME: something like this is necessary to support destructuring like:
|
|
61
|
+
//
|
|
61
62
|
// const { foo } = process.env;
|
|
63
|
+
//
|
|
64
|
+
// However, it also means that process.env.foo = 'bar' will fail, so removing this:
|
|
65
|
+
//
|
|
66
|
+
// envs['process.env'] = JSON.stringify(raw);
|
|
62
67
|
|
|
63
|
-
envs['process.env'] = JSON.stringify(raw);
|
|
64
68
|
return envs;
|
|
65
69
|
};
|
package/dist/esm/utils/paths.js
CHANGED
|
@@ -30,9 +30,9 @@ export var nodePathsToArray = function (nodePath) {
|
|
|
30
30
|
return path.resolve('./', p);
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
-
var relativePattern = /^\.{1,2}[/\\]/;
|
|
33
|
+
var relativePattern = /^\.{1,2}([/\\]|$)/;
|
|
34
34
|
/**
|
|
35
|
-
* Ensures that a path starts with `./` or
|
|
35
|
+
* Ensures that a path starts with `./` or `../`, or is entirely `.` or `..`
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
export function normalizeStoryPath(filename) {
|
|
@@ -57,9 +57,13 @@ export var stringifyProcessEnvs = function (raw) {
|
|
|
57
57
|
}, {
|
|
58
58
|
// Default fallback
|
|
59
59
|
'process.env.XSTORYBOOK_EXAMPLE_APP': '""'
|
|
60
|
-
}); // support destructuring like
|
|
60
|
+
}); // FIXME: something like this is necessary to support destructuring like:
|
|
61
|
+
//
|
|
61
62
|
// const { foo } = process.env;
|
|
63
|
+
//
|
|
64
|
+
// However, it also means that process.env.foo = 'bar' will fail, so removing this:
|
|
65
|
+
//
|
|
66
|
+
// envs['process.env'] = JSON.stringify(raw);
|
|
62
67
|
|
|
63
|
-
envs['process.env'] = JSON.stringify(raw);
|
|
64
68
|
return envs;
|
|
65
69
|
};
|
|
@@ -30,9 +30,9 @@ export var nodePathsToArray = function (nodePath) {
|
|
|
30
30
|
return path.resolve('./', p);
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
-
var relativePattern = /^\.{1,2}[/\\]/;
|
|
33
|
+
var relativePattern = /^\.{1,2}([/\\]|$)/;
|
|
34
34
|
/**
|
|
35
|
-
* Ensures that a path starts with `./` or
|
|
35
|
+
* Ensures that a path starts with `./` or `../`, or is entirely `.` or `..`
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
export function normalizeStoryPath(filename) {
|
|
@@ -2,6 +2,6 @@ export declare const getProjectRoot: () => string;
|
|
|
2
2
|
export declare const nodeModulesPaths: string;
|
|
3
3
|
export declare const nodePathsToArray: (nodePath: string) => string[];
|
|
4
4
|
/**
|
|
5
|
-
* Ensures that a path starts with `./` or
|
|
5
|
+
* Ensures that a path starts with `./` or `../`, or is entirely `.` or `..`
|
|
6
6
|
*/
|
|
7
7
|
export declare function normalizeStoryPath(filename: string): string;
|
|
@@ -2,6 +2,6 @@ export declare const getProjectRoot: () => string;
|
|
|
2
2
|
export declare const nodeModulesPaths: string;
|
|
3
3
|
export declare const nodePathsToArray: (nodePath: string) => string[];
|
|
4
4
|
/**
|
|
5
|
-
* Ensures that a path starts with `./` or
|
|
5
|
+
* Ensures that a path starts with `./` or `../`, or is entirely `.` or `..`
|
|
6
6
|
*/
|
|
7
7
|
export declare function normalizeStoryPath(filename: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/core-common",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.14",
|
|
4
4
|
"description": "Storybook framework-agnostic API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@babel/preset-react": "^7.12.10",
|
|
62
62
|
"@babel/preset-typescript": "^7.12.7",
|
|
63
63
|
"@babel/register": "^7.12.1",
|
|
64
|
-
"@storybook/node-logger": "6.4.
|
|
64
|
+
"@storybook/node-logger": "6.4.14",
|
|
65
65
|
"@storybook/semver": "^7.3.2",
|
|
66
66
|
"@types/node": "^14.0.10",
|
|
67
67
|
"@types/pretty-hrtime": "^1.0.0",
|
|
@@ -110,6 +110,6 @@
|
|
|
110
110
|
"publishConfig": {
|
|
111
111
|
"access": "public"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "cf71c9f2b86e71f39c0d452174d84f34f86879b0",
|
|
114
114
|
"sbmodern": "dist/modern/index.js"
|
|
115
115
|
}
|