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 3.0.0-rc.27 to 3.0.0-rc.28

4

lib/MountFS.d.ts

@@ -21,2 +21,3 @@ /// <reference types="node" />

maxOpenFiles?: number;
typeCheck?: number | null;
useCache?: boolean;

@@ -53,6 +54,7 @@ /**

private readonly maxOpenFiles;
private readonly typeCheck;
private isMount;
private notMount;
private realPaths;
constructor({ baseFs, filter, magicByte, maxOpenFiles, useCache, maxAge, getMountPoint, factoryPromise, factorySync }: MountFSOptions<MountedFS>);
constructor({ baseFs, filter, magicByte, maxOpenFiles, useCache, maxAge, typeCheck, getMountPoint, factoryPromise, factorySync }: MountFSOptions<MountedFS>);
getExtractHint(hints: ExtractHintOptions): boolean;

@@ -59,0 +61,0 @@ getRealPath(): PortablePath;

@@ -20,3 +20,3 @@ "use strict";

class MountFS extends FakeFS_1.BasePortableFakeFS {
constructor({ baseFs = new NodeFS_1.NodeFS(), filter = null, magicByte = 0x2a, maxOpenFiles = Infinity, useCache = true, maxAge = 5000, getMountPoint, factoryPromise, factorySync }) {
constructor({ baseFs = new NodeFS_1.NodeFS(), filter = null, magicByte = 0x2a, maxOpenFiles = Infinity, useCache = true, maxAge = 5000, typeCheck = fs_1.constants.S_IFREG, getMountPoint, factoryPromise, factorySync }) {
if (Math.floor(magicByte) !== magicByte || !(magicByte > 1 && magicByte <= 127))

@@ -40,2 +40,3 @@ throw new Error(`The magic byte must be set to a round value between 1 and 127 included`);

this.maxOpenFiles = maxOpenFiles;
this.typeCheck = typeCheck;
}

@@ -746,3 +747,3 @@ getExtractHint(hints) {

try {
if (!this.baseFs.lstatSync(filePath).isFile()) {
if (this.typeCheck !== null && (this.baseFs.lstatSync(filePath).mode & fs_1.constants.S_IFMT) !== this.typeCheck) {
this.notMount.add(filePath);

@@ -749,0 +750,0 @@ continue;

@@ -15,2 +15,3 @@ declare enum PathType {

dot: PortablePath;
parent: PortablePath;
};

@@ -17,0 +18,0 @@ export type Filename = string & {

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

dot: `.`,
parent: `..`,
};

@@ -17,0 +18,0 @@ exports.Filename = {

{
"name": "@yarnpkg/fslib",
"version": "3.0.0-rc.27",
"version": "3.0.0-rc.28",
"stableVersion": "2.8.0",

@@ -16,3 +16,3 @@ "license": "BSD-2-Clause",

"devDependencies": {
"@yarnpkg/libzip": "^3.0.0-rc.27"
"@yarnpkg/libzip": "^3.0.0-rc.28"
},

@@ -19,0 +19,0 @@ "scripts": {

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