nx 21.3.0-rc.0 → 21.3.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/bin/nx.js +19 -2
- package/package.json +11 -11
- package/schemas/nx-schema.json +18 -0
- package/src/command-line/init/implementation/add-nx-to-monorepo.d.ts +1 -1
- package/src/command-line/init/implementation/add-nx-to-monorepo.js +2 -2
- package/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts +1 -1
- package/src/command-line/init/implementation/add-nx-to-npm-repo.js +2 -2
- package/src/command-line/init/implementation/utils.js +1 -5
- package/src/command-line/init/init-v2.js +44 -22
- package/src/command-line/release/changelog.js +47 -3
- package/src/command-line/release/config/config.js +14 -1
- package/src/command-line/release/utils/git.d.ts +35 -4
- package/src/command-line/release/utils/git.js +71 -11
- package/src/command-line/release/utils/shared.d.ts +1 -0
- package/src/command-line/release/utils/shared.js +1 -0
- package/src/command-line/release/version/release-group-processor.js +6 -1
- package/src/config/nx-json.d.ts +40 -0
- package/src/core/graph/main.js +1 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +3 -7
- package/src/utils/ab-testing.d.ts +3 -3
- package/src/utils/ab-testing.js +3 -3
@@ -198,7 +198,12 @@ class ReleaseGroupProcessor {
|
|
198
198
|
if (finalConfigForProject.currentVersionResolver === 'git-tag') {
|
199
199
|
latestMatchingGitTag = await (0, git_1.getLatestGitTagForPattern)(releaseTagPattern, {
|
200
200
|
projectName: projectGraphNode.name,
|
201
|
-
},
|
201
|
+
}, {
|
202
|
+
checkAllBranchesWhen: releaseGroupNode.group.releaseTagPatternCheckAllBranchesWhen,
|
203
|
+
preid: this.options.preid,
|
204
|
+
releaseTagPatternRequireSemver: releaseGroupNode.group.releaseTagPatternRequireSemver,
|
205
|
+
releaseTagPatternStrictPreid: releaseGroupNode.group.releaseTagPatternStrictPreid,
|
206
|
+
});
|
202
207
|
this.cachedLatestMatchingGitTag.set(projectName, latestMatchingGitTag);
|
203
208
|
}
|
204
209
|
// Cache the current version for the project
|
package/src/config/nx-json.d.ts
CHANGED
@@ -349,6 +349,26 @@ export interface NxReleaseConfiguration {
|
|
349
349
|
* - Setting this to false will cause us to not use semver to match the version allowing for non-semver versions
|
350
350
|
*/
|
351
351
|
releaseTagPatternRequireSemver?: boolean;
|
352
|
+
/**
|
353
|
+
* When set to true and multiple tags match your configured "releaseTagPattern", the git tag matching logic will strictly prefer the tag which contain a semver preid which matches the one
|
354
|
+
* given to the nx release invocation.
|
355
|
+
*
|
356
|
+
* For example, let's say your "releaseTagPattern" is "{projectName}@{version}" and you have the following tags for project "my-lib", which uses semver:
|
357
|
+
* - my-lib@1.2.4-beta.1
|
358
|
+
* - my-lib@1.2.4-alpha.1
|
359
|
+
* - my-lib@1.2.3
|
360
|
+
*
|
361
|
+
* If "releaseTagPatternStrictPreid" is set to true and you run:
|
362
|
+
* - `nx release --preid beta`, the git tag "my-lib@1.2.4-beta.1" will be resolved.
|
363
|
+
* - `nx release --preid alpha`, the git tag "my-lib@1.2.4-alpha.1" will be resolved.
|
364
|
+
* - `nx release` (no preid), the git tag "my-lib@1.2.3" will be resolved.
|
365
|
+
*
|
366
|
+
* If "releaseTagPatternStrictPreid" is set to false, the git tag "my-lib@1.2.4-beta.1" will always be resolved as the latest tag that matches the pattern,
|
367
|
+
* regardless of any preid which gets passed to nx release.
|
368
|
+
*
|
369
|
+
* NOTE: This feature was added in a minor version and is therefore set to false by default, but this may change in a future major version.
|
370
|
+
*/
|
371
|
+
releaseTagPatternStrictPreid?: boolean;
|
352
372
|
/**
|
353
373
|
* Enables using version plans as a specifier source for versioning and
|
354
374
|
* to determine changes for changelog generation.
|
@@ -424,6 +444,26 @@ export interface NxReleaseConfiguration {
|
|
424
444
|
* - Setting this to false will cause us to not use semver to match the version allowing for non-semver versions
|
425
445
|
*/
|
426
446
|
releaseTagPatternRequireSemver?: boolean;
|
447
|
+
/**
|
448
|
+
* When set to true and multiple tags match your configured "releaseTagPattern", the git tag matching logic will strictly prefer the tag which contain a semver preid which matches the one
|
449
|
+
* given to the nx release invocation.
|
450
|
+
*
|
451
|
+
* For example, let's say your "releaseTagPattern" is "{projectName}@{version}" and you have the following tags for project "my-lib", which uses semver:
|
452
|
+
* - my-lib@1.2.4-beta.1
|
453
|
+
* - my-lib@1.2.4-alpha.1
|
454
|
+
* - my-lib@1.2.3
|
455
|
+
*
|
456
|
+
* If "releaseTagPatternStrictPreid" is set to true and you run:
|
457
|
+
* - `nx release --preid beta`, the git tag "my-lib@1.2.4-beta.1" will be resolved.
|
458
|
+
* - `nx release --preid alpha`, the git tag "my-lib@1.2.4-alpha.1" will be resolved.
|
459
|
+
* - `nx release` (no preid), the git tag "my-lib@1.2.3" will be resolved.
|
460
|
+
*
|
461
|
+
* If "releaseTagPatternStrictPreid" is set to false, the git tag "my-lib@1.2.4-beta.1" will always be resolved as the latest tag that matches the pattern,
|
462
|
+
* regardless of any preid which gets passed to nx release.
|
463
|
+
*
|
464
|
+
* NOTE: This feature was added in a minor version and is therefore set to false by default, but this may change in a future major version.
|
465
|
+
*/
|
466
|
+
releaseTagPatternStrictPreid?: boolean;
|
427
467
|
/**
|
428
468
|
* Enable and configure automatic git operations as part of the release
|
429
469
|
*/
|