mirror of https://github.com/immich-app/immich.git
chore: use pnpm for builds (#19752)
* Migrate from npm to pnpm across entire project • Update all GitHub workflow files to use pnpm instead of npm • Replace npm commands with pnpm equivalents in devcontainer scripts • Remove package-lock.json files and update to use pnpm-lock.yaml • Consolidate node version references to use server/.nvmrc * Refine pnpm migration based on review feedback • Replace SKIP_SHARP_FILTERING with SHARP_IGNORE_GLOBAL_LIBVIPS environment variable • Improve Sharp package filtering to include specific Linux architectures for Docker builds • Optimize Dockerfile dependency caching with improved layer structure • Clean up workspace configuration and remove redundant settings * Address additional review feedback for pnpm migration • Fix node-version-file paths in GitHub workflow configurations • Refactor .pnpmfile.cjs to use switch statement for better code organization • Correct cache type typo in fix-format workflow • Simplify Vite configuration by merging configs inline • Update package description for consistency * Use 'server/.nvmrc' for fix-format.yml GHA * Delete npm locks * Remove Docker volume isolation for node_modules directories • Remove volume mounts for node_modules and related directories • Allow shared access between host and container filesystem • Update init container to handle file ownership with conditional existence check * Remove unused Docker volumes and volume mounts • Remove node_modules volume mounts from devcontainer configuration • Remove unused named volumes for pnpm-store, node_modules, and cache directories • Clean up Docker Compose configuration after removing volume isolation * Fix typescript-sdk package issues • Remove unknown "build" dependency that was incorrectly added to package.json • Update pnpm-lock.yaml to reflect dependency removal * Add pnpm setup to mobile workflow for translation formatting • Add pnpm action setup step to mobile unit tests workflow • Required for translation file formatting and sorting operations --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>pull/21049/head
parent
acb1e513a7
commit
845b0f2073
@ -1,28 +0,0 @@
|
||||
{
|
||||
"name": ".github",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"devDependencies": {
|
||||
"prettier": "^3.5.3"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz",
|
||||
"integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
module.exports = {
|
||||
hooks: {
|
||||
readPackage: (pkg) => {
|
||||
if (!pkg.name) {
|
||||
return pkg;
|
||||
}
|
||||
switch (pkg.name) {
|
||||
case "exiftool-vendored":
|
||||
if (pkg.optionalDependencies["exiftool-vendored.pl"]) {
|
||||
// make exiftool-vendored.pl a regular dependency
|
||||
pkg.dependencies["exiftool-vendored.pl"] =
|
||||
pkg.optionalDependencies["exiftool-vendored.pl"];
|
||||
delete pkg.optionalDependencies["exiftool-vendored.pl"];
|
||||
}
|
||||
break;
|
||||
case "sharp":
|
||||
const optionalDeps = Object.keys(pkg.optionalDependencies).filter(
|
||||
(dep) => dep.startsWith("@img")
|
||||
);
|
||||
for (const dep of optionalDeps) {
|
||||
// remove all optionalDepdencies from sharp (they will be compiled from source), except:
|
||||
// include the precompiled musl version of sharp, for web/Dockerfile
|
||||
// include precompiled linux-x64 version of sharp, for server/Dockerfile, stage: web-prod
|
||||
// include precompiled linux-arm64 version of sharp, for server/Dockerfile, stage: web-prod
|
||||
if (
|
||||
dep.includes("musl") ||
|
||||
dep.includes("linux-x64") ||
|
||||
dep.includes("linux-arm64")
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
delete pkg.optionalDependencies[dep];
|
||||
}
|
||||
break;
|
||||
}
|
||||
return pkg;
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -1,19 +1,14 @@
|
||||
FROM node:22.16.0-alpine3.20@sha256:2289fb1fba0f4633b08ec47b94a89c7e20b829fc5679f9b7b298eaa2f1ed8b7e AS core
|
||||
|
||||
WORKDIR /usr/src/open-api/typescript-sdk
|
||||
COPY open-api/typescript-sdk/package*.json open-api/typescript-sdk/tsconfig*.json ./
|
||||
RUN npm ci
|
||||
COPY open-api/typescript-sdk/ ./
|
||||
RUN npm run build
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY cli/package.json cli/package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY cli .
|
||||
RUN npm run build
|
||||
COPY package* pnpm* .pnpmfile.cjs ./
|
||||
COPY ./cli ./cli/
|
||||
COPY ./open-api/typescript-sdk ./open-api/typescript-sdk/
|
||||
RUN corepack enable pnpm && \
|
||||
pnpm install --filter @immich/sdk --filter @immich/cli --frozen-lockfile && \
|
||||
pnpm --filter @immich/sdk build && \
|
||||
pnpm --filter @immich/cli build
|
||||
|
||||
WORKDIR /import
|
||||
|
||||
ENTRYPOINT ["node", "/usr/src/app/dist"]
|
||||
ENTRYPOINT ["node", "/usr/src/app/cli/dist"]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
||||
{
|
||||
"name": "@immich/sdk",
|
||||
"version": "1.138.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@immich/sdk",
|
||||
"version": "1.138.1",
|
||||
"license": "GNU Affero General Public License version 3",
|
||||
"dependencies": {
|
||||
"@oazapfts/runtime": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.17.1",
|
||||
"typescript": "^5.3.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@oazapfts/runtime": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@oazapfts/runtime/-/runtime-1.0.4.tgz",
|
||||
"integrity": "sha512-7t6C2shug/6tZhQgkCa532oTYBLEnbASV/i1SG1rH2GB4h3aQQujYciYSPT92hvN4IwTe8S2hPkN/6iiOyTlCg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.17.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.17.2.tgz",
|
||||
"integrity": "sha512-gL6z5N9Jm9mhY+U2KXZpteb+09zyffliRkZyZOHODGATyC5B1Jt/7TzuuiLkFsSUMLbS1OLmlj/E+/3KF4Q/4w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.8.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
|
||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "immich-monorepo",
|
||||
"version": "0.0.1",
|
||||
"description": "Monorepo for Immich",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748",
|
||||
"engines": {
|
||||
"pnpm": ">=10.0.0"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,58 @@
|
||||
packages:
|
||||
- cli
|
||||
- docs
|
||||
- e2e
|
||||
- open-api/typescript-sdk
|
||||
- server
|
||||
- web
|
||||
- .github
|
||||
ignoredBuiltDependencies:
|
||||
- '@nestjs/core'
|
||||
- '@scarf/scarf'
|
||||
- '@swc/core'
|
||||
- bcrypt
|
||||
- canvas
|
||||
- core-js
|
||||
- core-js-pure
|
||||
- cpu-features
|
||||
- es5-ext
|
||||
- esbuild
|
||||
- msgpackr-extract
|
||||
- postman-code-generators
|
||||
- protobufjs
|
||||
- ssh2
|
||||
- utimes
|
||||
onlyBuiltDependencies:
|
||||
- sharp
|
||||
- '@tailwindcss/oxide'
|
||||
overrides:
|
||||
canvas: 2.11.2
|
||||
sharp: ^0.34.2
|
||||
packageExtensions:
|
||||
nestjs-kysely:
|
||||
dependencies:
|
||||
tslib: '*'
|
||||
nestjs-otel:
|
||||
dependencies:
|
||||
tslib: '*'
|
||||
'@photo-sphere-viewer/equirectangular-video-adapter':
|
||||
dependencies:
|
||||
three: '*'
|
||||
'@photo-sphere-viewer/video-plugin':
|
||||
dependencies:
|
||||
three: '*'
|
||||
sharp:
|
||||
dependencies:
|
||||
node-addon-api: '*'
|
||||
node-gyp: '*'
|
||||
'@immich/ui':
|
||||
dependencies:
|
||||
tailwindcss: '>=4.1'
|
||||
tailwind-variants:
|
||||
dependencies:
|
||||
tailwindcss: '>=4.1'
|
||||
dedupePeerDependents: false
|
||||
preferWorkspacePackages: true
|
||||
injectWorkspacePackages: true
|
||||
shamefullyHoist: false
|
||||
verifyDepsBeforeRun: install
|
||||
@ -0,0 +1,5 @@
|
||||
src
|
||||
tsconfig*
|
||||
eslint*
|
||||
pnpm*
|
||||
coverage
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,17 @@
|
||||
FROM node:22.16.0-alpine3.20@sha256:2289fb1fba0f4633b08ec47b94a89c7e20b829fc5679f9b7b298eaa2f1ed8b7e
|
||||
|
||||
RUN apk add --no-cache tini bash
|
||||
|
||||
USER node
|
||||
WORKDIR /usr/src/app
|
||||
ENV CHOKIDAR_USEPOLLING=true \
|
||||
PATH="${PATH}:/usr/src/app/web/bin" \
|
||||
COREPACK_HOME=/tmp
|
||||
|
||||
COPY --chown=node:node ./web/package* ./web/
|
||||
RUN npm install --global corepack@latest && \
|
||||
corepack enable && corepack install -g pnpm && \
|
||||
apk add --no-cache tini make bash && \
|
||||
mkdir -p /buildcache/pnpm-store && \
|
||||
pnpm config set store-dir /buildcache/pnpm-store
|
||||
|
||||
WORKDIR /usr/src/app/web
|
||||
RUN npm ci
|
||||
|
||||
ENV CHOKIDAR_USEPOLLING=true \
|
||||
PATH="${PATH}:/usr/src/app/web/bin"
|
||||
EXPOSE 24678
|
||||
EXPOSE 3000
|
||||
ENTRYPOINT ["tini", "--", "/bin/bash", "-c"]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue