@dbx-tools/projen 0.6.196 → 0.6.198

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 CHANGED
@@ -403,8 +403,10 @@ a new package is covered without a re-synth. Work from the root:
403
403
  dedicated `release/v<version>` branch, invokes the pure `bump` task, validates
404
404
  the complete workspace, runs local publication, and opens a PR into the
405
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
406
+ never merges the PR unless `--approve` is passed; that option requests an
407
+ immediate admin merge so the main release can start without waiting for PR
408
+ checks. npm uses `npm config get registry` and publishes to a local Verdaccio
409
+ automatically. Publishable JavaScript members compile once
408
410
  from the root in parallel, then upload through a bounded pool without rerunning
409
411
  their `prepack` tasks. Python prefers uv's default index and only
410
412
  treats a loopback `.../+simple/` URL as writable devpi; a read-only cache such as
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.196";
6
+ export const PACKAGE_VERSION = "0.6.198";
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";
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.196",
29
- "@dbx-tools/path": "0.6.196",
30
- "@dbx-tools/shared-core": "0.6.196",
28
+ "@dbx-tools/core": "0.6.198",
29
+ "@dbx-tools/path": "0.6.198",
30
+ "@dbx-tools/shared-core": "0.6.198",
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.196",
50
+ "version": "0.6.198",
51
51
  "types": "index.ts",
52
52
  "type": "module",
53
53
  "exports": {
@@ -66,6 +66,24 @@ function gitSucceeds(root: string, args: string[]): boolean {
66
66
  );
67
67
  }
68
68
 
69
+ function commandSucceeds(
70
+ root: string,
71
+ command: string,
72
+ args: string[],
73
+ env?: NodeJS.ProcessEnv,
74
+ ): boolean {
75
+ return (
76
+ exec.spawnSync(command, args, {
77
+ cwd: root,
78
+ env,
79
+ stdout: "ignore",
80
+ stderr: "ignore",
81
+ stdin: "ignore",
82
+ check: false,
83
+ }).exitCode === 0
84
+ );
85
+ }
86
+
69
87
  function run(root: string, command: string, args: string[], env?: NodeJS.ProcessEnv): void {
70
88
  exec.spawnSync(command, args, {
71
89
  cwd: root,
@@ -120,6 +138,7 @@ program
120
138
  .option("--local-pypi <value>", "local PyPI index: auto, false, or an explicit URL", "auto")
121
139
  .option("--python-root <path>", "Python workspace package root", "packages/py")
122
140
  .option("--no-local-cargo", "skip local Cargo publication")
141
+ .option("--approve", "merge the release PR immediately with admin bypass")
123
142
  .action(
124
143
  async (opts: {
125
144
  level: VersionLevel;
@@ -132,6 +151,7 @@ program
132
151
  localPypi: string;
133
152
  pythonRoot: string;
134
153
  localCargo: boolean;
154
+ approve: boolean;
135
155
  }) => {
136
156
  const root = project.root() ?? process.cwd();
137
157
  const currentBranch = git(root, ["branch", "--show-current"], { capture: true });
@@ -234,25 +254,31 @@ program
234
254
  "",
235
255
  "Merging this PR updates VERSION on main and starts the public release workflow.",
236
256
  ].join("\n");
237
- run(
238
- root,
239
- "gh",
240
- [
241
- "pr",
242
- "create",
243
- "--base",
244
- opts.base,
245
- "--head",
246
- releaseBranch,
247
- "--title",
248
- title,
249
- "--body",
250
- body,
251
- ],
252
- { ...process.env, GH_TOKEN: account.token },
253
- );
257
+ const githubEnvironment = { ...process.env, GH_TOKEN: account.token };
258
+ if (!commandSucceeds(root, "gh", ["pr", "view", releaseBranch], githubEnvironment)) {
259
+ run(
260
+ root,
261
+ "gh",
262
+ [
263
+ "pr",
264
+ "create",
265
+ "--base",
266
+ opts.base,
267
+ "--head",
268
+ releaseBranch,
269
+ "--title",
270
+ title,
271
+ "--body",
272
+ body,
273
+ ],
274
+ githubEnvironment,
275
+ );
276
+ }
277
+ if (opts.approve) {
278
+ run(root, "gh", ["pr", "merge", releaseBranch, "--admin", "--merge"], githubEnvironment);
279
+ }
254
280
  if (!resuming) git(root, ["switch", currentBranch]);
255
- logger.success(`opened ${releaseBranch} for ${releaseTag}`);
281
+ logger.success(`${opts.approve ? "merged" : "opened"} ${releaseBranch} for ${releaseTag}`);
256
282
  },
257
283
  );
258
284