nx 22.0.0-canary.20251008-05ab516 → 22.0.0-canary.20251010-bfaa91b

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.
Files changed (48) hide show
  1. package/executors.json +16 -16
  2. package/generators.json +13 -13
  3. package/migrations.json +100 -95
  4. package/package.json +11 -14
  5. package/presets/npm.json +4 -4
  6. package/schemas/nx-schema.json +1294 -1139
  7. package/schemas/project-schema.json +359 -359
  8. package/schemas/workspace-schema.json +165 -165
  9. package/src/ai/set-up-ai-agents/schema.json +31 -31
  10. package/src/command-line/release/changelog.d.ts.map +1 -1
  11. package/src/command-line/release/changelog.js +18 -18
  12. package/src/command-line/release/config/config.d.ts +6 -2
  13. package/src/command-line/release/config/config.d.ts.map +1 -1
  14. package/src/command-line/release/config/config.js +119 -70
  15. package/src/command-line/release/utils/git.d.ts +2 -2
  16. package/src/command-line/release/utils/git.d.ts.map +1 -1
  17. package/src/command-line/release/utils/git.js +5 -5
  18. package/src/command-line/release/utils/release-graph.d.ts +1 -1
  19. package/src/command-line/release/utils/release-graph.d.ts.map +1 -1
  20. package/src/command-line/release/utils/release-graph.js +6 -6
  21. package/src/command-line/release/utils/shared.js +11 -11
  22. package/src/command-line/release/version/release-group-processor.d.ts.map +1 -1
  23. package/src/command-line/release/version/release-group-processor.js +9 -1
  24. package/src/config/nx-json.d.ts +129 -70
  25. package/src/config/nx-json.d.ts.map +1 -1
  26. package/src/core/graph/main.js +1 -1
  27. package/src/daemon/client/client.d.ts +4 -0
  28. package/src/daemon/client/client.d.ts.map +1 -1
  29. package/src/daemon/client/client.js +23 -0
  30. package/src/daemon/message-types/register-project-graph-listener.d.ts +6 -0
  31. package/src/daemon/message-types/register-project-graph-listener.d.ts.map +1 -0
  32. package/src/daemon/message-types/register-project-graph-listener.js +11 -0
  33. package/src/daemon/server/project-graph-incremental-recomputation.d.ts +3 -1
  34. package/src/daemon/server/project-graph-incremental-recomputation.d.ts.map +1 -1
  35. package/src/daemon/server/project-graph-incremental-recomputation.js +13 -5
  36. package/src/daemon/server/project-graph-listener-sockets.d.ts +8 -0
  37. package/src/daemon/server/project-graph-listener-sockets.d.ts.map +1 -0
  38. package/src/daemon/server/project-graph-listener-sockets.js +24 -0
  39. package/src/daemon/server/server.d.ts.map +1 -1
  40. package/src/daemon/server/server.js +9 -2
  41. package/src/executors/noop/schema.json +8 -8
  42. package/src/executors/run-commands/schema.json +187 -187
  43. package/src/executors/run-script/schema.json +25 -25
  44. package/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts +3 -0
  45. package/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts.map +1 -0
  46. package/src/migrations/update-22-0-0/consolidate-release-tag-config.js +100 -0
  47. package/src/native/nx.wasm32-wasi.wasm +0 -0
  48. package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +38 -38
