@dbx-tools/projen 0.6.185 → 0.6.186

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
@@ -153,10 +153,11 @@ skips matching files and fails when an existing filename has different content.
153
153
 
154
154
  The Rust matrix has one row per target. Each row installs native dependencies,
155
155
  restores Cargo and sccache once, builds the Cargo workspace once, then packages
156
- every discovered output from that shared build. Set a source-only crate's
157
- `releaseExcludeOs` package option to omit it from incompatible rows through
158
- Cargo `--exclude`; crates that produce UniFFI or release-binary artifacts cannot
159
- use this option because every configured target must produce their artifacts.
156
+ every discovered output from that shared build. Set a source-only crate's or
157
+ release-enabled binary's `releaseExcludeOs` package option to omit it from
158
+ incompatible rows through Cargo `--exclude`. Release binary packaging and
159
+ artifact upload are skipped in those rows. UniFFI crates cannot use this option
160
+ because every configured target must produce their artifacts.
160
161
  Rust rows prepare native npm
161
162
  archives and Python wheels; they do not install Bun or UBRN and do not build
162
163
  Node facades. A binary-only row therefore installs no language package tool.
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.184";
6
+ export const PACKAGE_VERSION = "0.6.185";
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.185",
29
- "@dbx-tools/path": "0.6.185",
30
- "@dbx-tools/shared-core": "0.6.185",
28
+ "@dbx-tools/core": "0.6.186",
29
+ "@dbx-tools/path": "0.6.186",
30
+ "@dbx-tools/shared-core": "0.6.186",
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.185",
50
+ "version": "0.6.186",
51
51
  "types": "index.ts",
52
52
  "type": "module",
