fix: use esm import for @pnpm/patch-package in @pnpm/apply-patch (#10191)

This commit is contained in:
Brandon Cheng authored and GitHub committed 2025-11-16 23:35:25 +01:00
1 parent 23b139a10f
commit a0e3a21a93
3 files changed
+7 -2

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@pnpm/patching.apply-patch": patch
---
Import `@pnpm/patch-package/dist/applyPatches` using `.js` extension for ESM compatibility. This fixes an `ERR_MODULE_NOT_FOUND` error.
+1 -1
View File
@@ -113,7 +113,7 @@ declare module 'yaml-tag' {
export = anything
}
declare module '@pnpm/patch-package/dist/applyPatches' {
declare module '@pnpm/patch-package/dist/applyPatches.js' {
export function applyPatch (opts: any): boolean
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { PnpmError } from '@pnpm/error'
import { applyPatch } from '@pnpm/patch-package/dist/applyPatches'
import { applyPatch } from '@pnpm/patch-package/dist/applyPatches.js'
import { globalWarn } from '@pnpm/logger'
export interface ApplyPatchToDirOpts {