Socket
Socket
Sign inDemoInstall

@pnpm/git-fetcher

Package Overview
Dependencies
46
Maintainers
2
Versions
121
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.3.1

5

lib/index.d.ts

@@ -5,4 +5,7 @@ declare const _default: () => {

commit: string;
}, dest: string) => Promise<any>;
}, targetFolder: string) => Promise<{
filesIndex: any;
tempLocation: string;
}>;
};
export default _default;

15

lib/index.js

@@ -14,12 +14,17 @@ "use strict";

const path = require("path");
const pathTemp = require("path-temp");
const rimraf = require("rimraf-then");
exports.default = () => {
return {
git: function fetchFromGit(resolution, dest) {
git: function fetchFromGit(resolution, targetFolder) {
return __awaiter(this, void 0, void 0, function* () {
yield execGit(['clone', resolution.repo, dest]);
yield execGit(['checkout', resolution.commit], { cwd: dest });
const tempLocation = pathTemp(targetFolder);
yield execGit(['clone', resolution.repo, tempLocation]);
yield execGit(['checkout', resolution.commit], { cwd: tempLocation });
// removing /.git to make directory integrity calculation faster
yield rimraf(path.join(dest, '.git'));
return dint.from(dest);
yield rimraf(path.join(tempLocation, '.git'));
return {
filesIndex: yield dint.from(tempLocation),
tempLocation,
};
});

@@ -26,0 +31,0 @@ },

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

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

"scripts": {
"test": "npm run lint",
"test": "npm run lint && preview && ts-node test --type-check",
"lint": "tslint -c tslint.json --project .",

@@ -35,9 +35,16 @@ "tsc": "rimraf lib && tsc",

"dependencies": {
"@types/node": "^8.0.53",
"@types/node": "^9.3.0",
"dint": "^2.0.0",
"execa": "^0.8.0",
"execa": "^0.9.0",
"path-temp": "^1.0.0",
"rimraf-then": "^1.0.1"
},
"devDependencies": {
"@types/tape": "^4.2.31",
"@types/tempy": "^0.1.0",
"package-preview": "^1.0.5",
"rimraf": "^2.6.2",
"tape": "^4.8.0",
"tempy": "^0.2.1",
"ts-node": "^4.1.0",
"tslint": "^5.8.0",

@@ -44,0 +51,0 @@ "typescript": "^2.6.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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc