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

backfill-hasher

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backfill-hasher - npm Package Compare versions

Comparing version 3.1.0-alpha.0 to 4.0.0

7

lib/hashOfFiles.d.ts

@@ -1,2 +0,5 @@

export declare function generateHashOfFiles(packageRoot: string, glob?: string[]): Promise<string>;
//# sourceMappingURL=hashOfFiles.d.ts.map
export declare function generateHashOfFiles(
packageRoot: string,
globs: string[]
): Promise<string>;
//# sourceMappingURL=hashOfFiles.d.ts.map
"use strict";
var __importDefault =
(this && this.__importDefault) ||
function(mod) {
return mod && mod.__esModule ? mod : { default: mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const crypto = require("crypto");
const fg = require("fast-glob");
const fs = require("fs-extra");
const path = require("path");
const backfill_config_1 = require("backfill-config");
const crypto_1 = __importDefault(require("crypto"));
const path_1 = __importDefault(require("path"));
const fast_glob_1 = __importDefault(require("fast-glob"));
const fs_extra_1 = __importDefault(require("fs-extra"));
const helpers_1 = require("./helpers");
const newline = /\r\n|\r|\n/g;
const LF = "\n";
async function generateHashOfFiles(packageRoot, glob) {
if (!glob) {
glob = backfill_config_1.createConfig(packageRoot).hashGlobs;
}
const files = await fg(glob, {
cwd: packageRoot,
onlyFiles: false,
objectMode: true
});
files.sort((a, b) => a.path.localeCompare(b.path));
const hashes = await Promise.all(files.map(async (file) => {
const hasher = crypto.createHash("sha1");
hasher.update(file.path);
if (!file.dirent.isDirectory()) {
const fileBuffer = await fs.readFile(path.join(packageRoot, file.path));
const data = fileBuffer.toString().replace(newline, LF);
hasher.update(data);
}
return hasher.digest("hex");
}));
return helpers_1.hashStrings(hashes);
async function generateHashOfFiles(packageRoot, globs) {
const files = await fast_glob_1.default(globs, {
cwd: packageRoot,
onlyFiles: false,
objectMode: true
});
files.sort((a, b) => a.path.localeCompare(b.path));
const hashes = await Promise.all(
files.map(async file => {
const hasher = crypto_1.default.createHash("sha1");
hasher.update(file.path);
if (!file.dirent.isDirectory()) {
const fileBuffer = await fs_extra_1.default.readFile(
path_1.default.join(packageRoot, file.path)
);
const data = fileBuffer.toString().replace(newline, LF);
hasher.update(data);
}
return hasher.digest("hex");
})
);
return helpers_1.hashStrings(hashes);
}
exports.generateHashOfFiles = generateHashOfFiles;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFzaE9mRmlsZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaGFzaE9mRmlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxpQ0FBaUM7QUFDakMsZ0NBQWdDO0FBQ2hDLCtCQUErQjtBQUMvQiw2QkFBNkI7QUFDN0IscURBQStDO0FBQy9DLHVDQUF3QztBQUV4QyxNQUFNLE9BQU8sR0FBRyxhQUFhLENBQUM7QUFDOUIsTUFBTSxFQUFFLEdBQUcsSUFBSSxDQUFDO0FBRVQsS0FBSyxVQUFVLG1CQUFtQixDQUN2QyxXQUFtQixFQUNuQixJQUFlO0lBRWYsSUFBSSxDQUFDLElBQUksRUFBRTtRQUNULElBQUksR0FBRyw4QkFBWSxDQUFDLFdBQVcsQ0FBQyxDQUFDLFNBQVMsQ0FBQztLQUM1QztJQUVELE1BQU0sS0FBSyxHQUFHLE1BQU0sRUFBRSxDQUFDLElBQUksRUFBRTtRQUMzQixHQUFHLEVBQUUsV0FBVztRQUNoQixTQUFTLEVBQUUsS0FBSztRQUNoQixVQUFVLEVBQUUsSUFBSTtLQUNqQixDQUFDLENBQUM7SUFFSCxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDL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RUFBRSxDQUFDLE9BQU8sQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUM7WUFDeEQsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztTQUNyQjtRQUVELE9BQU8sTUFBTSxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUM5QixDQUFDLENBQUMsQ0FDSCxDQUFDO0lBRUYsT0FBTyxxQkFBVyxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQzdCLENBQUM7QUE1QkQsa0RBNEJDIn0=

@@ -0,1 +1,2 @@

import { Logger } from "backfill-logger";
import { ParsedYarnLock } from "./yarnLock";

@@ -10,3 +11,3 @@ import { WorkspaceInfo } from "./yarnWorkspaces";

export declare function generateHashOfInternalPackages(internalPackages: PackageHashInfo[]): string;
export declare function getPackageHash(packageRoot: string, workspaces: WorkspaceInfo, yarnLock: ParsedYarnLock): Promise<PackageHashInfo>;
export declare function getPackageHash(packageRoot: string, workspaces: WorkspaceInfo, yarnLock: ParsedYarnLock, logger: Logger, hashGlobs: string[]): Promise<PackageHashInfo>;
//# sourceMappingURL=hashOfPackage.d.ts.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const crypto = require("crypto");
const path = require("path");
const fs = require("fs");
const fsExtra = require("fs-extra");
const backfill_logger_1 = require("backfill-logger");
const crypto_1 = __importDefault(require("crypto"));
const path_1 = __importDefault(require("path"));
const resolveInternalDependencies_1 = require("./resolveInternalDependencies");

@@ -14,3 +14,3 @@ const resolveExternalDependencies_1 = require("./resolveExternalDependencies");

internalPackages.sort((a, b) => a.name.localeCompare(b.name));
const hasher = crypto.createHash("sha1");
const hasher = crypto_1.default.createHash("sha1");
internalPackages.forEach(pkg => {

@@ -24,12 +24,9 @@ hasher.update(pkg.name);

exports.generateHashOfInternalPackages = generateHashOfInternalPackages;
async function getPackageHash(packageRoot, workspaces, yarnLock) {
const cacheFile = path.join(packageRoot, "node_modules", "backfill-hash.json");
try {
const cachedValue = await fs.promises.readFile(cacheFile);
const result = JSON.parse(cachedValue.toString());
return result;
const memoization = {};
async function getPackageHash(packageRoot, workspaces, yarnLock, logger, hashGlobs) {
const memoizationKey = path_1.default.resolve(packageRoot);
if (memoization[memoizationKey]) {
return memoization[memoizationKey];
}
catch {
}
const { name, dependencies, devDependencies } = require(path.join(packageRoot, "package.json"));
const { name, dependencies, devDependencies } = require(path_1.default.join(packageRoot, "package.json"));
const allDependencies = {

@@ -45,7 +42,7 @@ ...dependencies,

];
const filesHash = await hashOfFiles_1.generateHashOfFiles(packageRoot);
const filesHash = await hashOfFiles_1.generateHashOfFiles(packageRoot, hashGlobs);
const dependenciesHash = helpers_1.hashStrings(resolvedDependencies);
backfill_logger_1.logger.silly(name);
backfill_logger_1.logger.silly(` ${filesHash} (fileHash)`);
backfill_logger_1.logger.silly(` ${dependenciesHash} (dependenciesHash)`);
logger.silly(name);
logger.silly(` ${filesHash} (fileHash)`);
logger.silly(` ${dependenciesHash} (dependenciesHash)`);
const packageHash = {

@@ -57,7 +54,6 @@ name,

};
await fsExtra.mkdirp(path.dirname(cacheFile));
await fs.promises.writeFile(cacheFile, JSON.stringify(packageHash));
memoization[memoizationKey] = packageHash;
return packageHash;
}
exports.getPackageHash = getPackageHash;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFzaE9mUGFja2FnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9oYXNoT2ZQYWNrYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsaUNBQWlDO0FBQ2pDLDZCQUE2QjtBQUM3Qix5QkFBeUI7QUFDekIsb0NBQW9DO0FBQ3BDLHFEQUF5QztBQUV6QywrRUFBNEU7QUFDNUUsK0VBQTRFO0FBQzVFLCtDQUFvRDt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NBQW1CLENBQUMsV0FBVyxFQUFFLFNBQVMsQ0FBQyxDQUFDO0lBQ3BFLE1BQU0sZ0JBQWdCLEdBQUcscUJBQVcsQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO0lBRTNELE1BQU0sQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDbkIsTUFBTSxDQUFDLEtBQUssQ0FBQyxLQUFLLFNBQVMsYUFBYSxDQUFDLENBQUM7SUFDMUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxLQUFLLGdCQUFnQixxQkFBcUIsQ0FBQyxDQUFDO0lBRXpELE1BQU0sV0FBVyxHQUFHO1FBQ2xCLElBQUk7UUFDSixTQUFTO1FBQ1QsZ0JBQWdCO1FBQ2hCLG9CQUFvQjtLQUNyQixDQUFDO0lBRUYsV0FBVyxDQUFDLGNBQWMsQ0FBQyxHQUFHLFdBQVcsQ0FBQztJQUUxQyxPQUFPLFdBQVcsQ0FBQztBQUNyQixDQUFDO0FBeERELHdDQXdEQyJ9
export declare function hashStrings(strings: string | string[]): string;
export declare function getPackageRoot(cwd: string): Promise<string>;
export declare function nameAtVersion(name: string, version: string): string;
//# sourceMappingURL=helpers.d.ts.map
//# sourceMappingURL=helpers.d.ts.map
"use strict";
var __importDefault =
(this && this.__importDefault) ||
function(mod) {
return mod && mod.__esModule ? mod : { default: mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const crypto = require("crypto");
const findUp = require("find-up");
const path_1 = __importDefault(require("path"));
const crypto_1 = __importDefault(require("crypto"));
const find_up_1 = __importDefault(require("find-up"));
function hashStrings(strings) {
const hasher = crypto.createHash("sha1");
const anArray = typeof strings === "string" ? [strings] : strings;
const elements = [...anArray];
elements.sort((a, b) => a.localeCompare(b));
elements.forEach(element => hasher.update(element));
return hasher.digest("hex");
const hasher = crypto_1.default.createHash("sha1");
const anArray = typeof strings === "string" ? [strings] : strings;
const elements = [...anArray];
elements.sort((a, b) => a.localeCompare(b));
elements.forEach(element => hasher.update(element));
return hasher.digest("hex");
}
exports.hashStrings = hashStrings;
async function getPackageRoot(cwd) {
const packageRoot = await findUp("package.json", { cwd });
if (!packageRoot) {
throw new Error(`Could not find package.json inside ${cwd}.`);
}
return path.dirname(packageRoot);
const packageRoot = await find_up_1.default("package.json", { cwd });
if (!packageRoot) {
throw new Error(`Could not find package.json inside ${cwd}.`);
}
return path_1.default.dirname(packageRoot);
}
exports.getPackageRoot = getPackageRoot;
function nameAtVersion(name, version) {
return `${name}@${version}`;
return `${name}@${version}`;
}
exports.nameAtVersion = nameAtVersion;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9oZWxwZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNkJBQTZCO0FBQzdCLGlDQUFpQztBQUNqQyxrQ0FBa0M7QUFFbEMsU0FBZ0IsV0FBVyxDQUFDLE9BQTBCO0lBQ3BELE1BQU0sTUFBTSxHQUFHLE1BQU0sQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLENBQUM7SUFFekMsTUFBTSxPQUFPLEdBQUcsT0FBTyxPQUFPLEtBQUssUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUM7SUFDbEUsTUFBTSxRQUFRLEdBQUcsQ0FBQyxHQUFHLE9BQU8sQ0FBQyxDQUFDO0lBQzlCLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDNUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLE1BQU0sQ0FBQyx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QyxDQUFDLENBQUMsT0FBTyxDQUFDO0lBQ2xFLE1BQU0sUUFBUSxHQUFHLENBQUMsR0FBRyxPQUFPLENBQUMsQ0FBQztJQUM5QixRQUFRLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQzVDLFFBQVEsQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7SUFFcEQsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDO0FBQzlCLENBQUM7QUFURCxrQ0FTQztBQUVNLEtBQUssVUFBVSxjQUFjLENBQUMsR0FBVztJQUM5QyxNQUFNLFdBQVcsR0FBRyxNQUFNLGlCQUFNLENBQUMsY0FBYyxFQUFFLEVBQUUsR0FBRyxFQUFFLENBQUMsQ0FBQztJQUUxRCxJQUFJLENBQUMsV0FBVyxFQUFFO1FBQ2hCLE1BQU0sSUFBSSxLQUFLLENBQUMsc0NBQXNDLEdBQUcsR0FBRyxDQUFDLENBQUM7S0FDL0Q7SUFFRCxPQUFPLGNBQUksQ0FBQyxPQUFPLENBQUMsV0FBVyxDQUFDLENBQUM7QUFDbkMsQ0FBQztBQVJELHdDQVFDO0FBRUQsU0FBZ0IsYUFBYSxDQUFDLElBQVksRUFBRSxPQUFlO0lBQ3pELE9BQU8sR0FBRyxJQUFJLElBQUksT0FBTyxFQUFFLENBQUM7QUFDOUIsQ0FBQztBQUZELHNDQUVDIn0=

@@ -0,5 +1,6 @@

import { Logger } from "backfill-logger";
import { PackageHashInfo } from "./hashOfPackage";
import { WorkspaceInfo } from "./yarnWorkspaces";
export interface IHasher {
createPackageHash: () => Promise<string>;
createPackageHash: (salt: string) => Promise<string>;
hashOfOutput: () => Promise<string>;

@@ -10,12 +11,14 @@ }

private options;
private buildCommandSignature;
private logger;
private packageRoot;
private outputGlob;
private hashGlobs;
constructor(options: {
packageRoot: string;
outputGlob: string[];
}, buildCommandSignature: string);
createPackageHash(): Promise<string>;
hashGlobs: string[];
}, logger: Logger);
createPackageHash(salt: string): Promise<string>;
hashOfOutput(): Promise<string>;
}
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const backfill_logger_1 = require("backfill-logger");
const hashOfFiles_1 = require("./hashOfFiles");

@@ -27,10 +26,11 @@ const hashOfPackage_1 = require("./hashOfPackage");

class Hasher {
constructor(options, buildCommandSignature) {
constructor(options, logger) {
this.options = options;
this.buildCommandSignature = buildCommandSignature;
this.logger = logger;
this.packageRoot = this.options.packageRoot;
this.outputGlob = this.options.outputGlob;
this.hashGlobs = this.options.hashGlobs;
}
async createPackageHash() {
backfill_logger_1.logger.profile("hasher:calculateHash");
async createPackageHash(salt) {
const tracer = this.logger.setTime("hashTime");
const packageRoot = await helpers_1.getPackageRoot(this.packageRoot);

@@ -46,3 +46,3 @@ const yarnLock = await yarnLock_1.parseLockFile(packageRoot);

}
const packageHash = await hashOfPackage_1.getPackageHash(packageRoot, workspaces, yarnLock);
const packageHash = await hashOfPackage_1.getPackageHash(packageRoot, workspaces, yarnLock, this.logger, this.hashGlobs);
addToQueue(packageHash.internalDependencies, queue, done, workspaces);

@@ -52,12 +52,9 @@ done.push(packageHash);

const internalPackagesHash = hashOfPackage_1.generateHashOfInternalPackages(done);
const buildCommandHash = helpers_1.hashStrings(this.buildCommandSignature);
const combinedHash = helpers_1.hashStrings([
internalPackagesHash,
buildCommandHash
]);
backfill_logger_1.logger.verbose(`Hash of internal packages: ${internalPackagesHash}`);
backfill_logger_1.logger.verbose(`Hash of build command: ${buildCommandHash}`);
backfill_logger_1.logger.verbose(`Combined hash: ${combinedHash}`);
backfill_logger_1.logger.profile("hasher:calculateHash");
backfill_logger_1.logger.setHash(combinedHash);
const buildCommandHash = helpers_1.hashStrings(salt);
const combinedHash = helpers_1.hashStrings([internalPackagesHash, buildCommandHash]);
this.logger.verbose(`Hash of internal packages: ${internalPackagesHash}`);
this.logger.verbose(`Hash of build command: ${buildCommandHash}`);
this.logger.verbose(`Combined hash: ${combinedHash}`);
tracer.stop();
this.logger.setHash(combinedHash);
return combinedHash;

@@ -70,2 +67,2 @@ }

exports.Hasher = Hasher;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxxREFBeUM7QUFFekMsK0NBQW9EO0FBQ3BELG1EQUl5QjtBQUN6Qix1Q0FBd0Q7QUFDeEQseUNBQTJDO0FBQzNDLHFEQUkwQjtBQU8xQixTQUFTLE1BQU0sQ0FBQyxJQUF1QixFQUFFLFdBQW1CO0lBQzFELE9BQU8sT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxFQUFFLElBQUksRUFBRSxFQUFFLEVBQUUsQ0FBQyxJQUFJLEtBQUssV0FBVyxDQUFDLENBQUMsQ0FBQztBQUNoRSxDQUFDO0FBRUQsU0FBUyxTQUFTLENBQUMsS0FBZSxFQUFFLFdBQW1CO0lBQ3JELE9BQU8sS0FBSyxDQUFDLE9BQU8sQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDekMsQ0FBQztBQUVELFNBQWdCLFVBQVUsQ0FDeEIsZUFBeUIsRUFDekIsS0FBZSxFQUNmLElBQXVCLEVBQ3ZCLFVBQXlCO0lBRXpCLGVBQWUsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLEVBQUU7UUFDN0IsTUFBTSxjQUFjLEdBQUcsa0NBQWlCLENBQUMsVUFBVSxFQUFFLElBQUksQ0FBQyxDQUFDO1FBRTNELEl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yxDQUFDLFlBQVk7UUFDdkIsT0FBTyxpQ0FBbUIsQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQztJQUNoRSxDQUFDO0NBQ0Y7QUFqRUQsd0JBaUVDIn0=
import { ParsedYarnLock } from "./yarnLock";
import { WorkspaceInfo } from "./yarnWorkspaces";
export declare type Dependencies = {
[key in string]: string;
[key in string]: string;
};
export declare type ExternalDependenciesQueue = {
name: string;
versionRange: string;
name: string;
versionRange: string;
}[];
export declare function filterExternalDependencies(dependencies: Dependencies, workspaces: WorkspaceInfo): Dependencies;
export declare function addToQueue(dependencies: Dependencies | undefined, done: string[], queue: [string, string][]): void;
export declare function resolveExternalDependencies(allDependencies: Dependencies, workspaces: WorkspaceInfo, yarnLock: ParsedYarnLock): string[];
//# sourceMappingURL=resolveExternalDependencies.d.ts.map
export declare function filterExternalDependencies(
dependencies: Dependencies,
workspaces: WorkspaceInfo
): Dependencies;
export declare function addToQueue(
dependencies: Dependencies | undefined,
done: string[],
queue: [string, string][]
): void;
export declare function resolveExternalDependencies(
allDependencies: Dependencies,
workspaces: WorkspaceInfo,
yarnLock: ParsedYarnLock
): string[];
//# sourceMappingURL=resolveExternalDependencies.d.ts.map

@@ -7,55 +7,70 @@ "use strict";

function filterExternalDependencies(dependencies, workspaces) {
const workspacePackageNames = yarnWorkspaces_1.listOfWorkspacePackageNames(workspaces);
const externalDependencies = {};
Object.entries(dependencies).forEach(([name, versionRange]) => {
if (workspacePackageNames.indexOf(name) < 0) {
externalDependencies[name] = versionRange;
}
});
return externalDependencies;
const workspacePackageNames = yarnWorkspaces_1.listOfWorkspacePackageNames(
workspaces
);
const externalDependencies = {};
Object.entries(dependencies).forEach(([name, versionRange]) => {
if (workspacePackageNames.indexOf(name) < 0) {
externalDependencies[name] = versionRange;
}
});
return externalDependencies;
}
exports.filterExternalDependencies = filterExternalDependencies;
function isDone(done, key) {
return done.indexOf(key) >= 0;
return done.indexOf(key) >= 0;
}
function isInQueue(queue, key) {
return Boolean(queue.find(([name, versionRange]) => helpers_1.nameAtVersion(name, versionRange) === key));
return Boolean(
queue.find(
([name, versionRange]) =>
helpers_1.nameAtVersion(name, versionRange) === key
)
);
}
function addToQueue(dependencies, done, queue) {
if (dependencies) {
Object.entries(dependencies).forEach(([name, versionRange]) => {
const versionRangeSignature = helpers_1.nameAtVersion(name, versionRange);
if (!isDone(done, versionRangeSignature) &&
!isInQueue(queue, versionRangeSignature)) {
queue.push([name, versionRange]);
}
});
}
if (dependencies) {
Object.entries(dependencies).forEach(([name, versionRange]) => {
const versionRangeSignature = helpers_1.nameAtVersion(name, versionRange);
if (
!isDone(done, versionRangeSignature) &&
!isInQueue(queue, versionRangeSignature)
) {
queue.push([name, versionRange]);
}
});
}
}
exports.addToQueue = addToQueue;
function resolveExternalDependencies(allDependencies, workspaces, yarnLock) {
const externalDependencies = filterExternalDependencies(allDependencies, workspaces);
const done = [];
const doneRange = [];
const queue = Object.entries(externalDependencies);
while (queue.length > 0) {
const next = queue.shift();
if (!next) {
continue;
}
const [name, versionRange] = next;
doneRange.push(helpers_1.nameAtVersion(name, versionRange));
const lockFileResult = yarnLock_1.queryLockFile(name, versionRange, yarnLock);
if (lockFileResult) {
const { version, dependencies } = lockFileResult;
addToQueue(dependencies, doneRange, queue);
done.push(helpers_1.nameAtVersion(name, version));
}
else {
done.push(helpers_1.nameAtVersion(name, versionRange));
}
const externalDependencies = filterExternalDependencies(
allDependencies,
workspaces
);
const done = [];
const doneRange = [];
const queue = Object.entries(externalDependencies);
while (queue.length > 0) {
const next = queue.shift();
if (!next) {
continue;
}
return done;
const [name, versionRange] = next;
doneRange.push(helpers_1.nameAtVersion(name, versionRange));
const lockFileResult = yarnLock_1.queryLockFile(
name,
versionRange,
yarnLock
);
if (lockFileResult) {
const { version, dependencies } = lockFileResult;
addToQueue(dependencies, doneRange, queue);
done.push(helpers_1.nameAtVersion(name, version));
} else {
done.push(helpers_1.nameAtVersion(name, versionRange));
}
}
return done;
}
exports.resolveExternalDependencies = resolveExternalDependencies;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZUV4dGVybmFsRGVwZW5kZW5jaWVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3Jlc29sdmVFeHRlcm5hbERlcGVuZGVuY2llcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHVDQUEwQztBQUMxQyx5Q0FBMkQ7QUFDM0QscURBQThFO0FBUzlFLFNBQWdCLDBCQUEwQixDQUN4QyxZQUEwQixFQUMxQixVQUF5QjtJQUV6QixNQUFNLHFCQUFxQixHQUFHLDRDQUEyQixDQUFDLFVBQVUsQ0FBQyxDQUFDO0lBQ3RFLE1BQU0sb0JBQW9CLEdBQWlCLEVBQUUsQ0FBQztJQUU5QyxNQUFNLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsSUFBSSxFQUFFLFlBQVksQ0FBQyxFQUFFLEVBQUU7UUFDNUQsSUFBSSxxQkFBcUIsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFO1lBQzNDLG9CQUFvQixDQUFDLElBQUksQ0FBQyxHQUFHLFlBQVksQ0FBQztTQUMzQztJQUNILENBQUMsQ0FBQyxDQUFDO0lBRUgsT0FBTyxvQkFBb0IsQ0FBQztBQUM5QixDQUFDO0FBZEQsZ0VBY0M7QUFFRCxTQUFTLE1BQU0sQ0FBQyxJQUFjLEVBQUUsR0FBVztJQUN6QyxPQUFPLElBQUksQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2hDLENBQUM7QUFFRCxTQUFTLFNBQVMsQ0FBQyxLQUF5QixFQUFFLEdBQVc7SUFDdkQsT0FBTyxPQUFPLENBQ1osS0FBSyxDQU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UyxDQUFDLElBQUksQ0FBQyx1QkFBYSxDQUFDLElBQUksRUFBRSxZQUFZLENBQUMsQ0FBQyxDQUFDO1FBRWxELE1BQU0sY0FBYyxHQUFHLHdCQUFhLENBQUMsSUFBSSxFQUFFLFlBQVksRUFBRSxRQUFRLENBQUMsQ0FBQztRQUVuRSxJQUFJLGNBQWMsRUFBRTtZQUNsQixNQUFNLEVBQUUsT0FBTyxFQUFFLFlBQVksRUFBRSxHQUFHLGNBQWMsQ0FBQztZQUVqRCxVQUFVLENBQUMsWUFBWSxFQUFFLFNBQVMsRUFBRSxLQUFLLENBQUMsQ0FBQztZQUMzQyxJQUFJLENBQUMsSUFBSSxDQUFDLHVCQUFhLENBQUMsSUFBSSxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUM7U0FDekM7YUFBTTtZQUNMLElBQUksQ0FBQyxJQUFJLENBQUMsdUJBQWEsQ0FBQyxJQUFJLEVBQUUsWUFBWSxDQUFDLENBQUMsQ0FBQztTQUM5QztLQUNGO0lBRUQsT0FBTyxJQUFJLENBQUM7QUFDZCxDQUFDO0FBckNELGtFQXFDQyJ9
import { WorkspaceInfo } from "./yarnWorkspaces";
export declare type Dependencies = {
[key in string]: string;
[key in string]: string;
};
export declare function filterInternalDependencies(dependencies: Dependencies, workspaces: WorkspaceInfo): string[];
export declare function resolveInternalDependencies(allDependencies: Dependencies, workspaces: WorkspaceInfo): string[];
//# sourceMappingURL=resolveInternalDependencies.d.ts.map
export declare function filterInternalDependencies(
dependencies: Dependencies,
workspaces: WorkspaceInfo
): string[];
export declare function resolveInternalDependencies(
allDependencies: Dependencies,
workspaces: WorkspaceInfo
): string[];
//# sourceMappingURL=resolveInternalDependencies.d.ts.map

@@ -5,11 +5,18 @@ "use strict";

function filterInternalDependencies(dependencies, workspaces) {
const workspacePackageNames = yarnWorkspaces_1.listOfWorkspacePackageNames(workspaces);
return Object.keys(dependencies).filter(dependency => workspacePackageNames.indexOf(dependency) >= 0);
const workspacePackageNames = yarnWorkspaces_1.listOfWorkspacePackageNames(
workspaces
);
return Object.keys(dependencies).filter(
dependency => workspacePackageNames.indexOf(dependency) >= 0
);
}
exports.filterInternalDependencies = filterInternalDependencies;
function resolveInternalDependencies(allDependencies, workspaces) {
const dependencyNames = filterInternalDependencies(allDependencies, workspaces);
return dependencyNames;
const dependencyNames = filterInternalDependencies(
allDependencies,
workspaces
);
return dependencyNames;
}
exports.resolveInternalDependencies = resolveInternalDependencies;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZUludGVybmFsRGVwZW5kZW5jaWVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3Jlc29sdmVJbnRlcm5hbERlcGVuZGVuY2llcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHFEQUE4RTtBQUk5RSxTQUFnQiwwQkFBMEIsQ0FDeEMsWUFBMEIsRUFDMUIsVUFBeUI7SUFFekIsTUFBTSxxQkFBcUIsR0FBRyw0Q0FBMkIsQ0FBQyxVQUFVLENBQUMsQ0FBQztJQUN0RSxPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLENBQUMsTUFBTSxDQUNyQyxVQUFVLENBQUMsRUFBRSxDQUFDLHFCQUFxQixDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLENBQzdELENBQUM7QUFDSixDQUFDO0FBUkQsZ0VBUUM7QUFFRCxTQUFnQiwyQkFBMkIsQ0FDekMsZUFBNkIsRUFDN0IsVUFBeUI7SUFFekIsTUFBTSxlQUFlLEdBQUcsMEJBQTBCLENBQ2hELGVBQWUsRUFDZixVQUFVLENBQ1gsQ0FBQztJQUVGLE9BQU8sZUFBZSxDQUFDO0FBQ3pCLENBQUM7QUFWRCxrRUFVQyJ9
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZUludGVybmFsRGVwZW5kZW5jaWVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3Jlc29sdmVJbnRlcm5hbERlcGVuZGVuY2llcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHFEQUE4RTtBQUk5RSxTQUFnQiwwQkFBMEIsQ0FDeEMsWUFBMEIsRUFDMUIsVUFBeUI7SUFFekIsTUFBTSxxQkFBcUIsR0FBRyw0Q0FBMkIsQ0FBQyxVQUFVLENBQUMsQ0FBQztJQUN0RSxPQUFPLE1BQU0sQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLENBQUMsTUFBTSxDQUNyQyxVQUFVLENBQUMsRUFBRSxDQUFDLHFCQUFxQixDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLENBQzdELENBQUM7QUFDSixDQUFDO0FBUkQsZ0VBUUM7QUFFRCxTQUFnQiwyQkFBMkIsQ0FDekMsZUFBNkIsRUFDN0IsVUFBeUI7SUFFekIsTUFBTSxlQUFlLEdBQUcsMEJBQTBCLENBQ2hELGVBQWUsRUFDZixVQUFVLENBQ1gsQ0FBQztJQUVGLE9BQU8sZUFBZSxDQUFDO0FBQ3pCLENBQUM7QUFWRCxrRUFVQyJ9
import { Dependencies } from "./resolveExternalDependencies";
declare type YarnLockDependency = {
version: string;
dependencies?: Dependencies;
version: string;
dependencies?: Dependencies;
};
export declare type ParsedYarnLock = {
type: "success" | "merge" | "conflict";
object: {
[key in string]: YarnLockDependency;
};
type: "success" | "merge" | "conflict";
object: {
[key in string]: YarnLockDependency;
};
};
export declare function parseLockFile(packageRoot: string): Promise<ParsedYarnLock>;
export declare function queryLockFile(name: string, versionRange: string, yarnLock: ParsedYarnLock): YarnLockDependency;
export declare function parseLockFile(
packageRoot: string
): Promise<ParsedYarnLock>;
export declare function queryLockFile(
name: string,
versionRange: string,
yarnLock: ParsedYarnLock
): YarnLockDependency;
export {};
//# sourceMappingURL=yarnLock.d.ts.map
//# sourceMappingURL=yarnLock.d.ts.map
"use strict";
var __importDefault =
(this && this.__importDefault) ||
function(mod) {
return mod && mod.__esModule ? mod : { default: mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const findUp = require("find-up");
const fs = require("fs-extra");
const lockfile = require("@yarnpkg/lockfile");
const find_up_1 = __importDefault(require("find-up"));
const fs_extra_1 = __importDefault(require("fs-extra"));
const lockfile_1 = require("@yarnpkg/lockfile");
const helpers_1 = require("./helpers");
const memoization = {};
async function parseLockFile(packageRoot) {
const yarnLockPath = await findUp("yarn.lock", { cwd: packageRoot });
if (!yarnLockPath) {
throw new Error("Could not find a yarn.lock file. The hashing algorithm requires you to use yarn.");
}
const yarnLock = fs.readFileSync(yarnLockPath).toString();
return lockfile.parse(yarnLock);
const yarnLockPath = await find_up_1.default("yarn.lock", {
cwd: packageRoot
});
if (!yarnLockPath) {
throw new Error(
"Could not find a yarn.lock file. The hashing algorithm requires you to use yarn."
);
}
if (memoization[yarnLockPath]) {
return memoization[yarnLockPath];
}
const yarnLock = fs_extra_1.default.readFileSync(yarnLockPath).toString();
const parsed = lockfile_1.parse(yarnLock);
memoization[yarnLockPath] = parsed;
return parsed;
}
exports.parseLockFile = parseLockFile;
function queryLockFile(name, versionRange, yarnLock) {
const versionRangeSignature = helpers_1.nameAtVersion(name, versionRange);
return yarnLock.object[versionRangeSignature];
const versionRangeSignature = helpers_1.nameAtVersion(name, versionRange);
return yarnLock.object[versionRangeSignature];
}
exports.queryLockFile = queryLockFile;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieWFybkxvY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMveWFybkxvY2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxrQ0FBa0M7QUFDbEMsK0JBQStCO0FBQy9CLDhDQUE4QztBQUc5Qyx1Q0FBMEM7QUFjbkMsS0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UUsR0FBRyxFQUFFLFdBQVcsRUFBRSxDQUFDLENBQUM7SUFFckUsSUFBSSxDQUFDLFlBQVksRUFBRTtRQUNqQixNQUFNLElBQUksS0FBSyxDQUNiLGtGQUFrRixDQUNuRixDQUFDO0tBQ0g7SUFFRCxJQUFJLFdBQVcsQ0FBQyxZQUFZLENBQUMsRUFBRTtRQUM3QixPQUFPLFdBQVcsQ0FBQyxZQUFZLENBQUMsQ0FBQztLQUNsQztJQUVELE1BQU0sUUFBUSxHQUFHLGtCQUFFLENBQUMsWUFBWSxDQUFDLFlBQVksQ0FBQyxDQUFDLFFBQVEsRUFBRSxDQUFDO0lBQzFELE1BQU0sTUFBTSxHQUFHLGdCQUFLLENBQUMsUUFBUSxDQUFDLENBQUM7SUFFL0IsV0FBVyxDQUFDLFlBQVksQ0FBQyxHQUFHLE1BQU0sQ0FBQztJQUVuQyxPQUFPLE1BQU0sQ0FBQztBQUNoQixDQUFDO0FBckJELHNDQXFCQztBQUVELFNBQWdCLGFBQWEsQ0FDM0IsSUFBWSxFQUNaLFlBQW9CLEVBQ3BCLFFBQXdCO0lBRXhCLE1BQU0scUJBQXFCLEdBQUcsdUJBQWEsQ0FBQyxJQUFJLEVBQUUsWUFBWSxDQUFDLENBQUM7SUFDaEUsT0FBTyxRQUFRLENBQUMsTUFBTSxDQUFDLHFCQUFxQixDQUFDLENBQUM7QUFDaEQsQ0FBQztBQVBELHNDQU9DIn0=

@@ -5,3 +5,3 @@ export declare type WorkspaceInfo = {

}[];
export declare function getWorkspacePackageInfo(workspacePaths?: string[]): WorkspaceInfo;
export declare function getWorkspacePackageInfo(workspacePaths: string[]): WorkspaceInfo;
export declare function listOfWorkspacePackageNames(workspaces: WorkspaceInfo): string[];

@@ -8,0 +8,0 @@ export declare function findWorkspacePath(workspaces: WorkspaceInfo, packageName: string): string | undefined;

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const fg = require("fast-glob");
const findWorkspaceRoot = require("find-yarn-workspace-root");
const path_1 = __importDefault(require("path"));
const fast_glob_1 = __importDefault(require("fast-glob"));
const find_yarn_workspace_root_1 = __importDefault(require("find-yarn-workspace-root"));
function getYarnWorkspaceRoot(cwd) {
const yarnWorkspacesRoot = findWorkspaceRoot(cwd);
const yarnWorkspacesRoot = find_yarn_workspace_root_1.default(cwd);
if (!yarnWorkspacesRoot) {

@@ -14,3 +17,3 @@ throw new Error("Could not find yarn workspaces root");

function getRootPackageJson(yarnWorkspacesRoot) {
const packageJson = require(path.join(yarnWorkspacesRoot, "package.json"));
const packageJson = require(path_1.default.join(yarnWorkspacesRoot, "package.json"));
if (!packageJson) {

@@ -32,3 +35,3 @@ throw new Error("Could not load package.json from workspaces root");

function getPackagePaths(yarnWorkspacesRoot, packages) {
const packagePaths = packages.map(glob => fg.sync(glob, {
const packagePaths = packages.map(glob => fast_glob_1.default.sync(glob, {
cwd: yarnWorkspacesRoot,

@@ -38,5 +41,11 @@ onlyDirectories: true,

}));
return packagePaths.reduce((acc, cur) => {
/*
* fast-glob returns unix style path,
* so we use path.join to align the path with the platform.
*/
return packagePaths
.reduce((acc, cur) => {
return [...acc, ...cur];
});
})
.map(p => path_1.default.join(p));
}

@@ -50,3 +59,3 @@ function getWorkspacePackageInfo(workspacePaths) {

try {
name = require(path.join(workspacePath, "package.json")).name;
name = require(path_1.default.join(workspacePath, "package.json")).name;
}

@@ -91,2 +100,2 @@ catch {

exports.getYarnWorkspaces = getYarnWorkspaces;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieWFybldvcmtzcGFjZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMveWFybldvcmtzcGFjZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSw2QkFBNkI7QUFDN0IsZ0NBQWdDO0FBRWhDLDhEQUE4RDtBQ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@@ {

},
"version": "3.1.0-alpha.0",
"version": "4.0.0",
"main": "lib/index.js",

@@ -21,15 +21,14 @@ "scripts": {

"@yarnpkg/lockfile": "^1.1.0",
"backfill-config": "^3.0.0-alpha.0",
"backfill-logger": "^3.0.0-alpha.0",
"backfill-config": "^4.0.0",
"backfill-logger": "^4.0.0",
"fast-glob": "^3.0.4",
"find-up": "^4.1.0",
"find-yarn-workspace-root": "^1.2.1",
"fs-extra": "^8.1.0",
"normalize-path": "^3.0.0"
"fs-extra": "^8.1.0"
},
"devDependencies": {
"@types/fs-extra": "^8.0.0",
"@types/normalize-path": "^3.0.0",
"@types/yarnpkg__lockfile": "^1.1.3",
"backfill-utils-test": "^3.0.0-alpha.0",
"backfill-utils-tsconfig": "^2.0.3",
"backfill-utils-test": "^4.0.0",
"backfill-utils-tsconfig": "^4.0.0",
"jest": "^24.0.12",

@@ -39,3 +38,3 @@ "ts-jest": "^25.1.0",

},
"gitHead": "ff8429c51760c2fbcf9324a707226459489ac19d"
"gitHead": "895732a868c0d856f623a2e7ce668194a9c162c0"
}
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