npm to pnpm

This commit is contained in:
Pierre
2026-02-08 15:27:35 +01:00
parent 501e0ac8b6
commit cffe96d5b7
5 changed files with 1621 additions and 2629 deletions
+1
View File
@@ -3,3 +3,4 @@ dist/
*.log *.log
.env .env
.DS_Store .DS_Store
.pnpm-store
+25 -10
View File
@@ -6,28 +6,43 @@ FROM node:20-slim AS builder
# Install git for GitHub dependencies # Install git for GitHub dependencies
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN npm install -g corepack@latest && corepack enable
WORKDIR /app WORKDIR /app
COPY package.json tsconfig.json ./ # Copy package files first for layer caching
RUN npm install COPY package.json pnpm-lock.yaml ./
RUN corepack install
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
# Build the git dependency (filename-tools) # Build the git dependency (filename-tools)
RUN cd node_modules/@metazla/filename-tools && npm install && npm run build RUN cd node_modules/@metazla/filename-tools && pnpm install && pnpm run build
# Copy source and build
COPY tsconfig.json ./
COPY src/ ./src/ COPY src/ ./src/
RUN npm run build RUN pnpm run build
# Production # Production image
FROM node:20-slim FROM node:20-slim
WORKDIR /app
# Install git for GitHub dependencies # Install git for GitHub dependencies
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
COPY package.json ./ ENV PNPM_HOME="/pnpm"
RUN npm install --omit=dev ENV PATH="$PNPM_HOME:$PATH"
RUN npm install -g corepack@latest && corepack enable
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack install
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --prod
# Build the git dependency in production too # Build the git dependency in production too
RUN cd node_modules/@metazla/filename-tools && npm install && npm run build RUN cd node_modules/@metazla/filename-tools && pnpm install && pnpm run build
COPY --from=builder /app/dist ./dist COPY --from=builder /app/dist ./dist
-2619
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -1,6 +1,7 @@
{ {
"name": "@metazla/plugin-file-info", "name": "@metazla/plugin-file-info",
"version": "1.0.0", "version": "1.0.0",
"packageManager": "[email protected]",
"description": "MetaMesh plugin: Extracts basic file information (type, MIME, size)", "description": "MetaMesh plugin: Extracts basic file information (type, MIME, size)",
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",
+1594
View File
File diff suppressed because it is too large Load Diff