@dbx-tools/projen 0.6.194 → 0.6.196
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 +58 -42
- package/index.ts +2 -2
- package/package.json +4 -4
- package/src/pnpm-workspace.ts +4 -2
- package/src/project-js.ts +43 -12
- package/src/project-py.ts +7 -6
- package/src/project-rs.ts +99 -130
- package/src/release.ts +72 -22
- package/src/workspace-version.ts +57 -7
- package/tasks/bump.ts +19 -444
- package/tasks/clean.ts +1 -1
- package/tasks/local-publish.ts +166 -0
- package/tasks/publish-uniffi-local.ts +30 -8
- package/tasks/publish.ts +22 -59
- package/tasks/release-pr.ts +259 -0
- package/tasks/version-check.ts +85 -0
package/README.md
CHANGED
|
@@ -128,14 +128,20 @@ in dependency order; adding or
|
|
|
128
128
|
removing a crate or `setup_scaffolding!()` marker triggers a full synth. Repos
|
|
129
129
|
without Rust crates start no Rust watcher. When Rust projects are detected,
|
|
130
130
|
Cargo is required and the focused task fails immediately if it is unavailable.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
`rs:bindings` is explicit rather than part of root `pre-compile`, so ordinary
|
|
132
|
+
JavaScript PR builds type-check committed generated bindings without performing
|
|
133
|
+
a host Rust build. Release preparation runs Cargo workspace tests and
|
|
134
|
+
regenerates bindings before JavaScript validation.
|
|
135
|
+
|
|
136
|
+
The workspace generates one `release.yml` workflow for every ecosystem. A push
|
|
137
|
+
to the configured release branch starts it only when `VERSION` changed. The
|
|
138
|
+
context job requires the version to differ from its parent and exceed the latest
|
|
139
|
+
tag, creates the corresponding annotated `v*` tag, and exposes the verified tag,
|
|
140
|
+
commit, and version to every source job. If the tag already exists, it must be
|
|
141
|
+
annotated and reference the same commit. A manual run accepts that same tag and
|
|
136
142
|
commit but requires dry-run mode, so it builds and validates without publishing
|
|
137
|
-
packages or deploying documentation. One `release` concurrency
|
|
138
|
-
|
|
143
|
+
packages or deploying documentation. One non-cancelling `release` concurrency
|
|
144
|
+
group serializes publication.
|
|
139
145
|
|
|
140
146
|
Release generation writes `release.yml` without scanning for or removing other
|
|
141
147
|
workflow files. Consumers explicitly delete exact workflow files they no longer
|
|
@@ -146,15 +152,15 @@ For a separate recovery run, choose `node`, `python`, or `docs` instead of
|
|
|
146
152
|
`all`. Node and Python recovery can supply the prior `release.yml` run ID; the
|
|
147
153
|
workflow verifies that run used the commit selected by the annotated release
|
|
148
154
|
tag before downloading its artifacts. Dispatch the workflow with the release
|
|
149
|
-
tag as its Git ref so
|
|
155
|
+
tag as its Git ref so recovery checks out the immutable release boundary. Manual recovery
|
|
150
156
|
defaults to dry-run and publishes only when `dry_run` is cleared. npm retries skip an exact version only
|
|
151
157
|
after the local archive integrity and repository identity match registry
|
|
152
158
|
metadata. PyPI retries enable Twine's hash-aware existing-file behavior, which
|
|
153
159
|
skips matching files and fails when an existing filename has different content.
|
|
154
160
|
|
|
155
161
|
The Rust matrix has one row per target. Each row installs native dependencies,
|
|
156
|
-
|
|
157
|
-
|
|
162
|
+
builds the Cargo workspace once, then packages every discovered output from
|
|
163
|
+
that shared build. Set a source-only crate's or
|
|
158
164
|
release-enabled binary's `releaseExcludeOs` package option to omit it from
|
|
159
165
|
incompatible rows through Cargo `--exclude`. Release binary packaging and
|
|
160
166
|
artifact upload are skipped in those rows. UniFFI crates cannot use this option
|
|
@@ -171,10 +177,11 @@ Node facades. A binary-only row therefore installs no language package tool.
|
|
|
171
177
|
`rustVersion` remains the MSRV recorded in package manifests, while
|
|
172
178
|
`releaseRustVersion` independently defaults release compilation to `stable`.
|
|
173
179
|
Stable Windows rows verify and use the hosted runner's installed Rust toolchain
|
|
174
|
-
and select `rust-lld` for the workspace build.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
180
|
+
and select `rust-lld` for the workspace build. Rust release rows restore and
|
|
181
|
+
update dependency-only Cargo caches in the release branch's cache scope. The
|
|
182
|
+
cache key excludes workspace version changes, and manual tag recovery restores
|
|
183
|
+
without saving a tag-scoped copy. There is no separate cache workflow or
|
|
184
|
+
sccache layer. Phase timings are written to each build log. Python generation executes the already-built
|
|
178
185
|
`target/<triple>/release/<crate>-uniffi-bindgen` directly. Artifact packaging therefore
|
|
179
186
|
does no Rust compilation after the main workspace build.
|
|
180
187
|
|
|
@@ -187,7 +194,7 @@ Set `LOCAL_CARGO_REGISTRY` to a named Cargo registry such as a loopback
|
|
|
187
194
|
Cargo crates also publish directly to crates.io
|
|
188
195
|
with `CARGO_REGISTRY_TOKEN`. Override `releaseTargets` only when a consumer has
|
|
189
196
|
additional native runners; ordinary projects inherit the maintained matrix
|
|
190
|
-
automatically. `bun run
|
|
197
|
+
automatically. `bun run release` also accepts repeatable `--os` and `--arch`
|
|
191
198
|
selectors; every selected operating system is crossed with every selected
|
|
192
199
|
architecture. Omit both filters to regenerate the complete maintained matrix.
|
|
193
200
|
`DBX_TOOLS_RELEASE_PLATFORMS` can select the generated matrix without repeating
|
|
@@ -204,7 +211,7 @@ to run the optional nonblocking registry install and import check after facade
|
|
|
204
211
|
publication. Python combines same-run platform wheels with standard wheel and
|
|
205
212
|
source builds, then publishes each distribution through its own PyPI
|
|
206
213
|
trusted-publisher environment. Binding publishers wait for their dependencies.
|
|
207
|
-
Trusted-publisher instructions name `release.yml` and the release
|
|
214
|
+
Trusted-publisher instructions name `release.yml` and the release branch policy.
|
|
208
215
|
The docs jobs generate README and TypeScript API content and deploy GitHub Pages
|
|
209
216
|
from the same workflow. When a conventional Node binding path already belongs
|
|
210
217
|
to a root subproject, Rust mapping reuses that project and adds binding
|
|
@@ -381,22 +388,25 @@ Every repo-wide task lives on the root, and the root's `compile` / `test`
|
|
|
381
388
|
delegate with `bun run --filter '*'` rather than emitting a step per member - so
|
|
382
389
|
a new package is covered without a re-synth. Work from the root:
|
|
383
390
|
|
|
384
|
-
| Task
|
|
385
|
-
|
|
|
386
|
-
| `bun run build`
|
|
387
|
-
| `bun run compile`
|
|
388
|
-
| `bun run test`
|
|
389
|
-
| `bun run sync`
|
|
390
|
-
| `bun run barrels`
|
|
391
|
-
| `bun run bump`
|
|
392
|
-
|
|
393
|
-
`
|
|
394
|
-
|
|
395
|
-
|
|
391
|
+
| Task | What it does |
|
|
392
|
+
| ----------------------- | ------------------------------------------------------- |
|
|
393
|
+
| `bun run build` | synth + workspace compile and tests |
|
|
394
|
+
| `bun run compile` | `tsc --build` in each member, in parallel |
|
|
395
|
+
| `bun run test` | `eslint` once, then each member's tests |
|
|
396
|
+
| `bun run sync` | re-synth (`--watch` to keep synthing) |
|
|
397
|
+
| `bun run barrels` | regenerate the read-only `index.ts` barrels |
|
|
398
|
+
| `bun run bump` | increment `VERSION` and synchronize generated versions |
|
|
399
|
+
| `bun run version:check` | verify every version surface matches `VERSION` |
|
|
400
|
+
| `bun run release` | run full local preflight and open a reviewed release PR |
|
|
401
|
+
|
|
402
|
+
`release` commits pending work on the current branch, pushes it, creates a
|
|
403
|
+
dedicated `release/v<version>` branch, invokes the pure `bump` task, validates
|
|
404
|
+
the complete workspace, runs local publication, and opens a PR into the
|
|
405
|
+
configured release branch. `--message` sets the source commit message. The task
|
|
406
|
+
never merges the PR. npm uses `npm config get registry` and publishes to a local
|
|
407
|
+
Verdaccio automatically. Publishable JavaScript members compile once
|
|
396
408
|
from the root in parallel, then upload through a bounded pool without rerunning
|
|
397
|
-
their `prepack` tasks.
|
|
398
|
-
lock release-current, publishing also skips redundant version stamping and the
|
|
399
|
-
lockfile reinstall. Python prefers uv's default index and only
|
|
409
|
+
their `prepack` tasks. Python prefers uv's default index and only
|
|
400
410
|
treats a loopback `.../+simple/` URL as writable devpi; a read-only cache such as
|
|
401
411
|
proxpi (`.../index/`) is deliberately ignored. The task stamps every Python
|
|
402
412
|
member and its sibling dependencies to the release version, builds the workspace
|
|
@@ -408,12 +418,18 @@ Use `--local-registry false` or `--local-pypi false` to disable either local
|
|
|
408
418
|
publish. An explicit `--local-pypi http://localhost:3141/user/index/` overrides
|
|
409
419
|
auto-detection; `--python-root` defaults to `packages/py`.
|
|
410
420
|
|
|
411
|
-
The
|
|
421
|
+
The GitHub PR workflow runs synth plus the workspace TypeScript compile rather
|
|
422
|
+
than the complete root build. Release preparation has already run Rust tests,
|
|
423
|
+
binding generation, workspace tests, and local package preflight before opening
|
|
424
|
+
the PR.
|
|
425
|
+
|
|
426
|
+
The configured release branch publishes only when a reviewed PR changes
|
|
427
|
+
`VERSION`. Its workflow creates the annotated `v*` public release boundary.
|
|
428
|
+
Available workflow
|
|
412
429
|
stages form the generated chain Rust -> Python -> Node -> docs: Rust builds and
|
|
413
430
|
publishes native artifacts and Cargo crates, Python publishes standard
|
|
414
431
|
distributions, Node publishes standard workspace packages, and docs deploys
|
|
415
|
-
after publication. A stage with no corresponding outputs is omitted.
|
|
416
|
-
pushes to `main` publish none of those surfaces.
|
|
432
|
+
after publication. A stage with no corresponding outputs is omitted.
|
|
417
433
|
|
|
418
434
|
Members intentionally keep only the tasks that something OTHER than a human
|
|
419
435
|
invokes, so there is no second place to run the same thing:
|
|
@@ -425,8 +441,8 @@ invokes, so there is no second place to run the same thing:
|
|
|
425
441
|
- `watch` - a single-package `tsc --build -w`, for narrowing a long
|
|
426
442
|
edit/compile loop to one package.
|
|
427
443
|
- `build` / `package` - a complete compile/test/pack lifecycle when invoked in
|
|
428
|
-
one package.
|
|
429
|
-
|
|
444
|
+
one package. Release preparation validates through the root's filtered tasks,
|
|
445
|
+
and publication uses concurrent `bun publish --ignore-scripts`. The package phase also packs
|
|
430
446
|
with `--ignore-scripts` because its build already compiled; `prepack` remains
|
|
431
447
|
available for a standalone publish that did not run `build` first.
|
|
432
448
|
- `install` / `install:ci` / `default` / `pre-compile` / `post-compile` -
|
|
@@ -448,9 +464,9 @@ example apps - so the packages, the engine, and the examples always match.
|
|
|
448
464
|
`src/workspace-version.ts` owns reading and writing it. Synth only ever reads it;
|
|
449
465
|
it never resets, upgrades, or downgrades a version on its own.
|
|
450
466
|
|
|
451
|
-
`bun run bump` is the only command that changes the number: it fetches
|
|
452
|
-
tags once, takes the highest
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
467
|
+
`bun run bump` is the only command that changes the number: it fetches remote
|
|
468
|
+
tags once, takes the highest `v*` tag as the base, increments by `--level`, writes
|
|
469
|
+
`VERSION`, then synths so every manifest copies it. It has no git or publication
|
|
470
|
+
side effects. `bun run release` invokes it while preparing the reviewed release
|
|
471
|
+
PR. The remote is consulted only on `bump` and on one-time creation of a missing
|
|
472
|
+
`VERSION` file, never on an ordinary synth.
|
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.6.
|
|
6
|
+
export const PACKAGE_VERSION = "0.6.196";
|
|
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";
|
|
@@ -64,4 +64,4 @@ export type { TypeScriptBindingModule } from "./src/uniffi.ts";
|
|
|
64
64
|
export { DBXToolsVsCode } from "./src/vscode.ts";
|
|
65
65
|
export type { IgnoreGroupOptions } from "./src/watch.ts";
|
|
66
66
|
export { VERSION_FILE, DEFAULT_VERSION } from "./src/workspace-version.ts";
|
|
67
|
-
export type { Semver } from "./src/workspace-version.ts";
|
|
67
|
+
export type { Semver, VersionLevel } from "./src/workspace-version.ts";
|
package/package.json
CHANGED
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@clack/prompts": "^1.7.0",
|
|
28
|
-
"@dbx-tools/core": "0.6.
|
|
29
|
-
"@dbx-tools/path": "0.6.
|
|
30
|
-
"@dbx-tools/shared-core": "0.6.
|
|
28
|
+
"@dbx-tools/core": "0.6.196",
|
|
29
|
+
"@dbx-tools/path": "0.6.196",
|
|
30
|
+
"@dbx-tools/shared-core": "0.6.196",
|
|
31
31
|
"commander": "^15.0.0",
|
|
32
32
|
"concurrently": "^10.0.3",
|
|
33
33
|
"constructs": "^10.6.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"main": "index.ts",
|
|
49
49
|
"license": "Apache-2.0",
|
|
50
|
-
"version": "0.6.
|
|
50
|
+
"version": "0.6.196",
|
|
51
51
|
"types": "index.ts",
|
|
52
52
|
"type": "module",
|
|
53
53
|
"exports": {
|
package/src/pnpm-workspace.ts
CHANGED
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
*/
|
|
41
41
|
import { relative } from "node:path";
|
|
42
42
|
import { javascript, type Project } from "projen";
|
|
43
|
+
import { BUN_VERSION } from "./bun-workflow.ts";
|
|
43
44
|
import { toPosix } from "./packages.ts";
|
|
44
45
|
|
|
45
46
|
/**
|
|
@@ -63,8 +64,8 @@ export type AllowBuilds = Record<string, boolean>;
|
|
|
63
64
|
* always available at `catalog:` without a per-repo override.
|
|
64
65
|
*/
|
|
65
66
|
const DEFAULT_CATALOG: Catalog = {
|
|
66
|
-
react: "
|
|
67
|
-
"react-dom": "
|
|
67
|
+
react: "~19.2.4",
|
|
68
|
+
"react-dom": "~19.2.4",
|
|
68
69
|
"@types/react": "^19.2.2",
|
|
69
70
|
"@types/react-dom": "^19.2.2",
|
|
70
71
|
// Tailwind v4 compiler for bun's dev server + `Bun.build` (the `app` tag).
|
|
@@ -117,6 +118,7 @@ const DEFAULT_ALLOW_BUILDS: AllowBuilds = {
|
|
|
117
118
|
};
|
|
118
119
|
|
|
119
120
|
const DEFAULT_OVERRIDES: Readonly<Record<string, string>> = {
|
|
121
|
+
bun: BUN_VERSION,
|
|
120
122
|
glob: "^13.0.0",
|
|
121
123
|
};
|
|
122
124
|
|
package/src/project-js.ts
CHANGED
|
@@ -44,7 +44,7 @@ import { DBXToolsRelease, type ReleaseDocsOptions } from "./release.ts";
|
|
|
44
44
|
import { AGNOSTIC_COMPILER_OPTIONS, PACKAGE_TAG_MIXINS, type PackageTag } from "./tags.ts";
|
|
45
45
|
import { DBXToolsRootTsconfig } from "./tsconfig.ts";
|
|
46
46
|
import { DBXToolsVsCode } from "./vscode.ts";
|
|
47
|
-
import { readWorkspaceVersion } from "./workspace-version.ts";
|
|
47
|
+
import { readWorkspaceVersion, syncWorkspaceManifestVersion } from "./workspace-version.ts";
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* The dbx-tools project surface, backed by projen's Node toolchain. A single
|
|
@@ -415,10 +415,10 @@ function defaultProjectOptions(
|
|
|
415
415
|
// would omit the key - except that `npmProvenance` then defaults on and forces
|
|
416
416
|
// the block to render, giving the root a `publishConfig` it does not have
|
|
417
417
|
// today. Provenance is never written to a manifest here (projen only reads it
|
|
418
|
-
// in its own `Publisher`, and `release: false` means none exists)
|
|
419
|
-
//
|
|
420
|
-
//
|
|
421
|
-
//
|
|
418
|
+
// in its own `Publisher`, and `release: false` means none exists). The release
|
|
419
|
+
// workflow opts in per run through `npm_config_provenance`, so local publishes
|
|
420
|
+
// to Verdaccio still work without a CI OIDC provider. See
|
|
421
|
+
// {@link DBXToolsRelease}.
|
|
422
422
|
...(isRoot ? {} : { npmAccess: javascript.NpmAccess.PUBLIC }),
|
|
423
423
|
buildWorkflow: false,
|
|
424
424
|
workflowPackageCache: false,
|
|
@@ -426,8 +426,7 @@ function defaultProjectOptions(
|
|
|
426
426
|
// The root build validates the whole workspace and must not also pack every
|
|
427
427
|
// member into unused `dist/js` tarballs. Child projects keep projen's package
|
|
428
428
|
// task so `bun run build` in ONE package remains a complete compile/test/pack
|
|
429
|
-
// operation.
|
|
430
|
-
// compiles once with filtered root tasks and packs via
|
|
429
|
+
// operation. Release publication compiles once with filtered root tasks and packs via
|
|
431
430
|
// `bun publish --ignore-scripts` (see {@link applyCompiledPublish}).
|
|
432
431
|
...(isRoot ? { package: false } : {}),
|
|
433
432
|
jest: false,
|
|
@@ -450,7 +449,9 @@ function defaultProjectOptions(
|
|
|
450
449
|
prettierOptions: {
|
|
451
450
|
settings: PRETTIER_SETTINGS,
|
|
452
451
|
ignoreFile: true,
|
|
453
|
-
ignoreFileOptions: {
|
|
452
|
+
ignoreFileOptions: {
|
|
453
|
+
ignorePatterns: [...ignore.ignorePatterns({ test: false, lock: true })],
|
|
454
|
+
},
|
|
454
455
|
},
|
|
455
456
|
}
|
|
456
457
|
: {}),
|
|
@@ -656,6 +657,10 @@ export class DBXToolsNodeProject
|
|
|
656
657
|
public override preSynthesize(): void {
|
|
657
658
|
if (this.rootInstallOnly) this.with(ROOT_INSTALL_ONLY_MIXIN);
|
|
658
659
|
super.preSynthesize();
|
|
660
|
+
const version = readWorkspaceVersion(this.outdir);
|
|
661
|
+
for (const member of this.extraWorkspaceMembers) {
|
|
662
|
+
syncWorkspaceManifestVersion(join(this.outdir, member, "package.json"), version);
|
|
663
|
+
}
|
|
659
664
|
// Members come from the attached subprojects, which the root's scan appends
|
|
660
665
|
// after construction - so the list is filled here, not in the constructor.
|
|
661
666
|
// `extraWorkspaceMembers` adds self-synthesizing siblings (e.g. `projen/`).
|
|
@@ -834,6 +839,29 @@ class WorkspaceValidationTasks extends Component {
|
|
|
834
839
|
*/
|
|
835
840
|
class WorkflowDefaults extends Component {
|
|
836
841
|
public override preSynthesize(): void {
|
|
842
|
+
const project = this.project as javascript.NodeProject;
|
|
843
|
+
const workflow = project.buildWorkflow?.workflow;
|
|
844
|
+
if (workflow) {
|
|
845
|
+
const job = workflow.getJob("build");
|
|
846
|
+
if ("steps" in job) {
|
|
847
|
+
const mutableJob = job as unknown as { steps: JobStep[] | (() => JobStep[]) };
|
|
848
|
+
const configuredSteps = mutableJob.steps;
|
|
849
|
+
const rewrite = (steps: JobStep[]): JobStep[] =>
|
|
850
|
+
steps.map((step) =>
|
|
851
|
+
step.name === "build"
|
|
852
|
+
? {
|
|
853
|
+
...step,
|
|
854
|
+
name: "Validate generated files and types",
|
|
855
|
+
run: "bunx projen default\nbun run compile",
|
|
856
|
+
}
|
|
857
|
+
: step,
|
|
858
|
+
);
|
|
859
|
+
mutableJob.steps =
|
|
860
|
+
typeof configuredSteps === "function"
|
|
861
|
+
? () => rewrite(configuredSteps())
|
|
862
|
+
: rewrite(configuredSteps);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
837
865
|
const build = this.project.tryFindObjectFile(".github/workflows/build.yml");
|
|
838
866
|
for (const job of ["build", "self-mutation"]) {
|
|
839
867
|
build?.addOverride(`jobs.${job}.timeout-minutes`, 30);
|
|
@@ -890,6 +918,7 @@ class PrettierIgnoreGenerated extends Component {
|
|
|
890
918
|
public override preSynthesize(): void {
|
|
891
919
|
const prettier = javascript.Prettier.of(this.project);
|
|
892
920
|
if (!prettier) return;
|
|
921
|
+
prettier.addIgnorePattern("**/src/generated/**");
|
|
893
922
|
const rootAbs = resolve(this.project.outdir);
|
|
894
923
|
for (const sub of this.project.subprojects) {
|
|
895
924
|
if (!(sub instanceof javascript.NodeProject)) continue;
|
|
@@ -1115,7 +1144,9 @@ function initProject(
|
|
|
1115
1144
|
// to re-include a file whose parent directory is excluded - so every per-file
|
|
1116
1145
|
// `!/.github/...` negation projen emits for its own generated files silently
|
|
1117
1146
|
// does nothing, and the file cannot be added at all.
|
|
1118
|
-
project.gitignore.addPatterns(
|
|
1147
|
+
project.gitignore.addPatterns(
|
|
1148
|
+
...[...ignore.ignorePatterns({ test: false, dot: false, lock: true })],
|
|
1149
|
+
);
|
|
1119
1150
|
// What the dot group was actually earning here, named explicitly: secrets and
|
|
1120
1151
|
// local editor state. Both ignore CONTENTS (`.idea/*`) rather than the
|
|
1121
1152
|
// directory, so a later `!` negation can still reach a file inside.
|
|
@@ -1156,6 +1187,7 @@ function initProject(
|
|
|
1156
1187
|
eslint.addIgnorePattern(`${root}/openapi/**`);
|
|
1157
1188
|
eslint.addIgnorePattern(`${root}/**/index.ts`);
|
|
1158
1189
|
}
|
|
1190
|
+
eslint.addIgnorePattern("**/src/generated/**");
|
|
1159
1191
|
eslint.addIgnorePattern("projen/index.ts");
|
|
1160
1192
|
// The generated bun app scripts + unmanaged overrides live at the package root,
|
|
1161
1193
|
// outside any `src/**` tsconfig include, so the type-aware parser cannot resolve
|
|
@@ -1253,9 +1285,8 @@ function initProject(
|
|
|
1253
1285
|
new PrettierIgnoreGenerated(project);
|
|
1254
1286
|
|
|
1255
1287
|
new GeneratedSource(project);
|
|
1256
|
-
//
|
|
1257
|
-
//
|
|
1258
|
-
// authors. Independent of projen's own `release` component.
|
|
1288
|
+
// Version mutation, reviewed release preparation, and public publication are
|
|
1289
|
+
// separate surfaces owned by one release component.
|
|
1259
1290
|
new DBXToolsRelease(project as DBXToolsNodeProject, {
|
|
1260
1291
|
tagPrefix: options.releaseTagPrefix,
|
|
1261
1292
|
nodeRelease: options.nodeRelease,
|
package/src/project-py.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { IResolver } from "projen/lib/file";
|
|
|
6
6
|
import { JobPermission } from "projen/lib/github/workflows-model";
|
|
7
7
|
import { parse, stringify } from "smol-toml";
|
|
8
8
|
import { BUN_VERSION, bunCacheRestoreSteps, bunCacheSaveStep } from "./bun-workflow.ts";
|
|
9
|
-
import { projectRepositoryUrl } from "./project-js.ts";
|
|
9
|
+
import { projectReleaseBranch, projectRepositoryUrl } from "./project-js.ts";
|
|
10
10
|
import { isDBXToolsJavaScriptProject } from "./project-predicate.ts";
|
|
11
11
|
import type { DBXToolsProject, DBXToolsProjectOptions } from "./project.ts";
|
|
12
12
|
import { RELEASE_VERSION, releaseSourceSteps } from "./release-dispatch.ts";
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
releaseArtifactSteps,
|
|
15
15
|
releasePublishCondition,
|
|
16
16
|
releaseStageCondition,
|
|
17
|
-
releaseTagPattern,
|
|
18
17
|
releaseWorkflow,
|
|
19
18
|
} from "./release.ts";
|
|
20
19
|
import { readWorkspaceVersion } from "./workspace-version.ts";
|
|
@@ -577,13 +576,15 @@ export class DBXToolsPythonWorkspace extends Component {
|
|
|
577
576
|
): void {
|
|
578
577
|
const repository = this.githubRepository();
|
|
579
578
|
const publications = this.trustedPublisherPublications(options);
|
|
580
|
-
const
|
|
579
|
+
const releaseBranch = isDBXToolsJavaScriptProject()(project)
|
|
580
|
+
? projectReleaseBranch(project)
|
|
581
|
+
: "main";
|
|
581
582
|
const linesBeforeAuthentication = [
|
|
582
583
|
"# PyPI Trusted Publisher Setup Instructions",
|
|
583
584
|
"",
|
|
584
585
|
"Use the system browser to audit and configure the PyPI trusted publishers below.",
|
|
585
586
|
"Do not use an in-app browser or embedded webview.",
|
|
586
|
-
"Do not visit GitHub or use the GitHub API or CLI. Every required GitHub owner, repository, workflow, environment, and
|
|
587
|
+
"Do not visit GitHub or use the GitHub API or CLI. Every required GitHub owner, repository, workflow, environment, and branch value is provided below and is authoritative.",
|
|
587
588
|
"Use only PyPI pages for this task.",
|
|
588
589
|
"",
|
|
589
590
|
"## Audit and confirmation",
|
|
@@ -601,7 +602,7 @@ export class DBXToolsPythonWorkspace extends Component {
|
|
|
601
602
|
"",
|
|
602
603
|
"## GitHub environment policy",
|
|
603
604
|
"",
|
|
604
|
-
`- The supplied
|
|
605
|
+
`- The supplied branch policy value is ${releaseBranch}.`,
|
|
605
606
|
"- Do not inspect or configure GitHub environments during this task.",
|
|
606
607
|
"- GitHub environment administration is a separate task; use the supplied values only when comparing PyPI publisher entries.",
|
|
607
608
|
"",
|
|
@@ -642,7 +643,7 @@ export class DBXToolsPythonWorkspace extends Component {
|
|
|
642
643
|
`- Repository name: ${repository.name}`,
|
|
643
644
|
"- Workflow name: release.yml",
|
|
644
645
|
`- Environment name: ${publication.environment}`,
|
|
645
|
-
`- GitHub environment
|
|
646
|
+
`- GitHub environment branch: ${releaseBranch}`,
|
|
646
647
|
...(publication.artifacts ? [`- Artifacts: ${publication.artifacts}`] : []),
|
|
647
648
|
"",
|
|
648
649
|
];
|