-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Discussed in #36508
Originally posted by shirauix June 14, 2025
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
GitHub
Please tell us more about your question or problem
Issue
When using a pnpm workspace, if shared-workspace-lockfile = false
is set, even if the version defined in the catalog in pnpm-workspace.yaml
is updated, the pnpm-lock.yaml
of other packages that reference it are not updated.
About shared-workspace-lockfile = false
By default in a pnpm workspace, the pnpm-lock.yaml
file exists only at the repository root, where it centrally manages dependencies for all packages included in the monorepo. Each package only has its package.json
and does not have a pnpm-lock.yaml
.
However, if you set shared-workspace-lockfile
to false
, this behavior changes, and each package gets its own pnpm-lock.yaml
.
Minimal reproduction
Here:
https://github.com/shirauix/renovate-pnpm-catalog-issue-reproduction
File structure
.
├── packages
│ ├── no-catalog
│ │ ├── package.json // uses husky without catalog
│ │ └── pnpm-lock.yaml
│ └── use-catalog
│ ├── package.json // uses zod with catalog
│ └── pnpm-lock.yaml
├── .node-version
├── .npmrc // shared-workspace-lockfile = false
├── package.json // uses zod with catalog
├── pnpm-lock.yaml
├── pnpm-workspace.yaml // zod version defined via catalog
├── README.md
└── renovate.json
Self-hosted Runner Configuration
GitHub Actions workflow:
- name: Self-hosted Renovate
uses: renovatebot/[email protected]
with:
configurationFile: '.github/renovate.json'
renovate-version: 40.50.0
token: ${{ steps.app-token.outputs.token }}
env:
LOG_LEVEL: 'debug'
Config:
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:best-practices",
"mergeConfidence:all-badges"
],
"branchPrefix": "renovate/",
"labels": [
"renovate"
],
"platform": "github",
"prCreation": "not-pending",
"repositories": [
"<Org>/<Repo>"
],
"username": "renovate-bot[bot]",
"allowedCommands": [
"^pnpm install.*$"
]
}
Current Behavior
Renovate generates the following PRs:
chore(deps): update dependency zod to v3.25.64
This includes updates to the following files:
pnpm-lock.yaml
pnpm-workspace.yaml
Since the use-catalog
package also references zod
using catalog:
, the following file should also be updated, but it is not:
packages/use-catalog/pnpm-lock.yaml
chore(deps): update dependency husky to v9.0.11
This includes updates to the following files:
packages/no-catalog/package.json
packages/no-catalog/pnpm-lock.yaml
This behavior is as expected.
Expected Behavior
As described above, in the PR that updates zod
, the pnpm-lock.yaml
inside the use-catalog
package should also be updated.
Workaround
In my environment, the updates were performed correctly after adding the following configuration to the repository’s renovate.json
.
This is likely because pnpm install
recursively updates all packages in the repository by default.
"postUpgradeTasks":{
"commands": ["pnpm install --lockfile-only"],
"executionMode": "branch",
"fileFilters": [
"pnpm-workspace.yaml",
"**/package.json",
"**/pnpm-lock.yaml"
]
}
Logs (if relevant)
Logs
DEBUG: syncBranchState() (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: syncBranchState(): Branch cache not found, creating minimal branchState (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: getBranchPr(renovate/zod-3.x) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: findPr(renovate/zod-3.x, undefined, open) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Found PR #15 (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: branchExists=true (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: dependencyDashboardCheck=undefined (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Manual rebase requested via PR checkbox for #15 (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: PR rebase requested=true (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Open PR Count: 5, Existing Branch Count: 5, Hourly PR Count: 0 (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Checking if PR has been edited (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: branch.isModified(): using git to calculate (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: branch.isModified() = false (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Found existing branch PR (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Checking schedule(schedule=at any time, tz=null, now=2025-06-15T12:57:09.776Z) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: No schedule defined (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: User has requested rebase (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Using reuseExistingBranch: false (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Setting current branch to main (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: latest commit (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"branchName": "main",
"latestCommitDate": "2025-06-15T21:54:01+09:00",
"sha": "6d082f5c990832f6ce688a5d63e0fe50b494e6bf"
DEBUG: manager.getUpdatedPackageFiles() reuseExistingBranch=false (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Updating zod in pnpm-workspace.yaml (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: updateArtifacts for updatedPackageFiles (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: npm.updateArtifacts(pnpm-workspace.yaml) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: No packageManager updates - returning null (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Updated 1 package files (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Getting updated lock files (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Writing package.json files (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"packageFiles": [
"package.json",
"packages/no-catalog/package.json",
"packages/use-catalog/package.json",
"pnpm-workspace.yaml"
]
DEBUG: Writing any updated package files (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Writing pnpm-workspace.yaml (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Found 0 npm host rule(s) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Found 1 host rule(s) without host type (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Found 1 host rule(s) without host type after dropping duplicates (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: npmrc file .npmrc found in repository (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Generating pnpm-lock.yaml for . (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Spawning pnpm install to create pnpm-lock.yaml (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Found pnpm constraint in package.json packageManager: 10.6.3 (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Using node constraint "22.13.1" from .node-version (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Setting CONTAINERBASE_CACHE_DIR to /tmp/renovate/cache/containerbase (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Using containerbase dynamic installs (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Executing command (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"command": "install-tool node 22.13.1"
DEBUG: exec completed (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"durationMs": 453,
"stdout": "[12:57:09.984] INFO (517): Installing tool [email protected]...\n[12:57:09.999] INFO (517): tool already installed\n tool: \"node\"\nv22.13.1\n10.9.2\n0.30.0\n[12:57:10.166] INFO (517): Install tool node succeeded in 192ms.\n",
"stderr": ""
DEBUG: Executing command (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"command": "install-tool pnpm 10.6.3"
DEBUG: exec completed (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"durationMs": 704,
"stdout": "[12:57:10.435] INFO (553): Installing npm [email protected]...\n[12:57:10.450] INFO (553): tool already installed\n tool: \"pnpm\"\n10.6.3\n[12:57:10.741] INFO (553): Install tool pnpm succeeded in 316ms.\n",
"stderr": ""
DEBUG: Executing command (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"command": "pnpm install --lockfile-only --ignore-scripts --ignore-pnpmfile"
DEBUG: exec completed (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"durationMs": 522,
"stdout": "Scope: all 3 workspace projects\npackages/use-catalog | Progress: resolved 1, reused 0, downloaded 0, added 0\nProgress: resolved 1, reused 0, downloaded 0, added 0\nProgress: resolved 1, reused 0, downloaded 0, added 0, done\n\npackages/use-catalog | Progress: resolved 1, reused 0, downloaded 0, added 0, done\nDone in 485ms using pnpm v10.6.3\n",
"stderr": ""
DEBUG: pnpm-lock.yaml needs updating (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Updated 1 lock files (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"updatedArtifacts": ["pnpm-lock.yaml"]
DEBUG: Getting comments for #15 (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: http cache: saving https://api.github.com/repos/shirauix/renovate-pnpm-catalog-issue-reproduction/issues/15/comments?per_page=100 (etag="959b401ea118ad14eb0ebb9934c93429f7eac9110f720470d91f9d1ad66ba517", lastModified=undefined) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Found 0 comments (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Getting comments for #15 (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: http cache: Using cached response: https://api.github.com/repos/shirauix/renovate-pnpm-catalog-issue-reproduction/issues/15/comments?per_page=100 from 2025-06-15T12:57:11.655Z (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Found 0 comments (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: isBranchConflicted(main, renovate/zod-3.x) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: branch.isConflicted(): using git to calculate (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: branch.isConflicted(): false (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: 2 file(s) to commit (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Preparing files for committing to branch renovate/zod-3.x (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: git commit (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"deletedFiles": [],
"ignoredFiles": [],
"result": {
"author": null,
"branch": "renovate/zod-3.x",
"commit": "7c00fd4ebb7b28ffbcc817dd50fad3283760e726",
"root": false,
"summary": {"changes": 2, "insertions": 7, "deletions": 0}
}
DEBUG: resetToCommit(6d082f5c990832f6ce688a5d63e0fe50b494e6bf) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Fetching branch renovate/zod-3.x (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Setting current branch to main (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: latest commit (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"branchName": "main",
"latestCommitDate": "2025-06-15T21:54:01+09:00",
"sha": "6d082f5c990832f6ce688a5d63e0fe50b494e6bf"
INFO: Branch updated (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"commitSha": "123e673a88def9741faf6a835b71008da8e4ffe8"
DEBUG: Ensuring PR (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: There are 0 errors and 0 warnings (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: getBranchPr(renovate/zod-3.x) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: findPr(renovate/zod-3.x, undefined, open) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Found PR #15 (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Found existing PR (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: PR rebase requested, so skipping cache check (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Fetching changelog: https://github.com/colinhacks/zod (3.24.2 -> 3.25.64) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: http cache: saving https://api.github.com/repos/colinhacks/zod (etag=W/"3a633da022df1037867b3216e354c849e0e3924bb78ea1b0b65165fe43306354", lastModified=Sun, 15 Jun 2025 12:52:42 GMT) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: http cache: saving https://api.github.com/repos/colinhacks/zod/git/trees/main (etag=W/"49373b58b654c072fcdb465e55c014a58fa9331f37363715975384053f327232", lastModified=Sun, 15 Jun 2025 12:52:42 GMT) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: Processing existing PR (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: updatePr(15, chore(deps): update dependency zod to v3.25.64, body) (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: PR updated...prNo: 15 (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
INFO: PR updated (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
"pr": 15,
"prTitle": "chore(deps): update dependency zod to v3.25.64"
DEBUG: setPrCache() (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: PR is not configured for automerge (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)
DEBUG: setBranchCommit() (repository=shirauix/renovate-pnpm-catalog-issue-reproduction, branch=renovate/zod-3.x)