Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
},
"dependencies": {
"readline-sync": "^1.4.9",
"sprintf-js": "^1.1.2",
"tmp": "^0.0.33"
"sprintf-js": "^1.1.2"
},
"sideEffects": false,
"eslintConfig": {
Expand Down
5 changes: 3 additions & 2 deletions src/loslib.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,9 @@ if (typeof process === "undefined") {
};
} else {
/* Only with Node */
const os = require('os');
const fs = require('fs');
const tmp = require('tmp');
const path = require('path');
const child_process = require('child_process');

syslib.exit = function(L) {
Expand Down Expand Up @@ -517,7 +518,7 @@ if (typeof process === "undefined") {
};

const lua_tmpname = function() {
return tmp.tmpNameSync();
return path.join(os.tmpdir(), 'tmp-' + Math.random().toString(36).slice(2));
};

syslib.remove = function(L) {
Expand Down
Loading