console/patches/bullmq@3.5.6.patch
renovate[bot] 87388f68cb
fix(deps): update dependency bullmq to v3.5.6 (#1006)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dotan Simha <dotansimha@gmail.com>
2023-01-15 09:02:47 +00:00

29 lines
No EOL
1.2 KiB
Diff

diff --git a/dist/esm/commands/script-loader.js b/dist/esm/commands/script-loader.js
index bcbe1b33d8c4adf3113e561584dbd17c48a197d2..671d1316123c29ea8bc0901e4e8236fbd6290dcd 100644
--- a/dist/esm/commands/script-loader.js
+++ b/dist/esm/commands/script-loader.js
@@ -2,6 +2,7 @@ import { createHash } from 'crypto';
import { glob, hasMagic } from 'glob';
import * as path from 'path';
import * as fs from 'fs';
+import { fileURLToPath } from 'url';
import { promisify } from 'util';
const readFile = promisify(fs.readFile);
const readdir = promisify(fs.readdir);
@@ -349,15 +350,7 @@ async function getFilenamesByPattern(pattern) {
// Determine the project root
// https://stackoverflow.com/a/18721515
function getPkgJsonDir() {
- for (const modPath of module.paths || []) {
- try {
- const prospectivePkgJsonDir = path.dirname(modPath);
- fs.accessSync(modPath, fs.constants.F_OK);
- return prospectivePkgJsonDir;
- // eslint-disable-next-line no-empty
- }
- catch (e) { }
- }
+ return path.dirname(fileURLToPath(import.meta.url));
}
// https://stackoverflow.com/a/66842927
// some dark magic here :-)