chore: switch from npm to pnpm (#20)
* chore: switch from npm to pnpm * fix more references * fixed some more stragglers * add missing exec
This commit is contained in:
+3
-3
@@ -36,8 +36,8 @@ Frontend:
|
||||
```bash
|
||||
cd frontend
|
||||
cp env.dev.example .env
|
||||
npm install
|
||||
npm run dev
|
||||
pnpm install
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
### Running Tests
|
||||
@@ -67,7 +67,7 @@ make frontend-browser-install
|
||||
- Backend: strong typing, async/await, no blocking I/O in async contexts.
|
||||
- Frontend: strict TypeScript, no `any`. Named exports. Async/await only.
|
||||
- Use existing design tokens (`primary`, `secondary`, etc.) for colours, not hardcoded values.
|
||||
- Run `npm run lint` and `npm run check` in the frontend before submitting.
|
||||
- Run `pnpm run lint` and `pnpm run check` in the frontend before submitting.
|
||||
|
||||
## AI-Assisted Contributions
|
||||
|
||||
|
||||
+12
-3
@@ -5,11 +5,20 @@ FROM node:22.16-alpine AS frontend-build
|
||||
|
||||
WORKDIR /app/frontend
|
||||
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm ci --ignore-scripts
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
|
||||
# Install pnpm
|
||||
RUN npm install -g pnpm@10.33.0
|
||||
|
||||
COPY frontend/package.json ./
|
||||
COPY frontend/pnpm-lock.yaml ./
|
||||
COPY frontend/pnpm-workspace.yaml ./
|
||||
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
|
||||
COPY frontend/ .
|
||||
RUN npm run build
|
||||
RUN pnpm run build
|
||||
|
||||
##
|
||||
# Stage 2 — Install Python dependencies
|
||||
|
||||
@@ -10,7 +10,7 @@ BACKEND_VENV_PYTHON := $(BACKEND_VENV_DIR)/bin/python
|
||||
BACKEND_VENV_STAMP := $(BACKEND_VENV_DIR)/.deps-stamp
|
||||
BACKEND_VIRTUALENV_ZIPAPP := $(BACKEND_DIR)/.virtualenv.pyz
|
||||
PYTHON ?= python3
|
||||
NPM ?= npm
|
||||
NPM ?= pnpm
|
||||
|
||||
.PHONY: help backend-venv backend-lint backend-test backend-test-audiodb backend-test-audiodb-prewarm backend-test-audiodb-settings backend-test-coverart-audiodb backend-test-audiodb-phase8 backend-test-audiodb-phase9 backend-test-exception-handling backend-test-playlist backend-test-multidisc backend-test-performance backend-test-security backend-test-config-validation backend-test-home backend-test-home-genre backend-test-infra-hardening backend-test-library-pagination backend-test-search-top-result test-audiodb-all frontend-install frontend-build frontend-check frontend-lint frontend-test frontend-test-queuehelpers frontend-test-album-page frontend-test-playlist-detail frontend-test-audiodb-images frontend-browser-install project-map rebuild test check lint ci
|
||||
|
||||
@@ -132,20 +132,20 @@ frontend-test: ## Run the frontend vitest suite
|
||||
cd "$(FRONTEND_DIR)" && $(NPM) run test
|
||||
|
||||
frontend-test-queuehelpers: ## Run queue helper regressions
|
||||
cd "$(FRONTEND_DIR)" && npx vitest run --project server src/lib/player/queueHelpers.spec.ts
|
||||
cd "$(FRONTEND_DIR)" && $(NPM) exec vitest run --project server src/lib/player/queueHelpers.spec.ts
|
||||
|
||||
frontend-test-album-page: ## Run the album page browser test
|
||||
cd "$(FRONTEND_DIR)" && npx vitest run --project client src/routes/album/[id]/page.svelte.spec.ts
|
||||
cd "$(FRONTEND_DIR)" && $(NPM) exec vitest run --project client src/routes/album/[id]/page.svelte.spec.ts
|
||||
|
||||
frontend-test-playlist-detail: ## Run playlist page browser tests
|
||||
cd "$(FRONTEND_DIR)" && npx vitest run --project client src/routes/playlists/[id]/page.svelte.spec.ts
|
||||
cd "$(FRONTEND_DIR)" && $(NPM) exec vitest run --project client src/routes/playlists/[id]/page.svelte.spec.ts
|
||||
|
||||
frontend-browser-install: ## Install Playwright Chromium for browser tests
|
||||
cd "$(FRONTEND_DIR)" && npx playwright install chromium
|
||||
cd "$(FRONTEND_DIR)" && $(NPM) exec playwright install chromium
|
||||
|
||||
frontend-test-audiodb-images: ## Run AudioDB image tests
|
||||
cd "$(FRONTEND_DIR)" && npx vitest run --project server src/lib/utils/imageSuffix.spec.ts
|
||||
cd "$(FRONTEND_DIR)" && npx vitest run --project client src/lib/components/BaseImage.svelte.spec.ts
|
||||
cd "$(FRONTEND_DIR)" && $(NPM) exec vitest run --project server src/lib/utils/imageSuffix.spec.ts
|
||||
cd "$(FRONTEND_DIR)" && $(NPM) exec vitest run --project client src/lib/components/BaseImage.svelte.spec.ts
|
||||
|
||||
project-map: ## Refresh the project map block
|
||||
cd "$(ROOT_DIR)" && $(PYTHON) scripts/gen-project-map.py
|
||||
|
||||
Generated
-4955
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
||||
"format": "prettier --write .",
|
||||
"lint": "prettier --check . && eslint .",
|
||||
"test:unit": "vitest",
|
||||
"test": "npm run test:unit -- --run"
|
||||
"test": "pnpm run test:unit -- --run"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.4.0",
|
||||
|
||||
Generated
+3165
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
allowBuilds:
|
||||
'@parcel/watcher': true
|
||||
esbuild: true
|
||||
Reference in New Issue
Block a user