New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/git-resolver

Package Overview
Dependencies
Maintainers
2
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/git-resolver - npm Package Compare versions

Comparing version 5.1.5 to 5.1.6

4

lib/index.js

@@ -12,3 +12,3 @@ "use strict";

var _a;
const parsedSpec = await parsePref_1.default(wantedDependency.pref);
const parsedSpec = await (0, parsePref_1.default)(wantedDependency.pref);
if (parsedSpec == null)

@@ -62,3 +62,3 @@ return null;

// graceful-git by default retries 10 times, reduce to single retry
const result = await graceful_git_1.default(['ls-remote', ...gitArgs], { retries: 1 });
const result = await (0, graceful_git_1.default)(['ls-remote', ...gitArgs], { retries: 1 });
const refs = result.stdout.split('\n').reduce((obj, line) => {

@@ -65,0 +65,0 @@ const [commit, refName] = line.split('\t');

@@ -50,3 +50,3 @@ "use strict";

if (protocol && gitProtocols.has(protocol.toLocaleLowerCase())) {
const urlparse = new url_1.URL(pref);
const urlparse = new url_1.URL(escapeColon(pref));
if (!urlparse || !urlparse.protocol)

@@ -71,2 +71,9 @@ return null;

exports.default = parsePref;
function escapeColon(url) {
if (!url.includes('@'))
return url;
const [front, ...backs] = url.split('@');
const escapedBacks = backs.map(e => e.replace(/:([^/])/, ':/$1'));
return [front, ...escapedBacks].join('@');
}
function urlToFetchSpec(urlparse) {

@@ -109,3 +116,3 @@ urlparse.hash = '';

// HTTP HEAD on https://domain/user/repo, strip out ".git"
const response = await fetch_1.default(httpsUrl.substr(0, httpsUrl.length - 4), { method: 'HEAD', follow: 0 });
const response = await (0, fetch_1.default)(httpsUrl.substr(0, httpsUrl.length - 4), { method: 'HEAD', follow: 0 });
if (response.ok) {

@@ -138,6 +145,6 @@ fetchSpec = httpsUrl;

try {
await graceful_git_1.default(['ls-remote', '--exit-code', repository, 'HEAD'], { retries: 0 });
await (0, graceful_git_1.default)(['ls-remote', '--exit-code', repository, 'HEAD'], { retries: 0 });
return true;
}
catch (err) {
catch (err) { // eslint-disable-line
return false;

@@ -144,0 +151,0 @@ }

{
"name": "@pnpm/git-resolver",
"version": "5.1.5",
"version": "5.1.6",
"description": "Resolver for git-hosted packages",

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

"keywords": [
"pnpm6",
"pnpm",

@@ -27,3 +28,3 @@ "resolver",

"dependencies": {
"@pnpm/fetch": "4.1.1",
"@pnpm/fetch": "4.1.2",
"@pnpm/resolver-base": "8.0.4",

@@ -30,0 +31,0 @@ "graceful-git": "^3.1.2",

Sorry, the diff of this file is not supported yet

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