Files
Trevor Burnham 88263a8be7 refactor: force re-fetch when resolution integrity changes (#10454)
* fix: force re-fetch when resolution integrity changes

When a resolver returns a resolution with a different integrity than
the current package's resolution, automatically force re-fetching the
package. This allows custom resolvers to trigger re-fetches by simply
returning the updated integrity, without needing to explicitly set
a forceFetch flag.

Closes #10451

* refactor: remove forceFetch

* test: fix

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2026-01-20 01:57:16 +01:00
..
2025-10-21 15:30:20 +02:00
2026-01-14 01:18:13 +01:00

@pnpm/local-resolver

Resolver for local packages

npm version

Installation

pnpm add @pnpm/local-resolver

Usage

'use strict'
const resolveFromLocal = require('@pnpm/local-resolver').default

resolveFromLocal({bareSpecifier: './example-package'}, {prefix: process.cwd()})
  .then(resolveResult => console.log(resolveResult))
//> { id: 'link:example-package',
//    normalizedBareSpecifier: 'link:example-package',
//    package:
//     { name: 'foo',
//       version: '1.0.0',
//       readme: '# foo\n',
//       readmeFilename: 'README.md',
//       description: '',
//       _id: 'foo@1.0.0' },
//    resolution: { directory: 'example-package', type: 'directory' }
//    resolvedVia: 'local-filesystem' }

License

MIT