@dbx-tools/projen 0.6.210 → 0.6.212

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/src/release.ts CHANGED
@@ -276,13 +276,23 @@ function addDocsJobs(
276
276
  uses: "actions/setup-node@v6",
277
277
  with: { "node-version": "22" },
278
278
  },
279
+ {
280
+ name: "Setup Python",
281
+ uses: "actions/setup-python@v6",
282
+ with: { "python-version": "3.11" },
283
+ },
284
+ { name: "Setup Rust", uses: "dtolnay/rust-toolchain@stable" },
279
285
  { name: "Configure Pages", uses: "actions/configure-pages@v5" },
280
286
  { name: "Install dependencies", run: "bun install" },
287
+ {
288
+ name: "Validate public source documentation",
289
+ run: "bun docs/scripts/check-source-docs.mjs",
290
+ },
281
291
  { name: "Generate docs from READMEs", run: "bun docs/scripts/sync-readmes.mjs" },
282
292
  { name: "Install docs dependencies", run: "bun install --cwd .docs-build/site" },
283
293
  bunCacheSaveStep(),
284
294
  {
285
- name: "Generate TypeScript API docs",
295
+ name: "Generate API docs",
286
296
  run: "bun docs/scripts/generate-api-docs.mjs",
287
297
  },
288
298
  {
package/src/tags.ts CHANGED
@@ -64,8 +64,13 @@ export const PACKAGE_TAG_MIXINS = {
64
64
  // compile (typecheck). No app build / index.html: a full browser app is an
65
65
  // `app`-tagged package (see below) that layers Bun's build tooling on top.
66
66
  ui: create(projectPredicate.hasTag("ui"), (p) => {
67
- p.addDeps("react@catalog:", "react-dom@catalog:");
68
- p.addDevDeps("@types/react@catalog:", "@types/react-dom@catalog:");
67
+ p.addPeerDeps("react@catalog:", "react-dom@catalog:");
68
+ p.addDevDeps(
69
+ "react@catalog:",
70
+ "react-dom@catalog:",
71
+ "@types/react@catalog:",
72
+ "@types/react-dom@catalog:",
73
+ );
69
74
  // `jsx` is not set here: it is in the shared floor for EVERY package, because
70
75
  // packages resolve each other to source and so every consumer of a `.tsx`
71
76
  // module needs it too (see SHARED_COMPILER_OPTIONS). What this tag adds is the
package/tasks/bump.ts CHANGED
@@ -6,44 +6,27 @@
6
6
  */
7
7
  import { exec, project } from "@dbx-tools/core";
8
8
  import { log } from "@dbx-tools/shared-core";
9
- import { Command, Option } from "commander";
10
- import { releasePlatformFilter } from "../src/_release-platform.ts";
9
+ import { Command } from "commander";
11
10
  import {
11
+ releaseArchitectureOption,
12
+ releaseLevelOption,
13
+ releaseOperatingSystemOption,
14
+ releasePlatformFilter,
15
+ type ReleaseArch,
16
+ type ReleaseOs,
12
17
  type VersionLevel,
13
- resolveNextVersion,
14
- writeWorkspaceVersion,
15
- } from "../src/workspace-version.ts";
18
+ } from "../src/_release-platform.ts";
19
+ import { resolveNextVersion, writeWorkspaceVersion } from "../src/workspace-version.ts";
16
20
 
17
21
  const logger = log.logger("projen:bump");
18
- const LEVELS = ["patch", "minor", "major"] as const;
19
- const RELEASE_OSES = ["darwin", "linux", "win32"] as const;
20
- const RELEASE_ARCHES = ["arm64", "x64"] as const;
21
- type ReleaseOs = (typeof RELEASE_OSES)[number];
22
- type ReleaseArch = (typeof RELEASE_ARCHES)[number];
23
-
24
- function collectValue<T extends string>(value: T, previous: T[]): T[] {
25
- return [...previous, value];
26
- }
27
22
 
28
23
  const program = new Command();
29
24
  program
30
25
  .description("Increment VERSION and synchronize generated workspace versions")
31
- .addOption(
32
- new Option("-l, --level <level>", "semver increment").choices([...LEVELS]).default("patch"),
33
- )
26
+ .addOption(releaseLevelOption())
34
27
  .option("--prefix <prefix>", "git tag prefix used to resolve the published base", "v")
35
- .addOption(
36
- new Option("--os <os>", "release operating system, repeatable; crossed with every --arch")
37
- .choices([...RELEASE_OSES])
38
- .argParser((value, previous: ReleaseOs[]) => collectValue(value as ReleaseOs, previous))
39
- .default([] as ReleaseOs[]),
40
- )
41
- .addOption(
42
- new Option("--arch <arch>", "release CPU architecture, repeatable; crossed with every --os")
43
- .choices([...RELEASE_ARCHES])
44
- .argParser((value, previous: ReleaseArch[]) => collectValue(value as ReleaseArch, previous))
45
- .default([] as ReleaseArch[]),
46
- )
28
+ .addOption(releaseOperatingSystemOption())
29
+ .addOption(releaseArchitectureOption())
47
30
  .option("--no-synth", "write VERSION without synchronizing generated files")
48
31
  .action(
49
32
  (opts: {
@@ -12,24 +12,19 @@ import { join } from "node:path";
12
12
  import { fileURLToPath } from "node:url";
13
13
  import { exec, project } from "@dbx-tools/core";
14
14
  import { log } from "@dbx-tools/shared-core";
15
- import { Command, Option } from "commander";
16
- import { publishLocalRelease } from "./local-publish.ts";
15
+ import { Command } from "commander";
17
16
  import {
17
+ releaseArchitectureOption,
18
+ releaseLevelOption,
19
+ releaseOperatingSystemOption,
20
+ type ReleaseArch,
21
+ type ReleaseOs,
18
22
  type VersionLevel,
19
- readWorkspaceVersion,
20
- resolveNextVersion,
21
- } from "../src/workspace-version.ts";
23
+ } from "../src/_release-platform.ts";
24
+ import { publishLocalRelease } from "./local-publish.ts";
25
+ import { readWorkspaceVersion, resolveNextVersion } from "../src/workspace-version.ts";
22
26
 
23
27
  const logger = log.logger("projen:release");
24
- const LEVELS = ["patch", "minor", "major"] as const;
25
- const RELEASE_OSES = ["darwin", "linux", "win32"] as const;
26
- const RELEASE_ARCHES = ["arm64", "x64"] as const;
27
- type ReleaseOs = (typeof RELEASE_OSES)[number];
28
- type ReleaseArch = (typeof RELEASE_ARCHES)[number];
29
-
30
- function collectValue<T extends string>(value: T, previous: T[]): T[] {
31
- return [...previous, value];
32
- }
33
28
 
34
29
  function git(
35
30
  root: string,
@@ -126,24 +121,12 @@ function githubAccount(root: string): { owner: string; repository: string; token
126
121
  const program = new Command();
127
122
  program
128
123
  .description("Prepare, validate, locally publish, and open a reviewed release PR")
129
- .addOption(
130
- new Option("-l, --level <level>", "semver increment").choices([...LEVELS]).default("patch"),
131
- )
124
+ .addOption(releaseLevelOption())
132
125
  .option("--prefix <prefix>", "release tag prefix", "v")
133
126
  .option("--base <branch>", "release pull request base branch", "main")
134
127
  .option("--message <message>", "commit message for pending source work", "chore: prepare release")
135
- .addOption(
136
- new Option("--os <os>", "release operating system, repeatable; crossed with every --arch")
137
- .choices([...RELEASE_OSES])
138
- .argParser((value, previous: ReleaseOs[]) => collectValue(value as ReleaseOs, previous))
139
- .default([] as ReleaseOs[]),
140
- )
141
- .addOption(
142
- new Option("--arch <arch>", "release CPU architecture, repeatable; crossed with every --os")
143
- .choices([...RELEASE_ARCHES])
144
- .argParser((value, previous: ReleaseArch[]) => collectValue(value as ReleaseArch, previous))
145
- .default([] as ReleaseArch[]),
146
- )
128
+ .addOption(releaseOperatingSystemOption())
129
+ .addOption(releaseArchitectureOption())
147
130
  .option("--local-registry <value>", "local npm registry: auto, false, or an explicit URL", "auto")
148
131
  .option("--local-pypi <value>", "local PyPI index: auto, false, or an explicit URL", "auto")
149
132
  .option("--python-root <path>", "Python workspace package root", "packages/py")