@dbx-tools/projen 0.6.191 → 0.6.192
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/index.ts +1 -1
- package/package.json +4 -4
- package/src/project-rs.ts +15 -1
- package/tasks/bump.ts +10 -0
- package/tasks/uniffi-release.mjs +9 -1
- package/tasks/uniffi.ts +1 -0
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.191";
|
|
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.
|
|
29
|
-
"@dbx-tools/path": "0.6.
|
|
30
|
-
"@dbx-tools/shared-core": "0.6.
|
|
28
|
+
"@dbx-tools/core": "0.6.192",
|
|
29
|
+
"@dbx-tools/path": "0.6.192",
|
|
30
|
+
"@dbx-tools/shared-core": "0.6.192",
|
|
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.192",
|
|
51
51
|
"types": "index.ts",
|
|
52
52
|
"type": "module",
|
|
53
53
|
"exports": {
|
package/src/project-rs.ts
CHANGED
|
@@ -693,6 +693,7 @@ export class DBXToolsRustWorkspace {
|
|
|
693
693
|
dbxToolsProject.dbxToolsConfig.rust = this.workspaceMapping;
|
|
694
694
|
}
|
|
695
695
|
project.gitignore.addPatterns(
|
|
696
|
+
"!/Cargo.lock",
|
|
696
697
|
"target/",
|
|
697
698
|
...this.bindingMappings.flatMap((binding) => [
|
|
698
699
|
...(binding.node ? [`${binding.node}/src/*${binding.crate.replaceAll("-", "_")}.*`] : []),
|
|
@@ -816,6 +817,18 @@ export class DBXToolsRustWorkspace {
|
|
|
816
817
|
new TextFile(project, "Cargo.toml", {
|
|
817
818
|
lines: renderToml(generatedWorkspaceManifest).trimEnd().split("\n"),
|
|
818
819
|
});
|
|
820
|
+
new TextFile(project, ".cargo/config.toml", {
|
|
821
|
+
lines: renderToml({
|
|
822
|
+
"target.x86_64-pc-windows-msvc": {
|
|
823
|
+
rustflags: ["-C", "target-feature=+crt-static"],
|
|
824
|
+
},
|
|
825
|
+
"target.aarch64-pc-windows-msvc": {
|
|
826
|
+
rustflags: ["-C", "target-feature=+crt-static"],
|
|
827
|
+
},
|
|
828
|
+
})
|
|
829
|
+
.trimEnd()
|
|
830
|
+
.split("\n"),
|
|
831
|
+
});
|
|
819
832
|
project.addTask("rs:format", { exec: "cargo fmt --all" });
|
|
820
833
|
project.addTask("rs:lint", { exec: "cargo clippy --workspace --all-targets --all-features" });
|
|
821
834
|
project.addTask("rs:test", { exec: "cargo test --workspace" });
|
|
@@ -879,6 +892,7 @@ export class DBXToolsRustWorkspace {
|
|
|
879
892
|
return { ...target, ...(hasReleaseExclusions ? { cargoExcludes } : {}) };
|
|
880
893
|
});
|
|
881
894
|
const hasPythonBindings = bindings.some((binding) => binding.python);
|
|
895
|
+
const usesCargoLock = existsSync(join(project.outdir, "Cargo.lock"));
|
|
882
896
|
const usePreinstalledWindowsRust = releaseRustVersion === "stable";
|
|
883
897
|
const hasTargetOutputs =
|
|
884
898
|
bindings.length > 0 || releaseBinaries.length > 0 || publicCrates.length > 0;
|
|
@@ -1056,7 +1070,7 @@ export class DBXToolsRustWorkspace {
|
|
|
1056
1070
|
},
|
|
1057
1071
|
run: timedBash(
|
|
1058
1072
|
"rust_workspace",
|
|
1059
|
-
`cargo build --release --workspace --target "\${{ matrix.cargo }}"${
|
|
1073
|
+
`cargo build --release --workspace${usesCargoLock ? " --locked" : ""} --target "\${{ matrix.cargo }}"${
|
|
1060
1074
|
hasReleaseExclusions ? " ${{ matrix.cargoExcludes }}" : ""
|
|
1061
1075
|
}`,
|
|
1062
1076
|
),
|
package/tasks/bump.ts
CHANGED
|
@@ -315,6 +315,16 @@ program
|
|
|
315
315
|
stdin: "ignore",
|
|
316
316
|
check: true,
|
|
317
317
|
});
|
|
318
|
+
if (existsSync(join(root, "Cargo.toml"))) {
|
|
319
|
+
logger.info("refreshing Cargo.lock workspace versions");
|
|
320
|
+
exec.spawnSync("cargo", ["metadata", "--format-version", "1", "--no-deps"], {
|
|
321
|
+
cwd: process.cwd(),
|
|
322
|
+
stdout: "ignore",
|
|
323
|
+
stderr: "inherit",
|
|
324
|
+
stdin: "ignore",
|
|
325
|
+
check: true,
|
|
326
|
+
});
|
|
327
|
+
}
|
|
318
328
|
}
|
|
319
329
|
|
|
320
330
|
if (opts.commit) {
|
package/tasks/uniffi-release.mjs
CHANGED
|
@@ -494,7 +494,15 @@ const build = () => {
|
|
|
494
494
|
rmSync(output, { recursive: true, force: true });
|
|
495
495
|
mkdirSync(output, { recursive: true });
|
|
496
496
|
if (!parsed.values["skip-build"]) {
|
|
497
|
-
run("cargo", [
|
|
497
|
+
run("cargo", [
|
|
498
|
+
"build",
|
|
499
|
+
"--release",
|
|
500
|
+
...(existsSync(resolve(root, "Cargo.lock")) ? ["--locked"] : []),
|
|
501
|
+
"--package",
|
|
502
|
+
crate,
|
|
503
|
+
"--target",
|
|
504
|
+
cargoTarget,
|
|
505
|
+
]);
|
|
498
506
|
}
|
|
499
507
|
if (!existsSync(library)) throw new Error(`Missing native library ${library}`);
|
|
500
508
|
|
package/tasks/uniffi.ts
CHANGED