@dbx-tools/projen 0.9.93 → 0.9.99
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 +42 -6
- package/index.ts +3 -1
- package/package.json +4 -4
- package/src/dev-watch.ts +15 -0
- package/src/pnpm-workspace.ts +1 -0
- package/src/project-js.ts +67 -14
- package/src/python-node-bindings.ts +279 -21
- package/src/release.ts +0 -10
- package/src/tags.ts +2 -6
- package/src/tsconfig.ts +1 -1
- package/tasks/dev-watch.ts +339 -0
- package/tasks/python-node-bindings.ts +64 -100
- package/tasks/release-notes.ts +24 -1
- package/tasks/release.ts +45 -4
package/tasks/release.ts
CHANGED
|
@@ -71,7 +71,9 @@ function pushAnnotatedReleaseTag(options: {
|
|
|
71
71
|
runTaskCommand(root, "git", ["tag", "--annotate", tag, "--message", annotation]);
|
|
72
72
|
const githubAccount = projectUtils.resolveProjectGhAccount(root, { remote });
|
|
73
73
|
if (!githubAccount) {
|
|
74
|
-
logger.warn(
|
|
74
|
+
logger.warn(
|
|
75
|
+
"no authenticated GitHub account can access the release repository; using git push",
|
|
76
|
+
);
|
|
75
77
|
runTaskCommand(root, "git", ["push", remote, `refs/tags/${tag}`]);
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
@@ -228,16 +230,44 @@ export async function runRelease(
|
|
|
228
230
|
readonly validationTasks?: readonly string[];
|
|
229
231
|
/** After tagging, stage and deploy the AppKit demo app. Off by default. */
|
|
230
232
|
readonly demoDeploy?: boolean;
|
|
233
|
+
/** Explicit Databricks CLI profile used by the optional demo deployment. */
|
|
234
|
+
readonly demoProfile?: string;
|
|
231
235
|
/** Write `docs/releases/vX.Y.Z.md` via Genie, with a git-log fallback. On by default. */
|
|
232
236
|
readonly releaseNotes?: boolean;
|
|
233
237
|
/** Additional instructions appended to the standard Genie release-notes prompt. */
|
|
234
238
|
readonly releaseNotesInstructions?: string;
|
|
239
|
+
/** Complete release notes supplied directly instead of invoking Genie. */
|
|
240
|
+
readonly releaseNotesText?: string;
|
|
241
|
+
/** Path to complete release notes supplied instead of invoking Genie. */
|
|
242
|
+
readonly releaseNotesFile?: string;
|
|
235
243
|
readonly writeReleaseNotes?: typeof writeReleaseNotes;
|
|
236
244
|
},
|
|
237
245
|
): Promise<string> {
|
|
238
246
|
const { branch, prefix, remote, root } = options;
|
|
239
247
|
const selection = releaseStepSelection(options);
|
|
240
248
|
const install = options.install ?? "auto";
|
|
249
|
+
const demoProfile = options.demoProfile?.trim();
|
|
250
|
+
|
|
251
|
+
if (options.demoDeploy && !demoProfile) {
|
|
252
|
+
throw new Error("--demo-deploy requires --profile <name>");
|
|
253
|
+
}
|
|
254
|
+
if (options.releaseNotesText !== undefined && options.releaseNotesFile !== undefined) {
|
|
255
|
+
throw new Error("--release-notes-text and --release-notes-file are mutually exclusive");
|
|
256
|
+
}
|
|
257
|
+
if (
|
|
258
|
+
options.releaseNotesInstructions !== undefined &&
|
|
259
|
+
(options.releaseNotesText !== undefined || options.releaseNotesFile !== undefined)
|
|
260
|
+
) {
|
|
261
|
+
throw new Error(
|
|
262
|
+
"--release-notes-instructions cannot be combined with supplied release notes",
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
if (
|
|
266
|
+
options.releaseNotes === false &&
|
|
267
|
+
(options.releaseNotesText !== undefined || options.releaseNotesFile !== undefined)
|
|
268
|
+
) {
|
|
269
|
+
throw new Error("--no-release-notes cannot be combined with supplied release notes");
|
|
270
|
+
}
|
|
241
271
|
|
|
242
272
|
if (install === "always") runTaskCommand(root, "bun", ["install"]);
|
|
243
273
|
if (selection.validation && hasPackageScript(root, "eslint:fix")) {
|
|
@@ -270,6 +300,8 @@ export async function runRelease(
|
|
|
270
300
|
prefix,
|
|
271
301
|
root,
|
|
272
302
|
version,
|
|
303
|
+
content: options.releaseNotesText,
|
|
304
|
+
file: options.releaseNotesFile,
|
|
273
305
|
instructions: options.releaseNotesInstructions,
|
|
274
306
|
});
|
|
275
307
|
}
|
|
@@ -331,8 +363,8 @@ export async function runRelease(
|
|
|
331
363
|
});
|
|
332
364
|
}
|
|
333
365
|
|
|
334
|
-
if (options.demoDeploy) {
|
|
335
|
-
runTaskCommand(root, "bun", ["run", "demo:deploy"]);
|
|
366
|
+
if (options.demoDeploy && demoProfile) {
|
|
367
|
+
runTaskCommand(root, "bun", ["run", "demo:deploy", "--profile", demoProfile]);
|
|
336
368
|
}
|
|
337
369
|
|
|
338
370
|
return tag;
|
|
@@ -371,14 +403,17 @@ export function createReleaseCommand(): Command {
|
|
|
371
403
|
.option("--no-docs", "skip documentation build and deployment")
|
|
372
404
|
.option(
|
|
373
405
|
"--no-validation",
|
|
374
|
-
"skip optional release validation tasks; version
|
|
406
|
+
"skip optional release validation tasks; workspace version checks remain mandatory",
|
|
375
407
|
)
|
|
376
408
|
.option("--no-release-notes", "skip writing docs/releases notes (Genie and git-log fallback)")
|
|
409
|
+
.option("--release-notes-text <markdown>", "write supplied markdown without invoking Genie")
|
|
410
|
+
.option("--release-notes-file <path>", "copy supplied markdown without invoking Genie")
|
|
377
411
|
.option(
|
|
378
412
|
"--release-notes-instructions <text>",
|
|
379
413
|
"append custom instructions to the Genie release-notes prompt",
|
|
380
414
|
)
|
|
381
415
|
.option("--demo-deploy", "after tagging, stage and deploy the AppKit demo app (off by default)")
|
|
416
|
+
.option("--profile <name>", "Databricks CLI profile for --demo-deploy")
|
|
382
417
|
.option("--no-local-publish", "skip publishing to configured local registries")
|
|
383
418
|
.option("--local-registry <auto|false|url>", "local npm registry selection", "auto")
|
|
384
419
|
.option("--local-pypi <auto|false|url>", "local devpi registry selection", "auto")
|
|
@@ -397,8 +432,11 @@ export function createReleaseCommand(): Command {
|
|
|
397
432
|
install: ReleaseInstallMode;
|
|
398
433
|
validate: string[];
|
|
399
434
|
demoDeploy?: boolean;
|
|
435
|
+
profile?: string;
|
|
400
436
|
releaseNotes?: boolean;
|
|
401
437
|
releaseNotesInstructions?: string;
|
|
438
|
+
releaseNotesText?: string;
|
|
439
|
+
releaseNotesFile?: string;
|
|
402
440
|
},
|
|
403
441
|
) => {
|
|
404
442
|
await runRelease({
|
|
@@ -419,8 +457,11 @@ export function createReleaseCommand(): Command {
|
|
|
419
457
|
validation: options.validation,
|
|
420
458
|
validationTasks: options.validate,
|
|
421
459
|
demoDeploy: options.demoDeploy,
|
|
460
|
+
demoProfile: options.profile,
|
|
422
461
|
releaseNotes: options.releaseNotes,
|
|
423
462
|
releaseNotesInstructions: options.releaseNotesInstructions,
|
|
463
|
+
releaseNotesText: options.releaseNotesText,
|
|
464
|
+
releaseNotesFile: options.releaseNotesFile,
|
|
424
465
|
});
|
|
425
466
|
},
|
|
426
467
|
);
|