From ee08706a3c4efe9b2cc2f7abfcaca914ff8e28c4 Mon Sep 17 00:00:00 2001 From: midzelis Date: Wed, 9 Jul 2025 18:17:43 +0000 Subject: [PATCH] PNPM documentation changes --- cli/README.md | 12 ++++++++---- docs/.prettierignore | 5 +++++ docs/README.md | 2 +- docs/docs/developer/devcontainers.md | 2 +- docs/docs/developer/setup.md | 2 +- docs/docs/developer/testing.md | 2 +- open-api/bin/generate-open-api.sh | 3 +-- open-api/typescript-sdk/README.md | 2 +- 8 files changed, 19 insertions(+), 11 deletions(-) diff --git a/cli/README.md b/cli/README.md index 8fa2ace483..05213bfc22 100644 --- a/cli/README.md +++ b/cli/README.md @@ -6,8 +6,10 @@ Please see the [Immich CLI documentation](https://immich.app/docs/features/comma Before building the CLI, you must build the immich server and the open-api client. To build the server run the following in the server folder: - $ npm install - $ npm run build + # if you don't have node installed + $ npm install -g pnpm + $ pnpm install + $ pnpm build Then, to build the open-api client run the following in the open-api folder: @@ -15,8 +17,10 @@ Then, to build the open-api client run the following in the open-api folder: To run the Immich CLI from source, run the following in the cli folder: - $ npm install - $ npm run build + # if you don't have node installed + $ npm install -g pnpm + $ pnpm install + $ pnpm build $ ts-node . You'll need ts-node, the easiest way to install it is to use npm: diff --git a/docs/.prettierignore b/docs/.prettierignore index 580649a5a5..d6bf2637e9 100644 --- a/docs/.prettierignore +++ b/docs/.prettierignore @@ -1,2 +1,7 @@ build/ .docusaurus/ + +# Ignore files for PNPM, NPM and YARN +pnpm-lock.yaml +package-lock.json +yarn.lock diff --git a/docs/README.md b/docs/README.md index cdf0733949..9d2b0a1731 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,7 +5,7 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati ### Installation ``` -$ npm install +$ pnpm install ``` ### Local Development diff --git a/docs/docs/developer/devcontainers.md b/docs/docs/developer/devcontainers.md index c4c5396466..6e1c96fbd6 100644 --- a/docs/docs/developer/devcontainers.md +++ b/docs/docs/developer/devcontainers.md @@ -204,7 +204,7 @@ When the Dev Container starts, it automatically: 1. **Runs post-create script** (`container-server-post-create.sh`): - Adjusts file permissions for the `node` user - - Installs dependencies: `npm install` in all packages + - Installs dependencies: `pnpm install` in all packages - Builds TypeScript SDK: `npm run build` in `open-api/typescript-sdk` 2. **Starts development servers** via VS Code tasks: diff --git a/docs/docs/developer/setup.md b/docs/docs/developer/setup.md index 32705e3248..2410964c8d 100644 --- a/docs/docs/developer/setup.md +++ b/docs/docs/developer/setup.md @@ -56,7 +56,7 @@ If you only want to do web development connected to an existing, remote backend, 1. Build the Immich SDK - `cd open-api/typescript-sdk && npm i && npm run build && cd -` 2. Enter the web directory - `cd web/` -3. Install web dependencies - `npm i` +3. Install web dependencies - `pnpm i` 4. Start the web development server ```bash diff --git a/docs/docs/developer/testing.md b/docs/docs/developer/testing.md index ad64ba015c..3bb352eb63 100644 --- a/docs/docs/developer/testing.md +++ b/docs/docs/developer/testing.md @@ -5,7 +5,7 @@ ### Unit tests Unit are run by calling `npm run test` from the `server/` directory. -You need to run `npm install` (in `server/`) before _once_. +You need to run `pnpm install` (in `server/`) before _once_. ### End to end tests diff --git a/open-api/bin/generate-open-api.sh b/open-api/bin/generate-open-api.sh index 9780bca6fb..1f00c7536a 100755 --- a/open-api/bin/generate-open-api.sh +++ b/open-api/bin/generate-open-api.sh @@ -27,14 +27,13 @@ function dart { } function typescript { - npx --yes oazapfts --optimistic --argumentStyle=object --useEnumType immich-openapi-specs.json typescript-sdk/src/fetch-client.ts pnpm --filter @immich/sdk install --frozen-lockfile pnpm --filter @immich/sdk build } # requires server to be built ( - cd .. + cd .. pnpm --filter immich install pnpm --filter immich build pnpm --filter immich sync:open-api diff --git a/open-api/typescript-sdk/README.md b/open-api/typescript-sdk/README.md index 046cea7695..996fdd679a 100644 --- a/open-api/typescript-sdk/README.md +++ b/open-api/typescript-sdk/README.md @@ -5,7 +5,7 @@ A TypeScript SDK for interfacing with the [Immich](https://immich.app/) API. ## Install ```bash -npm i --save @immich/sdk +pnpm i --save @immich/sdk ``` ## Usage