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

@pnpm/cafs

Package Overview
Dependencies
Maintainers
3
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/cafs - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

8

CHANGELOG.md
# @pnpm/cafs
## 3.0.4
### Patch Changes
- ef0ca24be: Use graceful-fs for reading files.
- Updated dependencies [a2aeeef88]
- @pnpm/graceful-fs@1.0.0
## 3.0.3

@@ -4,0 +12,0 @@

7

lib/addFilesFromDir.js

@@ -8,2 +8,3 @@ "use strict";

const path_1 = __importDefault(require("path"));
const graceful_fs_1 = __importDefault(require("@pnpm/graceful-fs"));
const p_limit_1 = __importDefault(require("p-limit"));

@@ -33,3 +34,3 @@ const parseJson_1 = require("./parseJson");

if ((deferredManifest != null) && rootDir === currDir && file === 'package.json') {
const buffer = await fs_1.promises.readFile(fullPath);
const buffer = await graceful_fs_1.default.readFile(fullPath);
parseJson_1.parseJsonBuffer(buffer, deferredManifest);

@@ -39,6 +40,6 @@ return cafs.addBuffer(buffer, stat.mode);

if (stat.size < MAX_BULK_SIZE) {
const buffer = await fs_1.promises.readFile(fullPath);
const buffer = await graceful_fs_1.default.readFile(fullPath);
return cafs.addBuffer(buffer, stat.mode);
}
return cafs.addStream(fs_1.createReadStream(fullPath), stat.mode);
return cafs.addStream(graceful_fs_1.default.createReadStream(fullPath), stat.mode);
});

@@ -45,0 +46,0 @@ index[relativePath] = {

@@ -8,2 +8,3 @@ "use strict";

const fs_1 = require("fs");
const graceful_fs_1 = __importDefault(require("@pnpm/graceful-fs"));
const rimraf_1 = __importDefault(require("@zkochan/rimraf"));

@@ -43,3 +44,3 @@ const p_limit_1 = __importDefault(require("p-limit"));

if (deferredManifest != null) {
parseJson_1.parseJsonBuffer(await fs_1.promises.readFile(filename), deferredManifest);
parseJson_1.parseJsonBuffer(await graceful_fs_1.default.readFile(filename), deferredManifest);
}

@@ -53,3 +54,3 @@ // If a file was not edited, we are skipping integrity check.

if (expectedFile.size > MAX_BULK_SIZE && (deferredManifest == null)) {
const ok = Boolean(await ssri_1.default.checkStream(fs_1.createReadStream(filename), expectedFile.integrity));
const ok = Boolean(await ssri_1.default.checkStream(graceful_fs_1.default.createReadStream(filename), expectedFile.integrity));
if (!ok) {

@@ -60,3 +61,3 @@ await rimraf_1.default(filename);

}
const data = await fs_1.promises.readFile(filename);
const data = await graceful_fs_1.default.readFile(filename);
const ok = Boolean(ssri_1.default.checkData(data, expectedFile.integrity));

@@ -63,0 +64,0 @@ if (!ok) {

@@ -8,6 +8,7 @@ "use strict";

const path_1 = __importDefault(require("path"));
const graceful_fs_1 = __importDefault(require("@pnpm/graceful-fs"));
const dirs = new Set();
async function default_1(fileDest, buffer, mode) {
await makeDirForFile(fileDest);
await fs_1.promises.writeFile(fileDest, buffer, { mode });
await graceful_fs_1.default.writeFile(fileDest, buffer, { mode });
}

@@ -14,0 +15,0 @@ exports.default = default_1;

{
"name": "@pnpm/cafs",
"version": "3.0.3",
"version": "3.0.4",
"description": "A content-addressable filesystem for the packages storage",

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

"@pnpm/fetcher-base": "11.0.0",
"@pnpm/graceful-fs": "1.0.0",
"@pnpm/store-controller-types": "11.0.2",

@@ -13,0 +14,0 @@ "@zkochan/rimraf": "^2.1.1",

Sorry, the diff of this file is not supported yet

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