@@ -1,185 +1,185 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema",
3
- "$id": "https://nx.dev",
4
- "title": "JSON schema for Nx workspaces",
5
- "type": "object",
6
- "properties": {
7
- "version": {
8
- "type": "number",
9
- "enum": [1, 2]
10
- }
11
- },
12
- "allOf": [
13
- {
14
- "if": {
15
- "properties": { "version": { "const": 2 } },
16
- "required": ["version"]
17
- },
18
- "then": {
19
- "properties": {
20
- "projects": {
21
- "type": "object",
22
- "additionalProperties": {
23
- "oneOf": [
24
- {
25
- "type": "string"
26
- },
27
- {
28
- "type": "object",
29
- "properties": {
30
- "targets": {
31
- "type": "object",
32
- "description": "Configures all the targets which define what tasks you can run against the project",
33
- "additionalProperties": {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "https://nx.dev",
4
+ "title": "JSON schema for Nx workspaces",
5
+ "type": "object",
6
+ "properties": {
7
+ "version": {
8
+ "type": "number",
9
+ "enum": [1, 2]
10
+ }
11
+ },
12
+ "allOf": [
13
+ {
14
+ "if": {
15
+ "properties": { "version": { "const": 2 } },
16
+ "required": ["version"]
17
+ },
18
+ "then": {
19
+ "properties": {
20
+ "projects": {
34
21
  "type": "object",
35
- "properties": {
36
- "executor": {
37
- "description": "The function that Nx will invoke when you run this target",
38
- "type": "string"
39
- },
40
- "options": {
41
- "type": "object"
42
- },
43
- "outputs": {
44
- "type": "array",
45
- "items": {
46
- "type": "string"
47
- }
48
- },
49
- "configurations": {
50
- "type": "object",
51
- "description": "provides extra sets of values that will be merged into the options map",
52
- "additionalProperties": {
53
- "type": "object"
54
- }
55
- },
56
- "dependsOn": {
57
- "type": "array",
58
- "description": "Target dependency.",
59
- "items": {
60
- "oneOf": [
22
+ "additionalProperties": {
23
+ "oneOf": [
61
24
  {
62
- "type": "string"
25
+ "type": "string"
63
26
  },
64
27
  {
65
- "type": "object",
66
- "properties": {
67
- "projects": {
68
- "oneOf": [
69
- {
70
- "type": "string",
71
- "description": "A project name"
28
+ "type": "object",
29
+ "properties": {
30
+ "targets": {
31
+ "type": "object",
32
+ "description": "Configures all the targets which define what tasks you can run against the project",
33
+ "additionalProperties": {
34
+ "type": "object",
35
+ "properties": {
36
+ "executor": {
37
+ "description": "The function that Nx will invoke when you run this target",
38
+ "type": "string"
39
+ },
40
+ "options": {
41
+ "type": "object"
42
+ },
43
+ "outputs": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "configurations": {
50
+ "type": "object",
51
+ "description": "provides extra sets of values that will be merged into the options map",
52
+ "additionalProperties": {
53
+ "type": "object"
54
+ }
55
+ },
56
+ "dependsOn": {
57
+ "type": "array",
58
+ "description": "Target dependency.",
59
+ "items": {
60
+ "oneOf": [
61
+ {
62
+ "type": "string"
63
+ },
64
+ {
65
+ "type": "object",
66
+ "properties": {
67
+ "projects": {
68
+ "oneOf": [
69
+ {
70
+ "type": "string",
71
+ "description": "A project name"
72
+ },
73
+ {
74
+ "type": "array",
75
+ "description": "An array of project names",
76
+ "items": {
77
+ "type": "string"
78
+ }
79
+ }
80
+ ]
81
+ },
82
+ "dependencies": {
83
+ "type": "boolean"
84
+ },
85
+ "target": {
86
+ "type": "string",
87
+ "description": "The name of the target."
88
+ },
89
+ "params": {
90
+ "type": "string",
91
+ "description": "Configuration for params handling.",
92
+ "enum": ["ignore", "forward"],
93
+ "default": "ignore"
94
+ }
95
+ },
96
+ "oneOf": [
97
+ {
98
+ "required": ["projects", "target"]
99
+ },
100
+ {
101
+ "required": ["dependencies", "target"]
102
+ },
103
+ {
104
+ "required": ["target"],
105
+ "not": {
106
+ "anyOf": [
107
+ { "required": ["projects"] },
108
+ { "required": ["dependencies"] }
109
+ ]
110
+ }
111
+ }
112
+ ],
113
+ "additionalProperties": false
114
+ }
115
+ ]
116
+ }
117
+ },
118
+ "command": {
119
+ "type": "string",
120
+ "description": "A shorthand for using the nx:run-commands executor"
121
+ },
122
+ "cache": {
123
+ "type": "boolean",
124
+ "description": "Specifies if the given target should be cacheable"
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "tags": {
130
+ "type": "array",
131
+ "items": {
132
+ "type": "string"
133
+ }
72
134
  },
73
- {
74
- "type": "array",
75
- "description": "An array of project names",
76
- "items": {
77
- "type": "string"
78
- }
135
+ "implicitDependencies": {
136
+ "type": "array",
137
+ "items": {
138
+ "type": "string"
139
+ }
79
140
  }
80
- ]
81
- },
82
- "dependencies": {
83
- "type": "boolean"
84
- },
85
- "target": {
86
- "type": "string",
87
- "description": "The name of the target."
88
- },
89
- "params": {
90
- "type": "string",
91
- "description": "Configuration for params handling.",
92
- "enum": ["ignore", "forward"],
93
- "default": "ignore"
94
141
  }
95
- },
96
- "oneOf": [
97
- {
98
- "required": ["projects", "target"]
99
- },
100
- {
101
- "required": ["dependencies", "target"]
102
- },
103
- {
104
- "required": ["target"],
105
- "not": {
106
- "anyOf": [
107
- { "required": ["projects"] },
108
- { "required": ["dependencies"] }
109
- ]
110
- }
111
- }
112
- ],
113
- "additionalProperties": false
114
142
  }
115
- ]
116
- }
117
- },
118
- "command": {
119
- "type": "string",
120
- "description": "A shorthand for using the nx:run-commands executor"
121
- },
122
- "cache": {
123
- "type": "boolean",
124
- "description": "Specifies if the given target should be cacheable"
125
- }
143
+ ]
126
144
  }
127
- }
128
- },
129
- "tags": {
130
- "type": "array",
131
- "items": {
132
- "type": "string"
133
- }
134
- },
135
- "implicitDependencies": {
136
- "type": "array",
137
- "items": {
138
- "type": "string"
139
- }
140
145
  }
141
- }
142
146
  }
143
- ]
144
- }
145
- }
146
- }
147
- },
148
- "else": {
149
- "properties": {
150
- "projects": {
151
- "type": "object",
152
- "additionalProperties": {
153
- "type": "object",
154
- "properties": {
155
- "architect": {
156
- "type": "object",
157
- "description": "Configures all the targets which define what tasks you can run against the project",
158
- "additionalProperties": {
159
- "type": "object",
160
- "properties": {
161
- "builder": {
162
- "description": "The function that Nx will invoke when you run this architect",
163
- "type": "string"
164
- },
165
- "options": {
166
- "type": "object"
167
- },
168
- "configurations": {
147
+ },
148
+ "else": {
149
+ "properties": {
150
+ "projects": {
169
151
  "type": "object",
170
- "description": "provides extra sets of values that will be merged into the options map",
171
152
  "additionalProperties": {
172
- "type": "object"
153
+ "type": "object",
154
+ "properties": {
155
+ "architect": {
156
+ "type": "object",
157
+ "description": "Configures all the targets which define what tasks you can run against the project",
158
+ "additionalProperties": {
159
+ "type": "object",
160
+ "properties": {
161
+ "builder": {
162
+ "description": "The function that Nx will invoke when you run this architect",
163
+ "type": "string"
164
+ },
165
+ "options": {
166
+ "type": "object"
167
+ },
168
+ "configurations": {
169
+ "type": "object",
170
+ "description": "provides extra sets of values that will be merged into the options map",
171
+ "additionalProperties": {
172
+ "type": "object"
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ }
173
179
  }
174
- }
175
180
  }
176
- }
177
181
  }
178
- }
179
182
  }
180
- }
181
183
  }
182
- }
183
- }
184
- ]
184
+ ]
185
185
  }
@@ -1,34 +1,34 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "$id": "SetupAiAgents",
4
- "title": "Set Up AI Agents",
5
- "description": "Sets up the Nx MCP & rule files for common AI Agents.",
6
- "type": "object",
7
- "properties": {
8
- "directory": {
9
- "type": "string",
10
- "description": "Directory where the AI agent configuration files will be generated",
11
- "default": "."
2
+ "$schema": "https://json-schema.org/schema",
3
+ "$id": "SetupAiAgents",
4
+ "title": "Set Up AI Agents",
5
+ "description": "Sets up the Nx MCP & rule files for common AI Agents.",
6
+ "type": "object",
7
+ "properties": {
8
+ "directory": {
9
+ "type": "string",
10
+ "description": "Directory where the AI agent configuration files will be generated",
11
+ "default": "."
12
+ },
13
+ "writeNxCloudRules": {
14
+ "type": "boolean",
15
+ "description": "Whether to write Nx Cloud rules",
16
+ "default": false
17
+ },
18
+ "packageVersion": {
19
+ "type": "string",
20
+ "description": "The version of the package to use",
21
+ "default": "latest"
22
+ },
23
+ "agents": {
24
+ "type": "array",
25
+ "description": "The agents to setup Nx configuration for.",
26
+ "items": {
27
+ "type": "string",
28
+ "enum": ["claude", "gemini", "codex", "cursor", "copilot"]
29
+ },
30
+ "default": ["claude", "gemini", "codex", "cursor", "copilot"]
31
+ }
12
32
  },
13
- "writeNxCloudRules": {
14
- "type": "boolean",
15
- "description": "Whether to write Nx Cloud rules",
16
- "default": false
17
- },
18
- "packageVersion": {
19
- "type": "string",
20
- "description": "The version of the package to use",
21
- "default": "latest"
22
- },
23
- "agents": {
24
- "type": "array",
25
- "description": "The agents to setup Nx configuration for.",
26
- "items": {
27
- "type": "string",
28
- "enum": ["claude", "gemini", "codex", "cursor", "copilot"]
29
- },
30
- "default": ["claude", "gemini", "codex", "cursor", "copilot"]
31
- }
32
- },
33
- "required": ["directory"]
33
+ "required": ["directory"]
34
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/changelog.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAkB1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAepD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AExD,wBAAgB,SAAS,CAAC,qBAAqB,EAAE,sBAAsB,IAOnE,MAAM,gBAAgB,KACrB,OAAO,CAAC,wBAAwB,CAAC,CAgqBrC"}
@@ -213,12 +213,12 @@ function createAPI(overrideReleaseConfig) {
213
213
  }
214
214
  else {
215
215
  let workspaceChangelogFromRef = args.from ||
216
- (await (0, git_1.getLatestGitTagForPattern)(nxReleaseConfig.releaseTagPattern, {}, {
217
- checkAllBranchesWhen: nxReleaseConfig.releaseTagPatternCheckAllBranchesWhen,
216
+ (await (0, git_1.getLatestGitTagForPattern)(nxReleaseConfig.releaseTag.pattern, {}, {
217
+ checkAllBranchesWhen: nxReleaseConfig.releaseTag.checkAllBranchesWhen,
218
218
  preid: workspacePreid ??
219
219
  projectsPreid?.[Object.keys(projectsPreid)[0]],
220
- releaseTagPatternRequireSemver: nxReleaseConfig.releaseTagPatternRequireSemver,
221
- releaseTagPatternStrictPreid: nxReleaseConfig.releaseTagPatternStrictPreid,
220
+ requireSemver: nxReleaseConfig.releaseTag.requireSemver,
221
+ strictPreid: nxReleaseConfig.releaseTag.strictPreid,
222
222
  }))?.tag;
223
223
  if (!workspaceChangelogFromRef) {
224
224
  if (useAutomaticFromRef) {
@@ -228,7 +228,7 @@ function createAPI(overrideReleaseConfig) {
228
228
  }
229
229
  }
230
230
  else {
231
- throw new Error(`Unable to determine the previous git tag. If this is the first release of your workspace, use the --first-release option or set the "release.changelog.automaticFromRef" config property in nx.json to generate a changelog from the first commit. Otherwise, be sure to configure the "release.releaseTagPattern" property in nx.json to match the structure of your repository's git tags.`);
231
+ throw new Error(`Unable to determine the previous git tag. If this is the first release of your workspace, use the --first-release option or set the "release.changelog.automaticFromRef" config property in nx.json to generate a changelog from the first commit. Otherwise, be sure to configure the "release.releaseTag.pattern" property in nx.json to match the structure of your repository's git tags.`);
232
232
  }
233
233
  }
234
234
  // Make sure that the fromRef is actually resolvable
@@ -347,14 +347,14 @@ function createAPI(overrideReleaseConfig) {
347
347
  }
348
348
  else {
349
349
  let fromRef = args.from ||
350
- (await (0, git_1.getLatestGitTagForPattern)(releaseGroup.releaseTagPattern, {
350
+ (await (0, git_1.getLatestGitTagForPattern)(releaseGroup.releaseTag.pattern, {
351
351
  projectName: project.name,
352
352
  releaseGroupName: releaseGroup.name,
353
353
  }, {
354
- checkAllBranchesWhen: releaseGroup.releaseTagPatternCheckAllBranchesWhen,
354
+ checkAllBranchesWhen: releaseGroup.releaseTag.checkAllBranchesWhen,
355
355
  preid: projectsPreid[project.name],
356
- releaseTagPatternRequireSemver: releaseGroup.releaseTagPatternRequireSemver,
357
- releaseTagPatternStrictPreid: releaseGroup.releaseTagPatternStrictPreid,
356
+ requireSemver: releaseGroup.releaseTag.requireSemver,
357
+ strictPreid: releaseGroup.releaseTag.strictPreid,
358
358
  }))?.tag;
359
359
  let commits;
360
360
  if (!fromRef && useAutomaticFromRef) {
@@ -370,7 +370,7 @@ function createAPI(overrideReleaseConfig) {
370
370
  }
371
371
  }
372
372
  if (!fromRef && !commits) {
373
- throw new Error(`Unable to determine the previous git tag. If this is the first release of your workspace, use the --first-release option or set the "release.changelog.automaticFromRef" config property in nx.json to generate a changelog from the first commit. Otherwise, be sure to configure the "release.releaseTagPattern" property in nx.json to match the structure of your repository's git tags.`);
373
+ throw new Error(`Unable to determine the previous git tag. If this is the first release of your workspace, use the --first-release option or set the "release.changelog.automaticFromRef" config property in nx.json to generate a changelog from the first commit. Otherwise, be sure to configure the "release.releaseTag.pattern" property in nx.json to match the structure of your repository's git tags.`);
374
374
  }
375
375
  if (!commits) {
376
376
  commits = await filterProjectCommits({
@@ -461,12 +461,12 @@ function createAPI(overrideReleaseConfig) {
461
461
  }
462
462
  else {
463
463
  let fromRef = args.from ||
464
- (await (0, git_1.getLatestGitTagForPattern)(releaseGroup.releaseTagPattern, {}, {
465
- checkAllBranchesWhen: releaseGroup.releaseTagPatternCheckAllBranchesWhen,
464
+ (await (0, git_1.getLatestGitTagForPattern)(releaseGroup.releaseTag.pattern, {}, {
465
+ checkAllBranchesWhen: releaseGroup.releaseTag.checkAllBranchesWhen,
466
466
  preid: workspacePreid ??
467
467
  projectsPreid?.[Object.keys(projectsPreid)[0]],
468
- releaseTagPatternRequireSemver: releaseGroup.releaseTagPatternRequireSemver,
469
- releaseTagPatternStrictPreid: releaseGroup.releaseTagPatternStrictPreid,
468
+ requireSemver: releaseGroup.releaseTag.requireSemver,
469
+ strictPreid: releaseGroup.releaseTag.strictPreid,
470
470
  }))?.tag;
471
471
  if (!fromRef) {
472
472
  if (useAutomaticFromRef) {
@@ -476,7 +476,7 @@ function createAPI(overrideReleaseConfig) {
476
476
  }
477
477
  }
478
478
  else {
479
- throw new Error(`Unable to determine the previous git tag. If this is the first release of your release group, use the --first-release option or set the "release.changelog.automaticFromRef" config property in nx.json to generate a changelog from the first commit. Otherwise, be sure to configure the "release.releaseTagPattern" property in nx.json to match the structure of your repository's git tags.`);
479
+ throw new Error(`Unable to determine the previous git tag. If this is the first release of your release group, use the --first-release option or set the "release.changelog.automaticFromRef" config property in nx.json to generate a changelog from the first commit. Otherwise, be sure to configure the "release.releaseTag.pattern" property in nx.json to match the structure of your repository's git tags.`);
480
480
  }
481
481
  }
482
482
  // Make sure that the fromRef is actually resolvable
@@ -547,7 +547,7 @@ function resolveChangelogVersions(args, releaseGraph) {
547
547
  * otherwise it suggests a filtering mismatch between the version and changelog command invocations.
548
548
  */
549
549
  if (!args.versionData[projectName]) {
550
- throw new Error(`The provided versionData object does not contain a version for project "${projectName}". This suggests a filtering mismatch between the version and changelog command invocations.`);
550
+ throw new Error(`The provided versionData object does not contain a version for project "${projectName}". This suggests a filtering mismatch between the version and changelog command invocations. Please ensure that you have used the same "group" or "project" filter between commands.`);
551
551
  }
552
552
  }
553
553
  return versionData;
@@ -744,7 +744,7 @@ async function generateChangelogForWorkspace({ tree, args, nxReleaseConfig, work
744
744
  }
745
745
  const releaseVersion = new shared_1.ReleaseVersion({
746
746
  version: workspaceChangelogVersion,
747
- releaseTagPattern: nxReleaseConfig.releaseTagPattern,
747
+ releaseTagPattern: nxReleaseConfig.releaseTag.pattern,
748
748
  });
749
749
  if (interpolatedTreePath) {
750
750
  const prefix = dryRun ? 'Previewing' : 'Generating';
@@ -849,7 +849,7 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
849
849
  projectsVersionData[project.name].dockerVersion
850
850
  ? projectsVersionData[project.name].dockerVersion
851
851
  : projectsVersionData[project.name].newVersion,
852
- releaseTagPattern: releaseGroup.releaseTagPattern,
852
+ releaseTagPattern: releaseGroup.releaseTag.pattern,
853
853
  projectName: project.name,
854
854
  });
855
855
  if (interpolatedTreePath) {
@@ -29,6 +29,9 @@ type RemoveBooleanFromProperties<T, K extends keyof T> = {
29
29
  type RemoveBooleanFromPropertiesOnEach<T, K extends keyof T[keyof T]> = {
30
30
  [U in keyof T]: RemoveBooleanFromProperties<T[U], K>;
31
31
  };
32
+ type RemoveDeprecatedPropertiesFromEach<T> = {
33
+ [K in keyof T]: Omit<T[K], 'releaseTagPattern' | 'releaseTagPatternCheckAllBranchesWhen' | 'releaseTagPatternRequireSemver' | 'releaseTagPatternPreferDockerVersion' | 'releaseTagPatternStrictPreid'>;
34
+ };
32
35
  export declare const IMPLICIT_DEFAULT_RELEASE_GROUP = "__default__";
33
36
  export declare const DEFAULT_VERSION_ACTIONS_PATH = "@nx/js/src/release/version-actions";
34
37
  /**
@@ -41,13 +44,14 @@ export declare const DEFAULT_VERSION_ACTIONS_PATH = "@nx/js/src/release/version-
41
44
  * pattern such as directories and globs).
42
45
  */
43
46
  export type NxReleaseConfig = Omit<DeepRequired<NxReleaseConfiguration & {
44
- groups: EnsureDockerOptional<DeepRequired<RemoveTrueFromPropertiesOnEach<EnsureProjectsArray<NxReleaseConfiguration['groups']>, 'changelog' | 'docker'>>>;
47
+ groups: RemoveDeprecatedPropertiesFromEach<EnsureDockerOptional<DeepRequired<RemoveTrueFromPropertiesOnEach<EnsureProjectsArray<NxReleaseConfiguration['groups']>, 'changelog' | 'docker'>>>>;
45
48
  changelog: RemoveTrueFromProperties<DeepRequired<NxReleaseConfiguration['changelog']>, 'workspaceChangelog' | 'projectChangelogs'>;
46
49
  conventionalCommits: {
47
50
  types: RemoveBooleanFromPropertiesOnEach<DeepRequired<RemoveBooleanFromProperties<DeepRequired<NxReleaseConfiguration['conventionalCommits']['types']>, string>>, 'changelog'>;
48
51
  };
49
- }>, 'projects' | 'docker'> & {
52
+ }>, 'projects' | 'docker' | 'releaseTagPattern' | 'releaseTagPatternCheckAllBranchesWhen' | 'releaseTagPatternRequireSemver' | 'releaseTagPatternPreferDockerVersion' | 'releaseTagPatternStrictPreid'> & {
50
53
  docker: DeepRequired<NxReleaseDockerConfiguration> | undefined;
54
+ releaseTag: DeepRequired<NonNullable<NxReleaseConfiguration['releaseTag']>>;
51
55
  };
52
56
  export interface CreateNxReleaseConfigError {
53
57
  code: 'PROJECTS_AND_GROUPS_DEFINED' | 'RELEASE_GROUP_MATCHES_NO_PROJECTS' | 'RELEASE_GROUP_RELEASE_TAG_PATTERN_VERSION_PLACEHOLDER_MISSING_OR_EXCESSIVE' | 'PROJECT_MATCHES_MULTIPLE_GROUPS' | 'CONVENTIONAL_COMMITS_SHORTHAND_MIXED_WITH_OVERLAPPING_OPTIONS' | 'GLOBAL_GIT_CONFIG_MIXED_WITH_GRANULAR_GIT_CONFIG' | 'CANNOT_RESOLVE_CHANGELOG_RENDERER' | 'INVALID_CHANGELOG_CREATE_RELEASE_PROVIDER' | 'INVALID_CHANGELOG_CREATE_RELEASE_HOSTNAME' | 'INVALID_CHANGELOG_CREATE_RELEASE_API_BASE_URL' | 'GIT_PUSH_FALSE_WITH_CREATE_RELEASE';
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/config/config.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,mBAAmB,EAEnB,sBAAsB,EACtB,4BAA4B,EAG7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAA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AED,UAAU,GAAG,QAAQ,CACtB,GAAG;IAEF,MAAM,EAAE,YAAY,CAAC,4BAA4B,CAAC,GAAG,SAAS,CAAC;CAChE,CAAC;AAGF,MAAM,WAAW,0BAA0B;IACzC,IAAI,EACA,6BAA6B,GAC7B,mCAAmC,GACnC,4EAA4E,GAC5E,iCAAiC,GACjC,+DAA+D,GAC/D,kDAAkD,GAClD,mCAAmC,GACnC,2CAA2C,GAC3C,2CAA2C,GAC3C,+CAA+C,GAC/C,oCAAoC,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;CACzC;AAGD,wBAAsB,qBAAqB,CACzC,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,UAAU,GAAE,mBAAmB,CAAC,SAAS,CAAM,GAC9C,OAAO,CAAC;IACT,KAAK,EAAE,IAAI,GAAG,0BAA0B,CAAC;IACzC,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;CACzC,CAAC,CAmuBD;AA4GD,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,KAAK,CAAC,CA2IhB;AA2QD;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/config/config.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,mBAAmB,EAEnB,sBAAsB,EACtB,4BAA4B,EAG7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAa7E,KAAK,YAAY,CAAC,CAAC,IAAI,QAAQ,CAAC;KAC7B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,QA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