filesystem-sandbox
Advanced tools
Comparing version 1.12.0 to 1.13.0
@@ -15,3 +15,3 @@ /// <reference types="node" /> | ||
private tryDestroySelf; | ||
writeFile(at: string, contents: string | Buffer): Promise<string>; | ||
writeFile(at: string, contents: string | Buffer | string[]): Promise<string>; | ||
mkdir(name: string): Promise<string>; | ||
@@ -18,0 +18,0 @@ readTextFile(at: string): Promise<string>; |
@@ -112,2 +112,5 @@ "use strict"; | ||
: { encoding: "utf8" }; | ||
if (Array.isArray(contents)) { | ||
contents = contents.join("\n"); | ||
} | ||
await writeFile(fullPath, contents, options); | ||
@@ -173,3 +176,3 @@ return fullPath; | ||
static async destroyAny() { | ||
const target = path_1.default.join(process.cwd(), exports.basePrefix); | ||
const target = path_1.default.join(baseTarget, exports.basePrefix); | ||
await rimraf(target); | ||
@@ -176,0 +179,0 @@ } |
{ | ||
"name": "filesystem-sandbox", | ||
"version": "1.12.0", | ||
"version": "1.13.0", | ||
"description": "JavaScript module to provide filesystem sandboxes for testing", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
13486
232