Socket
Socket
Sign inDemoInstall

@pnpm/local-resolver

Package Overview
Dependencies
Maintainers
3
Versions
128
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 5.1.3 to 6.0.0

15

CHANGELOG.md
# @pnpm/local-resolver
## 6.0.0
### Major Changes
- 97b986fbc: Node.js 10 support is dropped. At least Node.js 12.17 is required for the package to work.
### Patch Changes
- 83645c8ed: Update ssri.
- Updated dependencies [97b986fbc]
- @pnpm/error@2.0.0
- @pnpm/read-project-manifest@2.0.0
- @pnpm/resolver-base@8.0.0
- @pnpm/types@7.0.0
## 5.1.3

@@ -4,0 +19,0 @@

12

lib/index.js

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = __importDefault(require("fs"));
const error_1 = __importDefault(require("@pnpm/error"));
const read_project_manifest_1 = require("@pnpm/read-project-manifest");
const ssri_1 = __importDefault(require("ssri"));
const parsePref_1 = __importDefault(require("./parsePref"));
const fs = require("graceful-fs");
const ssri = require("ssri");
/**

@@ -17,4 +17,4 @@ * Resolves a package hosted on the local filesystem

var _a;
const spec = parsePref_1.default(wantedDependency.pref, opts.projectDir, (_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.projectDir);
if (!spec)
const spec = (0, parsePref_1.default)(wantedDependency.pref, opts.projectDir, (_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.projectDir);
if (spec == null)
return null;

@@ -34,3 +34,3 @@ if (spec.type === 'file') {

try {
localDependencyManifest = await read_project_manifest_1.readProjectManifestOnly(spec.fetchSpec);
localDependencyManifest = await (0, read_project_manifest_1.readProjectManifestOnly)(spec.fetchSpec);
}

@@ -63,4 +63,4 @@ catch (internalErr) {

async function getFileIntegrity(filename) {
return (await ssri.fromStream(fs.createReadStream(filename))).toString();
return (await ssri_1.default.fromStream(fs_1.default.createReadStream(filename))).toString();
}
//# sourceMappingURL=index.js.map

@@ -6,6 +6,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const os_1 = __importDefault(require("os"));
const path_1 = __importDefault(require("path"));
const error_1 = __importDefault(require("@pnpm/error"));
const os = require("os");
const normalize = require("normalize-path");
const path = require("path");
const normalize_path_1 = __importDefault(require("normalize-path"));
// eslint-disable-next-line

@@ -23,3 +23,3 @@ const isWindows = process.platform === 'win32' || global['FAKE_WINDOWS'];

pref.endsWith('.tar') ||
pref.includes(path.sep) ||
pref.includes(path_1.default.sep) ||
pref.startsWith('file:') ||

@@ -51,3 +51,3 @@ isFilespec.test(pref)) {

// this is needed for windows and for file:~/foo/bar
fetchSpec = resolvePath(os.homedir(), spec.slice(2));
fetchSpec = resolvePath(os_1.default.homedir(), spec.slice(2));
normalizedPref = `${protocol}${spec}`;

@@ -61,9 +61,9 @@ }

else {
normalizedPref = `${protocol}${path.relative(projectDir, fetchSpec)}`;
normalizedPref = `${protocol}${path_1.default.relative(projectDir, fetchSpec)}`;
}
}
const dependencyPath = normalize(path.relative(projectDir, fetchSpec));
const dependencyPath = (0, normalize_path_1.default)(path_1.default.relative(projectDir, fetchSpec));
const id = type === 'directory' || projectDir === lockfileDir
? `${protocol}${dependencyPath}`
: `${protocol}${normalize(path.relative(lockfileDir, fetchSpec))}`;
: `${protocol}${(0, normalize_path_1.default)(path_1.default.relative(lockfileDir, fetchSpec))}`;
return {

@@ -80,3 +80,3 @@ dependencyPath,

return spec;
return path.resolve(where, spec);
return path_1.default.resolve(where, spec);
}

@@ -83,0 +83,0 @@ function isAbsolute(dir) {

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

@@ -12,3 +12,3 @@ "main": "lib/index.js",

"engines": {
"node": ">=10.16"
"node": ">=12.17"
},

@@ -21,3 +21,3 @@ "scripts": {

"fix": "tslint -c tslint.json src/**/*.ts test/**/*.ts --fix",
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build"
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix"
},

@@ -30,3 +30,2 @@ "repository": "https://github.com/pnpm/pnpm/blob/master/packages/local-resolver",

],
"author": "Zoltan Kochan <z@kochan.io> (https://www.kochan.io/)",
"license": "MIT",

@@ -38,12 +37,10 @@ "bugs": {

"dependencies": {
"@pnpm/error": "1.4.0",
"@pnpm/read-project-manifest": "1.1.7",
"@pnpm/resolver-base": "7.1.1",
"@pnpm/types": "6.4.0",
"graceful-fs": "4.2.4",
"@pnpm/error": "2.0.0",
"@pnpm/read-project-manifest": "2.0.0",
"@pnpm/resolver-base": "8.0.0",
"@pnpm/types": "7.0.0",
"normalize-path": "^3.0.0",
"ssri": "6.0.1"
"ssri": "^8.0.1"
},
"devDependencies": {
"@types/graceful-fs": "^4.1.4",
"@types/normalize-path": "^3.0.0",

@@ -50,0 +47,0 @@ "@types/ssri": "^7.1.0"

@@ -38,2 +38,2 @@ # @pnpm/local-resolver

MIT © [Zoltan Kochan](https://www.kochan.io/)
MIT

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