Files
pnpm/resolving/local-resolver
Zoltan Kochan dba4153767 refactor: rename packages and consolidate runtime resolvers (#10999)
* refactor: rename workspace.sort-packages and workspace.pkgs-graph

- workspace.sort-packages -> workspace.projects-sorter
- workspace.pkgs-graph -> workspace.projects-graph

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: rename packages/ to core/ and pkg-manifest.read-package-json to reader

- Rename packages/ directory to core/ for clarity
- Rename pkg-manifest/read-package-json to pkg-manifest/reader (@pnpm/pkg-manifest.reader)
- Update all tsconfig, package.json, and lockfile references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: consolidate runtime resolvers under engine/runtime domain

- Remove unused @pnpm/engine.runtime.node.fetcher package
- Rename engine/runtime/node.resolver to node-resolver (dash convention)
- Move resolving/bun-resolver to engine/runtime/bun-resolver
- Move resolving/deno-resolver to engine/runtime/deno-resolver
- Update all package names, tsconfig paths, and lockfile references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update lockfile after removing node.fetcher

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: sort tsconfig references and package.json deps alphabetically

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: auto-fix import sorting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: update __typings__ paths in tsconfig.lint.json for moved resolvers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: remove deno-resolver from deps of bun-resolver

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 00:19:58 +01:00
..
2025-10-21 15:30:20 +02: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