@nx/storybook 22.6.3 → 22.6.5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/storybook",
|
|
3
|
-
"version": "22.6.
|
|
3
|
+
"version": "22.6.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.",
|
|
6
6
|
"repository": {
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"migrations": "./migrations.json"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@nx/devkit": "22.6.
|
|
36
|
+
"@nx/devkit": "22.6.5",
|
|
37
37
|
"@phenomnomnominal/tsquery": "~6.1.4",
|
|
38
38
|
"semver": "^7.6.3",
|
|
39
39
|
"tslib": "^2.3.0",
|
|
40
|
-
"@nx/cypress": "22.6.
|
|
41
|
-
"@nx/js": "22.6.
|
|
42
|
-
"@nx/eslint": "22.6.
|
|
40
|
+
"@nx/cypress": "22.6.5",
|
|
41
|
+
"@nx/js": "22.6.5",
|
|
42
|
+
"@nx/eslint": "22.6.5"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"nx": "22.6.
|
|
45
|
+
"nx": "22.6.5",
|
|
46
46
|
"storybook": "9.0.6"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/storybook/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAGlB,aAAa,EAQd,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/storybook/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAGlB,aAAa,EAQd,MAAM,YAAY,CAAC;AAapB,MAAM,WAAW,sBAAsB;IACrC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAeD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,sBAAsB,CAgC7D,CAAC;AAEF,eAAO,MAAM,aAAa,uCAAc,CAAC"}
|
package/src/plugins/plugin.js
CHANGED
|
@@ -12,7 +12,6 @@ const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
|
12
12
|
const file_hasher_1 = require("nx/src/hasher/file-hasher");
|
|
13
13
|
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
14
14
|
const util_1 = require("@nx/js/src/plugins/typescript/util");
|
|
15
|
-
const pmc = (0, devkit_1.getPackageManagerCommand)();
|
|
16
15
|
function readTargetsCache(cachePath) {
|
|
17
16
|
return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
|
|
18
17
|
}
|
|
@@ -34,8 +33,9 @@ exports.createNodes = [
|
|
|
34
33
|
const optionsHash = (0, file_hasher_1.hashObject)(normalizedOptions);
|
|
35
34
|
const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `storybook-${optionsHash}.hash`);
|
|
36
35
|
const targetsCache = readTargetsCache(cachePath);
|
|
36
|
+
const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
|
|
37
37
|
try {
|
|
38
|
-
return await (0, devkit_1.createNodesFromFiles)((configFile, _, context) => createNodesInternal(configFile, normalizedOptions, context, targetsCache), configFilePaths, normalizedOptions, context);
|
|
38
|
+
return await (0, devkit_1.createNodesFromFiles)((configFile, _, context) => createNodesInternal(configFile, normalizedOptions, context, targetsCache, pmc), configFilePaths, normalizedOptions, context);
|
|
39
39
|
}
|
|
40
40
|
finally {
|
|
41
41
|
writeTargetsToCache(cachePath, targetsCache);
|
|
@@ -43,7 +43,7 @@ exports.createNodes = [
|
|
|
43
43
|
},
|
|
44
44
|
];
|
|
45
45
|
exports.createNodesV2 = exports.createNodes;
|
|
46
|
-
async function createNodesInternal(configFilePath, options, context, targetsCache) {
|
|
46
|
+
async function createNodesInternal(configFilePath, options, context, targetsCache, pmc) {
|
|
47
47
|
let projectRoot = '';
|
|
48
48
|
if (configFilePath.includes('/.storybook')) {
|
|
49
49
|
projectRoot = (0, path_1.dirname)(configFilePath).replace('/.storybook', '');
|
|
@@ -62,7 +62,7 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
|
|
|
62
62
|
}
|
|
63
63
|
const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(projectRoot, options, context, [(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot))]);
|
|
64
64
|
const projectName = buildProjectName(projectRoot, context.workspaceRoot);
|
|
65
|
-
targetsCache[hash] ??= await buildStorybookTargets(configFilePath, projectRoot, options, context, projectName);
|
|
65
|
+
targetsCache[hash] ??= await buildStorybookTargets(configFilePath, projectRoot, options, context, projectName, pmc);
|
|
66
66
|
const result = {
|
|
67
67
|
projects: {
|
|
68
68
|
[projectRoot]: {
|
|
@@ -73,7 +73,7 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
|
|
|
73
73
|
};
|
|
74
74
|
return result;
|
|
75
75
|
}
|
|
76
|
-
async function buildStorybookTargets(configFilePath, projectRoot, options, context, projectName) {
|
|
76
|
+
async function buildStorybookTargets(configFilePath, projectRoot, options, context, projectName, pmc) {
|
|
77
77
|
const buildOutputs = getOutputs();
|
|
78
78
|
const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
|
|
79
79
|
// First attempt to do a very fast lookup for the framework
|