mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-29 18:51:43 +02:00
Keep the type check out of npm run build so installs fit in 2 GB (issue #3181)
This commit is contained in:
@@ -88,7 +88,7 @@ npm run lint -- --fix
|
||||
**Frontend type errors:**
|
||||
```bash
|
||||
cd frontend
|
||||
npx tsc --noEmit
|
||||
npm run typecheck
|
||||
# Fix the errors shown
|
||||
```
|
||||
|
||||
|
||||
@@ -276,9 +276,13 @@ jobs:
|
||||
working-directory: frontend
|
||||
run: npm ci
|
||||
|
||||
# `tsc -b`, not `tsc --noEmit`: the root tsconfig only holds project
|
||||
# references, so plain `tsc` checks zero files. Kept out of `npm run
|
||||
# build` because every installer runs that on the user's machine, and
|
||||
# the type check alone needs ~1 GB of Node heap (#3181).
|
||||
- name: Run TypeScript check
|
||||
working-directory: frontend
|
||||
run: npx tsc --noEmit
|
||||
run: npm run typecheck
|
||||
|
||||
frontend-tests:
|
||||
name: Frontend Tests
|
||||
|
||||
@@ -58,7 +58,7 @@ repos:
|
||||
files: ^backend/app/
|
||||
- id: frontend-typecheck
|
||||
name: TypeScript type check
|
||||
entry: bash -c 'cd frontend && npx tsc --noEmit'
|
||||
entry: bash -c 'cd frontend && npm run typecheck'
|
||||
language: system
|
||||
pass_filenames: false
|
||||
files: ^frontend/src/
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
All notable changes to Bambuddy will be documented in this file.
|
||||
|
||||
## [1.2.5.7] - Unreleased
|
||||
|
||||
### Fixed
|
||||
- **Installing or updating no longer runs out of memory on 2 GB machines (#3181, reported by @PhilippeP62)** — Every installer and updater builds the frontend with `npm run build`, which also ran the TypeScript type check. That check alone needs about 1 GB of Node memory, the whole default allowance on a 2 GB machine such as the standard Proxmox LXC or a 2 GB Raspberry Pi, so the build crashed with "JavaScript heap out of memory". On the Proxmox helper script that left the install without its database and nobody could sign in; Bambuddy's own update script rolled back but could never finish an update. The build now only bundles the frontend, and the type check runs on its own in development and CI (`npm run typecheck`). That also fixes CI's type-check job and the pre-commit hook, which ran `tsc --noEmit` against a config that lists no files and so had been passing without checking anything.
|
||||
|
||||
## [1.2.5.6] - 2026-09-24
|
||||
|
||||
### Added
|
||||
|
||||
+1
-1
@@ -206,7 +206,7 @@ cd frontend
|
||||
npm run lint
|
||||
|
||||
# Type check
|
||||
npx tsc --noEmit
|
||||
npm run typecheck
|
||||
```
|
||||
|
||||
### Pre-commit Hooks
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build && npm run check:baseline",
|
||||
"build": "vite build && npm run check:baseline",
|
||||
"typecheck": "tsc -b",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview",
|
||||
"test": "vitest",
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd frontend
|
||||
npx tsc
|
||||
npm run typecheck
|
||||
npm run lint
|
||||
npm run test:run
|
||||
cd ..
|
||||
|
||||
Reference in New Issue
Block a user