@dbx-tools/projen 0.9.5 → 0.9.7
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/README.md +69 -17
- package/index.ts +7 -5
- package/package.json +9 -6
- package/src/_rust-project.ts +356 -0
- package/src/_rust-release-workflow.ts +954 -0
- package/src/_rust-release.ts +605 -0
- package/src/_task-command.ts +89 -0
- package/src/barrels.ts +12 -11
- package/src/bun-app.ts +96 -85
- package/src/bun-workflow.ts +60 -52
- package/src/engine-root.ts +5 -5
- package/src/openapi.ts +16 -9
- package/src/packages.ts +9 -9
- package/src/pnpm-workspace.ts +1 -1
- package/src/project-js.ts +19 -25
- package/src/project-py.ts +28 -23
- package/src/project-rs.ts +100 -1098
- package/src/projen-version.ts +9 -0
- package/src/publish.ts +3 -4
- package/src/release-catalog.ts +1 -1
- package/src/release.ts +212 -177
- package/src/scaffold.ts +1 -1
- package/src/uniffi.ts +7 -0
- package/src/watch.ts +2 -2
- package/src/workspace-version.ts +20 -15
- package/tasks/barrels.ts +4 -4
- package/tasks/build-rust-release.ts +68 -0
- package/tasks/bump.ts +3 -2
- package/tasks/clean.ts +3 -3
- package/tasks/local-publish.ts +21 -3
- package/tasks/openapi.ts +2 -2
- package/tasks/publish-npm.ts +12 -6
- package/tasks/publish-python.ts +2 -2
- package/tasks/publish-uniffi-local.ts +11 -15
- package/tasks/publish.ts +88 -88
- package/tasks/python-registry.ts +1 -1
- package/tasks/release-bootstrap.ts +2 -2
- package/tasks/release-plan.ts +1 -1
- package/tasks/release-please.ts +1 -1
- package/tasks/release-pr.ts +60 -115
- package/tasks/release-request.ts +8 -29
- package/tasks/release-summary-units.ts +2 -9
- package/tasks/release-summary.ts +35 -24
- package/tasks/release-version.ts +44 -0
- package/tasks/rust-release.d.ts +41 -0
- package/tasks/rust-release.mjs +1717 -0
- package/tasks/sync.ts +3 -3
- package/tasks/uniffi-python.js +1 -1
- package/tasks/uniffi.ts +7 -1
- package/tasks/version-check.ts +6 -5
package/tasks/sync.ts
CHANGED
|
@@ -95,9 +95,9 @@ if (!process.argv.includes("--watch")) {
|
|
|
95
95
|
* re-emitting it is how we say "stop" in a language the supervisor understands.
|
|
96
96
|
*
|
|
97
97
|
* Killing is asynchronous (concurrently shells out to `ps` to walk each process tree)
|
|
98
|
-
* and can outlive `result
|
|
99
|
-
*
|
|
100
|
-
*
|
|
98
|
+
* and can outlive `result`. The timer keeps the process open until the kills
|
|
99
|
+
* land, which prevents orphaned watchers after SIGTERM. It also stops waiting
|
|
100
|
+
* if one of them wedges.
|
|
101
101
|
*/
|
|
102
102
|
function stop(): void {
|
|
103
103
|
if (stopping) return;
|
package/tasks/uniffi-python.js
CHANGED
|
@@ -160,7 +160,7 @@ export const installPythonBindings = ({
|
|
|
160
160
|
|
|
161
161
|
const init = join(packageDirectory, "__init__.py");
|
|
162
162
|
setWritable(init);
|
|
163
|
-
writeFileSync(init,
|
|
163
|
+
writeFileSync(init, `${generatedHeader(crate)}from .bindings import *\n`);
|
|
164
164
|
|
|
165
165
|
const nativeLibrary = join(packageDirectory, basename(library));
|
|
166
166
|
setWritable(nativeLibrary);
|
package/tasks/uniffi.ts
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
addExplicitInterfaceReexports,
|
|
23
23
|
addTypeScriptExtensionsToBindingImports,
|
|
24
24
|
makeDefaultedInterfaceParametersOptional,
|
|
25
|
+
removeObsoleteInterfaceAliases,
|
|
25
26
|
} from "../src/uniffi.ts";
|
|
26
27
|
|
|
27
28
|
const { values } = parseArgs({
|
|
@@ -204,7 +205,12 @@ if (values.node) {
|
|
|
204
205
|
),
|
|
205
206
|
);
|
|
206
207
|
for (const file of generatedFiles) {
|
|
207
|
-
writeFileSync(
|
|
208
|
+
writeFileSync(
|
|
209
|
+
file,
|
|
210
|
+
removeObsoleteInterfaceAliases(
|
|
211
|
+
makeDefaultedInterfaceParametersOptional(readFileSync(file, "utf8")),
|
|
212
|
+
),
|
|
213
|
+
);
|
|
208
214
|
}
|
|
209
215
|
writeFileSync(
|
|
210
216
|
nodeBindings,
|
package/tasks/version-check.ts
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
/** Verify that every committed package version matches its owning release unit. */
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { dirname, join, relative } from "node:path";
|
|
5
|
-
import
|
|
5
|
+
import * as exec from "@dbx-tools/core/exec";
|
|
6
|
+
import * as projectUtils from "@dbx-tools/core/project-utils";
|
|
6
7
|
import { find } from "@dbx-tools/path";
|
|
7
8
|
import { json, log, object } from "@dbx-tools/shared-core";
|
|
8
9
|
import { parse } from "smol-toml";
|
|
9
|
-
import { recordedPackages } from "../src/packages.ts";
|
|
10
|
+
import { recordedPackages, toPosix } from "../src/packages.ts";
|
|
10
11
|
import type { ReleaseUnitGraph } from "../src/release-catalog.ts";
|
|
11
12
|
import { readWorkspaceVersion } from "../src/workspace-version.ts";
|
|
12
13
|
|
|
@@ -53,14 +54,14 @@ function cargoVersions(root: string): Array<{ name: string; version: string; pat
|
|
|
53
54
|
{
|
|
54
55
|
name: candidate.name,
|
|
55
56
|
version: candidate.version,
|
|
56
|
-
path: relative(root, dirname(candidate.manifest_path))
|
|
57
|
+
path: toPosix(relative(root, dirname(candidate.manifest_path))) || ".",
|
|
57
58
|
},
|
|
58
59
|
];
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
function main(): void {
|
|
63
|
-
const root =
|
|
64
|
+
const root = projectUtils.root() ?? process.cwd();
|
|
64
65
|
const fixedVersion = readWorkspaceVersion(root);
|
|
65
66
|
const graphPath = join(root, ".projen/release-units.json");
|
|
66
67
|
const graph = existsSync(graphPath)
|
|
@@ -94,7 +95,7 @@ function main(): void {
|
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
for (const path of find.findFiles("**/pyproject.toml", { cwd: root })) {
|
|
97
|
-
check(path, dirname(path)
|
|
98
|
+
check(path, toPosix(dirname(path)), pythonVersion(join(root, path)));
|
|
98
99
|
}
|
|
99
100
|
for (const pkg of cargoVersions(root)) {
|
|
100
101
|
check(`Cargo package ${pkg.name}`, pkg.path, pkg.version);
|