@storm-software/workspace-tools 1.60.23 → 1.62.0
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/CHANGELOG.md +29 -0
- package/README.md +2 -2
- package/index.js +475 -575
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +136 -128
- package/src/executors/npm-publish/executor.js +6 -0
- package/src/executors/tsup/executor.js +158 -157
- package/src/executors/tsup/schema.d.ts +2 -2
- package/src/executors/tsup/schema.json +7 -23
- package/src/executors/tsup-browser/executor.js +158 -155
- package/src/executors/tsup-neutral/executor.js +158 -155
- package/src/executors/tsup-node/executor.js +158 -155
- package/src/executors/typia/executor.js +33 -31
- package/src/generators/browser-library/generator.js +125 -120
- package/src/generators/config-schema/generator.js +29 -28
- package/src/generators/neutral-library/generator.js +125 -120
- package/src/generators/node-library/generator.js +125 -120
- package/src/generators/preset/generator.js +24 -25
- package/src/generators/release-version/generator.js +59 -47
- package/src/utils/index.js +299 -403
|
@@ -171997,7 +171997,7 @@ var init_find_workspace_root = __esm({
|
|
|
171997
171997
|
"packages/config-tools/src/utilities/find-workspace-root.ts"() {
|
|
171998
171998
|
init_find_up();
|
|
171999
171999
|
rootFiles = [
|
|
172000
|
-
"
|
|
172000
|
+
"storm.json",
|
|
172001
172001
|
"storm.config.js",
|
|
172002
172002
|
"storm.config.ts",
|
|
172003
172003
|
".storm.json",
|
|
@@ -172005,6 +172005,7 @@ var init_find_workspace_root = __esm({
|
|
|
172005
172005
|
".storm.yml",
|
|
172006
172006
|
".storm.js",
|
|
172007
172007
|
".storm.ts",
|
|
172008
|
+
"lerna.json",
|
|
172008
172009
|
"nx.json",
|
|
172009
172010
|
"turbo.json",
|
|
172010
172011
|
"npm-workspace.json",
|
|
@@ -381843,25 +381844,23 @@ var init_get_config_file = __esm({
|
|
|
381843
381844
|
} : { config: {}, filepath: jsonPath, isEmpty };
|
|
381844
381845
|
};
|
|
381845
381846
|
getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
381846
|
-
const workspacePath = filePath ? filePath :
|
|
381847
|
-
|
|
381848
|
-
|
|
381849
|
-
|
|
381850
|
-
|
|
381851
|
-
|
|
381852
|
-
|
|
381853
|
-
|
|
381854
|
-
|
|
381855
|
-
|
|
381856
|
-
|
|
381857
|
-
|
|
381858
|
-
|
|
381859
|
-
|
|
381860
|
-
|
|
381861
|
-
|
|
381862
|
-
|
|
381863
|
-
break;
|
|
381864
|
-
}
|
|
381847
|
+
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
381848
|
+
if (!defaultExplorer) {
|
|
381849
|
+
defaultExplorer = await getConfigFileExplorer("storm");
|
|
381850
|
+
}
|
|
381851
|
+
let cosmiconfigResult = null;
|
|
381852
|
+
if (defaultExplorer) {
|
|
381853
|
+
cosmiconfigResult = await defaultExplorer.search(workspacePath);
|
|
381854
|
+
}
|
|
381855
|
+
if ((!cosmiconfigResult || cosmiconfigResult.isEmpty) && additionalFileNames.length > 0) {
|
|
381856
|
+
for (const additionalFileName of additionalFileNames) {
|
|
381857
|
+
cosmiconfigResult = await getJsonConfigFile(additionalFileName, workspacePath);
|
|
381858
|
+
if (cosmiconfigResult && !cosmiconfigResult.isEmpty) {
|
|
381859
|
+
break;
|
|
381860
|
+
}
|
|
381861
|
+
cosmiconfigResult = await getConfigFileByName(additionalFileName, workspacePath);
|
|
381862
|
+
if (cosmiconfigResult && !cosmiconfigResult.isEmpty) {
|
|
381863
|
+
break;
|
|
381865
381864
|
}
|
|
381866
381865
|
}
|
|
381867
381866
|
}
|
|
@@ -385842,7 +385841,7 @@ var init_get_log_level = __esm({
|
|
|
385842
385841
|
return LogLevel.INFO;
|
|
385843
385842
|
}
|
|
385844
385843
|
};
|
|
385845
|
-
getLogLevelLabel = (logLevel) => {
|
|
385844
|
+
getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
385846
385845
|
if (logLevel >= LogLevel.ALL) {
|
|
385847
385846
|
return LogLevelLabel.ALL;
|
|
385848
385847
|
}
|
|
@@ -386168,14 +386167,14 @@ var init_set_env = __esm({
|
|
|
386168
386167
|
if (extension[key2]) {
|
|
386169
386168
|
const result = key2?.replace(
|
|
386170
386169
|
/([A-Z])+/g,
|
|
386171
|
-
(input) => input ? input[0]
|
|
386170
|
+
(input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
|
|
386172
386171
|
).split(/(?=[A-Z])|[\.\-\s_]/).map((x5) => x5.toLowerCase()) ?? [];
|
|
386173
386172
|
let extensionKey;
|
|
386174
386173
|
if (result.length === 0) {
|
|
386175
386174
|
return;
|
|
386176
386175
|
}
|
|
386177
386176
|
if (result.length === 1) {
|
|
386178
|
-
extensionKey = result[0]
|
|
386177
|
+
extensionKey = result[0]?.toUpperCase() ?? "";
|
|
386179
386178
|
} else {
|
|
386180
386179
|
extensionKey = result.reduce((ret, part) => {
|
|
386181
386180
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -386485,7 +386484,7 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
|
|
|
386485
386484
|
if (result.includes("{workspaceRoot}")) {
|
|
386486
386485
|
result = result.replaceAll(
|
|
386487
386486
|
"{workspaceRoot}",
|
|
386488
|
-
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config
|
|
386487
|
+
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
|
|
386489
386488
|
);
|
|
386490
386489
|
}
|
|
386491
386490
|
return result;
|
|
@@ -386546,7 +386545,7 @@ ${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.en
|
|
|
386546
386545
|
writeTrace(
|
|
386547
386546
|
config,
|
|
386548
386547
|
`Generator schema options \u2699\uFE0F
|
|
386549
|
-
${Object.keys(options8).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
|
|
386548
|
+
${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
|
|
386550
386549
|
);
|
|
386551
386550
|
const tokenized = applyWorkspaceTokens(
|
|
386552
386551
|
options8,
|
|
@@ -171997,7 +171997,7 @@ var init_find_workspace_root = __esm({
|
|
|
171997
171997
|
"packages/config-tools/src/utilities/find-workspace-root.ts"() {
|
|
171998
171998
|
init_find_up();
|
|
171999
171999
|
rootFiles = [
|
|
172000
|
-
"
|
|
172000
|
+
"storm.json",
|
|
172001
172001
|
"storm.config.js",
|
|
172002
172002
|
"storm.config.ts",
|
|
172003
172003
|
".storm.json",
|
|
@@ -172005,6 +172005,7 @@ var init_find_workspace_root = __esm({
|
|
|
172005
172005
|
".storm.yml",
|
|
172006
172006
|
".storm.js",
|
|
172007
172007
|
".storm.ts",
|
|
172008
|
+
"lerna.json",
|
|
172008
172009
|
"nx.json",
|
|
172009
172010
|
"turbo.json",
|
|
172010
172011
|
"npm-workspace.json",
|
|
@@ -381843,25 +381844,23 @@ var init_get_config_file = __esm({
|
|
|
381843
381844
|
} : { config: {}, filepath: jsonPath, isEmpty };
|
|
381844
381845
|
};
|
|
381845
381846
|
getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
381846
|
-
const workspacePath = filePath ? filePath :
|
|
381847
|
-
|
|
381848
|
-
|
|
381849
|
-
|
|
381850
|
-
|
|
381851
|
-
|
|
381852
|
-
|
|
381853
|
-
|
|
381854
|
-
|
|
381855
|
-
|
|
381856
|
-
|
|
381857
|
-
|
|
381858
|
-
|
|
381859
|
-
|
|
381860
|
-
|
|
381861
|
-
|
|
381862
|
-
|
|
381863
|
-
break;
|
|
381864
|
-
}
|
|
381847
|
+
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
381848
|
+
if (!defaultExplorer) {
|
|
381849
|
+
defaultExplorer = await getConfigFileExplorer("storm");
|
|
381850
|
+
}
|
|
381851
|
+
let cosmiconfigResult = null;
|
|
381852
|
+
if (defaultExplorer) {
|
|
381853
|
+
cosmiconfigResult = await defaultExplorer.search(workspacePath);
|
|
381854
|
+
}
|
|
381855
|
+
if ((!cosmiconfigResult || cosmiconfigResult.isEmpty) && additionalFileNames.length > 0) {
|
|
381856
|
+
for (const additionalFileName of additionalFileNames) {
|
|
381857
|
+
cosmiconfigResult = await getJsonConfigFile(additionalFileName, workspacePath);
|
|
381858
|
+
if (cosmiconfigResult && !cosmiconfigResult.isEmpty) {
|
|
381859
|
+
break;
|
|
381860
|
+
}
|
|
381861
|
+
cosmiconfigResult = await getConfigFileByName(additionalFileName, workspacePath);
|
|
381862
|
+
if (cosmiconfigResult && !cosmiconfigResult.isEmpty) {
|
|
381863
|
+
break;
|
|
381865
381864
|
}
|
|
381866
381865
|
}
|
|
381867
381866
|
}
|
|
@@ -385842,7 +385841,7 @@ var init_get_log_level = __esm({
|
|
|
385842
385841
|
return LogLevel.INFO;
|
|
385843
385842
|
}
|
|
385844
385843
|
};
|
|
385845
|
-
getLogLevelLabel = (logLevel) => {
|
|
385844
|
+
getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
385846
385845
|
if (logLevel >= LogLevel.ALL) {
|
|
385847
385846
|
return LogLevelLabel.ALL;
|
|
385848
385847
|
}
|
|
@@ -386168,14 +386167,14 @@ var init_set_env = __esm({
|
|
|
386168
386167
|
if (extension[key2]) {
|
|
386169
386168
|
const result = key2?.replace(
|
|
386170
386169
|
/([A-Z])+/g,
|
|
386171
|
-
(input) => input ? input[0]
|
|
386170
|
+
(input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
|
|
386172
386171
|
).split(/(?=[A-Z])|[\.\-\s_]/).map((x5) => x5.toLowerCase()) ?? [];
|
|
386173
386172
|
let extensionKey;
|
|
386174
386173
|
if (result.length === 0) {
|
|
386175
386174
|
return;
|
|
386176
386175
|
}
|
|
386177
386176
|
if (result.length === 1) {
|
|
386178
|
-
extensionKey = result[0]
|
|
386177
|
+
extensionKey = result[0]?.toUpperCase() ?? "";
|
|
386179
386178
|
} else {
|
|
386180
386179
|
extensionKey = result.reduce((ret, part) => {
|
|
386181
386180
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -386452,9 +386451,9 @@ var init_src2 = __esm({
|
|
|
386452
386451
|
}
|
|
386453
386452
|
});
|
|
386454
386453
|
|
|
386455
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.
|
|
386454
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.4.2_@swc+wasm@1.4.2_@types+node@20.11.20_n_rxzlxl4elx7wiiidhdla5wvhle/node_modules/@nx/js/src/generators/release-version/utils/update-lock-file.js
|
|
386456
386455
|
var require_update_lock_file = __commonJS({
|
|
386457
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.
|
|
386456
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.4.2_@swc+wasm@1.4.2_@types+node@20.11.20_n_rxzlxl4elx7wiiidhdla5wvhle/node_modules/@nx/js/src/generators/release-version/utils/update-lock-file.js"(exports2) {
|
|
386458
386457
|
"use strict";
|
|
386459
386458
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
386460
386459
|
exports2.updateLockFile = void 0;
|
|
@@ -386546,9 +386545,9 @@ var require_update_lock_file = __commonJS({
|
|
|
386546
386545
|
}
|
|
386547
386546
|
});
|
|
386548
386547
|
|
|
386549
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.
|
|
386548
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.4.2_@swc+wasm@1.4.2_@types+node@20.11.20_n_rxzlxl4elx7wiiidhdla5wvhle/node_modules/@nx/js/src/generators/release-version/utils/package.js
|
|
386550
386549
|
var require_package4 = __commonJS({
|
|
386551
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.
|
|
386550
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.4.2_@swc+wasm@1.4.2_@types+node@20.11.20_n_rxzlxl4elx7wiiidhdla5wvhle/node_modules/@nx/js/src/generators/release-version/utils/package.js"(exports2) {
|
|
386552
386551
|
"use strict";
|
|
386553
386552
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
386554
386553
|
exports2.Package = void 0;
|
|
@@ -388817,9 +388816,9 @@ var require_npa = __commonJS({
|
|
|
388817
388816
|
}
|
|
388818
388817
|
});
|
|
388819
388818
|
|
|
388820
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.
|
|
388819
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.4.2_@swc+wasm@1.4.2_@types+node@20.11.20_n_rxzlxl4elx7wiiidhdla5wvhle/node_modules/@nx/js/src/generators/release-version/utils/resolve-version-spec.js
|
|
388821
388820
|
var require_resolve_version_spec = __commonJS({
|
|
388822
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.
|
|
388821
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.4.2_@swc+wasm@1.4.2_@types+node@20.11.20_n_rxzlxl4elx7wiiidhdla5wvhle/node_modules/@nx/js/src/generators/release-version/utils/resolve-version-spec.js"(exports2) {
|
|
388823
388822
|
"use strict";
|
|
388824
388823
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
388825
388824
|
exports2.resolveVersionSpec = void 0;
|
|
@@ -388845,9 +388844,9 @@ var require_resolve_version_spec = __commonJS({
|
|
|
388845
388844
|
}
|
|
388846
388845
|
});
|
|
388847
388846
|
|
|
388848
|
-
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.
|
|
388847
|
+
// node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.4.2_@swc+wasm@1.4.2_@types+node@20.11.20_n_rxzlxl4elx7wiiidhdla5wvhle/node_modules/@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies.js
|
|
388849
388848
|
var require_resolve_local_package_dependencies = __commonJS({
|
|
388850
|
-
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.
|
|
388849
|
+
"node_modules/.pnpm/@nx+js@18.0.4_@swc-node+register@1.8.0_@swc+core@1.4.2_@swc+wasm@1.4.2_@types+node@20.11.20_n_rxzlxl4elx7wiiidhdla5wvhle/node_modules/@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies.js"(exports2) {
|
|
388851
388850
|
"use strict";
|
|
388852
388851
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
388853
388852
|
exports2.resolveLocalPackageDependencies = void 0;
|
|
@@ -388953,7 +388952,7 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
|
|
|
388953
388952
|
if (result.includes("{workspaceRoot}")) {
|
|
388954
388953
|
result = result.replaceAll(
|
|
388955
388954
|
"{workspaceRoot}",
|
|
388956
|
-
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config
|
|
388955
|
+
tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
|
|
388957
388956
|
);
|
|
388958
388957
|
}
|
|
388959
388958
|
return result;
|
|
@@ -389014,7 +389013,7 @@ ${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.en
|
|
|
389014
389013
|
writeTrace(
|
|
389015
389014
|
config,
|
|
389016
389015
|
`Generator schema options \u2699\uFE0F
|
|
389017
|
-
${Object.keys(options8).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
|
|
389016
|
+
${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
|
|
389018
389017
|
);
|
|
389019
389018
|
const tokenized = applyWorkspaceTokens(
|
|
389020
389019
|
options8,
|
|
@@ -389091,8 +389090,8 @@ Valid values are: ${import_version.validReleaseVersionPrefixes.map((s) => `"${s}
|
|
|
389091
389090
|
}
|
|
389092
389091
|
const projects = options8.projects;
|
|
389093
389092
|
const createResolvePackageRoot = (customPackageRoot) => (projectNode) => {
|
|
389094
|
-
if (projectNode?.data?.root === config
|
|
389095
|
-
return config
|
|
389093
|
+
if (projectNode?.data?.root === config?.workspaceRoot || projectNode?.data?.root === ".") {
|
|
389094
|
+
return config?.workspaceRoot ?? findWorkspaceRoot();
|
|
389096
389095
|
}
|
|
389097
389096
|
if (!customPackageRoot) {
|
|
389098
389097
|
return projectNode.data.root;
|
|
@@ -389108,15 +389107,18 @@ Valid values are: ${import_version.validReleaseVersionPrefixes.map((s) => `"${s}
|
|
|
389108
389107
|
for (const project of projects) {
|
|
389109
389108
|
projectNameToPackageRootMap.set(project.name, resolvePackageRoot(project));
|
|
389110
389109
|
}
|
|
389111
|
-
let currentVersion;
|
|
389110
|
+
let currentVersion = null;
|
|
389112
389111
|
let currentVersionResolvedFromFallback = false;
|
|
389113
|
-
let latestMatchingGitTag;
|
|
389112
|
+
let latestMatchingGitTag = null;
|
|
389114
389113
|
let specifier = options8.specifier ? options8.specifier : void 0;
|
|
389115
389114
|
for (const project of projects) {
|
|
389116
389115
|
const projectName = project.name;
|
|
389117
389116
|
const packageRoot = projectNameToPackageRootMap.get(projectName);
|
|
389118
|
-
const packageJsonPath = (0, import_devkit.joinPathFragments)(packageRoot, "package.json");
|
|
389119
|
-
const workspaceRelativePackageJsonPath = (0, import_node_path4.relative)(
|
|
389117
|
+
const packageJsonPath = (0, import_devkit.joinPathFragments)(packageRoot ?? "./", "package.json");
|
|
389118
|
+
const workspaceRelativePackageJsonPath = (0, import_node_path4.relative)(
|
|
389119
|
+
config?.workspaceRoot ?? findWorkspaceRoot(),
|
|
389120
|
+
packageJsonPath
|
|
389121
|
+
);
|
|
389120
389122
|
const log = (msg) => {
|
|
389121
389123
|
writeInfo(config, `${projectName}: ${msg}`);
|
|
389122
389124
|
};
|
|
@@ -389138,7 +389140,7 @@ To fix this you will either need to add a package.json file at that location, or
|
|
|
389138
389140
|
const metadata = options8.currentVersionResolverMetadata;
|
|
389139
389141
|
const registry = metadata?.registry ?? await getNpmRegistry() ?? "https://registry.npmjs.org";
|
|
389140
389142
|
const tag = metadata?.tag ?? "latest";
|
|
389141
|
-
if (
|
|
389143
|
+
if (options8.releaseGroup.projectsRelationship === "independent") {
|
|
389142
389144
|
try {
|
|
389143
389145
|
currentVersion = await new Promise((resolve3, reject) => {
|
|
389144
389146
|
(0, import_node_child_process2.exec)(
|
|
@@ -389188,8 +389190,10 @@ To fix this you will either need to add a package.json file at that location, or
|
|
|
389188
389190
|
log(`\u{1F4C4} Resolved the current version as ${currentVersion} from ${packageJsonPath}`);
|
|
389189
389191
|
break;
|
|
389190
389192
|
case "git-tag": {
|
|
389191
|
-
if (
|
|
389192
|
-
|
|
389193
|
+
if (
|
|
389194
|
+
// We always need to independently resolve the current version from git tag per project if the projects are independent
|
|
389195
|
+
options8.releaseGroup.projectsRelationship === "independent"
|
|
389196
|
+
) {
|
|
389193
389197
|
const releaseTagPattern = options8.releaseGroup.releaseTagPattern;
|
|
389194
389198
|
latestMatchingGitTag = await (0, import_git.getLatestGitTagForPattern)(releaseTagPattern, {
|
|
389195
389199
|
projectName: project.name
|
|
@@ -389255,7 +389259,7 @@ To fix this you will either need to add a package.json file at that location, or
|
|
|
389255
389259
|
previousVersionRef,
|
|
389256
389260
|
options8.projectGraph,
|
|
389257
389261
|
affectedProjects
|
|
389258
|
-
);
|
|
389262
|
+
) ?? void 0;
|
|
389259
389263
|
if (!specifier) {
|
|
389260
389264
|
log(
|
|
389261
389265
|
"\u{1F6AB} No changes were detected using git history and the conventional commits standard."
|
|
@@ -389310,7 +389314,7 @@ To fix this you will either need to add a package.json file at that location, or
|
|
|
389310
389314
|
tree,
|
|
389311
389315
|
options8.projectGraph,
|
|
389312
389316
|
projects.filter(
|
|
389313
|
-
(project2) => project2?.data?.root && project2?.data?.root !== config
|
|
389317
|
+
(project2) => project2?.data?.root && project2?.data?.root !== config?.workspaceRoot
|
|
389314
389318
|
),
|
|
389315
389319
|
projectNameToPackageRootMap,
|
|
389316
389320
|
resolvePackageRoot,
|
|
@@ -389321,7 +389325,7 @@ To fix this you will either need to add a package.json file at that location, or
|
|
|
389321
389325
|
return localPackageDependency.target === project.name;
|
|
389322
389326
|
});
|
|
389323
389327
|
versionData[projectName] = {
|
|
389324
|
-
currentVersion,
|
|
389328
|
+
currentVersion: currentVersion ? currentVersion : "0.0.1",
|
|
389325
389329
|
dependentProjects,
|
|
389326
389330
|
newVersion: null
|
|
389327
389331
|
// will stay as null in the final result in the case that no changes are detected
|
|
@@ -389330,8 +389334,13 @@ To fix this you will either need to add a package.json file at that location, or
|
|
|
389330
389334
|
log(`\u{1F6AB} Skipping versioning "${projectPackageJson.name}" as no changes were detected.`);
|
|
389331
389335
|
continue;
|
|
389332
389336
|
}
|
|
389337
|
+
if (!currentVersion) {
|
|
389338
|
+
throw new Error(`Unable to determine the current version for project "${projectName}"`);
|
|
389339
|
+
}
|
|
389333
389340
|
const newVersion = (0, import_version.deriveNewSemverVersion)(currentVersion, specifier, options8.preid);
|
|
389334
|
-
versionData[projectName]
|
|
389341
|
+
if (versionData[projectName]) {
|
|
389342
|
+
versionData[projectName].newVersion = newVersion;
|
|
389343
|
+
}
|
|
389335
389344
|
(0, import_devkit.writeJson)(tree, packageJsonPath, {
|
|
389336
389345
|
...projectPackageJson,
|
|
389337
389346
|
version: newVersion
|
|
@@ -389345,7 +389354,10 @@ To fix this you will either need to add a package.json file at that location, or
|
|
|
389345
389354
|
for (const dependentProject of dependentProjects) {
|
|
389346
389355
|
(0, import_devkit.updateJson)(
|
|
389347
389356
|
tree,
|
|
389348
|
-
(0, import_devkit.joinPathFragments)(
|
|
389357
|
+
(0, import_devkit.joinPathFragments)(
|
|
389358
|
+
projectNameToPackageRootMap.get(dependentProject.source) ?? "./",
|
|
389359
|
+
"package.json"
|
|
389360
|
+
),
|
|
389349
389361
|
(json2) => {
|
|
389350
389362
|
let versionPrefix = options8.versionPrefix ?? "auto";
|
|
389351
389363
|
if (versionPrefix === "auto") {
|