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

@file-services/types

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@file-services/types - npm Package Compare versions

Comparing version 5.4.0 to 5.7.0

18

dist/base-api-sync.d.ts

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

import type { IFileSystemStats, BufferEncoding, WriteFileOptions, ReadFileOptions, IDirectoryEntry } from './common-fs-types.js';
import type { IFileSystemStats, BufferEncoding, WriteFileOptions, ReadFileOptions, IDirectoryEntry, StatSyncOptions } from './common-fs-types.js';
import type { IFileSystemPath } from './path.js';

@@ -84,7 +84,19 @@ import type { IWatchService } from './watch-api.js';

*/
statSync(path: string): IFileSystemStats;
statSync(path: string, options?: StatSyncOptions & {
throwIfNoEntry?: true;
}): IFileSystemStats;
statSync(path: string, options: StatSyncOptions & {
throwIfNoEntry: false;
}): IFileSystemStats | undefined;
statSync(path: string, options?: StatSyncOptions): IFileSystemStats | undefined;
/**
* Get path's `IFileSystemStats`. Does not dereference symbolic links.
*/
lstatSync(path: string): IFileSystemStats;
lstatSync(path: string, options?: StatSyncOptions & {
throwIfNoEntry?: true;
}): IFileSystemStats;
lstatSync(path: string, options: StatSyncOptions & {
throwIfNoEntry: false;
}): IFileSystemStats | undefined;
lstatSync(path: string, options?: StatSyncOptions): IFileSystemStats | undefined;
/**

@@ -91,0 +103,0 @@ * Get the canonicalized absolute pathname.

@@ -9,2 +9,9 @@ export declare type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'latin1' | 'binary' | 'hex';

export declare type CallbackFnVoid = (error?: Error | null) => void;
export interface StatSyncOptions {
/**
* Whether an exception will be thrown if no file system entry exists, rather than returning `undefined`.
* @default true
*/
throwIfNoEntry?: boolean;
}
export declare type WriteFileOptions = {

@@ -11,0 +18,0 @@ encoding?: BufferEncoding | null;

2

package.json
{
"name": "@file-services/types",
"description": "Common file system interfaces",
"version": "5.4.0",
"version": "5.7.0",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "files": [

@@ -7,2 +7,3 @@ import type {

IDirectoryEntry,
StatSyncOptions,
} from './common-fs-types.js';

@@ -93,3 +94,5 @@ import type { IFileSystemPath } from './path.js';

*/
statSync(path: string): IFileSystemStats;
statSync(path: string, options?: StatSyncOptions & { throwIfNoEntry?: true }): IFileSystemStats;
statSync(path: string, options: StatSyncOptions & { throwIfNoEntry: false }): IFileSystemStats | undefined;
statSync(path: string, options?: StatSyncOptions): IFileSystemStats | undefined;

@@ -99,3 +102,5 @@ /**

*/
lstatSync(path: string): IFileSystemStats;
lstatSync(path: string, options?: StatSyncOptions & { throwIfNoEntry?: true }): IFileSystemStats;
lstatSync(path: string, options: StatSyncOptions & { throwIfNoEntry: false }): IFileSystemStats | undefined;
lstatSync(path: string, options?: StatSyncOptions): IFileSystemStats | undefined;

@@ -102,0 +107,0 @@ /**

@@ -23,2 +23,10 @@ export type BufferEncoding =

export interface StatSyncOptions {
/**
* Whether an exception will be thrown if no file system entry exists, rather than returning `undefined`.
* @default true
*/
throwIfNoEntry?: boolean;
}
export type WriteFileOptions =

@@ -25,0 +33,0 @@ | {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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