@dbx-tools/projen 0.9.17 → 0.9.19
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 +39 -36
- package/index.ts +2 -2
- package/package.json +4 -5
- package/src/_release-platform.ts +10 -0
- package/src/_rust-project.ts +3 -0
- package/src/_rust-release-workflow.ts +117 -528
- package/src/project-js.ts +8 -13
- package/src/project-py.ts +62 -54
- package/src/project-rs.ts +7 -37
- package/src/release-github.ts +23 -0
- package/src/release-plan.ts +32 -40
- package/src/release.ts +91 -135
- package/tasks/compile-workspace.ts +121 -0
- package/tasks/publish-npm.ts +63 -11
- package/tasks/publish-python.ts +101 -26
- package/tasks/publish.ts +22 -3
- package/tasks/release-assets.ts +476 -0
- package/tasks/release-candidate.ts +383 -0
- package/tasks/release-manifest.ts +273 -0
- package/tasks/release-plan.ts +1 -2
- package/tasks/release-pr.ts +86 -60
- package/tasks/uniffi-python.js +24 -12
- package/tasks/uniffi-release.mjs +35 -2
- package/src/_rust-release.ts +0 -633
- package/tasks/build-rust-release.ts +0 -68
- package/tasks/rust-release.d.ts +0 -45
- package/tasks/rust-release.mjs +0 -1726
package/README.md
CHANGED
|
@@ -233,16 +233,14 @@ branch that already contains released `main`, and merges `main` into a diverged
|
|
|
233
233
|
branch when the merge is conflict-free. Missing branches and conflicted merges
|
|
234
234
|
are left untouched.
|
|
235
235
|
|
|
236
|
-
Rust release generation creates
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
skipped in those rows. UniFFI crates cannot use this option because every
|
|
245
|
-
configured target must produce their artifacts.
|
|
236
|
+
Rust release generation creates one uncached matrix with one row per target.
|
|
237
|
+
Each row builds all discovered bindings and selected release binaries together
|
|
238
|
+
with the union of their required features, then packages every native artifact
|
|
239
|
+
from that one Cargo output. Set a source-only crate's or release-enabled
|
|
240
|
+
binary's `releaseExcludeOs` package option to omit it from incompatible rows.
|
|
241
|
+
Release binary packaging and artifact upload are skipped in those rows. UniFFI
|
|
242
|
+
crates cannot use this option because every configured target must produce
|
|
243
|
+
their artifacts.
|
|
246
244
|
Set a release binary's `cli` package option and the workspace
|
|
247
245
|
`cliRegistryPath` to generate a typed `dbx` command registry from the same
|
|
248
246
|
selected targets. The generated entries carry only the archives that the
|
|
@@ -254,18 +252,12 @@ archives and Python wheels; they do not install Bun or UBRN and do not build
|
|
|
254
252
|
Node facades. A binary-only row therefore installs no language package tool.
|
|
255
253
|
`rustVersion` remains the MSRV recorded in package manifests, while
|
|
256
254
|
`releaseRustVersion` independently defaults release compilation to `stable`.
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
the GitHub release job deletes those internal assets from published
|
|
264
|
-
`vMAJOR.MINOR.PATCH` releases strictly lower than the current version while
|
|
265
|
-
leaving versioned consumer binaries in place. Phase timings are written to each
|
|
266
|
-
build log. Python generation executes the already-built
|
|
267
|
-
`target/<triple>/release/<crate>-uniffi-bindgen` directly. Artifact packaging
|
|
268
|
-
therefore does no Rust compilation after the UniFFI build.
|
|
255
|
+
Rows use the target runner's standard Rust toolchain without sccache, Cargo
|
|
256
|
+
cache actions, source fingerprints, or reusable raw bundles. Phase timings are
|
|
257
|
+
written to each build log. GitHub-hosted Python generation executes the
|
|
258
|
+
already-built `target/<triple>/release/<crate>-uniffi-bindgen` directly. A local
|
|
259
|
+
macOS build compiles one host generator and reuses it while packaging the
|
|
260
|
+
Darwin, Linux, and Windows libraries.
|
|
269
261
|
|
|
270
262
|
Artifacts identify their crate, target, and type. Rust jobs publish non-private
|
|
271
263
|
Cargo crates with `cargo publish --no-verify` and upload requested binary assets
|
|
@@ -282,18 +274,28 @@ architecture. Omit both filters to regenerate the complete maintained matrix.
|
|
|
282
274
|
`DBX_TOOLS_RELEASE_PLATFORMS` can select the generated matrix without repeating
|
|
283
275
|
environment parsing in a consumer.
|
|
284
276
|
|
|
277
|
+
`bun run release` always prepares the production candidate locally. After the
|
|
278
|
+
reviewed release pull request merges, the local process checks out the exact
|
|
279
|
+
merge commit, builds the complete npm, Python, native binding, and Rust binary
|
|
280
|
+
artifact set, then creates an annotated tag and draft GitHub Release. The draft
|
|
281
|
+
contains `release-manifest.json`, `SHA256SUMS`, and every registry or binary
|
|
282
|
+
artifact bound to that commit. A manager can rebuild an interrupted draft from
|
|
283
|
+
the exact source with
|
|
284
|
+
`bun run release:assets --version <version> --tag <tag> --sha <commit> --upload`.
|
|
285
|
+
Publishing the draft is the production promotion event; `release.yml` verifies
|
|
286
|
+
the tag, commit, version, manifest, checksums, and asset set before publishing
|
|
287
|
+
the approved npm archives, Python distributions, and Cargo crates. GitHub-hosted
|
|
288
|
+
runners never rebuild native release artifacts for singular-version releases.
|
|
289
|
+
|
|
285
290
|
Public UniFFI facades are marked with `dbxToolsConfig.uniffi = true` in Node
|
|
286
291
|
manifests and `[tool.dbx_tools.config] uniffi = true` in Python manifests. The
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
source builds, then publishes each distribution through its own PyPI
|
|
295
|
-
trusted-publisher environment. Binding publishers wait for their dependencies.
|
|
296
|
-
Trusted-publisher instructions name `release.yml` and the release branch policy.
|
|
292
|
+
approved npm archives are dependency-ordered and published through npm OIDC
|
|
293
|
+
Trusted Publishing with provenance. Local Verdaccio publication does not enable
|
|
294
|
+
provenance. Python publishes the exact approved wheels and source distributions
|
|
295
|
+
through package-specific PyPI trusted-publisher environments; binding publishers
|
|
296
|
+
wait for their dependencies. Trusted-publisher instructions name `release.yml`
|
|
297
|
+
and the `v*` deployment tag policy. Cargo publication checks the approved source
|
|
298
|
+
commit and skips an already-published version during recovery.
|
|
297
299
|
The docs jobs generate README and TypeScript API content and deploy GitHub Pages
|
|
298
300
|
from the same workflow. When a conventional Node binding path already belongs
|
|
299
301
|
to a root subproject, Rust mapping reuses that project and adds binding
|
|
@@ -483,14 +485,15 @@ bootstrap a folder that has no `.projenrc.ts` or toolchain yet.
|
|
|
483
485
|
|
|
484
486
|
## Run Tasks From The ROOT
|
|
485
487
|
|
|
486
|
-
Every repo-wide task lives on the root
|
|
487
|
-
|
|
488
|
-
|
|
488
|
+
Every repo-wide task lives on the root. `compile` batches ordinary TypeScript
|
|
489
|
+
packages in up to four `tsc --build` processes and runs custom compile tasks alongside them;
|
|
490
|
+
`test` delegates with `bun run --filter '*'`. Both read the current workspace
|
|
491
|
+
list, so a new package is covered without a re-synth. Work from the root:
|
|
489
492
|
|
|
490
493
|
| Task | What it does |
|
|
491
494
|
| ------------------------------ | ---------------------------------------------------- |
|
|
492
495
|
| `bun run build` | synth + workspace compile and tests |
|
|
493
|
-
| `bun run compile` | `tsc --build`
|
|
496
|
+
| `bun run compile` | Batched `tsc --build` plus custom member compiles |
|
|
494
497
|
| `bun run test` | `eslint` once, then each member's tests |
|
|
495
498
|
| `bun run sync` | re-synth (`--watch` to keep synthing) |
|
|
496
499
|
| `bun run barrels` | regenerate the read-only `index.ts` barrels |
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Hand edits are overwritten on the next watch; this file is read-only.
|
|
4
4
|
|
|
5
5
|
export const PACKAGE_IDENTIFIER = "@dbx-tools/projen";
|
|
6
|
-
export const PACKAGE_VERSION = "0.9.
|
|
6
|
+
export const PACKAGE_VERSION = "0.9.19";
|
|
7
7
|
export * as barrels from "./src/barrels.ts";
|
|
8
8
|
export * as bunApp from "./src/bun-app.ts";
|
|
9
9
|
export * as bunWorkflow from "./src/bun-workflow.ts";
|
|
@@ -66,7 +66,7 @@ export { DBXToolsReleaseCatalog } from "./src/release-catalog.ts";
|
|
|
66
66
|
export type { DBXToolsVersioningMode, ReleaseProjectLanguage, ReleaseArtifactKind, ReleaseEdgeKind, ReleasePropagation, ReleaseUnitRule, DBXToolsReleaseCatalogOptions, ReleaseDependencyInput, ReleaseProjectRegistration, ExternalReleaseProjectRegistration, ReleaseArtifactRegistration, ReleaseProjectNode, ReleaseArtifact, ReleaseDependencyEdge, ReleaseUnit, ReleaseUnitGraph } from "./src/release-catalog.ts";
|
|
67
67
|
export { RELEASE_TAG, RELEASE_SHA, RELEASE_VERSION, RELEASE_SUMMARY_DIRECTORY, RELEASE_SUMMARY_PROVIDER_NAMES, RELEASE_SUMMARY_FILE } from "./src/release-dispatch.ts";
|
|
68
68
|
export type { ReleaseSummaryProviderName } from "./src/release-dispatch.ts";
|
|
69
|
-
export type { GithubRepositoryIdentity, GithubAuthenticatedAccount } from "./src/release-github.ts";
|
|
69
|
+
export type { GithubRepositoryIdentity, GithubAuthenticatedAccount, GithubRepositoryPermissions } from "./src/release-github.ts";
|
|
70
70
|
export type { ReleaseReason, PlannedReleaseUnit, PlannedPackage, PlannedArtifact, PlannedRustTarget, ReleasePlan } from "./src/release-plan.ts";
|
|
71
71
|
export { ReleaseUnitWorkspacePlugin } from "./src/release-please.ts";
|
|
72
72
|
export type { ReleaseUnitWorkspacePluginOptions } from "./src/release-please.ts";
|
package/package.json
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
"name": "@dbx-tools/projen",
|
|
3
3
|
"scripts": {
|
|
4
4
|
"build": "projen build",
|
|
5
|
-
"bundle:rust-release": "projen bundle:rust-release",
|
|
6
5
|
"clobber": "projen clobber",
|
|
7
6
|
"compile": "projen compile",
|
|
8
7
|
"default": "projen default",
|
|
@@ -30,9 +29,9 @@
|
|
|
30
29
|
},
|
|
31
30
|
"dependencies": {
|
|
32
31
|
"@clack/prompts": "^1.7.0",
|
|
33
|
-
"@dbx-tools/core": "^0.9.
|
|
34
|
-
"@dbx-tools/path": "^0.9.
|
|
35
|
-
"@dbx-tools/shared-core": "^0.9.
|
|
32
|
+
"@dbx-tools/core": "^0.9.19",
|
|
33
|
+
"@dbx-tools/path": "^0.9.19",
|
|
34
|
+
"@dbx-tools/shared-core": "^0.9.19",
|
|
36
35
|
"commander": "^15.0.0",
|
|
37
36
|
"concurrently": "^10.0.3",
|
|
38
37
|
"constructs": "^10.6.0",
|
|
@@ -53,7 +52,7 @@
|
|
|
53
52
|
},
|
|
54
53
|
"main": "index.ts",
|
|
55
54
|
"license": "Apache-2.0",
|
|
56
|
-
"version": "0.9.
|
|
55
|
+
"version": "0.9.19",
|
|
57
56
|
"types": "index.ts",
|
|
58
57
|
"type": "module",
|
|
59
58
|
"exports": {
|
package/src/_release-platform.ts
CHANGED
|
@@ -22,6 +22,16 @@ export type ReleaseArch = (typeof RELEASE_ARCHES)[number];
|
|
|
22
22
|
|
|
23
23
|
export type { VersionLevel } from "./workspace-version.ts";
|
|
24
24
|
|
|
25
|
+
/** Stable archive name for one native release binary. */
|
|
26
|
+
export function releaseBinaryAssetName(
|
|
27
|
+
binaryName: string,
|
|
28
|
+
nodeTarget: string,
|
|
29
|
+
operatingSystem: ReleaseOs,
|
|
30
|
+
): string {
|
|
31
|
+
const extension = operatingSystem === "win32" ? "zip" : "tar.gz";
|
|
32
|
+
return `${binaryName}-${nodeTarget}.${extension}`;
|
|
33
|
+
}
|
|
34
|
+
|
|
25
35
|
function collectValue<T extends string>(value: T, previous: T[]): T[] {
|
|
26
36
|
return [...previous, value];
|
|
27
37
|
}
|
package/src/_rust-project.ts
CHANGED
|
@@ -71,6 +71,8 @@ export interface RustCrateOptions {
|
|
|
71
71
|
readonly release?: boolean;
|
|
72
72
|
/** Omit this crate and any release binary artifact from these operating systems. */
|
|
73
73
|
readonly releaseExcludeOs?: readonly RustReleaseOs[];
|
|
74
|
+
/** Cargo features used only by the macOS cross-platform release builder. */
|
|
75
|
+
readonly releaseLocalFeatures?: readonly string[];
|
|
74
76
|
readonly dependencies?: Readonly<Record<string, CargoDependency>>;
|
|
75
77
|
/** Cargo dependencies scoped by a target cfg expression. */
|
|
76
78
|
readonly targetDependencies?: Readonly<Record<string, Readonly<Record<string, CargoDependency>>>>;
|
|
@@ -221,6 +223,7 @@ function packageOptions(
|
|
|
221
223
|
...(options.private !== undefined ? { private: options.private } : {}),
|
|
222
224
|
...(options.release !== undefined ? { release: options.release } : {}),
|
|
223
225
|
...(options.releaseExcludeOs ? { releaseExcludeOs: options.releaseExcludeOs } : {}),
|
|
226
|
+
...(options.releaseLocalFeatures ? { releaseLocalFeatures: options.releaseLocalFeatures } : {}),
|
|
224
227
|
...(options.dependencies ? { dependencies: options.dependencies } : {}),
|
|
225
228
|
...(options.targetDependencies ? { targetDependencies: options.targetDependencies } : {}),
|
|
226
229
|
...(options.devDependencies ? { devDependencies: options.devDependencies } : {}),
|