Socket
Socket
Sign inDemoInstall

@platform/fs

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platform/fs - npm Package Compare versions

Comparing version 0.5.20 to 0.5.24

2

lib/common/libs.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dirname = exports.extname = exports.basename = exports.resolve = exports.join = exports.fs = exports.yaml = void 0;
exports.fs = exports.yaml = void 0;
var yaml = require("js-yaml");

@@ -5,0 +5,0 @@ exports.yaml = yaml;

import * as util from './util';
export declare class File<T> {
static loadAndParse: typeof util.loadAndParse;
static loadAndParseSync: typeof util.loadAndParseSync;
static stringifyAndSave: typeof util.stringifyAndSave;
static stringifyAndSaveSync: typeof util.stringifyAndSaveSync;
private constructor();
}
export declare const File: {
loadAndParse: typeof util.loadAndParse;
loadAndParseSync: typeof util.loadAndParseSync;
stringifyAndSave: typeof util.stringifyAndSave;
stringifyAndSaveSync: typeof util.stringifyAndSaveSync;
};

@@ -5,11 +5,7 @@ "use strict";

var util = require("./util");
var File = (function () {
function File() {
}
File.loadAndParse = util.loadAndParse;
File.loadAndParseSync = util.loadAndParseSync;
File.stringifyAndSave = util.stringifyAndSave;
File.stringifyAndSaveSync = util.stringifyAndSaveSync;
return File;
}());
exports.File = File;
exports.File = {
loadAndParse: util.loadAndParse,
loadAndParseSync: util.loadAndParseSync,
stringifyAndSave: util.stringifyAndSave,
stringifyAndSaveSync: util.stringifyAndSaveSync,
};

@@ -5,3 +5,2 @@ /// <reference types="node" />

import { t } from '../common';
import { File as file } from '../file';
import { glob } from '../glob';

@@ -32,3 +31,8 @@ import { is } from '../is';

sort: typeof sort;
file: typeof file;
file: {
loadAndParse: typeof import("../file/util").loadAndParse;
loadAndParseSync: typeof import("../file/util").loadAndParseSync;
stringifyAndSave: typeof import("../file/util").stringifyAndSave;
stringifyAndSaveSync: typeof import("../file/util").stringifyAndSaveSync;
};
ancestor: typeof ancestor;

@@ -120,6 +124,6 @@ merge: typeof merge;

