nx 22.2.0-canary.20251202-30acb10 → 22.2.0-canary.20251203-2e442d5

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.
@@ -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": {
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": {
21
34
  "type": "object",
22
- "additionalProperties": {
23
- "oneOf": [
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": [
24
61
  {
25
- "type": "string"
62
+ "type": "string"
26
63
  },
27
64
  {
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
- }
65
+ "type": "object",
66
+ "properties": {
67
+ "projects": {
68
+ "oneOf": [
69
+ {
70
+ "type": "string",
71
+ "description": "A project name"
134
72
  },
135
- "implicitDependencies": {
136
- "type": "array",
137
- "items": {
138
- "type": "string"
139
- }
73
+ {
74
+ "type": "array",
75
+ "description": "An array of project names",
76
+ "items": {
77
+ "type": "string"
78
+ }
140
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"
141
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
142
114
  }
143
- ]
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
+ }
144
126
  }
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
+ }
145
140
  }
141
+ }
146
142
  }
147
- },
148
- "else": {
149
- "properties": {
150
- "projects": {
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": {
151
169
  "type": "object",
170
+ "description": "provides extra sets of values that will be merged into the options map",
152
171
  "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": {
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
- }
172
+ "type": "object"
179
173
  }
174
+ }
180
175
  }
176
+ }
181
177
  }
178
+ }
182
179
  }
180
+ }
183
181
  }
184
- ]
182
+ }
183
+ }
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": "."
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
- }
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": "."
32
12
  },
33
- "required": ["directory"]
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"]
34
34
  }
@@ -32,6 +32,21 @@ export interface GetLatestGitTagForPatternOptions {
32
32
  requireSemver: boolean;
33
33
  strictPreid: boolean;
34
34
  }
