We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7a1a2c commit 555d39cCopy full SHA for 555d39c
1 file changed
src/utils/pnpm.mts
@@ -13,10 +13,11 @@ import type { LockfileObject, PackageSnapshot } from '@pnpm/lockfile.fs'
13
import type { SemVer } from 'semver'
14
15
export function extractOverridesFromPnpmLockSrc(lockfileContent: any): string {
16
- return typeof lockfileContent === 'string'
17
- ? (/^overrides:\r?\n(?: {2}.+(?:\r?\n)*)+/m.exec(lockfileContent)?.[0] ??
18
- '')
19
- : ''
+ let match
+ if (typeof lockfileContent === 'string') {
+ match = /^overrides:(?:\r?\n {2}.+)+(?:\r?\n)*/m.exec(lockfileContent)?.[0]
+ }
20
+ return match ?? ''
21
}
22
23
export async function extractPurlsFromPnpmLockfile(
0 commit comments