pathExistsSync(path: string): boolean;
access(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void;
access(path: string | Buffer, mode?: number | undefined): Promise<void>;
appendFile(file: string | number | Buffer, data: any, options: {
access(path: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
access(path: fsExtra.PathLike, mode: number, callback: (err: NodeJS.ErrnoException) => void): void;
access(path: fsExtra.PathLike, mode?: number | undefined): Promise<void>;
appendFile(file: string | number | Buffer | import("url").URL, data: any, options: {
encoding?: string | undefined;

@@ -129,4 +133,4 @@ mode?: string | number | undefined;

}, callback: (err: NodeJS.ErrnoException) => void): void;
appendFile(file: string | number | Buffer, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
appendFile(file: string | number | Buffer, data: any, options?: {
appendFile(file: string | number | Buffer | import("url").URL, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
appendFile(file: string | number | Buffer | import("url").URL, data: any, options?: {
encoding?: string | undefined;

@@ -136,6 +140,6 @@ mode?: string | number | undefined;

} | undefined): Promise<void>;
chmod(path: string | Buffer, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
chmod(path: string | Buffer, mode: string | number): Promise<void>;
chown(path: string | Buffer, uid: number, gid: number): Promise<void>;
chown(path: string | Buffer, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
chmod(path: fsExtra.PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
chmod(path: fsExtra.PathLike, mode: string | number): Promise<void>;
chown(path: fsExtra.PathLike, uid: number, gid: number): Promise<void>;
chown(path: fsExtra.PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;

@@ -160,22 +164,25 @@ close(fd: number): Promise<void>;

futimes(fd: number, atime: Date, mtime: Date): Promise<void>;
lchown(path: string | Buffer, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
lchown(path: string | Buffer, uid: number, gid: number): Promise<void>;
link(srcpath: string | Buffer, dstpath: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
link(srcpath: string | Buffer, dstpath: string | Buffer): Promise<void>;
lstat(path: string | Buffer, callback: (err: NodeJS.ErrnoException, stats: fsExtra.Stats) => any): void;
lstat(path: string | Buffer): Promise<fsExtra.Stats>;
mkdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
mkdir(path: string | Buffer, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
mkdir(path: string | Buffer): Promise<void>;
open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
open(path: string | Buffer, flags: string | number, mode: number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
open(path: string | Buffer, flags: string | number, mode?: number | undefined): Promise<number>;
lchown(path: fsExtra.PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
lchown(path: fsExtra.PathLike, uid: number, gid: number): Promise<void>;
link(existingPath: fsExtra.PathLike, newPath: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
link(existingPath: fsExtra.PathLike, newPath: fsExtra.PathLike): Promise<void>;
lstat(path: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException, stats: fsExtra.Stats) => any): void;
lstat(path: fsExtra.PathLike): Promise<fsExtra.Stats>;
mkdir(path: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
mkdir(path: fsExtra.PathLike, options: string | number | fsExtra.MakeDirectoryOptions | null, callback: (err: NodeJS.ErrnoException) => void): void;
mkdir(path: fsExtra.PathLike): Promise<void>;
open(path: fsExtra.PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
open(path: fsExtra.PathLike, flags: string | number, mode: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
open(path: fsExtra.PathLike, flags: string | number, mode?: string | number | null | undefined): Promise<number>;
opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: fsExtra.Dir) => void): void;
opendir(path: string, options: fsExtra.OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: fsExtra.Dir) => void): void;
opendir(path: string, options?: fsExtra.OpenDirOptions | undefined): Promise<fsExtra.Dir>;
read(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, callback: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void;
read(fd: number, buffer: Buffer, offset: number, length: number, position: number | null): Promise<fsExtra.ReadResult>;
readFile(file: string | number | Buffer, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
readFile(file: string | number | Buffer, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
readFile(file: string | number | Buffer, options: {
read<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null, callback: (err: NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer) => void): void;
read<TBuffer_1 extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer_1, offset: number, length: number, position: number | null): Promise<{
bytesRead: number;
buffer: TBuffer_1;
}>;
readFile(file: string | number | Buffer | import("url").URL, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
readFile(file: string | number | Buffer | import("url").URL, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
readFile(file: string | number | Buffer | import("url").URL, options: {
flag?: string | undefined;

@@ -186,3 +193,3 @@ } | {

}, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
readFile(file: string | number | Buffer, options: {
readFile(file: string | number | Buffer | import("url").URL, options: {
flag?: string | undefined;

@@ -193,40 +200,61 @@ } | {

}): Promise<string>;
readFile(file: string | number | Buffer, encoding: string): Promise<string>;
readFile(file: string | number | Buffer): Promise<Buffer>;
readdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
readdir(path: string | Buffer): Promise<string[]>;
readlink(path: string | Buffer, callback: (err: NodeJS.ErrnoException, linkString: string) => any): void;
readlink(path: string | Buffer): Promise<string>;
realpath(path: string | Buffer, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
realpath(path: string | Buffer, cache: {
readFile(file: string | number | Buffer | import("url").URL, encoding: string): Promise<string>;
readFile(file: string | number | Buffer | import("url").URL): Promise<Buffer>;
readdir(path: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
readdir(path: fsExtra.PathLike, options?: "utf-8" | "ascii" | "utf8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | {
encoding: "utf-8" | "ascii" | "utf8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | null;
withFileTypes?: false | undefined;
} | null | undefined): Promise<string[]>;
readdir(path: fsExtra.PathLike, options: "buffer" | {
encoding: "buffer";
withFileTypes?: false | undefined;
}): Promise<Buffer[]>;
readdir(path: fsExtra.PathLike, options?: {
encoding?: string | null | undefined;
withFileTypes?: false | undefined;
} | undefined): Promise<string[] | Buffer[]>;
readdir(path: fsExtra.PathLike, options: {
encoding?: string | null | undefined;
withFileTypes: true;
}): Promise<fsExtra.Dirent[]>;
readlink(path: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException, linkString: string) => any): void;
readlink(path: fsExtra.PathLike): Promise<string>;
realpath(path: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
realpath(path: fsExtra.PathLike, cache: {
[path: string]: string;
}, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
realpath(path: string | Buffer, cache?: {
realpath(path: fsExtra.PathLike, cache?: {
[path: string]: string;
} | undefined): Promise<string>;
rename(oldPath: string, newPath: string, callback: (err: NodeJS.ErrnoException) => void): void;
rename(oldPath: string, newPath: string): Promise<void>;
rmdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
rmdir(path: string | Buffer): Promise<void>;
stat(path: string | Buffer, callback: (err: NodeJS.ErrnoException, stats: fsExtra.Stats) => any): void;
stat(path: string | Buffer): Promise<fsExtra.Stats>;
symlink(srcpath: string | Buffer, dstpath: string | Buffer, type: "file" | "dir" | "junction" | undefined, callback: (err: NodeJS.ErrnoException) => void): void;
symlink(srcpath: string | Buffer, dstpath: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: "file" | "dir" | "junction" | undefined): Promise<void>;
truncate(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
truncate(path: string | Buffer, len: number, callback: (err: NodeJS.ErrnoException) => void): void;
truncate(path: string | Buffer, len?: number | undefined): Promise<void>;
unlink(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void;
unlink(path: string | Buffer): Promise<void>;
utimes(path: string | Buffer, atime: number, mtime: number, callback: (err: NodeJS.ErrnoException) => void): void;
utimes(path: string | Buffer, atime: Date, mtime: Date, callback: (err: NodeJS.ErrnoException) => void): void;
utimes(path: string | Buffer, atime: number, mtime: number): Promise<void>;
utimes(path: string | Buffer, atime: Date, mtime: Date): Promise<void>;
write(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void;
write(fd: number, buffer: Buffer, offset: number, length: number, callback: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void;
rename(oldPath: fsExtra.PathLike, newPath: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
rename(oldPath: fsExtra.PathLike, newPath: fsExtra.PathLike): Promise<void>;
rmdir(path: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
rmdir(path: fsExtra.PathLike): Promise<void>;
stat(path: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException, stats: fsExtra.Stats) => any): void;
stat(path: fsExtra.PathLike): Promise<fsExtra.Stats>;
symlink(target: fsExtra.PathLike, path: fsExtra.PathLike, type: "file" | "dir" | "junction" | undefined, callback: (err: NodeJS.ErrnoException) => void): void;
symlink(target: fsExtra.PathLike, path: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
symlink(target: fsExtra.PathLike, path: fsExtra.PathLike, type?: "file" | "dir" | "junction" | undefined): Promise<void>;
truncate(path: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
truncate(path: fsExtra.PathLike, len: number, callback: (err: NodeJS.ErrnoException) => void): void;
truncate(path: fsExtra.PathLike, len?: number | undefined): Promise<void>;
unlink(path: fsExtra.PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
unlink(path: fsExtra.PathLike): Promise<void>;
utimes(path: fsExtra.PathLike, atime: number, mtime: number, callback: (err: NodeJS.ErrnoException) => void): void;
utimes(path: fsExtra.PathLike, atime: Date, mtime: Date, callback: (err: NodeJS.ErrnoException) => void): void;
utimes(path: fsExtra.PathLike, atime: number, mtime: number): Promise<void>;
utimes(path: fsExtra.PathLike, atime: Date, mtime: Date): Promise<void>;
write<TBuffer_2 extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer_2, offset: number, length: number, position: number | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer_2) => void): void;
write<TBuffer_3 extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer_3, offset: number, length: number, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer_3) => void): void;
write(fd: number, data: any, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
write(fd: number, data: any, offset: number, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
write(fd: number, data: any, offset: number, encoding: string, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
write(fd: number, buffer: Buffer, offset?: number | undefined, length?: number | undefined, position?: number | null | undefined): Promise<fsExtra.WriteResult>;
write(fd: number, data: any, offset?: number | undefined, encoding?: string | undefined): Promise<fsExtra.WriteResult>;
write<TBuffer_4 extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer_4, offset?: number | undefined, length?: number | undefined, position?: number | null | undefined): Promise<{
bytesWritten: number;
buffer: TBuffer_4;
}>;
write(fd: number, data: any, offset?: number | undefined, encoding?: string | undefined): Promise<{
bytesWritten: number;
buffer: string;
}>;
writev(fd: number, buffers: NodeJS.ArrayBufferView[], position: number, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void): void;

@@ -249,5 +277,5 @@ writev(fd: number, buffers: NodeJS.ArrayBufferView[], cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void): void;

lchmodSync(path: fsExtra.PathLike, mode: string | number): void;
statSync(path: fsExtra.PathLike): fsExtra.Stats;
statSync(path: fsExtra.PathLike, options: fsExtra.BigIntOptions): fsExtra.BigIntStats;
statSync(path: fsExtra.PathLike, options: fsExtra.StatOptions): fsExtra.Stats | fsExtra.BigIntStats;
statSync(path: fsExtra.PathLike): fsExtra.Stats;
fstatSync(fd: number): fsExtra.Stats;

@@ -254,0 +282,0 @@ lstatSync(path: fsExtra.PathLike): fsExtra.Stats;

{
"name": "@platform/fs",
"version": "0.5.20",
"version": "0.5.24",
"description": "POSIX style file-system tools.",

@@ -8,13 +8,12 @@ "main": "lib/index",

"scripts": {
"test": "sh node_modules/@platform/test/test.sh $@",
"tdd": "yarn test --watch",
"lint": "sh node_modules/@platform/ts.libs/lint.sh $@",
"build": "sh node_modules/@platform/ts.libs/build.sh $@",
"test": "sh ../../node_modules/@platform/test/test.sh $@",
"lint": "sh ../../node_modules/@platform/ts.libs/lint.sh $@",
"build": "sh ../../node_modules/@platform/ts.libs/build.sh $@",
"prepare": "yarn build && yarn lint && yarn test"
},
"dependencies": {
"@platform/fs.types": "0.0.15",
"@types/fs-extra": "9.0.1",
"@platform/fs.types": "0.0.16",
"@types/fs-extra": "9.0.2",
"@types/js-yaml": "3.12.5",
"archiver": "4.0.2",
"archiver": "5.0.2",
"dotenv": "8.2.0",

@@ -29,5 +28,5 @@ "extract-zip": "2.0.1",

"devDependencies": {
"@platform/test": "0.1.15",
"@platform/ts.libs": "4.0.0",
"@types/archiver": "3.1.0",
"@platform/test": "0.1.16",
"@platform/ts.libs": "4.0.1",
"@types/archiver": "3.1.1",
"@types/dotenv": "8.2.0",

@@ -34,0 +33,0 @@ "@types/extract-zip": "1.6.2",

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