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

@yarnpkg/fslib

Package Overview
Dependencies
Maintainers
6
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yarnpkg/fslib - npm Package Compare versions

Comparing version 2.6.1 to 2.6.2

1

lib/algorithms/opendir.d.ts
/// <reference types="node" />
/// <reference types="node" />
import { NoParamCallback } from 'fs';

@@ -3,0 +4,0 @@ import { Dir, Dirent, FakeFS } from '../FakeFS';

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { EventEmitter } from 'events';

@@ -3,0 +6,0 @@ import { BigIntStats, Stats } from 'fs';

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { EventEmitter } from 'events';

@@ -3,0 +7,0 @@ import { Dirent as NodeDirent, ReadStream } from 'fs';

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import fs, { BigIntStats, Stats } from 'fs';

@@ -3,0 +6,0 @@ import { CreateReadStreamOptions, CreateWriteStreamOptions, Dir, StatWatcher, WatchFileCallback, WatchFileOptions, OpendirOptions } from './FakeFS';

/// <reference types="node" />
/// <reference types="node" />
import fs from 'fs';

@@ -3,0 +4,0 @@ import { FakeFS } from './FakeFS';

14

lib/patchFs.js

@@ -262,11 +262,19 @@ "use strict";

{
// Override the promisified version of `fs.read` to return an object as per
// TODO add promisified `fs.readv` and `fs.writev`, once they are implemented
// Override the promisified versions of `fs.read` and `fs.write` to return an object as per
// https://github.com/nodejs/node/blob/dc79f3f37caf6f25b8efee4623bec31e2c20f595/lib/fs.js#L559-L560
// and
// https://github.com/nodejs/node/blob/dc79f3f37caf6f25b8efee4623bec31e2c20f595/lib/fs.js#L690-L691
// and
// https://github.com/nodejs/node/blob/ba684805b6c0eded76e5cd89ee00328ac7a59365/lib/internal/util.js#L293
// @ts-expect-error
patchedFs.read[util_1.promisify.custom] = async (p, buffer, ...args) => {
const res = fakeFs.readPromise(p, buffer, ...args);
patchedFs.read[util_1.promisify.custom] = async (fd, buffer, ...args) => {
const res = fakeFs.readPromise(fd, buffer, ...args);
return { bytesRead: await res, buffer };
};
// @ts-expect-error
patchedFs.write[util_1.promisify.custom] = async (fd, buffer, ...args) => {
const res = fakeFs.writePromise(fd, buffer, ...args);
return { bytesWritten: await res, buffer };
};
}

@@ -273,0 +281,0 @@ }

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { Stats, BigIntStats } from 'fs';

@@ -3,0 +6,0 @@ import { CreateReadStreamOptions, CreateWriteStreamOptions, FakeFS, ExtractHintOptions, WatchFileCallback, WatchFileOptions, StatWatcher, Dir, OpendirOptions } from './FakeFS';

/// <reference types="node" />
/// <reference types="node" />
import { BigIntStats, Stats } from 'fs';

@@ -3,0 +4,0 @@ import { Filename } from './path';

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { Libzip } from '@yarnpkg/libzip';

@@ -3,0 +5,0 @@ import { ReadStream, WriteStream } from 'fs';

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { Libzip } from '@yarnpkg/libzip';

@@ -3,0 +6,0 @@ import { BigIntStats, Stats } from 'fs';

{
"name": "@yarnpkg/fslib",
"version": "2.6.1",
"version": "2.6.2",
"license": "BSD-2-Clause",

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

"dependencies": {
"@yarnpkg/libzip": "^2.2.3",
"@yarnpkg/libzip": "^2.2.4",
"tslib": "^1.13.0"

@@ -11,0 +11,0 @@ },

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