From 6ac9a842090ecb2ef4aed60daa23d37d0f8632d8 Mon Sep 17 00:00:00 2001
From: RahulGautamSingh <rahultesnik@gmail.com>
Date: Mon, 8 May 2023 13:24:19 +0530
Subject: [PATCH] fix(pnpm): extract engine constraint (#21959)

---
 lib/modules/manager/npm/extract/__snapshots__/index.spec.ts.snap | 1 +
 lib/modules/manager/npm/extract/index.spec.ts                    | 1 +
 lib/modules/manager/npm/extract/index.ts                         | 1 +
 3 files changed, 3 insertions(+)

diff --git a/lib/modules/manager/npm/extract/__snapshots__/index.spec.ts.snap b/lib/modules/manager/npm/extract/__snapshots__/index.spec.ts.snap
index 668bbac7b8..06e92a81a4 100644
--- a/lib/modules/manager/npm/extract/__snapshots__/index.spec.ts.snap
+++ b/lib/modules/manager/npm/extract/__snapshots__/index.spec.ts.snap
@@ -129,6 +129,7 @@ exports[`modules/manager/npm/extract/index .extractPackageFile() extracts engine
   "extractedConstraints": {
     "node": ">= 8.9.2",
     "npm": "^8.0.0",
+    "pnpm": "^1.2.0",
     "vscode": ">=1.49.3",
     "yarn": "disabled",
   },
diff --git a/lib/modules/manager/npm/extract/index.spec.ts b/lib/modules/manager/npm/extract/index.spec.ts
index 1932f6fd85..6013a24240 100644
--- a/lib/modules/manager/npm/extract/index.spec.ts
+++ b/lib/modules/manager/npm/extract/index.spec.ts
@@ -418,6 +418,7 @@ describe('modules/manager/npm/extract/index', () => {
         extractedConstraints: {
           node: '>= 8.9.2',
           npm: '^8.0.0',
+          pnpm: '^1.2.0',
           vscode: '>=1.49.3',
           yarn: 'disabled',
         },
diff --git a/lib/modules/manager/npm/extract/index.ts b/lib/modules/manager/npm/extract/index.ts
index 05803936be..4af1aefdca 100644
--- a/lib/modules/manager/npm/extract/index.ts
+++ b/lib/modules/manager/npm/extract/index.ts
@@ -233,6 +233,7 @@ export async function extractPackageFile(
       } else if (depName === 'pnpm') {
         dep.datasource = NpmDatasource.id;
         dep.commitMessageTopic = 'pnpm';
+        extractedConstraints.pnpm = dep.currentValue;
       } else if (depName === 'vscode') {
         dep.datasource = GithubTagsDatasource.id;
         dep.packageName = 'microsoft/vscode';
-- 
GitLab