Socket
Socket
Sign inDemoInstall

@pnpm/git-fetcher

Package Overview
Dependencies
43
Maintainers
2
Versions
121
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.2.0

17

lib/index.d.ts

@@ -1,10 +0,7 @@

/**
* clone a git repository.
*/
export default function (resolution: {
repo: string;
commit: string;
}, dest: string): Promise<{
headers: any;
integrityPromise: Promise<any>;
}>;
declare const _default: () => {
git: (resolution: {
repo: string;
commit: string;
}, dest: string) => Promise<any>;
};
export default _default;

@@ -15,19 +15,15 @@ "use strict";

const rimraf = require("rimraf-then");
/**
* clone a git repository.
*/
function default_1(resolution, dest) {
return __awaiter(this, void 0, void 0, function* () {
yield execGit(['clone', resolution.repo, dest]);
yield execGit(['checkout', resolution.commit], { cwd: dest });
// removing /.git to make directory integrity calculation faster
yield rimraf(path.join(dest, '.git'));
const dirIntegrity = yield dint.from(dest);
return {
headers: dirIntegrity,
integrityPromise: Promise.resolve(dirIntegrity),
};
});
}
exports.default = default_1;
exports.default = () => {
return {
git: function fetchFromGit(resolution, dest) {
return __awaiter(this, void 0, void 0, function* () {
yield execGit(['clone', resolution.repo, dest]);
yield execGit(['checkout', resolution.commit], { cwd: dest });
// removing /.git to make directory integrity calculation faster
yield rimraf(path.join(dest, '.git'));
return dint.from(dest);
});
},
};
};
function prefixGitArgs() {

@@ -34,0 +30,0 @@ return process.platform === 'win32' ? ['-c', 'core.longpaths=true'] : [];

{
"name": "@pnpm/git-fetcher",
"version": "0.1.0",
"version": "0.2.0",
"description": "A fetcher for git-hosted packages",

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

"@types/node": "^8.0.53",
"dint": "^1.0.0",
"dint": "^2.0.0",
"execa": "^0.8.0",

@@ -38,0 +38,0 @@ "rimraf-then": "^1.0.1"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc