* ci: run typecheck, build & tests on PRs and main Add a GitHub Actions workflow (.github/workflows/ci.yml) that installs on Node 20 (the pinned runtime), builds shared/server/web, typechecks desktop, and runs the full vitest suite across all packages on every pull request and push to main. The repo already had 500+ tests but only ever ran them locally. Also wires up the missing test/typecheck plumbing this exposed: - web package had 55 test files but no test script — add test/test:watch/typecheck - add root-level test and typecheck aggregate scripts - fix a latent web type error the new typecheck surfaced: reference vite-plugin-pwa/react types so virtual:pwa-register/react is typed (useRegisterSW callback params were implicit any; the tsc half of the web build script has been failing, masked by vite build ignoring type errors) * test: fix two latent failures surfaced by CI on Node 20 - server: exclude dist/** from vitest. Vitest 4's default exclude dropped dist/, so after `pnpm build` emits compiled .test.js files, vitest ran those stale copies alongside src/*.test.ts and they failed (compiled vi.mock paths resolve differently). - web: polyfill Blob.prototype.stream in the jsdom test setup. jsdom's Blob has no .stream() on Node 20 (Node 25 provided one, masking this locally); undici's Response constructor calls blob.stream(), so new Response(blob) threw 'object.stream is not a function'.
49 lines
1.6 KiB
JSON
49 lines
1.6 KiB
JSON
{
|
|
"name": "backspace",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"description": "Open, self-hosted communication platform — text, voice, video, and federation",
|
|
"license": "AGPL-3.0-only",
|
|
"author": "Jannis Braun",
|
|
"homepage": "https://github.com/TheZwiss/backspace",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/TheZwiss/backspace.git"
|
|
},
|
|
"scripts": {
|
|
"dev:server": "pnpm --filter @backspace/server dev",
|
|
"dev:web": "pnpm --filter @backspace/web dev",
|
|
"dev": "pnpm --filter @backspace/server dev & pnpm --filter @backspace/web dev",
|
|
"build:shared": "pnpm --filter @backspace/shared build",
|
|
"build:server": "pnpm --filter @backspace/server build",
|
|
"build:web": "pnpm --filter @backspace/web build",
|
|
"build": "pnpm --filter @backspace/shared build && pnpm --filter @backspace/server build && pnpm --filter @backspace/web build",
|
|
"typecheck": "pnpm --filter @backspace/shared build && pnpm -r typecheck",
|
|
"test": "pnpm -r test",
|
|
"dev:desktop": "pnpm --filter @backspace/desktop dev",
|
|
"build:desktop": "pnpm --filter @backspace/desktop build",
|
|
"gen-icons": "node scripts/gen-icons.mjs"
|
|
},
|
|
"devDependencies": {
|
|
"sharp": "^0.33.5",
|
|
"png-to-ico": "^2.1.8",
|
|
"png2icons": "^2.0.1"
|
|
},
|
|
"pnpm": {
|
|
"onlyBuiltDependencies": [
|
|
"better-sqlite3",
|
|
"esbuild",
|
|
"electron",
|
|
"sharp"
|
|
],
|
|
"patchedDependencies": {
|
|
"uiohook-napi@1.5.5": "patches/uiohook-napi@1.5.5.patch"
|
|
}
|
|
},
|
|
"packageManager": "pnpm@10.34.3",
|
|
"engines": {
|
|
"node": ">=20.0.0 <21.0.0",
|
|
"pnpm": ">=10.0.0"
|
|
}
|
|
}
|