mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-29 04:21:39 -04:00
* refactor: store link values before converting to references * fix: use .sort() without localeCompare https://github.com/pnpm/pnpm/pull/8128#discussion_r1614031566 > Nit, but you probably just want to call sort without a comparison > function; these are already strings and locale compare is not a good > comparison for anything but human readable strings since it will > differ on different people's machines based on their language setting. > I've hit this too many times before for code gen. * feat: configure meta-updater to write test/tsconfig.json files * fix: relative imports for __typings__ * chore: `pnpm run meta-updater` * fix: explicitly use test/tsconfig.json for ts-jest
@pnpm/local-resolver
Resolver for local packages
Installation
pnpm add @pnpm/local-resolver
Usage
'use strict'
const resolveFromLocal = require('@pnpm/local-resolver').default
resolveFromLocal({pref: './example-package'}, {prefix: process.cwd()})
.then(resolveResult => console.log(resolveResult))
//> { id: 'link:example-package',
// normalizedPref: '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