Skip to content

Commit

Permalink
πŸ› Fix import bug in Blast.requireFileViaVm
Browse files Browse the repository at this point in the history
  • Loading branch information
skerit committed May 20, 2024
1 parent 6c23b3e commit 97e7ce5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/server_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1584,7 +1584,7 @@ module.exports = function serverFunctions(Blast, extras) {
*
* @author Jelle De Loecker <[email protected]>
* @since 0.9.0
* @version 0.9.0
* @version 0.9.3
*/
Blast.requireFileViaVm = function requireFileViaVm(path, options) {

Expand All @@ -1609,6 +1609,7 @@ module.exports = function serverFunctions(Blast, extras) {
let exported_function = libvm.runInThisContext(head + source + '\n/**/})', {
filename: path,
lineOffset: -1,
importModuleDynamically: libvm.constants?.USE_MAIN_CONTEXT_DEFAULT_LOADER
});

let args = [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"mm" : "~3.2.1"
},
"engines": {
"node" : ">=14.0.0"
"node" : ">=20.13.0"
}
}

0 comments on commit 97e7ce5

Please sign in to comment.