Comparing version
@@ -50,9 +50,9 @@ "use strict"; | ||
const callerLine = stackLines?.find((line) => { return line.indexOf(__filename) === -1; }); | ||
const match = callerLine?.match(/\((.*):\d+:\d+\)/); | ||
const match = callerLine?.match(/(file:\/\/|)(\/.+):\d+:\d+/); | ||
if (match) { | ||
const dir = path_1.default.dirname(match[1]); | ||
const dir = path_1.default.dirname(match[2]); | ||
return path_1.default.resolve(dir, filePath); | ||
} | ||
} | ||
throw new Error(`Could not locate task file ${path_1.default}`); | ||
throw new Error(`Could not locate task file ${filePath}`); | ||
} | ||
@@ -59,0 +59,0 @@ function validate(expression) { |
@@ -50,9 +50,9 @@ "use strict"; | ||
const callerLine = stackLines?.find((line) => { return line.indexOf(__filename) === -1; }); | ||
const match = callerLine?.match(/\((.*):\d+:\d+\)/); | ||
const match = callerLine?.match(/(file:\/\/|)(\/.+):\d+:\d+/); | ||
if (match) { | ||
const dir = path_1.default.dirname(match[1]); | ||
const dir = path_1.default.dirname(match[2]); | ||
return path_1.default.resolve(dir, filePath); | ||
} | ||
} | ||
throw new Error(`Could not locate task file ${path_1.default}`); | ||
throw new Error(`Could not locate task file ${filePath}`); | ||
} | ||
@@ -59,0 +59,0 @@ function validate(expression) { |
{ | ||
"name": "node-cron", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "A Lightweight Task Scheduler for Node.js", | ||
@@ -5,0 +5,0 @@ "author": "Lucas Merencia", |
@@ -7,3 +7,2 @@ # Node Cron | ||
[](https://coveralls.io/github/node-cron/node-cron?branch=main) | ||
[](https://libraries.io/npm/node-cron) | ||
@@ -10,0 +9,0 @@ The node-cron module is tiny task scheduler in pure JavaScript for node.js based on [GNU crontab](https://www.gnu.org/software/mcron/manual/html_node/Crontab-file.html). This module allows you to schedule task in node.js using full crontab syntax. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
212478
-0.05%118
-0.84%