Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(manager/npm): add support for Volta's pnpm #23069

Merged
merged 4 commits into from Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -453,10 +453,18 @@ exports[`modules/manager/npm/extract/index .extractPackageFile() extracts volta
"prettyDepType": "volta",
},
{
"commitMessageTopic": "pnpm",
"currentValue": "6.11.2",
"datasource": "npm",
"depName": "pnpm",
"depType": "volta",
"prettyDepType": "volta",
},
{
"currentValue": "1.0.0",
"depName": "invalid",
"depType": "volta",
"prettyDepType": "volta",
"skipReason": "unknown-volta",
},
],
Expand Down
7 changes: 7 additions & 0 deletions lib/modules/manager/npm/extract/index.spec.ts
Expand Up @@ -490,6 +490,7 @@ describe('modules/manager/npm/extract/index', () => {
yarn: '1.12.3',
npm: '5.9.0',
pnpm: '6.11.2',
invalid: '1.0.0',
},
};
const pJsonStr = JSON.stringify(pJson);
Expand All @@ -506,6 +507,12 @@ describe('modules/manager/npm/extract/index', () => {
currentValue: '6.11.2',
depName: 'pnpm',
prettyDepType: 'volta',
},
{
depType: 'volta',
currentValue: '1.0.0',
depName: 'invalid',
prettyDepType: 'volta',
skipReason: 'unknown-volta',
},
],
Expand Down
3 changes: 3 additions & 0 deletions lib/modules/manager/npm/extract/index.ts
Expand Up @@ -263,6 +263,9 @@ export async function extractPackageFile(
}
} else if (depName === 'npm') {
dep.datasource = NpmDatasource.id;
} else if (depName === 'pnpm') {
dep.datasource = NpmDatasource.id;
dep.commitMessageTopic = 'pnpm';
} else {
dep.skipReason = 'unknown-volta';
oscard0m marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/npm/readme.md
Expand Up @@ -5,5 +5,5 @@ The following `depTypes` are currently supported by the npm manager :
- `optionalDependencies`
- `peerDependencies`
- `engines` : Renovate will update any `node`, `npm` and `yarn` version specified under `engines`.
- `volta` : Renovate will update any `node`, `npm` and `yarn` version specified under `volta`.
- `volta` : Renovate will update any `node`, `npm`, `pnpm` and `yarn` version specified under `volta`.
- `packageManager`