nx 22.1.0-canary.20251110-73ecb30 → 22.1.0-canary.20251111-647d751
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/executors.json +16 -16
- package/generators.json +13 -13
- package/migrations.json +143 -143
- package/package.json +11 -14
- package/presets/npm.json +4 -4
- package/release/changelog-renderer/index.d.ts.map +1 -1
- package/release/changelog-renderer/index.js +13 -8
- package/schemas/nx-schema.json +1286 -1286
- package/schemas/project-schema.json +359 -359
- package/schemas/workspace-schema.json +165 -165
- package/src/ai/set-up-ai-agents/schema.json +31 -31
- package/src/command-line/release/changelog/commit-utils.d.ts +14 -0
- package/src/command-line/release/changelog/commit-utils.d.ts.map +1 -0
- package/src/command-line/release/changelog/commit-utils.js +63 -0
- package/src/command-line/release/changelog/version-plan-filtering.d.ts +39 -0
- package/src/command-line/release/changelog/version-plan-filtering.d.ts.map +1 -0
- package/src/command-line/release/changelog/version-plan-filtering.js +151 -0
- package/src/command-line/release/changelog/version-plan-utils.d.ts +32 -0
- package/src/command-line/release/changelog/version-plan-utils.d.ts.map +1 -0
- package/src/command-line/release/changelog/version-plan-utils.js +92 -0
- package/src/command-line/release/changelog.d.ts +1 -16
- package/src/command-line/release/changelog.d.ts.map +1 -1
- package/src/command-line/release/changelog.js +127 -269
- package/src/command-line/release/command-object.d.ts +1 -0
- package/src/command-line/release/command-object.d.ts.map +1 -1
- package/src/command-line/release/command-object.js +6 -0
- package/src/command-line/release/utils/shared.d.ts.map +1 -1
- package/src/command-line/release/utils/shared.js +2 -2
- package/src/core/graph/main.js +1 -1
- package/src/executors/noop/schema.json +8 -8
- package/src/executors/run-commands/schema.json +187 -187
- package/src/executors/run-script/schema.json +25 -25
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +38 -38
- package/src/plugins/js/index.d.ts.map +1 -1
- package/src/plugins/js/index.js +55 -7
- package/src/plugins/js/lock-file/lock-file.d.ts +5 -2
- package/src/plugins/js/lock-file/lock-file.d.ts.map +1 -1
- package/src/plugins/js/lock-file/lock-file.js +8 -6
- package/src/plugins/js/lock-file/npm-parser.d.ts +5 -2
- package/src/plugins/js/lock-file/npm-parser.d.ts.map +1 -1
- package/src/plugins/js/lock-file/npm-parser.js +5 -8
- package/src/plugins/js/lock-file/pnpm-parser.d.ts +5 -2
- package/src/plugins/js/lock-file/pnpm-parser.d.ts.map +1 -1
- package/src/plugins/js/lock-file/pnpm-parser.js +5 -7
- package/src/plugins/js/lock-file/yarn-parser.d.ts +5 -2
- package/src/plugins/js/lock-file/yarn-parser.d.ts.map +1 -1
- package/src/plugins/js/lock-file/yarn-parser.js +5 -7
|
@@ -1,185 +1,185 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
"
|
|
36
|
-
|
|
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
|
-
|
|
25
|
+
"type": "string"
|
|
63
26
|
},
|
|
64
27
|
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
"
|
|
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
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GitCommit } from '../utils/git';
|
|
2
|
+
import { FileData, ProjectFileMap } from '../../../config/project-graph';
|
|
3
|
+
import { NxReleaseConfig } from '../config/config';
|
|
4
|
+
import { ChangelogChange } from './version-plan-utils';
|
|
5
|
+
export declare function mapCommitToChange(commit: GitCommit, affectedProjects: string[] | '*'): ChangelogChange;
|
|
6
|
+
export declare function createChangesFromCommits(commits: GitCommit[], fileMap: {
|
|
7
|
+
projectFileMap: ProjectFileMap;
|
|
8
|
+
nonProjectFiles: FileData[];
|
|
9
|
+
}, fileToProjectMap: Record<string, string>, conventionalCommitsConfig: NxReleaseConfig['conventionalCommits']): ChangelogChange[];
|
|
10
|
+
export declare function filterHiddenChanges(changes: ChangelogChange[], conventionalCommitsConfig: NxReleaseConfig['conventionalCommits']): ChangelogChange[];
|
|
11
|
+
export declare function getProjectsAffectedByCommit(commit: GitCommit, fileToProjectMap: Record<string, string>): string[];
|
|
12
|
+
export declare function commitChangesNonProjectFiles(commit: GitCommit, nonProjectFiles: FileData[]): boolean;
|
|
13
|
+
export declare function createFileToProjectMap(projectFileMap: ProjectFileMap): Record<string, string>;
|
|
14
|
+
//# sourceMappingURL=commit-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/changelog/commit-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,EACjB,gBAAgB,EAAE,MAAM,EAAE,GAAG,GAAG,GAC/B,eAAe,CAajB;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,SAAS,EAAE,EACpB,OAAO,EAAE;IAAE,cAAc,EAAE,cAAc,CAAC;IAAC,eAAe,EAAE,QAAQ,EAAE,CAAA;CAAE,EACxE,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACxC,yBAAyB,EAAE,eAAe,CAAC,qBAAqB,CAAC,GAChE,eAAe,EAAE,CAanB;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,eAAe,EAAE,EAC1B,yBAAyB,EAAE,eAAe,CAAC,qBAAqB,CAAC,GAChE,eAAe,EAAE,CAWnB;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,SAAS,EACjB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACvC,MAAM,EAAE,CASV;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,QAAQ,EAAE,GAC1B,OAAO,CAIT;AAED,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,cAAc,GAC7B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQxB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapCommitToChange = mapCommitToChange;
|
|
4
|
+
exports.createChangesFromCommits = createChangesFromCommits;
|
|
5
|
+
exports.filterHiddenChanges = filterHiddenChanges;
|
|
6
|
+
exports.getProjectsAffectedByCommit = getProjectsAffectedByCommit;
|
|
7
|
+
exports.commitChangesNonProjectFiles = commitChangesNonProjectFiles;
|
|
8
|
+
exports.createFileToProjectMap = createFileToProjectMap;
|
|
9
|
+
function mapCommitToChange(commit, affectedProjects) {
|
|
10
|
+
return {
|
|
11
|
+
type: commit.type,
|
|
12
|
+
scope: commit.scope,
|
|
13
|
+
description: commit.description,
|
|
14
|
+
body: commit.body,
|
|
15
|
+
isBreaking: commit.isBreaking,
|
|
16
|
+
githubReferences: commit.references,
|
|
17
|
+
authors: commit.authors,
|
|
18
|
+
shortHash: commit.shortHash,
|
|
19
|
+
revertedHashes: commit.revertedHashes,
|
|
20
|
+
affectedProjects,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function createChangesFromCommits(commits, fileMap, fileToProjectMap, conventionalCommitsConfig) {
|
|
24
|
+
return filterHiddenChanges(commits.map((c) => {
|
|
25
|
+
const affectedProjects = commitChangesNonProjectFiles(c, fileMap.nonProjectFiles)
|
|
26
|
+
? '*'
|
|
27
|
+
: getProjectsAffectedByCommit(c, fileToProjectMap);
|
|
28
|
+
return mapCommitToChange(c, affectedProjects);
|
|
29
|
+
}), conventionalCommitsConfig);
|
|
30
|
+
}
|
|
31
|
+
function filterHiddenChanges(changes, conventionalCommitsConfig) {
|
|
32
|
+
return changes.filter((change) => {
|
|
33
|
+
const type = change.type;
|
|
34
|
+
const typeConfig = conventionalCommitsConfig.types[type];
|
|
35
|
+
if (!typeConfig) {
|
|
36
|
+
// don't include changes with unknown types
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
return !typeConfig.changelog.hidden;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function getProjectsAffectedByCommit(commit, fileToProjectMap) {
|
|
43
|
+
const affectedProjects = new Set();
|
|
44
|
+
for (const affectedFile of commit.affectedFiles) {
|
|
45
|
+
const affectedProject = fileToProjectMap[affectedFile];
|
|
46
|
+
if (affectedProject) {
|
|
47
|
+
affectedProjects.add(affectedProject);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return Array.from(affectedProjects);
|
|
51
|
+
}
|
|
52
|
+
function commitChangesNonProjectFiles(commit, nonProjectFiles) {
|
|
53
|
+
return nonProjectFiles.some((fileData) => commit.affectedFiles.includes(fileData.file));
|
|
54
|
+
}
|
|
55
|
+
function createFileToProjectMap(projectFileMap) {
|
|
56
|
+
const fileToProjectMap = {};
|
|
57
|
+
for (const [projectName, projectFiles] of Object.entries(projectFileMap)) {
|
|
58
|
+
for (const file of projectFiles) {
|
|
59
|
+
fileToProjectMap[file.file] = projectName;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return fileToProjectMap;
|
|
63
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ChangelogOptions } from '../command-object';
|
|
2
|
+
import type { NxReleaseConfig } from '../config/config';
|
|
3
|
+
import { RawVersionPlan } from '../config/version-plans';
|
|
4
|
+
import type { VersionData } from '../utils/shared';
|
|
5
|
+
/**
|
|
6
|
+
* Filters version plans to only include those that were committed between the specified SHAs
|
|
7
|
+
* @param versionPlans The raw version plans to filter
|
|
8
|
+
* @param fromSHA The starting commit SHA (exclusive)
|
|
9
|
+
* @param toSHA The ending commit SHA (inclusive)
|
|
10
|
+
* @param isVerbose Whether to output verbose logging
|
|
11
|
+
* @returns The filtered version plans
|
|
12
|
+
*/
|
|
13
|
+
export declare function filterVersionPlansByCommitRange(versionPlans: RawVersionPlan[], fromSHA: string, toSHA: string, isVerbose: boolean): Promise<RawVersionPlan[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Resolves the "from SHA" for changelog purposes.
|
|
16
|
+
* This determines the starting point for changelog generation and optional version plan filtering.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveChangelogFromSHA({ fromRef, tagPattern, tagPatternValues, checkAllBranchesWhen, preid, requireSemver, strictPreid, useAutomaticFromRef, }: {
|
|
19
|
+
fromRef?: string;
|
|
20
|
+
tagPattern: string;
|
|
21
|
+
tagPatternValues: Record<string, string>;
|
|
22
|
+
checkAllBranchesWhen: boolean | string[];
|
|
23
|
+
preid?: string;
|
|
24
|
+
requireSemver: boolean;
|
|
25
|
+
strictPreid: boolean;
|
|
26
|
+
useAutomaticFromRef: boolean;
|
|
27
|
+
}): Promise<string | null>;
|
|
28
|
+
/**
|
|
29
|
+
* Helper function for workspace-level "from SHA" resolution.
|
|
30
|
+
* Extracts preids and calls the generic resolver.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveWorkspaceChangelogFromSHA({ args, nxReleaseConfig, useAutomaticFromRef, }: {
|
|
33
|
+
args: ChangelogOptions;
|
|
34
|
+
nxReleaseConfig: NxReleaseConfig;
|
|
35
|
+
useAutomaticFromRef: boolean;
|
|
36
|
+
}): Promise<string | null>;
|
|
37
|
+
export declare function extractPreidFromVersion(version: string | null | undefined): string | undefined;
|
|
38
|
+
export declare function extractProjectsPreidFromVersionData(versionData: VersionData | undefined): Record<string, string | undefined> | undefined;
|
|
39
|
+
//# sourceMappingURL=version-plan-filtering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-plan-filtering.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/release/changelog/version-plan-filtering.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAOzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;;;GAOG;AACH,wBAAsB,+BAA+B,CACnD,YAAY,EAAE,cAAc,EAAE,EAC9B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,cAAc,EAAE,CAAC,CAgC3B;AA0DD;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,EAC5C,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,EACL,aAAa,EACb,WAAW,EACX,mBAAmB,GACpB,EAAE;IACD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,oBAAoB,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;CAC9B,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyBzB;AAED;;;GAGG;AACH,wBAAsB,gCAAgC,CAAC,EACrD,IAAI,EACJ,eAAe,EACf,mBAAmB,GACpB,EAAE;IACD,IAAI,EAAE,gBAAgB,CAAC;IACvB,eAAe,EAAE,eAAe,CAAC;IACjC,mBAAmB,EAAE,OAAO,CAAC;CAC9B,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAczB;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACjC,MAAM,GAAG,SAAS,CAOpB;AAED,wBAAgB,mCAAmC,CACjD,WAAW,EAAE,WAAW,GAAG,SAAS,GACnC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,SAAS,CAYhD"}
|