53
53
  "exports": {
package/src/project-rs.ts CHANGED
@@ -46,7 +46,7 @@ export interface RustPackageOptions {
46
46
  readonly private?: boolean;
47
47
  /** Build this crate's binary for each target and attach it to the GitHub release. */
48
48
  readonly release?: boolean;
49
- /** Omit this source-only crate from release workspace builds on these operating systems. */
49
+ /** Omit this crate and any release binary artifact from these operating systems. */
50
50
  readonly releaseExcludeOs?: readonly RustReleaseOs[];
51
51
  readonly dependencies?: Readonly<Record<string, CargoDependency>>;
52
52
  readonly devDependencies?: Readonly<Record<string, CargoDependency>>;
@@ -507,9 +507,9 @@ export class DBXToolsRustWorkspace {
507
507
  rustPackageDependencies(this.packages, pkg, project.outdir, options.workspaceDependencies);
508
508
  for (const pkg of this.packages) {
509
509
  const excludedOs = new Set(pkg.packageOptions.releaseExcludeOs ?? []);
510
- if (excludedOs.size && (pkg.uniffi || pkg.packageOptions.release)) {
510
+ if (excludedOs.size && pkg.uniffi) {
511
511
  throw new Error(
512
- `${pkg.crateName} cannot set releaseExcludeOs because it produces target-specific release artifacts`,
512
+ `${pkg.crateName} cannot set releaseExcludeOs because UniFFI requires every configured target`,
513
513
  );
514
514
  }
515
515
  for (const dependency of packageDependencies(pkg)) {
@@ -764,6 +764,7 @@ export class DBXToolsRustWorkspace {
764
764
  .map((pkg) => ({
765
765
  crate: pkg.crateName,
766
766
  binary: pkg.packageOptions.binaryName ?? pkg.crateName,
767
+ excludedOs: pkg.packageOptions.releaseExcludeOs ?? [],
767
768
  }));
768
769
  const publicCrates = orderRustBindings(
769
770
  this.packages
@@ -823,18 +824,30 @@ export class DBXToolsRustWorkspace {
823
824
  "--skip-build",
824
825
  ].join(" \\\n "),
825
826
  );
826
- const binaryCommands = releaseBinaries.flatMap((pkg) => [
827
- `mkdir -p "dist/release/${pkg.crate}/\${{ matrix.node }}/binary/stage"`,
828
- `SOURCE="target/\${{ matrix.cargo }}/release/${pkg.binary}\${{ matrix.os == 'win32' && '.exe' || '' }}"`,
829
- `DESTINATION="dist/release/${pkg.crate}/\${{ matrix.node }}/binary/stage/${pkg.binary}\${{ matrix.os == 'win32' && '.exe' || '' }}"`,
830
- 'cp "$SOURCE" "$DESTINATION"',
831
- 'if [ "${{ matrix.os }}" = "win32" ]; then',
832
- ` 7z a "dist/release/${pkg.crate}/\${{ matrix.node }}/binary/${pkg.binary}-\${{ matrix.node }}.zip" "$DESTINATION"`,
833
- "else",
834
- ` tar -C "dist/release/${pkg.crate}/\${{ matrix.node }}/binary/stage" -czf "dist/release/${pkg.crate}/\${{ matrix.node }}/binary/${pkg.binary}-\${{ matrix.node }}.tar.gz" "${pkg.binary}"`,
835
- "fi",
836
- `rm -rf "dist/release/${pkg.crate}/\${{ matrix.node }}/binary/stage"`,
837
- ]);
827
+ const releaseBinaryCondition = (excludedOs: readonly RustReleaseOs[]) =>
828
+ excludedOs.length
829
+ ? `\${{ ${excludedOs.map((os) => `matrix.os != '${os}'`).join(" && ")} }}`
830
+ : undefined;
831
+ const binaryCommands = releaseBinaries.flatMap((pkg) => {
832
+ const commands = [
833
+ `mkdir -p "dist/release/${pkg.crate}/\${{ matrix.node }}/binary/stage"`,
834
+ `SOURCE="target/\${{ matrix.cargo }}/release/${pkg.binary}\${{ matrix.os == 'win32' && '.exe' || '' }}"`,
835
+ `DESTINATION="dist/release/${pkg.crate}/\${{ matrix.node }}/binary/stage/${pkg.binary}\${{ matrix.os == 'win32' && '.exe' || '' }}"`,
836
+ 'cp "$SOURCE" "$DESTINATION"',
837
+ 'if [ "${{ matrix.os }}" = "win32" ]; then',
838
+ ` 7z a "dist/release/${pkg.crate}/\${{ matrix.node }}/binary/${pkg.binary}-\${{ matrix.node }}.zip" "$DESTINATION"`,
839
+ "else",
840
+ ` tar -C "dist/release/${pkg.crate}/\${{ matrix.node }}/binary/stage" -czf "dist/release/${pkg.crate}/\${{ matrix.node }}/binary/${pkg.binary}-\${{ matrix.node }}.tar.gz" "${pkg.binary}"`,
841
+ "fi",
842
+ `rm -rf "dist/release/${pkg.crate}/\${{ matrix.node }}/binary/stage"`,
843
+ ];
844
+ const excludedCondition = pkg.excludedOs
845
+ .map((os) => `[ "\${{ matrix.os }}" != "${os}" ]`)
846
+ .join(" && ");
847
+ return excludedCondition
848
+ ? [`if ${excludedCondition}; then`, ...commands.map((command) => ` ${command}`), "fi"]
849
+ : commands;
850
+ });
838
851
  const artifactSteps: JobStep[] = [
839
852
  ...bindings.flatMap((binding) => [
840
853
  ...(binding.node
@@ -867,6 +880,9 @@ export class DBXToolsRustWorkspace {
867
880
  ...releaseBinaries.map((pkg) => ({
868
881
  name: `Upload ${pkg.crate} release binary`,
869
882
  uses: "actions/upload-artifact@v7",
883
+ ...(releaseBinaryCondition(pkg.excludedOs)
884
+ ? { if: releaseBinaryCondition(pkg.excludedOs) }
885
+ : {}),
870
886
  with: {
871
887
  name: `${pkg.crate}-\${{ matrix.node }}-binary`,
872
888
  path: `dist/release/${pkg.crate}/\${{ matrix.node }}/binary/*`,
package/tasks/bump.ts CHANGED
@@ -330,7 +330,7 @@ program
330
330
  "-m",
331
331
  "🌸 Shipped with Kanna — https://kanna.sh",
332
332
  "-m",
333
- "Co-Authored-By: Kanna <noreply@kanna.sh>\nKanna-Agent: codex/gpt",
333
+ "Co-Authored-By: Kanna <noreply@kanna.sh>\nKanna-Agent: codex/databricks-gpt-5-6-sol",
334
334
  ]);
335
335
  } else {
336
336
  logger.info("nothing to commit");