feat(client): migration old package to rspack (#15068)

#### PR Dependency Tree


* **PR #15068** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Upgraded Vitest across packages to 4.1.8 and bumped Tailwind PostCSS
to 4.3.0
* CLI/tooling updated to support the media-capture-playground package
and adjust build/dev server behavior

* **Bug Fixes**
  * Improved workspace deletion reliability in the Electron app

* **Refactor**
* Simplified media capture playground build setup (build/config
adjustments)

* **Tests**
* Made tests more robust by preserving/restoring environment state
during runs
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-06-02 12:00:50 +08:00
committed by GitHub
parent 69c2f09eba
commit aca47445aa
50 changed files with 738 additions and 507 deletions
+1 -2
View File
@@ -51,7 +51,6 @@
"@sentry/esbuild-plugin": "^5.3.0",
"@toeverything/infra": "workspace:*",
"@types/set-cookie-parser": "^2.4.10",
"@vitejs/plugin-react": "^5.2.0",
"app-builder-lib": "^26.8.1",
"builder-util-runtime": "^9.5.1",
"cross-env": "^10.1.0",
@@ -71,7 +70,7 @@
"tree-kill": "^1.2.2",
"typescript": "^5.9.3",
"uuid": "^14.0.0",
"vitest": "^4.0.18",
"vitest": "^4.1.8",
"zod": "^3.25.76"
},
"dependencies": {
@@ -31,7 +31,7 @@ async function deleteWorkspaceV1(workspaceId: string) {
try {
await ensureSQLiteDisconnected('workspace', workspaceId);
const basePath = await getWorkspaceBasePathV1('workspace', workspaceId);
await fs.rmdir(basePath, { recursive: true });
await fs.remove(basePath);
} catch (error) {
logger.error('deleteWorkspaceV1', error);
}
@@ -47,7 +47,7 @@ export async function deleteWorkspace(universalId: string) {
const dbPath = await getSpaceDBPath(peer, type, id);
try {
await getDocStoragePool().disconnect(universalId);
await fs.rmdir(path.dirname(dbPath), { recursive: true });
await fs.remove(path.dirname(dbPath));
} catch (e) {
logger.error('deleteWorkspace', e);
}
@@ -78,7 +78,7 @@ export async function trashWorkspace(universalId: string) {
await fs.copy(path.dirname(dbPath), movedPath, {
overwrite: true,
});
await fs.rmdir(path.dirname(dbPath), { recursive: true });
await fs.remove(path.dirname(dbPath));
} catch (error) {
logger.error('trashWorkspace', error);
}
@@ -331,7 +331,7 @@ async function importWorkspaceDb(originalPath: string) {
export async function deleteBackupWorkspace(id: string) {
const basePath = await getDeletedWorkspacesBasePath();
const workspacePath = path.join(basePath, normalizeWorkspaceIdForPath(id));
await fs.rmdir(workspacePath, { recursive: true });
await fs.remove(workspacePath);
logger.info(
'deleteBackupWorkspace',
`Deleted backup workspace: ${workspacePath}`
@@ -2,13 +2,11 @@
import { resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
const rootDir = fileURLToPath(new URL('../../../..', import.meta.url));
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
// prevent tests using two different sources of yjs
@@ -14,6 +14,6 @@
},
"devDependencies": {
"typescript": "^5.9.3",
"vitest": "^4.0.18"
"vitest": "^4.1.8"
}
}