@ohos-ports/nx 19.8.4-beta.2 → 19.8.14-beta.0
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/.eslintrc.json +140 -0
- package/bin/nx.js +8 -0
- package/bin/post-install.js +7 -5
- package/package.json +16 -30
- package/plugins/package-json.d.ts +5 -1
- package/plugins/package-json.js +26 -2
- package/release/changelog-renderer/index.d.ts +80 -0
- package/release/changelog-renderer/index.js +315 -0
- package/release/index.d.ts +4 -0
- package/release/index.js +12 -0
- package/schemas/nx-schema.json +819 -0
- package/schemas/project-schema.json +331 -0
- package/schemas/workspace-schema.json +185 -0
- package/src/command-line/affected/affected.js +3 -1
- package/src/command-line/format/format.js +4 -2
- package/src/command-line/show/project.js +4 -0
- package/src/command-line/show/projects.js +4 -0
- package/src/daemon/client/client.js +3 -0
- package/src/daemon/server/project-graph-incremental-recomputation.js +4 -4
- package/src/daemon/server/server.js +9 -0
- package/src/daemon/server/shutdown-utils.js +4 -2
- package/src/executors/utils/convert-nx-executor.js +2 -3
- package/src/hasher/hash-task.js +1 -1
- package/src/native/index.d.ts +6 -4
- package/src/native/index.js +0 -1
- package/src/native/native-bindings.js +3 -2
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/plugins/package-json/create-nodes.d.ts +3 -4
- package/src/plugins/package-json/create-nodes.js +19 -2
- package/src/project-graph/affected/affected-project-graph.js +3 -0
- package/src/project-graph/affected/locators/project-glob-changes.js +16 -4
- package/src/project-graph/build-project-graph.d.ts +1 -0
- package/src/project-graph/build-project-graph.js +12 -3
- package/src/project-graph/error-types.d.ts +1 -1
- package/src/project-graph/plugins/get-plugins.d.ts +4 -0
- package/src/{daemon/server/plugins.js → project-graph/plugins/get-plugins.js} +19 -1
- package/src/project-graph/plugins/index.js +1 -0
- package/src/project-graph/plugins/internal-api.d.ts +4 -4
- package/src/project-graph/plugins/internal-api.js +15 -13
- package/src/project-graph/plugins/isolation/index.js +1 -7
- package/src/project-graph/plugins/isolation/messaging.d.ts +1 -5
- package/src/project-graph/plugins/isolation/plugin-pool.js +0 -22
- package/src/project-graph/plugins/isolation/plugin-worker.js +36 -17
- package/src/project-graph/plugins/loader.d.ts +1 -1
- package/src/project-graph/plugins/loader.js +1 -4
- package/src/project-graph/project-graph.js +19 -11
- package/src/project-graph/utils/project-configuration-utils.js +4 -2
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +2 -6
- package/src/project-graph/utils/retrieve-workspace-files.js +3 -5
- package/src/tasks-runner/cache.d.ts +1 -0
- package/src/tasks-runner/cache.js +3 -1
- package/src/tasks-runner/create-task-graph.d.ts +13 -1
- package/src/tasks-runner/create-task-graph.js +46 -22
- package/src/tasks-runner/task-graph-utils.d.ts +11 -0
- package/src/tasks-runner/task-graph-utils.js +23 -0
- package/src/utils/db-connection.d.ts +2 -1
- package/src/utils/db-connection.js +7 -0
- package/src/utils/nx-cloud-utils.js +3 -0
- package/src/utils/task-history.d.ts +1 -1
- package/src/utils/task-history.js +2 -2
- package/tasks-runners/default.d.ts +1 -0
- package/tasks-runners/default.js +5 -0
- package/src/daemon/server/plugins.d.ts +0 -3
- package/src/native/nx.ohos-arm64.node +0 -0
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../.eslintrc",
|
|
3
|
+
"rules": {},
|
|
4
|
+
"ignorePatterns": ["!**/*", "**/__fixtures__/**/*"],
|
|
5
|
+
"overrides": [
|
|
6
|
+
{
|
|
7
|
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
8
|
+
"rules": {
|
|
9
|
+
"no-restricted-imports": [
|
|
10
|
+
"error",
|
|
11
|
+
{
|
|
12
|
+
"paths": [
|
|
13
|
+
{
|
|
14
|
+
"name": "fs-extra",
|
|
15
|
+
"message": "Please use equivalent utilities from `node:fs` instead."
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"patterns": [
|
|
19
|
+
{
|
|
20
|
+
"group": ["**/devkit-exports"],
|
|
21
|
+
"message": "Do not import from devkit-exports from the nx package"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"files": ["*.ts"],
|
|
30
|
+
"excludedFiles": ["*.spec.ts"],
|
|
31
|
+
"rules": {
|
|
32
|
+
"@typescript-eslint/no-restricted-imports": [
|
|
33
|
+
"error",
|
|
34
|
+
{
|
|
35
|
+
"paths": [
|
|
36
|
+
{
|
|
37
|
+
"name": "typescript",
|
|
38
|
+
"message": "TypeScript is an optional dependency for Nx. If you need to use it, make sure its installed first with ensureTypescript.",
|
|
39
|
+
"allowTypeImports": true
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"patterns": [
|
|
43
|
+
{
|
|
44
|
+
"group": ["nx/*"],
|
|
45
|
+
"message": "Circular import in 'nx' found. Use relative path."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"group": ["**/native-bindings", "**/native-bindings.js"],
|
|
49
|
+
"message": "Direct imports from native-bindings.js are not allowed. Import from index.js instead."
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"files": ["*.js", "*.jsx"],
|
|
58
|
+
"rules": {}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"files": ["./package.json", "./executors.json", "./migrations.json"],
|
|
62
|
+
"parser": "jsonc-eslint-parser",
|
|
63
|
+
"rules": {
|
|
64
|
+
"@nx/nx-plugin-checks": [
|
|
65
|
+
"error",
|
|
66
|
+
{
|
|
67
|
+
"allowedVersionStrings": ["latest"]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"files": ["nxw.ts"],
|
|
74
|
+
"rules": {
|
|
75
|
+
"@typescript-eslint/no-restricted-imports": [
|
|
76
|
+
"error",
|
|
77
|
+
{
|
|
78
|
+
"patterns": [
|
|
79
|
+
{
|
|
80
|
+
"group": ["*", "!fs"],
|
|
81
|
+
"message": "The Nx wrapper is ran before packages are installed. It should only import node builtins.",
|
|
82
|
+
"allowTypeImports": true
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"no-restricted-modules": [
|
|
88
|
+
"error",
|
|
89
|
+
{
|
|
90
|
+
"patterns": ["*", "!fs", "!path", "!child_process", "!node:*"]
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"no-restricted-imports": "off"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"files": ["./package.json"],
|
|
98
|
+
"parser": "jsonc-eslint-parser",
|
|
99
|
+
"rules": {
|
|
100
|
+
"@nx/dependency-checks": [
|
|
101
|
+
"error",
|
|
102
|
+
{
|
|
103
|
+
"buildTargets": ["build-base"],
|
|
104
|
+
"ignoredDependencies": [
|
|
105
|
+
"typescript",
|
|
106
|
+
"@nrwl/angular",
|
|
107
|
+
"@angular-devkit/build-angular",
|
|
108
|
+
"@angular-devkit/core",
|
|
109
|
+
"@angular-devkit/architect",
|
|
110
|
+
"@swc/core", //Optional, used in JS analysis if available
|
|
111
|
+
"@swc/node-register", //Optional, used in JS analysis if available
|
|
112
|
+
"rxjs",
|
|
113
|
+
"@angular-devkit/schematics",
|
|
114
|
+
"@pnpm/lockfile-types",
|
|
115
|
+
"@nestjs/cli", // nx init nest makes use of nestjs cli (which should be available in NestJS CLI app) to parse the nest-cli.json file
|
|
116
|
+
"ts-node", // We *may* fall back on ts-node, but we want to encourage the use of @swc-node instead so we don't explicitly list ts-node as an optional dep
|
|
117
|
+
"memfs", // used in mock for handling .node files in tests
|
|
118
|
+
"events", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
|
119
|
+
"process", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
|
120
|
+
"prettier", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
|
121
|
+
"util", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
|
122
|
+
// The native modules are optional and only one of them will ever be installed on a given machine
|
|
123
|
+
"@nx/nx-darwin-x64",
|
|
124
|
+
"@nx/nx-darwin-arm64",
|
|
125
|
+
"@nx/nx-linux-x64-gnu",
|
|
126
|
+
"@nx/nx-linux-x64-musl",
|
|
127
|
+
"@nx/nx-win32-x64-msvc",
|
|
128
|
+
"@nx/nx-linux-arm64-gnu",
|
|
129
|
+
"@nx/nx-linux-arm64-musl",
|
|
130
|
+
"@nx/nx-linux-arm-gnueabihf",
|
|
131
|
+
"@nx/nx-win32-arm64-msvc",
|
|
132
|
+
"@nx/nx-freebsd-x64",
|
|
133
|
+
"@nx/powerpack-license"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
package/bin/nx.js
CHANGED
|
@@ -16,6 +16,7 @@ const assert_supported_platform_1 = require("../src/native/assert-supported-plat
|
|
|
16
16
|
const perf_hooks_1 = require("perf_hooks");
|
|
17
17
|
const workspace_context_1 = require("../src/utils/workspace-context");
|
|
18
18
|
const client_1 = require("../src/daemon/client/client");
|
|
19
|
+
const db_connection_1 = require("../src/utils/db-connection");
|
|
19
20
|
function main() {
|
|
20
21
|
if (process.argv[2] !== 'report' &&
|
|
21
22
|
process.argv[2] !== '--version' &&
|
|
@@ -223,4 +224,11 @@ const getLatestVersionOfNx = ((fn) => {
|
|
|
223
224
|
let cache = null;
|
|
224
225
|
return () => cache || (cache = fn());
|
|
225
226
|
})(_getLatestVersionOfNx);
|
|
227
|
+
function nxCleanup() {
|
|
228
|
+
(0, db_connection_1.removeDbConnections)();
|
|
229
|
+
}
|
|
230
|
+
process.on('exit', nxCleanup);
|
|
231
|
+
process.on('SIGINT', nxCleanup);
|
|
232
|
+
process.on('SIGTERM', nxCleanup);
|
|
233
|
+
process.on('SIGHUP', nxCleanup);
|
|
226
234
|
main();
|
package/bin/post-install.js
CHANGED
|
@@ -10,18 +10,20 @@ const update_manager_1 = require("../src/nx-cloud/update-manager");
|
|
|
10
10
|
const get_cloud_options_1 = require("../src/nx-cloud/utilities/get-cloud-options");
|
|
11
11
|
const nx_cloud_utils_1 = require("../src/utils/nx-cloud-utils");
|
|
12
12
|
const nx_json_1 = require("../src/config/nx-json");
|
|
13
|
-
const workspace_context_1 = require("../src/utils/workspace-context");
|
|
14
13
|
const logger_1 = require("../src/utils/logger");
|
|
14
|
+
const workspace_context_1 = require("../src/utils/workspace-context");
|
|
15
15
|
(async () => {
|
|
16
16
|
const start = new Date();
|
|
17
17
|
try {
|
|
18
|
-
(0, workspace_context_1.setupWorkspaceContext)(workspace_root_1.workspaceRoot);
|
|
19
18
|
if (isMainNxPackage() && (0, fileutils_1.fileExists)((0, path_1.join)(workspace_root_1.workspaceRoot, 'nx.json'))) {
|
|
20
19
|
(0, assert_supported_platform_1.assertSupportedPlatform)();
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
(0, workspace_context_1.setupWorkspaceContext)(workspace_root_1.workspaceRoot);
|
|
21
|
+
if (client_1.daemonClient.enabled()) {
|
|
22
|
+
try {
|
|
23
|
+
await client_1.daemonClient.stop();
|
|
24
|
+
}
|
|
25
|
+
catch (e) { }
|
|
23
26
|
}
|
|
24
|
-
catch (e) { }
|
|
25
27
|
const tasks = [
|
|
26
28
|
(0, project_graph_1.buildProjectGraphAndSourceMapsWithoutDaemon)(),
|
|
27
29
|
];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohos-ports/nx",
|
|
3
|
-
"version": "19.8.
|
|
3
|
+
"version": "19.8.14-beta.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/ohos-ports/ohos-ports.git",
|
|
9
|
-
"directory": "ports/nx/19.8.
|
|
9
|
+
"directory": "ports/nx/19.8.14"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"Monorepo",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"tslib": "^2.3.0",
|
|
66
66
|
"yargs": "^17.6.2",
|
|
67
67
|
"yargs-parser": "21.1.1",
|
|
68
|
-
"node-machine-id": "1.1.12",
|
|
68
|
+
"node-machine-id": "npm:@ohos-ports/node-machine-id@^1.1.12-beta.0",
|
|
69
69
|
"ora": "5.3.0",
|
|
70
|
-
"@nrwl/tao": "npm:@ohos-ports/nrwl-tao
|
|
70
|
+
"@nrwl/tao": "npm:@ohos-ports/nrwl-tao@^19.8.4-beta.1"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@swc-node/register": "^1.8.0",
|
|
@@ -82,16 +82,17 @@
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
"optionalDependencies": {
|
|
85
|
-
"@nx/nx-darwin-x64": "19.8.
|
|
86
|
-
"@nx/nx-darwin-arm64": "19.8.
|
|
87
|
-
"@nx/nx-linux-x64-gnu": "19.8.
|
|
88
|
-
"@nx/nx-linux-x64-musl": "19.8.
|
|
89
|
-
"@nx/nx-win32-x64-msvc": "19.8.
|
|
90
|
-
"@nx/nx-linux-arm64-gnu": "19.8.
|
|
91
|
-
"@nx/nx-linux-arm64-musl": "19.8.
|
|
92
|
-
"@nx/nx-linux-arm-gnueabihf": "19.8.
|
|
93
|
-
"@nx/nx-win32-arm64-msvc": "19.8.
|
|
94
|
-
"@nx/nx-freebsd-x64": "19.8.
|
|
85
|
+
"@nx/nx-darwin-x64": "19.8.14",
|
|
86
|
+
"@nx/nx-darwin-arm64": "19.8.14",
|
|
87
|
+
"@nx/nx-linux-x64-gnu": "19.8.14",
|
|
88
|
+
"@nx/nx-linux-x64-musl": "19.8.14",
|
|
89
|
+
"@nx/nx-win32-x64-msvc": "19.8.14",
|
|
90
|
+
"@nx/nx-linux-arm64-gnu": "19.8.14",
|
|
91
|
+
"@nx/nx-linux-arm64-musl": "19.8.14",
|
|
92
|
+
"@nx/nx-linux-arm-gnueabihf": "19.8.14",
|
|
93
|
+
"@nx/nx-win32-arm64-msvc": "19.8.14",
|
|
94
|
+
"@nx/nx-freebsd-x64": "19.8.14",
|
|
95
|
+
"@nx/nx-openharmony-arm64": "npm:@ohos-ports/nx-nx-openharmony-arm64@19.8.14-beta.0"
|
|
95
96
|
},
|
|
96
97
|
"nx-migrations": {
|
|
97
98
|
"migrations": "./migrations.json",
|
|
@@ -191,20 +192,5 @@
|
|
|
191
192
|
"types": "./bin/nx.d.ts",
|
|
192
193
|
"scripts": {
|
|
193
194
|
"postinstall": "node ./bin/post-install"
|
|
194
|
-
}
|
|
195
|
-
"files": [
|
|
196
|
-
"bin/",
|
|
197
|
-
"init/",
|
|
198
|
-
"presets/",
|
|
199
|
-
"src/",
|
|
200
|
-
"plugins/",
|
|
201
|
-
"executors.json",
|
|
202
|
-
"generators.json",
|
|
203
|
-
"migrations.json",
|
|
204
|
-
"index.js",
|
|
205
|
-
"index.d.ts",
|
|
206
|
-
"package.json",
|
|
207
|
-
"README.md",
|
|
208
|
-
"LICENSE"
|
|
209
|
-
]
|
|
195
|
+
}
|
|
210
196
|
}
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ProjectConfiguration } from '../src/config/workspace-json-project-json';
|
|
2
|
+
export type PackageJsonConfigurationCache = {
|
|
3
|
+
[hash: string]: ProjectConfiguration;
|
|
4
|
+
};
|
|
5
|
+
export declare function readPackageJsonConfigurationCache(): PackageJsonConfigurationCache;
|
package/plugins/package-json.js
CHANGED
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readPackageJsonConfigurationCache = readPackageJsonConfigurationCache;
|
|
4
|
+
const plugins_1 = require("../src/project-graph/plugins");
|
|
3
5
|
const workspace_root_1 = require("../src/utils/workspace-root");
|
|
4
6
|
const package_json_1 = require("../src/plugins/package-json");
|
|
7
|
+
const cache_directory_1 = require("../src/utils/cache-directory");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const fileutils_1 = require("../src/utils/fileutils");
|
|
10
|
+
const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, 'package-json.hash');
|
|
11
|
+
function readPackageJsonConfigurationCache() {
|
|
12
|
+
try {
|
|
13
|
+
return (0, fileutils_1.readJsonFile)(cachePath);
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function writeCache(cache) {
|
|
20
|
+
(0, fileutils_1.writeJsonFile)(cachePath, cache);
|
|
21
|
+
}
|
|
5
22
|
const plugin = {
|
|
6
23
|
name: 'nx-all-package-jsons-plugin',
|
|
7
|
-
|
|
24
|
+
createNodesV2: [
|
|
8
25
|
'*/**/package.json',
|
|
9
|
-
(
|
|
26
|
+
(configFiles, options, context) => {
|
|
27
|
+
const cache = readPackageJsonConfigurationCache();
|
|
28
|
+
const result = (0, plugins_1.createNodesFromFiles)((f) => (0, package_json_1.createNodeFromPackageJson)(f, workspace_root_1.workspaceRoot, cache), configFiles, options, context);
|
|
29
|
+
writeCache(cache);
|
|
30
|
+
return result;
|
|
31
|
+
},
|
|
10
32
|
],
|
|
11
33
|
};
|
|
12
34
|
module.exports = plugin;
|
|
35
|
+
module.exports.readPackageJsonConfigurationCache =
|
|
36
|
+
readPackageJsonConfigurationCache;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ChangelogChange } from '../../src/command-line/release/changelog';
|
|
2
|
+
import { NxReleaseConfig } from '../../src/command-line/release/config/config';
|
|
3
|
+
import { GitCommit } from '../../src/command-line/release/utils/git';
|
|
4
|
+
import { GithubRepoData, RepoSlug } from '../../src/command-line/release/utils/github';
|
|
5
|
+
import type { ProjectGraph } from '../../src/config/project-graph';
|
|
6
|
+
/**
|
|
7
|
+
* The ChangelogRenderOptions are specific to each ChangelogRenderer implementation, and are taken
|
|
8
|
+
* from the user's nx.json configuration and passed as is into the ChangelogRenderer function.
|
|
9
|
+
*/
|
|
10
|
+
export type ChangelogRenderOptions = Record<string, unknown>;
|
|
11
|
+
/**
|
|
12
|
+
* When versioning projects independently and enabling `"updateDependents": "always"`, there could
|
|
13
|
+
* be additional dependency bump information that is not captured in the commit data, but that nevertheless
|
|
14
|
+
* should be included in the rendered changelog.
|
|
15
|
+
*/
|
|
16
|
+
export type DependencyBump = {
|
|
17
|
+
dependencyName: string;
|
|
18
|
+
newVersion: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A ChangelogRenderer function takes in the extracted commits and other relevant metadata
|
|
22
|
+
* and returns a string, or a Promise of a string of changelog contents (usually markdown).
|
|
23
|
+
*
|
|
24
|
+
* @param {Object} config The configuration object for the ChangelogRenderer
|
|
25
|
+
* @param {ProjectGraph} config.projectGraph The project graph for the workspace
|
|
26
|
+
* @param {GitCommit[]} config.commits DEPRECATED [Use 'config.changes' instead] - The collection of extracted commits to generate a changelog for
|
|
27
|
+
* @param {ChangelogChange[]} config.changes The collection of changes to show in the changelog
|
|
28
|
+
* @param {string} config.releaseVersion The version that is being released
|
|
29
|
+
* @param {string | null} config.project The name of specific project to generate a changelog for, or `null` if the overall workspace changelog
|
|
30
|
+
* @param {string | false} config.entryWhenNoChanges The (already interpolated) string to use as the changelog entry when there are no changes, or `false` if no entry should be generated
|
|
31
|
+
* @param {ChangelogRenderOptions} config.changelogRenderOptions The options specific to the ChangelogRenderer implementation
|
|
32
|
+
* @param {DependencyBump[]} config.dependencyBumps Optional list of additional dependency bumps that occurred as part of the release, outside of the commit data
|
|
33
|
+
* @param {GithubRepoData} config.repoData Resolved data for the current GitHub repository
|
|
34
|
+
*/
|
|
35
|
+
export type ChangelogRenderer = (config: {
|
|
36
|
+
projectGraph: ProjectGraph;
|
|
37
|
+
commits?: GitCommit[];
|
|
38
|
+
changes?: ChangelogChange[];
|
|
39
|
+
releaseVersion: string;
|
|
40
|
+
project: string | null;
|
|
41
|
+
entryWhenNoChanges: string | false;
|
|
42
|
+
changelogRenderOptions: DefaultChangelogRenderOptions;
|
|
43
|
+
dependencyBumps?: DependencyBump[];
|
|
44
|
+
repoSlug?: RepoSlug;
|
|
45
|
+
repoData?: GithubRepoData;
|
|
46
|
+
conventionalCommitsConfig: NxReleaseConfig['conventionalCommits'] | null;
|
|
47
|
+
}) => Promise<string> | string;
|
|
48
|
+
/**
|
|
49
|
+
* The specific options available to the default implementation of the ChangelogRenderer that nx exports
|
|
50
|
+
* for the common case.
|
|
51
|
+
*/
|
|
52
|
+
export interface DefaultChangelogRenderOptions extends ChangelogRenderOptions {
|
|
53
|
+
/**
|
|
54
|
+
* Whether or not the commit authors should be added to the bottom of the changelog in a "Thank You"
|
|
55
|
+
* section. Defaults to true.
|
|
56
|
+
*/
|
|
57
|
+
authors?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* If authors is enabled, controls whether or not to try to map the authors to their GitHub usernames
|
|
60
|
+
* using https://ungh.cc (from https://github.com/unjs/ungh) and the email addresses found in the commits.
|
|
61
|
+
* Defaults to true.
|
|
62
|
+
*/
|
|
63
|
+
mapAuthorsToGitHubUsernames?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether or not the commit references (such as commit and/or PR links) should be included in the changelog.
|
|
66
|
+
* Defaults to true.
|
|
67
|
+
*/
|
|
68
|
+
commitReferences?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Whether or not to include the date in the version title. It can be set to false to disable it, or true to enable
|
|
71
|
+
* with the default of (YYYY-MM-DD). Defaults to true.
|
|
72
|
+
*/
|
|
73
|
+
versionTitleDate?: boolean;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The default ChangelogRenderer implementation that nx exports for the common case of generating markdown
|
|
77
|
+
* from the given commits and other metadata.
|
|
78
|
+
*/
|
|
79
|
+
declare const defaultChangelogRenderer: ChangelogRenderer;
|
|
80
|
+
export default defaultChangelogRenderer;
|