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

fixturify-project

Package Overview
Dependencies
Maintainers
5
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fixturify-project - npm Package Compare versions

Comparing version 7.0.0 to 7.1.0-alpha.0

3

dist/index.d.ts

@@ -151,3 +151,3 @@ import fixturify from 'fixturify';

dispose(): void;
protected writeProject(): void;
private writeProject;
private assignBaseDirs;

@@ -159,2 +159,3 @@ private writeFiles;

private writeLinkedPackage;
private publishedPackageContents;
private hardLinkContents;

@@ -161,0 +162,0 @@ private hardLinkFile;

@@ -9,5 +9,5 @@ // src/index.ts

import binLinks from "bin-links";
import walkSync from "walk-sync";
import deepmerge from "deepmerge";
var { entries } = walkSync;
import Arborist from "@npmcli/arborist";
import packList from "npm-packlist";
tmp.setGracefulCleanup();

@@ -115,3 +115,3 @@ var defaultFiles = {

}
this.writeProject();
await this.writeProject();
await this.binLinks();

@@ -200,7 +200,7 @@ }

}
writeProject() {
async writeProject() {
this.assignBaseDirs();
let resolvedLinksMap = /* @__PURE__ */ new Map();
this.writeFiles(resolvedLinksMap);
this.finalizeWrite(resolvedLinksMap);
await this.finalizeWrite(resolvedLinksMap);
}

@@ -227,5 +227,5 @@ assignBaseDirs() {

}
finalizeWrite(resolvedLinksMap) {
async finalizeWrite(resolvedLinksMap) {
for (let [name, { dir: target }] of resolvedLinksMap.get(this)) {
this.writeLinkedPackage(name, target, path.join(this.baseDir, "node_modules", name));
await this.writeLinkedPackage(name, target, path.join(this.baseDir, "node_modules", name));
}

@@ -271,3 +271,3 @@ for (let depList of [this.dependencyProjects(), this.devDependencyProjects()]) {

}
writeLinkedPackage(name, target, destination) {
async writeLinkedPackage(name, target, destination) {
var _a;

@@ -280,3 +280,3 @@ let targetPkg = fs.readJsonSync(`${target}/package.json`);

}
this.hardLinkContents(target, destination);
await this.hardLinkContents(target, destination);
for (let section of ["dependencies", "peerDependencies"]) {

@@ -294,3 +294,3 @@ if (targetPkg[section]) {

}
this.writeLinkedPackage(depName, path.dirname(depTarget), path.join(destination, "node_modules", depName));
await this.writeLinkedPackage(depName, path.dirname(depTarget), path.join(destination, "node_modules", depName));
}

@@ -300,10 +300,11 @@ }

}
hardLinkContents(target, destination) {
async publishedPackageContents(targetDir) {
let tree = await new Arborist({ path: targetDir }).loadActual();
return await packList(tree);
}
async hardLinkContents(target, destination) {
fs.ensureDirSync(destination);
for (let entry of entries(target, { ignore: ["node_modules"] })) {
if (entry.isDirectory()) {
fs.ensureDirSync(path.join(destination, entry.relativePath));
} else {
this.hardLinkFile(entry.fullPath, path.join(destination, entry.relativePath));
}
for (let relativePath of await this.publishedPackageContents(target)) {
fs.ensureDirSync(path.dirname(path.join(destination, relativePath)));
this.hardLinkFile(path.join(target, relativePath), path.join(destination, relativePath));
}

@@ -310,0 +311,0 @@ }

{
"name": "fixturify-project",
"version": "7.0.0",
"version": "7.1.0-alpha.0",
"repository": "git@github.com:stefanpenner/node-fixturify-project",

@@ -22,3 +22,3 @@ "license": "MIT",

"scripts": {
"build": "tsup-node src/index.ts --format cjs,esm --external 'fs-extra' --dts --clean",
"build": "tsup-node src/index.ts --format cjs,esm --dts --clean",
"docs:generate": "readme-api-generator src/index.ts --ts",

@@ -31,9 +31,11 @@ "lint": "pnpm prettier --check *.ts",

"dependencies": {
"@npmcli/arborist": "^7.5.0",
"bin-links": "^3.0.0",
"deepmerge": "^4.2.2",
"fs-extra": "^10.0.0",
"fixturify": "^3.0.0",
"npm-packlist": "^8.0.2",
"resolve-package-path": "^4.0.3",
"tmp": "^0.0.33",
"type-fest": "^4.1.0",
"walk-sync": "^3.0.0"
"type-fest": "^4.1.0"
},

@@ -45,5 +47,6 @@ "devDependencies": {

"@types/node": "^16.9.1",
"@types/npm-packlist": "^7.0.3",
"@types/npmcli__arborist": "^5.6.6",
"@types/tmp": "^0.0.33",
"chai": "^4.3.4",
"fs-extra": "^10.0.0",
"prettier": "^2.3.0",

@@ -55,3 +58,4 @@ "release-it": "^14.2.1",

"vite": "^5.2.7",
"vitest": "^0.9.3"
"vitest": "^0.9.3",
"walk-sync": "^3.0.0"
},

@@ -58,0 +62,0 @@ "engines": {

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