Skip to content

Commit d3ed675

Browse files
committed
fix: unbuild version reduced to 2.0
1 parent 27ffc9e commit d3ed675

File tree

8 files changed

+322
-54
lines changed

8 files changed

+322
-54
lines changed

.github/workflows/action-build.yml renamed to .github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: Dependabot post-update
1+
# name: Dependabot post-update
2+
name: Build detection
23
on:
34
pull_request_target:
45
types: [opened, synchronize, reopened]
@@ -14,7 +15,7 @@ concurrency:
1415

1516
jobs:
1617
post-update:
17-
if: ${{ github.actor == 'dependabot[bot]' }}
18+
# if: ${{ github.actor == 'dependabot[bot]' }}
1819
runs-on: ubuntu-latest
1920
strategy:
2021
matrix:
@@ -45,5 +46,4 @@ jobs:
4546

4647
- name: Test and Build
4748
run: |
48-
pnpm run test:unit
4949
pnpm run build

internal/node-utils/src/fs.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export async function outputJSON(
1111
await fs.mkdir(dir, { recursive: true });
1212
const jsonData = JSON.stringify(data, null, spaces);
1313
await fs.writeFile(filePath, jsonData, 'utf8');
14-
console.log(`JSON data written to ${filePath}`);
1514
} catch (error) {
1615
console.error('Error writing JSON file:', error);
1716
throw error;
@@ -22,8 +21,7 @@ export async function ensureFile(filePath: string) {
2221
try {
2322
const dir = dirname(filePath);
2423
await fs.mkdir(dir, { recursive: true });
25-
await fs.writeFile(filePath, '', { flag: 'a' }); // 'a' flag to append if file exists, otherwise create
26-
console.log(`File ensured: ${filePath}`);
24+
await fs.writeFile(filePath, '', { flag: 'a' });
2725
} catch (error) {
2826
console.error('Error ensuring file:', error);
2927
throw error;

internal/tailwind-config/src/plugins/entry.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import * as plugin from 'tailwindcss/plugin.js';
1+
import plugin from 'tailwindcss/plugin.js';
22

3-
// @ts-expect-error Parameter 'addUtilities' implicitly has an 'any' type.
43
const enterAnimationPlugin = plugin(({ addUtilities }) => {
54
const maxChild = 5;
65
const utilities: Record<string, any> = {};

internal/vite-config/src/plugins/inject-app-loading/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import fs from 'node:fs';
2+
import fsp from 'node:fs/promises';
23
import { join } from 'node:path';
34
import { fileURLToPath } from 'node:url';
45

@@ -62,7 +63,7 @@ async function getLoadingRawByHtmlTemplate(loadingTemplate: string) {
6263
return;
6364
}
6465

65-
const htmlRaw = fs.readFileSync(loadingPath, 'utf8');
66+
const htmlRaw = await fsp.readFile(loadingPath, 'utf8');
6667
return htmlRaw;
6768
}
6869

internal/vite-config/src/utils/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { join } from 'node:path';
44

55
import { fs } from '@vben/node-utils';
66

7-
import * as dotenv from 'dotenv';
7+
import dotenv from 'dotenv';
88

99
/**
1010
* 获取当前环境下生效的配置文件名

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"tailwindcss": "^3.4.7",
8282
"turbo": "^2.0.11",
8383
"typescript": "^5.5.4",
84-
"unbuild": "^3.0.0-rc.7",
84+
"unbuild": "^2.0.0",
8585
"vite": "^5.3.5",
8686
"vitest": "^2.0.5",
8787
"vue-tsc": "^2.0.29"

0 commit comments

Comments
 (0)