@mnci/cli 4.40.0 → 4.40.1
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/cli.js +26 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1010,7 +1010,19 @@ function releaseConfig(ci) {
|
|
|
1010
1010
|
//
|
|
1011
1011
|
// A workspace that DOES want the lock file refreshed should commit the
|
|
1012
1012
|
// bump too (`git.commit: true`), at which point this can be dropped.
|
|
1013
|
-
versionActionsOptions: { skipLockFileUpdate: true }
|
|
1013
|
+
versionActionsOptions: { skipLockFileUpdate: true },
|
|
1014
|
+
// OFF, because under this tag-only model it can only ever refuse a release.
|
|
1015
|
+
//
|
|
1016
|
+
// With it on, nx will not release a package whose internal dependency range
|
|
1017
|
+
// cannot absorb the bump, and `git.commit: false` means the manifests on disk
|
|
1018
|
+
// stay at the scaffold version for ever, so the range is always the one that
|
|
1019
|
+
// was written then. Packages start at 0.0.1 and `npm install <pkg> -w <other>`
|
|
1020
|
+
// writes `^0.0.1`, which on a 0.0.x version matches that version alone: the
|
|
1021
|
+
// first bump to 0.0.2 is outside it, and the release dies in the version phase,
|
|
1022
|
+
// before anything is tagged, with lint, typecheck, test and build all green
|
|
1023
|
+
// (the release runs on the default branch only, so nothing else ever tries it).
|
|
1024
|
+
// Measured on a fresh workspace of two interdependent packages (#345).
|
|
1025
|
+
preserveMatchingDependencyRanges: false
|
|
1014
1026
|
},
|
|
1015
1027
|
changelog: githubReleases ? {
|
|
1016
1028
|
workspaceChangelog: false,
|
|
@@ -8164,6 +8176,17 @@ function checkNativeBuildConfig(workspaceRoot) {
|
|
|
8164
8176
|
remedy: "fix the entry in the mnci block of nx.json, then run `mnci upgrade`"
|
|
8165
8177
|
}];
|
|
8166
8178
|
}
|
|
8179
|
+
function checkDependencyRangesNotPreserved(nxJson) {
|
|
8180
|
+
if (nxJson.release === void 0) {
|
|
8181
|
+
return void 0;
|
|
8182
|
+
}
|
|
8183
|
+
return {
|
|
8184
|
+
check: "nx release does not preserve matching dependency ranges",
|
|
8185
|
+
ok: nxJson.release.version?.preserveMatchingDependencyRanges === false,
|
|
8186
|
+
detail: "release.version.preserveMatchingDependencyRanges is not false, so the first release of interdependent packages fails in the version phase, before anything is tagged",
|
|
8187
|
+
remedy: "run `mnci upgrade`, or set release.version.preserveMatchingDependencyRanges to false in nx.json"
|
|
8188
|
+
};
|
|
8189
|
+
}
|
|
8167
8190
|
function collectFindings(workspaceRoot) {
|
|
8168
8191
|
const nxJsonPath = (0, import_node_path32.join)(workspaceRoot, "nx.json");
|
|
8169
8192
|
if (!fileExists(nxJsonPath)) {
|
|
@@ -8190,7 +8213,8 @@ function collectFindings(workspaceRoot) {
|
|
|
8190
8213
|
checkGoWorkInSync(workspaceRoot),
|
|
8191
8214
|
...checkNativeApps(workspaceRoot),
|
|
8192
8215
|
...checkPipelinePhases(workspaceRoot),
|
|
8193
|
-
...checkNativeBuildConfig(workspaceRoot)
|
|
8216
|
+
...checkNativeBuildConfig(workspaceRoot),
|
|
8217
|
+
checkDependencyRangesNotPreserved(nxJson)
|
|
8194
8218
|
].filter((finding) => finding !== void 0);
|
|
8195
8219
|
}
|
|
8196
8220
|
function runDoctor(workspaceRoot, options = {}) {
|