diff --git a/package.json b/package.json index d34a4e5..e0b12a6 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "typescript": "^3.5.2" }, "dependencies": { - "glob": "^7.1.4", + "glob": "^10.5.0", "rimraf": "^4.3.1" } } diff --git a/src/index.ts b/src/index.ts index c78f548..32f17be 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import path from 'path'; import crypto from 'crypto'; import { spawn } from 'child_process'; -import glob from 'glob'; +import { glob } from 'glob'; import rimraf from 'rimraf'; export interface Options { @@ -122,9 +122,7 @@ const getOptionArgs = (options: Options): string[] => { return args; }; -const findFiles = async (patten: string): Promise => new Promise((resolve, reject) => { - glob(patten, (err, files) => (err ? reject(err) : resolve(files))); -}); +const findFiles = async (pattern: string): Promise => glob(pattern); class PDFToCairo { private bin: string;