From 8128074c9f613352a015068104e56bd46ee09510 Mon Sep 17 00:00:00 2001 From: Huakun Shen Date: Mon, 28 Oct 2024 11:17:23 -0400 Subject: [PATCH 1/4] ci: downgrade bun to 1.1.27, try to avoid windows build error --- .github/workflows/beta-build.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/desktop-publish-ci.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/beta-build.yml b/.github/workflows/beta-build.yml index e591361c..8a1c8d64 100644 --- a/.github/workflows/beta-build.yml +++ b/.github/workflows/beta-build.yml @@ -165,7 +165,7 @@ jobs: - uses: oven-sh/setup-bun@v1 with: - bun-version: 1.1.33 + bun-version: 1.1.27 - name: Init Environment Variables env: SUPABASE_URL: ${{ secrets.SUPABASE_URL }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f6974c5..b0077c3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: # run: curl -fsSL https://d2lang.com/install.sh | sh -s -- - uses: oven-sh/setup-bun@v1 with: - bun-version: 1.1.33 + bun-version: 1.1.27 - name: Init Environment Variables env: SUPABASE_URL: ${{ secrets.SUPABASE_URL }} diff --git a/.github/workflows/desktop-publish-ci.yml b/.github/workflows/desktop-publish-ci.yml index b425ceda..447f5b15 100644 --- a/.github/workflows/desktop-publish-ci.yml +++ b/.github/workflows/desktop-publish-ci.yml @@ -83,7 +83,7 @@ jobs: workspaces: "./apps/desktop/src-tauri -> target" - uses: oven-sh/setup-bun@v1 with: - bun-version: 1.1.33 + bun-version: 1.1.27 - name: Init Environment Variables env: SUPABASE_URL: ${{ secrets.SUPABASE_URL }} From 28b59010348b58a71051eafc1af6fc94a8b87f2b Mon Sep 17 00:00:00 2001 From: Huakun Shen Date: Tue, 29 Oct 2024 00:24:00 -0400 Subject: [PATCH 2/4] fix(ci): schema ci --- .github/workflows/ci-schema-upload.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci-schema-upload.yml b/.github/workflows/ci-schema-upload.yml index e75910ef..9e654143 100644 --- a/.github/workflows/ci-schema-upload.yml +++ b/.github/workflows/ci-schema-upload.yml @@ -30,11 +30,9 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: "pnpm" - - name: Install D2 For Docs - run: curl -fsSL https://d2lang.com/install.sh | sh -s -- - uses: oven-sh/setup-bun@v1 with: - bun-version: 1.1.10 + bun-version: 1.1.33 - name: Init Environment Variables env: SUPABASE_URL: ${{ secrets.SUPABASE_URL }} From 32d4e05092f4e239fe99d6bd48c105fc551fbff2 Mon Sep 17 00:00:00 2001 From: Huakun Shen Date: Tue, 29 Oct 2024 09:47:31 -0400 Subject: [PATCH 3/4] fix(create-kunkun): build script --- apps/create-kunkun/build.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/create-kunkun/build.ts b/apps/create-kunkun/build.ts index 1cdde722..621ab89d 100644 --- a/apps/create-kunkun/build.ts +++ b/apps/create-kunkun/build.ts @@ -63,7 +63,7 @@ for (const p of fs.readdirSync(tmpDistTemplatesPath)) { for (const p of fs.readdirSync(tmpDistTemplatesPath)) { const src = path.join(tmpDistTemplatesPath, p) // skip if src is not a directory - if (!fs.lstatSync(src).isDirectory()) { + if (!fs.statSync(src).isDirectory()) { continue } const dest = path.join(distTemplatesPath, `${p}.tgz`) From d7db2e45c00a784877125cf31e53c9e96eb47202 Mon Sep 17 00:00:00 2001 From: Huakun Shen Date: Tue, 29 Oct 2024 10:08:10 -0400 Subject: [PATCH 4/4] debug --- apps/create-kunkun/__tests__/create-template.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/create-kunkun/__tests__/create-template.test.ts b/apps/create-kunkun/__tests__/create-template.test.ts index 8dd0fecf..b6c4e4fe 100644 --- a/apps/create-kunkun/__tests__/create-template.test.ts +++ b/apps/create-kunkun/__tests__/create-template.test.ts @@ -23,8 +23,8 @@ await Promise.all( await $`node ${indexjsPath} --outdir ${testDir} --name ${folderName} --template ${templateName}` const templateDir = path.join(testDir, folderName) await $`rm -rf node_modules`.cwd(templateDir).text() // this doesn't work within bun test - await $`npm install`.cwd(templateDir).text() // this doesn't work within bun test - await $`npm run build`.cwd(templateDir).text() + await $`pnpm install`.cwd(templateDir).text() // this doesn't work within bun test + await $`pnpm run build`.cwd(templateDir).text() }) )