How to use the @pnpm/local-resolver function in @pnpm/local-resolver

To help you get started, we’ve selected a few @pnpm/local-resolver examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pnpm / pnpm / packages / default-resolver / src / index.ts View on Github external
return async (wantedDependency, opts) => {
    const resolution = await resolveFromNpm(wantedDependency, opts as ResolveFromNpmOptions)
      || wantedDependency.pref && (
        await resolveFromTarball(wantedDependency as {pref: string})
        || await resolveFromGit(wantedDependency as {pref: string})
        || await resolveFromLocal(wantedDependency as {pref: string}, opts)
      )
    if (!resolution) {
      throw new Error(`Cannot resolve ${wantedDependency.alias ? wantedDependency.alias + '@' : ''}${wantedDependency.pref} packages not supported`)
    }
    return resolution
  }
}

@pnpm/local-resolver

Resolver for local packages

MIT
Latest version published 7 days ago

Package Health Score

61 / 100
Full package analysis

Popular @pnpm/local-resolver functions