Skip to content

Commit

Permalink
Removed pify
Browse files Browse the repository at this point in the history
  • Loading branch information
alansemenov committed Nov 1, 2023
1 parent 96b3b44 commit cbc8944
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 1 addition & 2 deletions packages/enonic-dependencies-resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
},
"dependencies": {
"glob": "^10.0.0",
"minimist": "^1.2.5",
"pify": "^6.0.0"
"minimist": "^1.2.5"
},
"engines": {
"node": ">= 14.15.0",
Expand Down
7 changes: 3 additions & 4 deletions packages/enonic-dependencies-resolver/src/clean.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as rimraf from 'rimraf';
import pify from 'pify';
import {rimraf} from 'rimraf';

export default async function clean(globPath) {
await pify(rimraf)(globPath);
export default async function clean(globPath): Promise<void> {
await rimraf(globPath);
}
5 changes: 2 additions & 3 deletions packages/enonic-dependencies-resolver/src/find.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import * as glob from 'glob';
import pify from 'pify';
import {glob} from 'glob';

const EXCLUDES = [/\.d\.ts$/, /_module.*\.ts$/];
const isValid = file => !EXCLUDES.some(exclude => exclude.test(file));

export default async function find(globPath): Promise<string[]> {
const files = await pify(glob)(globPath);
const files = await glob(globPath);
return files.filter(isValid);
};

0 comments on commit cbc8944

Please sign in to comment.