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

@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.1.7 to 0.2.0

lib/ancestor/ancestor.d.ts

8

lib/fs/fs.d.ts
/// <reference types="node" />
import * as fsExtra from 'fs-extra';
import * as path from 'path';
import { File } from '../file';
import { File as file } from '../file';
import { glob } from '../glob';

@@ -9,2 +9,4 @@ import { is } from '../is';

import { unzip, zip } from '../zip';
import { ancestor } from '../ancestor';
import { match } from '../match';
export declare const fs: {

@@ -22,4 +24,6 @@ size: {

glob: typeof glob;
file: typeof File;
file: typeof file;
ancestor: typeof ancestor;
merge: typeof merge;
match: typeof match;
is: typeof is;

@@ -26,0 +30,0 @@ zip: typeof zip;

@@ -12,4 +12,10 @@ "use strict";

var zip_1 = require("../zip");
var ancestor_1 = require("../ancestor");
var match_1 = require("../match");
exports.fs = tslib_1.__assign({}, fsExtra, { size: size_1.size,
glob: glob_1.glob, file: file_1.File, merge: merge_1.merge,
glob: glob_1.glob,
file: file_1.File,
ancestor: ancestor_1.ancestor,
merge: merge_1.merge,
match: match_1.match,
is: is_1.is,

@@ -16,0 +22,0 @@ zip: zip_1.zip,

export declare type IGlobOptions = {
type?: 'FILES' | 'DIRS';
includeDirs?: boolean;
dot?: boolean;
cache?: {};
statCache?: {};
realpathCache?: {};
};
export declare function find(pattern: string, options?: IGlobOptions): Promise<string[]>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var fg = require("fast-glob");
var glob = require("glob");
function find(pattern, options) {

@@ -9,15 +9,14 @@ var _this = this;

return new Promise(function (resolve, reject) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var _a, type, _b, dot, onlyDirectories, args, res;
return tslib_1.__generator(this, function (_c) {
switch (_c.label) {
case 0:
_a = options.type, type = _a === void 0 ? 'FILES' : _a, _b = options.dot, dot = _b === void 0 ? false : _b;
onlyDirectories = type === 'DIRS' ? true : false;
args = { onlyDirectories: onlyDirectories, unique: true, dot: dot };
return [4, fg(pattern, args)];
case 1:
res = _c.sent();
resolve(res);
return [2];
}
var _a, dot, includeDirs, cache, statCache, realpathCache, nodir, args;
return tslib_1.__generator(this, function (_b) {
_a = options.dot, dot = _a === void 0 ? false : _a, includeDirs = options.includeDirs, cache = options.cache, statCache = options.statCache, realpathCache = options.realpathCache;
nodir = !Boolean(includeDirs);
args = { dot: dot, nodir: nodir, cache: cache, statCache: statCache, realpathCache: realpathCache };
glob(pattern, args, function (err, paths) {
if (err) {
return reject(err);
}
resolve(paths);
});
return [2];
});

@@ -24,0 +23,0 @@ }); });

export * from './fs';
export { File } from './file';

@@ -5,3 +5,1 @@ "use strict";

tslib_1.__exportStar(require("./fs"), exports);
var file_1 = require("./file");
exports.File = file_1.File;
{
"name": "@platform/fs",
"version": "0.1.7",
"version": "0.2.0",
"description": "File-system tools.",

@@ -17,18 +17,22 @@ "main": "lib/index",

"@types/js-yaml": "3.12.1",
"archiver": "3.0.3",
"archiver": "3.1.1",
"extract-zip": "1.6.7",
"fast-glob": "3.0.4",
"filesize": "4.1.2",
"fs-extra": "8.1.0",
"js-yaml": "3.13.1"
"glob": "7.1.4",
"js-yaml": "3.13.1",
"minimatch": "3.0.4"
},
"devDependencies": {
"@platform/test": "0.0.60",
"@platform/ts.libs": "3.5.5",
"@platform/test": "0.0.61",
"@platform/ts.libs": "3.5.6",
"@types/archiver": "3.0.0",
"@types/extract-zip": "1.6.2",
"@types/filesize": "^4.1.0"
"@types/filesize": "4.1.0",
"@types/glob": "7.1.1"
},
"files": [
"lib"
"lib",
"!lib/test",
"!*.TEST.{js, mjs, d.ts}"
],

@@ -35,0 +39,0 @@ "repository": "uiharness/platform",

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