diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 348cc77d..5637fd17 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -48,8 +48,15 @@ jobs: registry-url: "https://code.lotusguild.org/api/packages/LotusGuild/npm/" scope: "@lotusguild" - - name: Enable corepack (pnpm from packageManager field) - run: corepack enable + # pnpm is installed directly (NOT via `corepack enable`): matrix-js-sdk + # is a git dependency that pnpm has to build from source, and its own + # devEngines pins a different pnpm (11.9.0). A corepack-shimmed pnpm + # refuses to switch versions for that nested install and the whole + # `pnpm install` fails (run #1854); a real pnpm binary downloads the + # pinned version itself. Version is read from package.json's + # packageManager field so it cannot drift from the lockfile. + - name: Install pnpm (version from packageManager field) + run: npm install -g "pnpm@$(node -p "require('./package.json').packageManager.split('@')[1].split('+')[0]")" - name: Install dependencies run: pnpm install --frozen-lockfile @@ -110,8 +117,15 @@ jobs: registry-url: "https://code.lotusguild.org/api/packages/LotusGuild/npm/" scope: "@lotusguild" - - name: Enable corepack - run: corepack enable + # pnpm is installed directly (NOT via `corepack enable`): matrix-js-sdk + # is a git dependency that pnpm has to build from source, and its own + # devEngines pins a different pnpm (11.9.0). A corepack-shimmed pnpm + # refuses to switch versions for that nested install and the whole + # `pnpm install` fails (run #1854); a real pnpm binary downloads the + # pinned version itself. Version is read from package.json's + # packageManager field so it cannot drift from the lockfile. + - name: Install pnpm (version from packageManager field) + run: npm install -g "pnpm@$(node -p "require('./package.json').packageManager.split('@')[1].split('+')[0]")" - name: Install dependencies run: pnpm install --frozen-lockfile