Socket
Socket
Sign inDemoInstall

@platform/fs

Package Overview
Dependencies
66
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.3 to 0.5.4

2

lib/stream/stream.d.ts

@@ -1,1 +0,1 @@

export declare function save(path: string, data: ReadableStream): Promise<void>;
export declare function save(path: string, data: ReadableStream | string): Promise<void>;

@@ -15,15 +15,22 @@ "use strict";

case 0:
_a.trys.push([0, 3, , 4]);
_a.trys.push([0, 6, , 7]);
return [4, fs_extra_1.ensureDir(path_1.dirname(path))];
case 1:
_a.sent();
if (!(typeof data === 'string')) return [3, 3];
return [4, fs_extra_1.writeFile(path, data)];
case 2:
_a.sent();
return [3, 5];
case 3:
output = fs_extra_1.createWriteStream(path);
return [4, pipeline(data, output)];
case 2:
case 4:
_a.sent();
return [3, 4];
case 3:
_a.label = 5;
case 5: return [3, 7];
case 6:
err_1 = _a.sent();
throw new Error("Failed to save stream to '" + path + "'. " + err_1.message);
case 4: return [2];
case 7: return [2];
}

@@ -30,0 +37,0 @@ });

{
"name": "@platform/fs",
"version": "0.5.3",
"version": "0.5.4",
"description": "File-system tools.",

@@ -5,0 +5,0 @@ "main": "lib/index",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc