Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/local-resolver

Package Overview
Dependencies
Maintainers
2
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/local-resolver - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

17

lib/parsePref.js

@@ -25,7 +25,8 @@ "use strict";

if (pref.startsWith('path:')) {
const err = new Error('Local dependencies via `path:` prefix are not supported. ' +
'Use the `link:` prefix for folder dependencies and `file:` for local tarballs');
const err = new Error('Local dependencies via `path:` protocol are not supported. ' +
'Use the `link:` protocol for folder dependencies and `file:` for local tarballs');
// tslint:disable:no-string-literal
err['code'] = 'INVALID_PREF';
err['code'] = 'EUNSUPPORTEDPROTOCOL';
err['pref'] = pref;
err['protocol'] = 'path:';
// tslint:enable:no-string-literal

@@ -44,3 +45,3 @@ throw err;

// TODO: always use link: for directory dependencies
const prefPrefix = pref.startsWith('link:') ? 'link:' : 'file:';
const protocol = pref.startsWith('link:') ? 'link:' : 'file:';
let fetchSpec;

@@ -51,3 +52,3 @@ let normalizedPref;

fetchSpec = resolvePath(osenv.home(), spec.slice(2));
normalizedPref = `${prefPrefix}${spec}`;
normalizedPref = `${protocol}${spec}`;
}

@@ -57,10 +58,10 @@ else {

if (isAbsolute(spec)) {
normalizedPref = `${prefPrefix}${spec}`;
normalizedPref = `${protocol}${spec}`;
}
else {
normalizedPref = `${prefPrefix}${path.relative(where, fetchSpec)}`;
normalizedPref = `${protocol}${path.relative(where, fetchSpec)}`;
}
}
const dependencyPath = normalize(path.relative(where, fetchSpec));
const id = `${prefPrefix}${dependencyPath}`;
const id = `${protocol}${dependencyPath}`;
return {

@@ -67,0 +68,0 @@ dependencyPath,

{
"name": "@pnpm/local-resolver",
"version": "0.2.0",
"version": "0.2.1",
"description": "Resolver for local packages",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc