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

@pnpm/dependency-path

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/dependency-path - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

2

lib/index.d.ts

@@ -20,3 +20,3 @@ import { type Registries } from '@pnpm/types';

export declare function parse(dependencyPath: string): DependencyPath;
export declare function depPathToFilename(depPath: string): string;
export declare function depPathToFilename(depPath: string, maxLengthWithoutHash: number): string;
export type PeerId = {

@@ -23,0 +23,0 @@ name: string;

@@ -126,4 +126,3 @@ "use strict";

exports.parse = parse;
const MAX_LENGTH_WITHOUT_HASH = 120 - 26 - 1;
function depPathToFilename(depPath) {
function depPathToFilename(depPath, maxLengthWithoutHash) {
let filename = depPathToFilenameUnescaped(depPath).replace(/[\\/:*?"<>|]/g, '+');

@@ -135,4 +134,4 @@ if (filename.includes('(')) {

}
if (filename.length > 120 || filename !== filename.toLowerCase() && !filename.startsWith('file+')) {
return `${filename.substring(0, MAX_LENGTH_WITHOUT_HASH)}_${(0, crypto_base32_hash_1.createBase32Hash)(filename)}`;
if (filename.length > maxLengthWithoutHash || filename !== filename.toLowerCase() && !filename.startsWith('file+')) {
return `${filename.substring(0, maxLengthWithoutHash - 27)}_${(0, crypto_base32_hash_1.createBase32Hash)(filename)}`;
}

@@ -139,0 +138,0 @@ return filename;

{
"name": "@pnpm/dependency-path",
"version": "3.0.0",
"version": "4.0.0",
"description": "Utilities for working with symlinked node_modules",

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

"@types/semver": "7.5.3",
"@pnpm/dependency-path": "3.0.0"
"@pnpm/dependency-path": "4.0.0"
},

@@ -36,0 +36,0 @@ "funding": "https://opencollective.com/pnpm",

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