35
+ /**
36
+ * Sanitizes a project name to be valid for use in git tag names.
37
+ *
38
+ * Git tag names have specific restrictions per git-check-ref-format.
39
+ * This function handles:
40
+ * - Colons (:) - replaced with slashes (/) for Gradle-style module paths
41
+ * - Other invalid characters - replaced with hyphens (-)
42
+ * - Consecutive slashes - collapsed to single slash
43
+ * - Leading/trailing slashes - removed
44
+ * - Consecutive dots - replaced with single dot
45
+ *
46
+ * @param name - The project name to sanitize
47
+ * @returns The sanitized name suitable for git tags
48
+ */
49
+ export declare function sanitizeProjectNameForGitTag(name: string): string;
35
50
  /**
36
51
  * Extract the tag and version from a tag string
37
52
  *
@@ -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,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KAAK,IAAI,CAAC;CACnC,GAAG,OAAO,CAAC,MAAM,CAAC,CAqClB;AAED,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"}
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,SA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AC,CAqClB;AAED,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"}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sanitizeProjectNameForGitTag = sanitizeProjectNameForGitTag;
3
4
  exports.extractTagAndVersion = extractTagAndVersion;
4
5
  exports.getLatestGitTagForPattern = getLatestGitTagForPattern;
5
6
  exports.getGitDiff = getGitDiff;
@@ -29,6 +30,40 @@ function escapeRegExp(string) {
29
30
  }
30
31
  // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
31
32
  const SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/g;
33
+ /**
34
+ * Characters that are invalid in git ref names according to git-check-ref-format.
35
+ * Note: We don't include ':' here as we handle it specially (replace with '/').
36
+ */
37
+ const GIT_INVALID_REF_CHARS_REGEX = /[\x00-\x1f\x7f ~^?*\[\\]/g;
38
+ /**
39
+ * Sanitizes a project name to be valid for use in git tag names.
40
+ *
41
+ * Git tag names have specific restrictions per git-check-ref-format.
42
+ * This function handles:
43
+ * - Colons (:) - replaced with slashes (/) for Gradle-style module paths
44
+ * - Other invalid characters - replaced with hyphens (-)
45
+ * - Consecutive slashes - collapsed to single slash
46
+ * - Leading/trailing slashes - removed
47
+ * - Consecutive dots - replaced with single dot
48
+ *
49
+ * @param name - The project name to sanitize
50
+ * @returns The sanitized name suitable for git tags
51
+ */
52
+ function sanitizeProjectNameForGitTag(name) {
53
+ return (name
54
+ // Replace colons with slashes (for Gradle module paths like :common:lib)
55
+ .replace(/:/g, '/')
56
+ // Replace other git-invalid characters with hyphens
57
+ .replace(GIT_INVALID_REF_CHARS_REGEX, '-')
58
+ // Collapse consecutive slashes to single slash
59
+ .replace(/\/+/g, '/')
60
+ // Collapse consecutive dots (invalid in git refs)
61
+ .replace(/\.{2,}/g, '.')
62
+ // Remove leading slashes
63
+ .replace(/^\/+/, '')
64
+ // Remove trailing slashes
65
+ .replace(/\/+$/, ''));
66
+ }
32
67
  /**
33
68
  * Extract the tag and version from a tag string
34
69
  *
@@ -373,7 +373,7 @@ class ReleaseGraph {
373
373
  const releaseTagPattern = releaseGroupNode.group.releaseTag.pattern;
374
374
  if (finalConfigForProject.currentVersionResolver === 'git-tag') {
375
375
  latestMatchingGitTag = await (0, git_1.getLatestGitTagForPattern)(releaseTagPattern, {
376
- projectName: projectGraphNode.name,
376
+ projectName: (0, git_1.sanitizeProjectNameForGitTag)(projectGraphNode.name),
377
377
  releaseGroupName: releaseGroupNode.group.name,
378
378
  }, {
379
379
  checkAllBranchesWhen: releaseGroupNode.group.releaseTag.checkAllBranchesWhen,
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/shared.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAW7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,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,CAAC;KACxB,EAAE,CAAC;CACL;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQrD;AAED,qBAAa,cAAc;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;gBAEV,EACV,OAAO,EAAE,qEAAqE;IAC9E,iB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,4BAA4B,CAChD,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAAE,EACpB,QAAQ,EAAE,MAAM,EAAE,EAClB,eAAe,EAAE,eAAe,GAElC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,qBAAqB,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC,CAAC,CA6C5E"}
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/utils/shared.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAW7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EACL,SAAS,EAIV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,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,CAAC;KACxB,EAAE,CAAC;CACL;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQrD;AAED,qBAAa,cAAc;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;gBAEV,EACV,OAA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AAI,CAcnE;AA6BD,wBAAsB,4BAA4B,CAChD,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAAE,EACpB,QAAQ,EAAE,MAAM,EAAE,EAClB,eAAe,EAAE,eAAe,GAElC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,qBAAqB,EAAE,OAAO,CAAA;CAAE,EAAE,CAAC,CAAC,CA6C5E"}
@@ -35,7 +35,9 @@ class ReleaseVersion {
35
35
  this.rawVersion = version;
36
36
  this.gitTag = (0, utils_1.interpolate)(releaseTagPattern, {
37
37
  version,
38
- projectName,
38
+ projectName: projectName
39
+ ? (0, git_1.sanitizeProjectNameForGitTag)(projectName)
40
+ : projectName,
39
41
  });
40
42
  this.isPrerelease = isPrerelease(version);
41
43
  }
@@ -184,13 +186,13 @@ function createGitTagValues(releaseGroups, releaseGroupToFilteredProjects, versi
184
186
  if (projectVersionData.dockerVersion) {
185
187
  tags.push((0, utils_1.interpolate)(releaseGroup.releaseTag.pattern, {
186
188
  version: projectVersionData.dockerVersion,
187
- projectName: project,
189
+ projectName: (0, git_1.sanitizeProjectNameForGitTag)(project),
188
190
  }));
189
191
  }
190
192
  if (projectVersionData.newVersion) {
191
193
  tags.push((0, utils_1.interpolate)(releaseGroup.releaseTag.pattern, {
192
194
  version: projectVersionData.newVersion,
193
- projectName: project,
195
+ projectName: (0, git_1.sanitizeProjectNameForGitTag)(project),
194
196
  }));
195
197
  }
196
198
  }
@@ -200,7 +202,7 @@ function createGitTagValues(releaseGroups, releaseGroupToFilteredProjects, versi
200
202
  version: preferDockerVersion
201
203
  ? projectVersionData.dockerVersion
202
204
  : projectVersionData.newVersion,
203
- projectName: project,
205
+ projectName: (0, git_1.sanitizeProjectNameForGitTag)(project),
204
206
  }));
205
207
  }
206
208
  }
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": 2,
3
- "title": "Noop",
4
- "description": "An executor that does nothing.",
5
- "type": "object",
6
- "cli": "nx",
7
- "outputCapture": "pipe",
8
- "properties": {},
9
- "additionalProperties": true
2
+ "version": 2,
3
+ "title": "Noop",
4
+ "description": "An executor that does nothing.",
5
+ "type": "object",
6
+ "cli": "nx",
7
+ "outputCapture": "pipe",
8
+ "properties": {},
9
+ "additionalProperties": true
10
10
  }