Chore: migrate to pnpm only (#4907)

This commit is contained in:
shamoon 2025-03-11 09:41:25 -07:00 committed by GitHub
parent bb5cb36491
commit 1f282a1a93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 8772 deletions

View File

@ -20,6 +20,8 @@ RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store pnpm i
FROM docker.io/node:22-alpine AS builder FROM docker.io/node:22-alpine AS builder
WORKDIR /app WORKDIR /app
RUN mkdir config
ARG BUILDTIME ARG BUILDTIME
ARG VERSION ARG VERSION
ARG REVISION ARG REVISION
@ -28,9 +30,9 @@ COPY --link --from=deps /app/node_modules ./node_modules/
COPY . . COPY . .
SHELL ["/bin/ash", "-xeo", "pipefail", "-c"] SHELL ["/bin/ash", "-xeo", "pipefail", "-c"]
RUN npm run telemetry \ RUN npm install -g pnpm \
&& mkdir config \ && pnpm run telemetry \
&& NEXT_PUBLIC_BUILDTIME=$BUILDTIME NEXT_PUBLIC_VERSION=$VERSION NEXT_PUBLIC_REVISION=$REVISION npm run build && NEXT_PUBLIC_BUILDTIME=$BUILDTIME NEXT_PUBLIC_VERSION=$VERSION NEXT_PUBLIC_REVISION=$REVISION pnpm run build
# Production image, copy all the files and run next # Production image, copy all the files and run next
FROM docker.io/node:22-alpine AS runner FROM docker.io/node:22-alpine AS runner

View File

@ -10,7 +10,7 @@ RUN <<EOF
apk add libc6-compat apk add libc6-compat
apk add --virtual .gyp python3 make g++ apk add --virtual .gyp python3 make g++
npm install -g pnpm npm install -g pnpm
npm install -g next pnpm install -g next
EOF EOF
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store pnpm fetch | grep -v "cross-device link not permitted\|Falling back to copying packages from store" RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store pnpm fetch | grep -v "cross-device link not permitted\|Falling back to copying packages from store"

View File

@ -111,7 +111,7 @@ First, clone the repository:
git clone https://github.com/gethomepage/homepage.git git clone https://github.com/gethomepage/homepage.git
``` ```
Then install dependencies and build the production bundle (I'm using pnpm here, you can use npm or yarn if you like): Then install dependencies and build the production bundle:
```bash ```bash
pnpm install pnpm install

8767
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@
"version": "0.10.9", "version": "0.10.9",
"private": true, "private": true,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",