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

temp-file

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

temp-file - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

5

out/main.d.ts
export declare function getTempName(prefix?: string | null | undefined): string;
export interface GetTempFileOptions {
disposer: ((file: string) => Promise<void>) | null;
disposer?: ((file: string) => Promise<void>) | null;
prefix?: string | null;
isDir?: boolean;
}

@@ -11,5 +12,5 @@ export declare class TmpDir {

createTempDir(suffix?: string): Promise<string>;
getTempFile(suffix: string | null, isDir?: boolean, options?: GetTempFileOptions): Promise<string>;
getTempFile(suffix: string | null, options?: GetTempFileOptions): Promise<string>;
cleanupSync(): void;
cleanup(): Promise<any>;
}

12

out/main.js

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

}
const IS_DIR_OPTIONS = { isDir: true };
class TmpDir {

@@ -97,3 +98,3 @@ constructor() {

return this.getTempFile(suffix, true);
return this.getTempFile(suffix, IS_DIR_OPTIONS);
}

@@ -103,8 +104,5 @@ createTempDir() {

return this.getTempFile(suffix, true).then(it => (0, (_fsExtraP || _load_fsExtraP()).mkdir)(it).then(() => it));
return this.getTempFile(suffix, IS_DIR_OPTIONS).then(it => (0, (_fsExtraP || _load_fsExtraP()).mkdir)(it).then(() => it));
}
getTempFile(suffix) {
let isDir = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
let options = arguments[2];
getTempFile(suffix, options) {
return tempDir.value.then(it => {

@@ -120,3 +118,3 @@ if (!this.registered) {

path: result,
isDir,
isDir: options != null && options.isDir === true,
disposer: options == null ? null : options.disposer

@@ -123,0 +121,0 @@ });

{
"name": "temp-file",
"version": "2.0.0",
"version": "2.0.1",
"main": "out/main.js",

@@ -5,0 +5,0 @@ "author": "Vladimir Krivosheev",

Sorry, the diff of this file is not supported yet

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