create-conformal 0.11.0 → 0.12.1
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/CHANGELOG.md +25 -0
- package/package.json +6 -5
- package/package.json.bak +6 -5
- package/src/template.test.ts +56 -25
- package/template/.gitattributes +2 -0
- package/template/.github/actions/bootstrap/action.yml +7 -7
- package/template/.github/workflows/ci.yml +9 -1
- package/template/.github/workflows/release.yml +20 -1
- package/template/package.json +13 -13
- package/template/web/eslint-config-custom/index.mjs +2 -0
- package/template/web/tsconfig/tsconfig.json +2 -2
- package/template/{{cargo_toml}} +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# create-conformal
|
|
2
2
|
|
|
3
|
+
## 0.12.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0f26266: Fix for windows CI in template
|
|
8
|
+
|
|
9
|
+
## 0.12.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- b729eed: Add vendor to bundle.json
|
|
14
|
+
- 4446ab2: MSRV 1.93.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 58150bb: Support building windows installer in github workflow
|
|
19
|
+
- d15c573: add \_ to unused var patterns in eslint defaults
|
|
20
|
+
- 77adb9c: Hook up dev-mode script
|
|
21
|
+
- Updated dependencies [b729eed]
|
|
22
|
+
- Updated dependencies [77adb9c]
|
|
23
|
+
- Updated dependencies [b729eed]
|
|
24
|
+
- Updated dependencies [b078959]
|
|
25
|
+
- @conformal/create-plugin@0.12.0
|
|
26
|
+
- @conformal/stamp@0.5.0
|
|
27
|
+
|
|
3
28
|
## 0.11.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@conformal/stamp": "^0.
|
|
4
|
-
"@conformal/create-plugin": "^0.
|
|
5
|
-
"@commander-js/extra-typings": "^
|
|
6
|
-
"commander": "^
|
|
3
|
+
"@conformal/stamp": "^0.5.0",
|
|
4
|
+
"@conformal/create-plugin": "^0.12.0",
|
|
5
|
+
"@commander-js/extra-typings": "^14.0.0",
|
|
6
|
+
"commander": "^14.0.3"
|
|
7
7
|
},
|
|
8
8
|
"name": "create-conformal",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.12.1",
|
|
10
10
|
"description": "Project generator script for conformal projects",
|
|
11
11
|
"homepage": "https://russellmcc.github.io/conformal",
|
|
12
12
|
"bugs": "https://github.com/russellmcc/conformal/issues",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"tmp-promise": "catalog:",
|
|
24
|
+
"tsconfig": "workspace:0.0.0",
|
|
24
25
|
"eslint-config-custom": "workspace:0.0.0",
|
|
25
26
|
"zod": "catalog:"
|
|
26
27
|
}
|
package/package.json.bak
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@conformal/stamp": "^0.
|
|
4
|
-
"@conformal/create-plugin": "^0.
|
|
5
|
-
"@commander-js/extra-typings": "^
|
|
6
|
-
"commander": "^
|
|
3
|
+
"@conformal/stamp": "^0.5.0",
|
|
4
|
+
"@conformal/create-plugin": "^0.12.0",
|
|
5
|
+
"@commander-js/extra-typings": "^14.0.0",
|
|
6
|
+
"commander": "^14.0.3"
|
|
7
7
|
},
|
|
8
8
|
"name": "create-conformal",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.12.1",
|
|
10
10
|
"description": "Project generator script for conformal projects",
|
|
11
11
|
"homepage": "https://russellmcc.github.io/conformal",
|
|
12
12
|
"bugs": "https://github.com/russellmcc/conformal/issues",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"tmp-promise": "catalog:",
|
|
24
|
+
"tsconfig": "workspace:0.0.0",
|
|
24
25
|
"eslint-config-custom": "workspace:0.0.0",
|
|
25
26
|
"zod": "catalog:"
|
|
26
27
|
}
|
package/src/template.test.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, test, expect } from "bun:test";
|
|
2
2
|
import { withDir } from "tmp-promise";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { unlink, rm } from "node:fs/promises";
|
|
4
|
+
import { unlink, rm, readdir } from "node:fs/promises";
|
|
5
5
|
import { $ } from "bun";
|
|
6
6
|
import { Config, postBuild } from "./config";
|
|
7
7
|
import { stampTemplate } from "@conformal/stamp";
|
|
@@ -18,21 +18,30 @@ const TEST_CONFIG: Config = {
|
|
|
18
18
|
|
|
19
19
|
const MINUTE = 60_000;
|
|
20
20
|
|
|
21
|
-
const
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
.
|
|
21
|
+
const runShell = async (args: string[], options: { cwd?: string } = {}) => {
|
|
22
|
+
const proc = Bun.spawn(args, {
|
|
23
|
+
stdio: ["inherit", "inherit", "inherit"],
|
|
24
|
+
env: process.env,
|
|
25
|
+
...options,
|
|
26
|
+
});
|
|
27
|
+
console.log(`$ ${args.map((x) => `"${x}"`).join(" ")}`);
|
|
28
|
+
await proc.exited;
|
|
29
|
+
if (proc.exitCode !== 0) {
|
|
30
|
+
process.exit(proc.exitCode ?? undefined);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const packageJsonSchema = z.looseObject({
|
|
35
|
+
catalog: z.optional(z.record(z.string(), z.string())),
|
|
36
|
+
dependencies: z.optional(z.record(z.string(), z.string())),
|
|
37
|
+
devDependencies: z.optional(z.record(z.string(), z.string())),
|
|
38
|
+
scripts: z.optional(
|
|
39
|
+
z.looseObject({
|
|
40
|
+
prepack: z.optional(z.string()),
|
|
41
|
+
postpack: z.optional(z.string()),
|
|
42
|
+
}),
|
|
43
|
+
),
|
|
44
|
+
});
|
|
36
45
|
|
|
37
46
|
describe("create-conformal template", () => {
|
|
38
47
|
test(
|
|
@@ -126,7 +135,7 @@ describe("create-conformal template", () => {
|
|
|
126
135
|
|
|
127
136
|
// Extract the tarball to a sub-directory of tmpDir
|
|
128
137
|
const extractDir = path.join(tmpDir, `package`);
|
|
129
|
-
await
|
|
138
|
+
await runShell(["tar", "-xzf", tgzPath], { cwd: tmpDir });
|
|
130
139
|
// Fix up all dependencies
|
|
131
140
|
await rewireDeps(extractDir);
|
|
132
141
|
|
|
@@ -179,9 +188,29 @@ describe("create-conformal template", () => {
|
|
|
179
188
|
);
|
|
180
189
|
|
|
181
190
|
// Note that the generate script leaves some intentional task markers - replace all these with "DONE"
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
191
|
+
const replaceInFiles = async (
|
|
192
|
+
dirs: string[],
|
|
193
|
+
pattern: RegExp,
|
|
194
|
+
replacement: string,
|
|
195
|
+
) => {
|
|
196
|
+
for (const dir of dirs) {
|
|
197
|
+
const entries = await readdir(path.join(dest, dir), {
|
|
198
|
+
recursive: true,
|
|
199
|
+
withFileTypes: true,
|
|
200
|
+
});
|
|
201
|
+
for (const entry of entries) {
|
|
202
|
+
if (!entry.isFile()) continue;
|
|
203
|
+
const filePath = path.join(entry.parentPath, entry.name);
|
|
204
|
+
const content = await Bun.file(filePath).text();
|
|
205
|
+
const updated = content.replace(pattern, replacement);
|
|
206
|
+
if (updated !== content) {
|
|
207
|
+
await Bun.write(filePath, updated);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
await replaceInFiles(["web", "rust"], /TODO/g, "DONE");
|
|
185
214
|
|
|
186
215
|
// We have to re-install after adding new packages, now that dependencies are isolated.
|
|
187
216
|
await $`bun install`.cwd(dest);
|
|
@@ -190,18 +219,20 @@ describe("create-conformal template", () => {
|
|
|
190
219
|
// Replace these with a link to the local crate
|
|
191
220
|
const createDependencies = ["component", "vst_wrapper", "poly"];
|
|
192
221
|
for (const dep of createDependencies) {
|
|
193
|
-
const crateVersion = `{ path = "${path.join(workspacePath, "rust", dep.replace("_", "-"))}" }`;
|
|
194
|
-
await
|
|
195
|
-
|
|
222
|
+
const crateVersion = `{ path = "${path.join(workspacePath, "rust", dep.replace("_", "-")).replaceAll("\\", "\\\\")}" }`;
|
|
223
|
+
await replaceInFiles(
|
|
224
|
+
["rust"],
|
|
225
|
+
new RegExp(`conformal_${dep} = "[^"]+"`, "g"),
|
|
226
|
+
`conformal_${dep} = ${crateVersion}`,
|
|
196
227
|
);
|
|
197
228
|
}
|
|
198
229
|
|
|
199
230
|
// Make sure CI would pass.
|
|
200
231
|
await $`bun run ci`.cwd(dest);
|
|
201
232
|
},
|
|
202
|
-
{ unsafeCleanup: true },
|
|
233
|
+
{ unsafeCleanup: true, tmpdir: process.env.RUNNER_TEMP },
|
|
203
234
|
);
|
|
204
235
|
},
|
|
205
|
-
5 * MINUTE,
|
|
236
|
+
process.platform === "win32" ? 10 * MINUTE : 5 * MINUTE,
|
|
206
237
|
);
|
|
207
238
|
});
|
package/template/.gitattributes
CHANGED
|
@@ -20,30 +20,30 @@ runs:
|
|
|
20
20
|
id: vst3-cache
|
|
21
21
|
uses: actions/cache@v4
|
|
22
22
|
with:
|
|
23
|
-
path: /
|
|
23
|
+
path: $\{{ runner.temp }}/vst3sdk/vst3sdk
|
|
24
24
|
key: vst3-$\{{ runner.os }}-v3.8.0_build_66
|
|
25
25
|
|
|
26
26
|
- name: Set VST3_SDK_DIR from cache
|
|
27
27
|
if: steps.vst3-cache.outputs.cache-hit == 'true'
|
|
28
28
|
run: |
|
|
29
|
-
echo "VST3_SDK_DIR
|
|
30
|
-
echo "VST3_SDK_DIR
|
|
29
|
+
echo "VST3_SDK_DIR=$RUNNER_TEMP/vst3sdk" >> "$GITHUB_ENV"
|
|
30
|
+
echo "VST3_SDK_DIR=$RUNNER_TEMP/vst3sdk" >> .env
|
|
31
31
|
shell: bash
|
|
32
32
|
|
|
33
|
-
- run: bun run bootstrap-rust-toolchain
|
|
33
|
+
- run: bun run bootstrap-rust-toolchain --rust-version 1.93.1
|
|
34
34
|
shell: bash
|
|
35
35
|
|
|
36
36
|
- name: Rust cache
|
|
37
37
|
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
|
|
38
38
|
|
|
39
|
-
- run: bun run bootstrap --rust-version 1.
|
|
39
|
+
- run: bun run bootstrap --rust-version 1.93.1 --with-vst-sdk
|
|
40
40
|
shell: bash
|
|
41
41
|
|
|
42
42
|
- name: Persist VST3 SDK for caching
|
|
43
43
|
if: steps.vst3-cache.outputs.cache-hit != 'true'
|
|
44
44
|
run: |
|
|
45
45
|
VST3_DIR=$(grep "^VST3_SDK_DIR=" .env 2>/dev/null | tail -1 | cut -d= -f2-)
|
|
46
|
-
if [ -n "$VST3_DIR" ] && [ -d "$VST3_DIR" ] && [ "$VST3_DIR" != "/
|
|
47
|
-
cp -r "$VST3_DIR" /
|
|
46
|
+
if [ -n "$VST3_DIR" ] && [ -d "$VST3_DIR" ] && [ "$VST3_DIR" != "$RUNNER_TEMP/vst3sdk" ]; then
|
|
47
|
+
cp -r "$VST3_DIR" $RUNNER_TEMP/vst3sdk
|
|
48
48
|
fi
|
|
49
49
|
shell: bash
|
|
@@ -7,7 +7,7 @@ on:
|
|
|
7
7
|
- "*"
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
|
-
ci:
|
|
10
|
+
ci-macos:
|
|
11
11
|
runs-on: macos-15
|
|
12
12
|
steps:
|
|
13
13
|
- uses: actions/checkout@v4
|
|
@@ -15,3 +15,11 @@ jobs:
|
|
|
15
15
|
lfs: "true"
|
|
16
16
|
- uses: ./.github/actions/bootstrap
|
|
17
17
|
- run: bun run ci
|
|
18
|
+
ci-windows:
|
|
19
|
+
runs-on: windows-2025
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
with:
|
|
23
|
+
lfs: "true"
|
|
24
|
+
- uses: ./.github/actions/bootstrap
|
|
25
|
+
- run: bun run ci
|
|
@@ -7,7 +7,7 @@ on:
|
|
|
7
7
|
- "v*.*.*"
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
|
-
release:
|
|
10
|
+
release-macos:
|
|
11
11
|
permissions:
|
|
12
12
|
contents: write
|
|
13
13
|
runs-on: macos-15
|
|
@@ -66,3 +66,22 @@ jobs:
|
|
|
66
66
|
body: "Release $\{{ github.ref_name }}" # Prevent auto generation of release notes
|
|
67
67
|
files: |
|
|
68
68
|
target/release/{{plug_name}}.dmg
|
|
69
|
+
|
|
70
|
+
release-windows:
|
|
71
|
+
permissions:
|
|
72
|
+
contents: write
|
|
73
|
+
runs-on: windows-2025
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v4
|
|
76
|
+
with:
|
|
77
|
+
lfs: "true"
|
|
78
|
+
- uses: ./.github/actions/bootstrap
|
|
79
|
+
- run: bun run ci
|
|
80
|
+
- run: bun run package {{plug_slug}} --dist
|
|
81
|
+
- name: Release
|
|
82
|
+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
|
|
83
|
+
with:
|
|
84
|
+
prerelease: $\{{ contains(github.ref, '-') }}
|
|
85
|
+
body: "Release $\{{ github.ref_name }}"
|
|
86
|
+
files: |
|
|
87
|
+
target/release/{{plug_name}}.msi
|
package/template/package.json
CHANGED
|
@@ -24,31 +24,31 @@
|
|
|
24
24
|
"rust-test": "conformal-scripts cargo test",
|
|
25
25
|
"rust-bench": "conformal-scripts cargo bench",
|
|
26
26
|
"package": "conformal-scripts web-script -s package",
|
|
27
|
-
"validate": "conformal-scripts web-script -s validate"
|
|
27
|
+
"validate": "conformal-scripts web-script -s validate",
|
|
28
|
+
"dev-mode": "conformal-scripts web-script -s dev-mode"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
|
-
"@types/bun": "^1.
|
|
31
|
+
"@types/bun": "^1.3.3",
|
|
31
32
|
"eslint": "^9.39.1",
|
|
32
|
-
"prettier": "^3.
|
|
33
|
-
"typescript": "^5.
|
|
34
|
-
"@conformal/scripts": "^0.
|
|
33
|
+
"prettier": "^3.8.1",
|
|
34
|
+
"typescript": "^5.9.3",
|
|
35
|
+
"@conformal/scripts": "^0.10.0",
|
|
35
36
|
"tsconfig": "workspace:*"
|
|
36
37
|
},
|
|
37
38
|
"catalog": {
|
|
38
39
|
"@conformal/plugin": "^0.3.5",
|
|
39
40
|
"rollup-plugin-license": "^3.4.0",
|
|
40
|
-
"react": "^19.2.
|
|
41
|
-
"react-dom": "^19.2.
|
|
42
|
-
"@types/react": "^19.2.
|
|
43
|
-
"@types/react-dom": "^19.2.
|
|
41
|
+
"react": "^19.2.4",
|
|
42
|
+
"react-dom": "^19.2.4",
|
|
43
|
+
"@types/react": "^19.2.4",
|
|
44
|
+
"@types/react-dom": "^19.2.3",
|
|
44
45
|
"eslint-plugin-react": "^7.37.5",
|
|
45
46
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
46
|
-
"eslint-plugin-react-refresh": "^0.
|
|
47
|
+
"eslint-plugin-react-refresh": "^0.5.0",
|
|
47
48
|
"eslint-plugin-prefer-arrow-functions": "^3.9.1",
|
|
48
|
-
"typescript-eslint": "^8.
|
|
49
|
+
"typescript-eslint": "^8.56.0",
|
|
49
50
|
"vite": "^5.2.9",
|
|
50
|
-
"
|
|
51
|
-
"globals": "^16.5.0",
|
|
51
|
+
"globals": "^17.3.0",
|
|
52
52
|
"@eslint/js": "^9.39.1",
|
|
53
53
|
"@vitejs/plugin-react": "^5.1.0",
|
|
54
54
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
@@ -18,10 +18,12 @@ export default defineConfig([
|
|
|
18
18
|
],
|
|
19
19
|
rules: {
|
|
20
20
|
"@typescript-eslint/no-empty-function": "off",
|
|
21
|
+
"@typescript-eslint/no-unsafe-type-assertion": "error",
|
|
21
22
|
"@typescript-eslint/no-unused-vars": [
|
|
22
23
|
"error",
|
|
23
24
|
{
|
|
24
25
|
argsIgnorePattern: "^_",
|
|
26
|
+
varsIgnorePattern: "^_",
|
|
25
27
|
},
|
|
26
28
|
],
|
|
27
29
|
"@typescript-eslint/no-non-null-assertion": "off",
|