fix(core): update
This commit is contained in:
parent
6c05bf6ae3
commit
6206b55deb
908
pnpm-lock.yaml
generated
908
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartfile',
|
||||
version: '10.0.10',
|
||||
version: '10.0.11',
|
||||
description: 'offers smart ways to work with files in nodejs'
|
||||
}
|
||||
|
@ -341,8 +341,6 @@ export const listFileTree = async (
|
||||
miniMatchFilter: string,
|
||||
absolutePathsBool: boolean = false
|
||||
): Promise<string[]> => {
|
||||
const done = plugins.smartpromise.defer<string[]>();
|
||||
|
||||
// handle absolute miniMatchFilter
|
||||
let dirPath: string;
|
||||
if (plugins.path.isAbsolute(miniMatchFilter)) {
|
||||
@ -356,15 +354,9 @@ export const listFileTree = async (
|
||||
nodir: true,
|
||||
dot: true,
|
||||
};
|
||||
plugins.glob(miniMatchFilter, options, (err, files: string[]) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
done.reject(err);
|
||||
}
|
||||
done.resolve(files);
|
||||
});
|
||||
|
||||
let fileList = await done.promise;
|
||||
|
||||
let fileList = await plugins.glob.glob(miniMatchFilter, options)
|
||||
if (absolutePathsBool) {
|
||||
fileList = fileList.map((filePath) => {
|
||||
return plugins.path.resolve(plugins.path.join(dirPath, filePath));
|
||||
|
@ -31,7 +31,7 @@ export {
|
||||
|
||||
// third party scope
|
||||
import fsExtra from 'fs-extra';
|
||||
import glob from 'glob';
|
||||
import * as glob from 'glob';
|
||||
import yaml from 'js-yaml';
|
||||
|
||||
export { fsExtra, glob, yaml };
|
||||
|
@ -1,8 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "nodenext",
|
||||
"esModuleInterop": true,
|
||||
"target": "ES2017",
|
||||
"moduleResolution": "node"
|
||||
"verbatimModuleSyntax": true,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user