nx 22.0.0-beta.1 → 22.0.0-beta.3
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/migrations.json +5 -0
- package/package.json +12 -12
- package/project.json +2 -1
- package/schemas/nx-schema.json +339 -246
- package/schemas/project-schema.json +72 -12
- package/src/adapter/angular-json.d.ts.map +1 -1
- package/src/adapter/angular-json.js +13 -17
- package/src/ai/utils.d.ts +6 -5
- package/src/ai/utils.d.ts.map +1 -1
- package/src/ai/utils.js +14 -13
- package/src/command-line/affected/affected.d.ts.map +1 -1
- package/src/command-line/affected/affected.js +1 -2
- package/src/command-line/configure-ai-agents/configure-ai-agents.d.ts.map +1 -1
- package/src/command-line/configure-ai-agents/configure-ai-agents.js +79 -74
- package/src/command-line/format/format.js +1 -1
- package/src/command-line/init/init-v2.js +1 -1
- package/src/command-line/release/changelog.d.ts.map +1 -1
- package/src/command-line/release/changelog.js +1 -3
- package/src/command-line/release/command-object.d.ts +0 -6
- package/src/command-line/release/command-object.d.ts.map +1 -1
- package/src/command-line/release/config/config.d.ts +1 -1
- package/src/command-line/release/config/config.d.ts.map +1 -1
- package/src/command-line/release/config/config.js +41 -133
- package/src/command-line/release/plan-check.d.ts.map +1 -1
- package/src/command-line/release/plan-check.js +1 -3
- package/src/command-line/release/plan.d.ts.map +1 -1
- package/src/command-line/release/plan.js +1 -3
- package/src/command-line/release/publish.d.ts.map +1 -1
- package/src/command-line/release/publish.js +1 -3
- package/src/command-line/release/release.d.ts.map +1 -1
- package/src/command-line/release/release.js +1 -3
- package/src/command-line/release/utils/get-touched-projects-for-group.js +1 -1
- package/src/command-line/release/utils/git.d.ts.map +1 -1
- package/src/command-line/release/utils/git.js +3 -1
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts +2 -1
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts.map +1 -1
- package/src/command-line/release/utils/semver.d.ts +15 -9
- package/src/command-line/release/utils/semver.d.ts.map +1 -1
- package/src/command-line/release/utils/semver.js +30 -24
- package/src/command-line/release/utils/shared.d.ts +4 -1
- package/src/command-line/release/utils/shared.d.ts.map +1 -1
- package/src/command-line/release/utils/shared.js +33 -11
- package/src/command-line/release/utils/test/test-utils.d.ts +20 -0
- package/src/command-line/release/utils/test/test-utils.d.ts.map +1 -0
- package/src/command-line/release/utils/test/test-utils.js +24 -0
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts.map +1 -1
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.js +10 -1
- package/src/command-line/release/version/release-group-processor.d.ts.map +1 -1
- package/src/command-line/release/version/release-group-processor.js +1 -2
- package/src/command-line/release/version/test-utils.d.ts.map +1 -1
- package/src/command-line/release/version/test-utils.js +0 -4
- package/src/command-line/release/version.d.ts.map +1 -1
- package/src/command-line/release/version.js +1 -8
- package/src/command-line/show/projects.js +1 -2
- package/src/config/nx-json.d.ts +2 -31
- package/src/config/nx-json.d.ts.map +1 -1
- package/src/config/workspace-json-project-json.d.ts +2 -2
- package/src/config/workspace-json-project-json.d.ts.map +1 -1
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/styles.js +1 -1
- package/src/devkit-exports.d.ts +1 -1
- package/src/devkit-exports.d.ts.map +1 -1
- package/src/migrations/update-21-0-0/release-changelog-config-changes.d.ts.map +1 -1
- package/src/migrations/update-21-0-0/release-version-config-changes.d.ts.map +1 -1
- package/src/migrations/update-21-0-0/release-version-config-changes.js +5 -15
- package/src/migrations/update-22-0-0/release-version-config-changes.d.ts +3 -0
- package/src/migrations/update-22-0-0/release-version-config-changes.d.ts.map +1 -0
- package/src/migrations/update-22-0-0/release-version-config-changes.js +101 -0
- package/src/native/index.d.ts +2 -2
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/plugins/js/index.d.ts +1 -2
- package/src/plugins/js/index.d.ts.map +1 -1
- package/src/plugins/js/index.js +28 -32
- package/src/plugins/js/lock-file/lock-file.d.ts +2 -2
- package/src/plugins/js/lock-file/lock-file.d.ts.map +1 -1
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +1 -1
- package/src/project-graph/file-utils.d.ts +5 -2
- package/src/project-graph/file-utils.d.ts.map +1 -1
- package/src/project-graph/file-utils.js +1 -5
- package/src/project-graph/plugins/loaded-nx-plugin.d.ts.map +1 -1
- package/src/project-graph/plugins/loaded-nx-plugin.js +8 -6
- package/src/project-graph/plugins/public-api.d.ts +1 -36
- package/src/project-graph/plugins/public-api.d.ts.map +1 -1
- package/src/project-graph/plugins/utils.d.ts +4 -2
- package/src/project-graph/plugins/utils.d.ts.map +1 -1
- package/src/utils/nx-console-prompt.d.ts.map +1 -1
- package/src/utils/nx-console-prompt.js +4 -1
- package/src/command-line/release/config/use-legacy-versioning.d.ts +0 -3
- package/src/command-line/release/config/use-legacy-versioning.d.ts.map +0 -1
- package/src/command-line/release/config/use-legacy-versioning.js +0 -9
- package/src/command-line/release/utils/batch-projects-by-generator-config.d.ts +0 -8
- package/src/command-line/release/utils/batch-projects-by-generator-config.d.ts.map +0 -1
- package/src/command-line/release/utils/batch-projects-by-generator-config.js +0 -39
- package/src/command-line/release/version-legacy.d.ts +0 -47
- package/src/command-line/release/version-legacy.d.ts.map +0 -1
- package/src/command-line/release/version-legacy.js +0 -453
|
@@ -28,7 +28,6 @@ const gitlab_1 = require("../utils/remote-release-clients/gitlab");
|
|
|
28
28
|
const resolve_changelog_renderer_1 = require("../utils/resolve-changelog-renderer");
|
|
29
29
|
const resolve_nx_json_error_message_1 = require("../utils/resolve-nx-json-error-message");
|
|
30
30
|
const conventional_commits_1 = require("./conventional-commits");
|
|
31
|
-
const use_legacy_versioning_1 = require("./use-legacy-versioning");
|
|
32
31
|
exports.IMPLICIT_DEFAULT_RELEASE_GROUP = '__default__';
|
|
33
32
|
exports.DEFAULT_VERSION_ACTIONS_PATH = '@nx/js/src/release/version-actions';
|
|
34
33
|
// Apply default configuration to any optional user configuration and handle known errors
|
|
@@ -60,7 +59,6 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
60
59
|
nxReleaseConfig: null,
|
|
61
60
|
};
|
|
62
61
|
}
|
|
63
|
-
const USE_LEGACY_VERSIONING = (0, use_legacy_versioning_1.shouldUseLegacyVersioning)(userConfig);
|
|
64
62
|
const gitDefaults = {
|
|
65
63
|
commit: false,
|
|
66
64
|
commitMessage: 'chore(release): publish {version}',
|
|
@@ -113,16 +111,10 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
113
111
|
: false,
|
|
114
112
|
};
|
|
115
113
|
const defaultFixedReleaseTagPattern = 'v{version}';
|
|
116
|
-
/**
|
|
117
|
-
* TODO(v22): in v22, make it so that this pattern is used by default when any custom groups are used
|
|
118
|
-
*/
|
|
119
114
|
const defaultFixedGroupReleaseTagPattern = '{releaseGroupName}-v{version}';
|
|
120
115
|
const defaultIndependentReleaseTagPattern = '{projectName}@{version}';
|
|
121
116
|
const defaultReleaseTagPatternRequireSemver = true;
|
|
122
|
-
|
|
123
|
-
* TODO(v22): in v22, set this to true by default
|
|
124
|
-
*/
|
|
125
|
-
const defaultReleaseTagPatternStrictPreid = false;
|
|
117
|
+
const defaultReleaseTagPatternStrictPreid = true;
|
|
126
118
|
const workspaceProjectsRelationship = userConfig.projectsRelationship || 'fixed';
|
|
127
119
|
const defaultGeneratorOptions = {};
|
|
128
120
|
if (userConfig.version?.conventionalCommits) {
|
|
@@ -191,30 +183,17 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
191
183
|
: undefined,
|
|
192
184
|
git: gitDefaults,
|
|
193
185
|
version: {
|
|
194
|
-
useLegacyVersioning: USE_LEGACY_VERSIONING,
|
|
195
186
|
git: versionGitDefaults,
|
|
196
187
|
conventionalCommits: userConfig.version?.conventionalCommits || false,
|
|
197
188
|
preVersionCommand: userConfig.version?.preVersionCommand || '',
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
currentVersionResolver: defaultGeneratorOptions.currentVersionResolver,
|
|
207
|
-
specifierSource: defaultGeneratorOptions.specifierSource,
|
|
208
|
-
preserveLocalDependencyProtocols: userConfig.version
|
|
209
|
-
?.preserveLocalDependencyProtocols ?? true,
|
|
210
|
-
// TODO(v22): flip default to true
|
|
211
|
-
preserveMatchingDependencyRanges: userConfig.version
|
|
212
|
-
?.preserveMatchingDependencyRanges ?? false,
|
|
213
|
-
logUnchangedProjects: userConfig.version
|
|
214
|
-
?.logUnchangedProjects ?? true,
|
|
215
|
-
updateDependents: userConfig.version
|
|
216
|
-
?.updateDependents ?? 'auto',
|
|
217
|
-
}),
|
|
189
|
+
versionActions: exports.DEFAULT_VERSION_ACTIONS_PATH,
|
|
190
|
+
versionActionsOptions: {},
|
|
191
|
+
currentVersionResolver: defaultGeneratorOptions.currentVersionResolver,
|
|
192
|
+
specifierSource: defaultGeneratorOptions.specifierSource,
|
|
193
|
+
preserveLocalDependencyProtocols: userConfig.version?.preserveLocalDependencyProtocols ?? true,
|
|
194
|
+
preserveMatchingDependencyRanges: userConfig.version?.preserveMatchingDependencyRanges ?? true,
|
|
195
|
+
logUnchangedProjects: userConfig.version?.logUnchangedProjects ?? true,
|
|
196
|
+
updateDependents: userConfig.version?.updateDependents ?? 'auto',
|
|
218
197
|
},
|
|
219
198
|
changelog: {
|
|
220
199
|
git: changelogGitDefaults,
|
|
@@ -278,19 +257,12 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
278
257
|
groupPreVersionCommand: '',
|
|
279
258
|
}
|
|
280
259
|
: undefined,
|
|
281
|
-
version:
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
: {
|
|
289
|
-
conventionalCommits: false,
|
|
290
|
-
versionActions: exports.DEFAULT_VERSION_ACTIONS_PATH,
|
|
291
|
-
versionActionsOptions: {},
|
|
292
|
-
groupPreVersionCommand: '',
|
|
293
|
-
},
|
|
260
|
+
version: {
|
|
261
|
+
conventionalCommits: false,
|
|
262
|
+
versionActions: exports.DEFAULT_VERSION_ACTIONS_PATH,
|
|
263
|
+
versionActionsOptions: {},
|
|
264
|
+
groupPreVersionCommand: '',
|
|
265
|
+
},
|
|
294
266
|
changelog: {
|
|
295
267
|
createRelease: false,
|
|
296
268
|
entryWhenNoChanges: 'This was a version bump only for {projectName} to align it with other projects, there were no code changes.',
|
|
@@ -361,43 +333,19 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
361
333
|
delete rootVersionWithoutGlobalOptions.preVersionCommand;
|
|
362
334
|
// Apply conventionalCommits shorthand to the final group defaults if explicitly configured in the original user config
|
|
363
335
|
if (userConfig.version?.conventionalCommits === true) {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
...rootVersionWithoutGlobalOptions.generatorOptions,
|
|
367
|
-
currentVersionResolver: 'git-tag',
|
|
368
|
-
specifierSource: 'conventional-commits',
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
else {
|
|
372
|
-
rootVersionWithoutGlobalOptions.currentVersionResolver = 'git-tag';
|
|
373
|
-
rootVersionWithoutGlobalOptions.specifierSource = 'conventional-commits';
|
|
374
|
-
}
|
|
336
|
+
rootVersionWithoutGlobalOptions.currentVersionResolver = 'git-tag';
|
|
337
|
+
rootVersionWithoutGlobalOptions.specifierSource = 'conventional-commits';
|
|
375
338
|
}
|
|
376
339
|
if (userConfig.version?.conventionalCommits === false) {
|
|
377
|
-
delete rootVersionWithoutGlobalOptions.
|
|
378
|
-
|
|
379
|
-
delete rootVersionWithoutGlobalOptions.generatorOptions?.specifierSource;
|
|
380
|
-
delete rootVersionWithoutGlobalOptions
|
|
381
|
-
.currentVersionResolver;
|
|
382
|
-
delete rootVersionWithoutGlobalOptions
|
|
383
|
-
.specifierSource;
|
|
340
|
+
delete rootVersionWithoutGlobalOptions.currentVersionResolver;
|
|
341
|
+
delete rootVersionWithoutGlobalOptions.specifierSource;
|
|
384
342
|
}
|
|
385
343
|
// Apply versionPlans shorthand to the final group defaults if explicitly configured in the original user config
|
|
386
344
|
if (userConfig.versionPlans) {
|
|
387
|
-
|
|
388
|
-
rootVersionWithoutGlobalOptions.generatorOptions = {
|
|
389
|
-
...rootVersionWithoutGlobalOptions.generatorOptions,
|
|
390
|
-
specifierSource: 'version-plans',
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
else {
|
|
394
|
-
rootVersionWithoutGlobalOptions.specifierSource = 'version-plans';
|
|
395
|
-
}
|
|
345
|
+
rootVersionWithoutGlobalOptions.specifierSource = 'version-plans';
|
|
396
346
|
}
|
|
397
347
|
if (userConfig.versionPlans === false) {
|
|
398
|
-
delete rootVersionWithoutGlobalOptions.
|
|
399
|
-
delete rootVersionWithoutGlobalOptions
|
|
400
|
-
.specifierSource;
|
|
348
|
+
delete rootVersionWithoutGlobalOptions.specifierSource;
|
|
401
349
|
}
|
|
402
350
|
const rootDockerWithoutGlobalOptions = { ...rootDockerConfig };
|
|
403
351
|
delete rootDockerWithoutGlobalOptions.preVersionCommand;
|
|
@@ -463,6 +411,14 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
463
411
|
};
|
|
464
412
|
}
|
|
465
413
|
}
|
|
414
|
+
else {
|
|
415
|
+
releaseGroup.releaseTagPattern =
|
|
416
|
+
releaseGroup.projectsRelationship === 'independent'
|
|
417
|
+
? WORKSPACE_DEFAULTS.releaseTagPattern?.includes('{projectName}')
|
|
418
|
+
? WORKSPACE_DEFAULTS.releaseTagPattern
|
|
419
|
+
: defaultIndependentReleaseTagPattern
|
|
420
|
+
: userConfig?.releaseTagPattern ?? defaultFixedGroupReleaseTagPattern;
|
|
421
|
+
}
|
|
466
422
|
for (const project of matchingProjects) {
|
|
467
423
|
if (alreadyMatchedProjects.has(project)) {
|
|
468
424
|
return {
|
|
@@ -545,52 +501,21 @@ async function createNxReleaseConfig(projectGraph, projectFileMap, userConfig =
|
|
|
545
501
|
}
|
|
546
502
|
// Apply conventionalCommits shorthand to the final group if explicitly configured in the original group
|
|
547
503
|
if (releaseGroup.version?.conventionalCommits === true) {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
...finalReleaseGroup.version.generatorOptions,
|
|
551
|
-
currentVersionResolver: 'git-tag',
|
|
552
|
-
specifierSource: 'conventional-commits',
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
else {
|
|
556
|
-
finalReleaseGroup.version.currentVersionResolver = 'git-tag';
|
|
557
|
-
finalReleaseGroup.version.specifierSource = 'conventional-commits';
|
|
558
|
-
}
|
|
504
|
+
finalReleaseGroup.version.currentVersionResolver = 'git-tag';
|
|
505
|
+
finalReleaseGroup.version.specifierSource = 'conventional-commits';
|
|
559
506
|
}
|
|
560
507
|
if (releaseGroup.version?.conventionalCommits === false &&
|
|
561
508
|
releaseGroupName !== exports.IMPLICIT_DEFAULT_RELEASE_GROUP) {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
?.currentVersionResolver;
|
|
565
|
-
delete finalReleaseGroup.version.generatorOptions?.specifierSource;
|
|
566
|
-
}
|
|
567
|
-
delete finalReleaseGroup.version
|
|
568
|
-
.currentVersionResolver;
|
|
569
|
-
delete finalReleaseGroup.version
|
|
570
|
-
.specifierSource;
|
|
509
|
+
delete finalReleaseGroup.version.currentVersionResolver;
|
|
510
|
+
delete finalReleaseGroup.version.specifierSource;
|
|
571
511
|
}
|
|
572
512
|
// Apply versionPlans shorthand to the final group if explicitly configured in the original group
|
|
573
513
|
if (releaseGroup.versionPlans) {
|
|
574
|
-
|
|
575
|
-
finalReleaseGroup.version = {
|
|
576
|
-
...finalReleaseGroup.version,
|
|
577
|
-
generatorOptions: {
|
|
578
|
-
...finalReleaseGroup.version?.generatorOptions,
|
|
579
|
-
specifierSource: 'version-plans',
|
|
580
|
-
},
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
else {
|
|
584
|
-
finalReleaseGroup.version.specifierSource = 'version-plans';
|
|
585
|
-
}
|
|
514
|
+
finalReleaseGroup.version.specifierSource = 'version-plans';
|
|
586
515
|
}
|
|
587
516
|
if (releaseGroup.versionPlans === false &&
|
|
588
517
|
releaseGroupName !== exports.IMPLICIT_DEFAULT_RELEASE_GROUP) {
|
|
589
|
-
|
|
590
|
-
delete finalReleaseGroup.version.generatorOptions?.specifierSource;
|
|
591
|
-
}
|
|
592
|
-
delete finalReleaseGroup.version
|
|
593
|
-
.specifierSource;
|
|
518
|
+
delete finalReleaseGroup.version.specifierSource;
|
|
594
519
|
}
|
|
595
520
|
releaseGroups[releaseGroupName] = finalReleaseGroup;
|
|
596
521
|
}
|
|
@@ -728,7 +653,7 @@ function fillUnspecifiedConventionalCommitsProperties(config) {
|
|
|
728
653
|
types,
|
|
729
654
|
};
|
|
730
655
|
}
|
|
731
|
-
async function handleNxReleaseConfigError(error
|
|
656
|
+
async function handleNxReleaseConfigError(error) {
|
|
732
657
|
const linkMessage = `\nRead more about Nx Release at https://nx.dev/features/manage-releases.`;
|
|
733
658
|
switch (error.code) {
|
|
734
659
|
case 'PROJECTS_AND_GROUPS_DEFINED':
|
|
@@ -786,11 +711,8 @@ async function handleNxReleaseConfigError(error, useLegacyVersioning) {
|
|
|
786
711
|
const nxJsonMessage = await (0, resolve_nx_json_error_message_1.resolveNxJsonConfigErrorMessage)([
|
|
787
712
|
'release',
|
|
788
713
|
]);
|
|
789
|
-
const text = useLegacyVersioning
|
|
790
|
-
? '"version.generatorOptions"'
|
|
791
|
-
: 'configuration options';
|
|
792
714
|
output_1.output.error({
|
|
793
|
-
title: `You have configured both the shorthand "version.conventionalCommits" and one or more of the related
|
|
715
|
+
title: `You have configured both the shorthand "version.conventionalCommits" and one or more of the related configuration options that it sets for you. Please use one or the other:`,
|
|
794
716
|
bodyLines: [nxJsonMessage, linkMessage],
|
|
795
717
|
});
|
|
796
718
|
}
|
|
@@ -943,30 +865,16 @@ function deepMergeDefaults(defaultConfigs, userConfig) {
|
|
|
943
865
|
function hasInvalidConventionalCommitsConfig(userConfig) {
|
|
944
866
|
// at the root
|
|
945
867
|
if (userConfig.version?.conventionalCommits === true &&
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
?.currentVersionResolver ||
|
|
949
|
-
userConfig.version?.specifierSource ||
|
|
950
|
-
// Legacy config - on generatorOptions
|
|
951
|
-
userConfig.version
|
|
952
|
-
?.generatorOptions?.currentVersionResolver ||
|
|
953
|
-
userConfig.version
|
|
954
|
-
?.generatorOptions?.specifierSource)) {
|
|
868
|
+
(userConfig.version?.currentVersionResolver ||
|
|
869
|
+
userConfig.version?.specifierSource)) {
|
|
955
870
|
return true;
|
|
956
871
|
}
|
|
957
872
|
// within any groups
|
|
958
873
|
if (userConfig.groups) {
|
|
959
874
|
for (const group of Object.values(userConfig.groups)) {
|
|
960
875
|
if (group.version?.conventionalCommits === true &&
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
?.currentVersionResolver ||
|
|
964
|
-
group.version?.specifierSource ||
|
|
965
|
-
// Legacy config - on generatorOptions
|
|
966
|
-
group.version
|
|
967
|
-
?.generatorOptions?.currentVersionResolver ||
|
|
968
|
-
group.version
|
|
969
|
-
?.generatorOptions?.specifierSource)) {
|
|
876
|
+
(group.version?.currentVersionResolver ||
|
|
877
|
+
group.version?.specifierSource)) {
|
|
970
878
|
return true;
|
|
971
879
|
}
|
|
972
880
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-check.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/plan-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAU1E,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"plan-check.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/plan-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAU1E,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAejE,eAAO,MAAM,0BAA0B,GAAI,MAAM,gBAAgB,oBACV,CAAC;AAExD,wBAAgB,SAAS,CAAC,qBAAqB,EAAE,sBAAsB,IAC9B,MAAM,WAAW,KAAG,OAAO,CAAC,MAAM,CAAC,CAyN3E"}
|
|
@@ -12,7 +12,6 @@ const output_1 = require("../../utils/output");
|
|
|
12
12
|
const config_1 = require("./config/config");
|
|
13
13
|
const deep_merge_json_1 = require("./config/deep-merge-json");
|
|
14
14
|
const filter_release_groups_1 = require("./config/filter-release-groups");
|
|
15
|
-
const use_legacy_versioning_1 = require("./config/use-legacy-versioning");
|
|
16
15
|
const version_plans_1 = require("./config/version-plans");
|
|
17
16
|
const get_touched_projects_for_group_1 = require("./utils/get-touched-projects-for-group");
|
|
18
17
|
const print_config_1 = require("./utils/print-config");
|
|
@@ -26,8 +25,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
26
25
|
// Apply default configuration to any optional user configuration
|
|
27
26
|
const { error: configError, nxReleaseConfig } = await (0, config_1.createNxReleaseConfig)(projectGraph, await (0, file_map_utils_1.createProjectFileMapUsingProjectGraph)(projectGraph), userProvidedReleaseConfig);
|
|
28
27
|
if (configError) {
|
|
29
|
-
|
|
30
|
-
return await (0, config_1.handleNxReleaseConfigError)(configError, USE_LEGACY_VERSIONING);
|
|
28
|
+
return await (0, config_1.handleNxReleaseConfigError)(configError);
|
|
31
29
|
}
|
|
32
30
|
// --print-config exits directly as it is not designed to be combined with any other programmatic operations
|
|
33
31
|
if (args.printConfig) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/plan.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAU1E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/plan.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAU1E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAe/C,eAAO,MAAM,qBAAqB,GAAI,MAAM,WAAW,oBACA,CAAC;AAExD,wBAAgB,SAAS,CAAC,qBAAqB,EAAE,sBAAsB,IAEnE,MAAM,WAAW,KAChB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CA+N5B"}
|
|
@@ -18,7 +18,6 @@ const output_1 = require("../../utils/output");
|
|
|
18
18
|
const config_1 = require("./config/config");
|
|
19
19
|
const deep_merge_json_1 = require("./config/deep-merge-json");
|
|
20
20
|
const filter_release_groups_1 = require("./config/filter-release-groups");
|
|
21
|
-
const use_legacy_versioning_1 = require("./config/use-legacy-versioning");
|
|
22
21
|
const version_plans_1 = require("./config/version-plans");
|
|
23
22
|
const generate_version_plan_content_1 = require("./utils/generate-version-plan-content");
|
|
24
23
|
const get_touched_projects_for_group_1 = require("./utils/get-touched-projects-for-group");
|
|
@@ -35,8 +34,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
35
34
|
// Apply default configuration to any optional user configuration
|
|
36
35
|
const { error: configError, nxReleaseConfig } = await (0, config_1.createNxReleaseConfig)(projectGraph, await (0, file_map_utils_1.createProjectFileMapUsingProjectGraph)(projectGraph), userProvidedReleaseConfig);
|
|
37
36
|
if (configError) {
|
|
38
|
-
|
|
39
|
-
return await (0, config_1.handleNxReleaseConfigError)(configError, USE_LEGACY_VERSIONING);
|
|
37
|
+
return await (0, config_1.handleNxReleaseConfigError)(configError);
|
|
40
38
|
}
|
|
41
39
|
// --print-config exits directly as it is not designed to be combined with any other programmatic operations
|
|
42
40
|
if (args.printConfig) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EAEvB,MAAM,sBAAsB,CAAC;AAsB9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EAEvB,MAAM,sBAAsB,CAAC;AAsB9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AASlD,MAAM,WAAW,qBAAqB;IACpC,CAAC,WAAW,EAAE,MAAM,GAAG;QACrB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,eAAO,MAAM,wBAAwB,GAAI,MAAM,cAAc,oBAWzD,CAAC;AAEL,wBAAgB,SAAS,CAAC,qBAAqB,EAAE,sBAAsB,IAOnE,MAAM,cAAc,KACnB,OAAO,CAAC,qBAAqB,CAAC,CAkHlC"}
|
|
@@ -17,7 +17,6 @@ const graph_1 = require("../graph/graph");
|
|
|
17
17
|
const config_1 = require("./config/config");
|
|
18
18
|
const deep_merge_json_1 = require("./config/deep-merge-json");
|
|
19
19
|
const filter_release_groups_1 = require("./config/filter-release-groups");
|
|
20
|
-
const use_legacy_versioning_1 = require("./config/use-legacy-versioning");
|
|
21
20
|
const print_config_1 = require("./utils/print-config");
|
|
22
21
|
const releasePublishCLIHandler = (args) => (0, handle_errors_1.handleErrors)(args.verbose, async () => {
|
|
23
22
|
const publishProjectsResult = await createAPI({})(args);
|
|
@@ -48,8 +47,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
48
47
|
// Apply default configuration to any optional user configuration
|
|
49
48
|
const { error: configError, nxReleaseConfig } = await (0, config_1.createNxReleaseConfig)(projectGraph, await (0, file_map_utils_1.createProjectFileMapUsingProjectGraph)(projectGraph), userProvidedReleaseConfig);
|
|
50
49
|
if (configError) {
|
|
51
|
-
|
|
52
|
-
return await (0, config_1.handleNxReleaseConfigError)(configError, USE_LEGACY_VERSIONING);
|
|
50
|
+
return await (0, config_1.handleNxReleaseConfigError)(configError);
|
|
53
51
|
}
|
|
54
52
|
// --print-config exits directly as it is not designed to be combined with any other programmatic operations
|
|
55
53
|
if (args.printConfig) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/release.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAM1E,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/release.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAM1E,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA4BlE,OAAO,EACL,sBAAsB,EAEvB,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,iBAAiB,GAAI,MAAM,cAAc,oBACC,CAAC;AAExD,wBAAgB,SAAS,CAAC,qBAAqB,EAAE,sBAAsB,IAMnE,MAAM,cAAc,KACnB,OAAO,CAAC,sBAAsB,GAAG,MAAM,CAAC,CA4W5C"}
|
|
@@ -13,7 +13,6 @@ const changelog_1 = require("./changelog");
|
|
|
13
13
|
const config_1 = require("./config/config");
|
|
14
14
|
const deep_merge_json_1 = require("./config/deep-merge-json");
|
|
15
15
|
const filter_release_groups_1 = require("./config/filter-release-groups");
|
|
16
|
-
const use_legacy_versioning_1 = require("./config/use-legacy-versioning");
|
|
17
16
|
const version_plans_1 = require("./config/version-plans");
|
|
18
17
|
const publish_1 = require("./publish");
|
|
19
18
|
const git_1 = require("./utils/git");
|
|
@@ -49,8 +48,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
49
48
|
// Apply default configuration to any optional user configuration
|
|
50
49
|
const { error: configError, nxReleaseConfig } = await (0, config_1.createNxReleaseConfig)(projectGraph, await (0, file_map_utils_1.createProjectFileMapUsingProjectGraph)(projectGraph), userProvidedReleaseConfig);
|
|
51
50
|
if (configError) {
|
|
52
|
-
|
|
53
|
-
return await (0, config_1.handleNxReleaseConfigError)(configError, USE_LEGACY_VERSIONING);
|
|
51
|
+
return await (0, config_1.handleNxReleaseConfigError)(configError);
|
|
54
52
|
}
|
|
55
53
|
// --print-config exits directly as it is not designed to be combined with any other programmatic operations
|
|
56
54
|
if (args.printConfig) {
|
|
@@ -45,7 +45,7 @@ function createGetTouchedProjectsForGroup(nxArgs, projectGraph, changedFiles, fi
|
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
47
|
// We only care about directly touched projects, not implicitly affected ones etc
|
|
48
|
-
const touchedProjectsArr = await (0, workspace_projects_1.getTouchedProjects)((0, file_utils_1.calculateFileChanges)(changedFiles,
|
|
48
|
+
const touchedProjectsArr = await (0, workspace_projects_1.getTouchedProjects)((0, file_utils_1.calculateFileChanges)(changedFiles, nxArgs, undefined, ignore), projectGraph.nodes);
|
|
49
49
|
touchedProjects = touchedProjectsArr.reduce((acc, project) => ({ ...acc, [project]: true }), {});
|
|
50
50
|
serializedIgnorePatternsToTouchedProjects.set(serializedIgnorePatterns, touchedProjects);
|
|
51
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/git.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,gCAAgC;IAC/C,oBAAoB,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B,EAAE,OAAO,CAAC;IACxC,4BAA4B,EAAE,OAAO,CAAC;CACvC;AAUD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,gCAAgC,GACxC,gBAAgB,CAclB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,yBAAyB,CAC7C,iBAAiB,EAAE,MAAM,EACzB,2BAA2B,IAAK,EAChC,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/git.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW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AED,wBAAsB,OAAO,CAAC,EAC5B,SAAS,EACT,MAAM,EACN,OAAO,EACP,cAAc,GACf,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACpC,iBAoCA;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,CAEjE;AAED,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,MAAM,GAAG;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB,GAAG,IAAI,CAiBP;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,EAAE,CAiC7E;AA2BD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG;IAC5D,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B,CAKA;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI,CAqDrE;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,mBAM9C;AAED,wBAAsB,iBAAiB,oBAatC"}
|
|
@@ -140,11 +140,13 @@ async function getLatestGitTagForPattern(releaseTagPattern, additionalInterpolat
|
|
|
140
140
|
const interpolatedTagPattern = (0, utils_1.interpolate)(releaseTagPattern, {
|
|
141
141
|
version: '%v%',
|
|
142
142
|
projectName: '%p%',
|
|
143
|
+
releaseGroupName: '%rg%',
|
|
143
144
|
...additionalInterpolationData,
|
|
144
145
|
});
|
|
145
146
|
const tagRegexp = `^${escapeRegExp(interpolatedTagPattern)
|
|
146
147
|
.replace('%v%', '(.+)')
|
|
147
|
-
.replace('%p%', '(.+)')
|
|
148
|
+
.replace('%p%', '(.+)')
|
|
149
|
+
.replace('%rg%', '(.+)')}`;
|
|
148
150
|
const matchingTags = tags.filter((tag) => {
|
|
149
151
|
if (releaseTagPatternRequireSemver) {
|
|
150
152
|
// Match against Semver Regex when using semverVersioning to ensure only valid semver tags are matched
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ProjectGraph } from '../../../config/project-graph';
|
|
2
2
|
import { NxReleaseConfig } from '../config/config';
|
|
3
3
|
import { SemverBumpType } from '../version/version-actions';
|
|
4
|
-
|
|
4
|
+
import { SemverSpecifier } from './semver';
|
|
5
|
+
export declare function resolveSemverSpecifierFromConventionalCommits(from: string, projectGraph: ProjectGraph, projectNames: string[], conventionalCommitsConfig: NxReleaseConfig['conventionalCommits']): Promise<Map<string, SemverSpecifier | null>>;
|
|
5
6
|
export declare function resolveSemverSpecifierFromPrompt(selectionMessage: string, customVersionMessage: string): Promise<SemverBumpType | string>;
|
|
6
7
|
//# sourceMappingURL=resolve-semver-specifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-semver-specifier.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/resolve-semver-specifier.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve-semver-specifier.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/resolve-semver-specifier.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAyB,eAAe,EAAE,MAAM,UAAU,CAAC;AAGlE,wBAAsB,6CAA6C,CACjE,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,MAAM,EAAE,EACtB,yBAAyB,EAAE,eAAe,CAAC,qBAAqB,CAAC,GAEnE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC,CAAC,CAS3C;AAED,wBAAsB,gCAAgC,CACpD,gBAAgB,EAAE,MAAM,EACxB,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC,cAAc,GAAG,MAAM,CAAC,CAwClC"}
|
|
@@ -5,16 +5,22 @@
|
|
|
5
5
|
import { ReleaseType } from 'semver';
|
|
6
6
|
import { NxReleaseConfig } from '../config/config';
|
|
7
7
|
import { GitCommit } from './git';
|
|
8
|
+
export declare const enum SemverSpecifier {
|
|
9
|
+
MAJOR = 3,
|
|
10
|
+
MINOR = 2,
|
|
11
|
+
PATCH = 1
|
|
12
|
+
}
|
|
13
|
+
export declare const SemverSpecifierType: {
|
|
14
|
+
3: string;
|
|
15
|
+
2: string;
|
|
16
|
+
1: string;
|
|
17
|
+
};
|
|
8
18
|
export declare function isRelativeVersionKeyword(val: string): val is ReleaseType;
|
|
9
19
|
export declare function isValidSemverSpecifier(specifier: string): boolean;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* It would then flow up through deriveSpecifierFromConventionalCommits back to
|
|
16
|
-
* ReleaseGroupProcessor.
|
|
17
|
-
*/
|
|
18
|
-
export declare function determineSemverChange(commits: GitCommit[], config: NxReleaseConfig['conventionalCommits']): 'patch' | 'minor' | 'major' | null;
|
|
20
|
+
export declare function determineSemverChange(relevantCommits: Map<string, {
|
|
21
|
+
commit: GitCommit;
|
|
22
|
+
isProjectScopedCommit: boolean;
|
|
23
|
+
}[]>, // <projectName, commits>
|
|
24
|
+
config: NxReleaseConfig['conventionalCommits']): Map<string, SemverSpecifier | null>;
|
|
19
25
|
export declare function deriveNewSemverVersion(currentSemverVersion: string, semverSpecifier: string, preid?: string): string;
|
|
20
26
|
//# sourceMappingURL=semver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semver.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/semver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAiB,WAAW,EAAc,MAAM,QAAQ,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,WAAW,CAExE;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAIjE;
|
|
1
|
+
{"version":3,"file":"semver.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/semver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAiB,WAAW,EAAc,MAAM,QAAQ,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,0BAAkB,eAAe;IAC/B,KAAK,IAAI;IACT,KAAK,IAAI;IACT,KAAK,IAAI;CACV;AAED,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,WAAW,CAExE;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAIjE;AAGD,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,GAAG,CAClB,MAAM,EACN;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,qBAAqB,EAAE,OAAO,CAAA;CAAE,EAAE,CACxD,EAAE,yBAAyB;AAC5B,MAAM,EAAE,eAAe,CAAC,qBAAqB,CAAC,GAC7C,GAAG,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC,CA0BrC;AAED,wBAAgB,sBAAsB,CACpC,oBAAoB,EAAE,MAAM,EAC5B,eAAe,EAAE,MAAM,EACvB,KAAK,CAAC,EAAE,MAAM,UA2Bf"}
|
|
@@ -4,44 +4,50 @@
|
|
|
4
4
|
* https://github.com/unjs/changelogen
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.SemverSpecifierType = void 0;
|
|
7
8
|
exports.isRelativeVersionKeyword = isRelativeVersionKeyword;
|
|
8
9
|
exports.isValidSemverSpecifier = isValidSemverSpecifier;
|
|
9
10
|
exports.determineSemverChange = determineSemverChange;
|
|
10
11
|
exports.deriveNewSemverVersion = deriveNewSemverVersion;
|
|
11
12
|
const semver_1 = require("semver");
|
|
13
|
+
exports.SemverSpecifierType = {
|
|
14
|
+
3: 'major',
|
|
15
|
+
2: 'minor',
|
|
16
|
+
1: 'patch',
|
|
17
|
+
};
|
|
12
18
|
function isRelativeVersionKeyword(val) {
|
|
13
19
|
return semver_1.RELEASE_TYPES.includes(val);
|
|
14
20
|
}
|
|
15
21
|
function isValidSemverSpecifier(specifier) {
|
|
16
22
|
return (specifier && !!((0, semver_1.valid)(specifier) || isRelativeVersionKeyword(specifier)));
|
|
17
23
|
}
|
|
18
|
-
/**
|
|
19
|
-
* TODO: We would be able to make the logging for the conventional commits use-case
|
|
20
|
-
* for fixed release groups more clear/precise if we passed through which project
|
|
21
|
-
* the conventional commits were detected for.
|
|
22
|
-
*
|
|
23
|
-
* It would then flow up through deriveSpecifierFromConventionalCommits back to
|
|
24
|
-
* ReleaseGroupProcessor.
|
|
25
|
-
*/
|
|
26
24
|
// https://github.com/unjs/changelogen/blob/main/src/semver.ts
|
|
27
|
-
function determineSemverChange(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
25
|
+
function determineSemverChange(relevantCommits, // <projectName, commits>
|
|
26
|
+
config) {
|
|
27
|
+
const semverChangePerProject = new Map();
|
|
28
|
+
for (const [projectName, relevantCommit] of relevantCommits) {
|
|
29
|
+
let highestChange = null;
|
|
30
|
+
for (const { commit, isProjectScopedCommit } of relevantCommit) {
|
|
31
|
+
if (!isProjectScopedCommit) {
|
|
32
|
+
// commit is relevant to the project, but not directly, report minor change
|
|
33
|
+
highestChange = Math.max(2 /* SemverSpecifier.MINOR */, highestChange ?? 0);
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const semverType = config.types[commit.type]?.semverBump;
|
|
37
|
+
if (semverType === 'major' || commit.isBreaking) {
|
|
38
|
+
highestChange = Math.max(3 /* SemverSpecifier.MAJOR */, highestChange ?? 0);
|
|
39
|
+
break; // Major is highest priority, no need to check more commits
|
|
40
|
+
}
|
|
41
|
+
else if (semverType === 'minor') {
|
|
42
|
+
highestChange = Math.max(2 /* SemverSpecifier.MINOR */, highestChange ?? 0);
|
|
43
|
+
}
|
|
44
|
+
else if (semverType === 'patch') {
|
|
45
|
+
highestChange = Math.max(1 /* SemverSpecifier.PATCH */, highestChange ?? 0);
|
|
46
|
+
}
|
|
42
47
|
}
|
|
48
|
+
semverChangePerProject.set(projectName, highestChange);
|
|
43
49
|
}
|
|
44
|
-
return
|
|
50
|
+
return semverChangePerProject;
|
|
45
51
|
}
|
|
46
52
|
function deriveNewSemverVersion(currentSemverVersion, semverSpecifier, preid) {
|
|
47
53
|
if (!(0, semver_1.valid)(currentSemverVersion)) {
|
|
@@ -54,5 +54,8 @@ export declare function shouldSkipVersionActions(dockerOptions: {
|
|
|
54
54
|
}, projectName: string): boolean;
|
|
55
55
|
export declare function createGitTagValues(releaseGroups: ReleaseGroupWithName[], releaseGroupToFilteredProjects: Map<ReleaseGroupWithName, Set<string>>, versionData: VersionData): string[];
|
|
56
56
|
export declare function handleDuplicateGitTags(gitTagValues: string[]): void;
|
|
57
|
-
export declare function getCommitsRelevantToProjects(projectGraph: ProjectGraph, commits: GitCommit[], projects: string[]): Promise<
|
|
57
|
+
export declare function getCommitsRelevantToProjects(projectGraph: ProjectGraph, commits: GitCommit[], projects: string[]): Promise<Map<string, {
|
|
58
|
+
commit: GitCommit;
|
|
59
|
+
isProjectScopedCommit: boolean;
|
|
60
|
+
}[]>>;
|
|
58
61
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/shared.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/shared.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAK7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AAErD,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,iBAAiB,EAAE;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,oBAAoB,EAAE,MAAM,CAAC;QAC7B,cAAc,EAAE,MAAM,CAA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