@yarnpkg/libzip
Advanced tools
Comparing version 3.0.0-rc.27 to 3.0.0-rc.28
@@ -6,2 +6,5 @@ /// <reference types="node" /> | ||
import { ZipFS } from './ZipFS'; | ||
export declare function mountMemoryDrive(origFs: typeof fs, mountPoint: PortablePath, source?: Buffer): ZipFS; | ||
export type MemoryDriveOpts = { | ||
typeCheck?: number | null; | ||
}; | ||
export declare function mountMemoryDrive(origFs: typeof fs, mountPoint: PortablePath, source?: Buffer | null, opts?: MemoryDriveOpts): ZipFS; |
@@ -8,6 +8,6 @@ "use strict"; | ||
const ZipFS_1 = require("./ZipFS"); | ||
function mountMemoryDrive(origFs, mountPoint, source = Buffer.alloc(0)) { | ||
function mountMemoryDrive(origFs, mountPoint, source = Buffer.alloc(0), opts) { | ||
const archive = new ZipFS_1.ZipFS(source); | ||
const getMountPoint = (p) => { | ||
const detectedMountPoint = p.startsWith(`${mountPoint}/`) ? p.slice(0, mountPoint.length) : null; | ||
const detectedMountPoint = p === mountPoint || p.startsWith(`${mountPoint}/`) ? p.slice(0, mountPoint.length) : null; | ||
return detectedMountPoint; | ||
@@ -33,2 +33,3 @@ }; | ||
maxAge: Infinity, | ||
typeCheck: opts === null || opts === void 0 ? void 0 : opts.typeCheck, | ||
}); | ||
@@ -35,0 +36,0 @@ (0, fslib_1.patchFs)(fs_1.default, new fslib_1.PosixFS(mountFs)); |
{ | ||
"name": "@yarnpkg/libzip", | ||
"version": "3.0.0-rc.27", | ||
"version": "3.0.0-rc.28", | ||
"license": "BSD-2-Clause", | ||
@@ -45,7 +45,7 @@ "main": "./lib/sync.js", | ||
"@types/emscripten": "^1.39.6", | ||
"@yarnpkg/fslib": "^3.0.0-rc.27", | ||
"@yarnpkg/fslib": "^3.0.0-rc.28", | ||
"tslib": "^2.4.0" | ||
}, | ||
"peerDependencies": { | ||
"@yarnpkg/fslib": "^3.0.0-rc.27" | ||
"@yarnpkg/fslib": "^3.0.0-rc.28" | ||
}, | ||
@@ -52,0 +52,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
861649
13396
Updated@yarnpkg/fslib@^3.0.0-rc.28