From 9237d58db93f039f328db106ec6039b10b30a528 Mon Sep 17 00:00:00 2001 From: Andreas Rozek Date: Fri, 28 May 2021 13:26:35 +0200 Subject: [PATCH 1/3] Update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 69fd242..6643514 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ */.svn/* */*/.svn/* node_modules/ +package-lock.json -.DS_Store \ No newline at end of file +.DS_Store From 4d38fc5d3e6bef59272d2fac832e1b3a68709ce1 Mon Sep 17 00:00:00 2001 From: Andreas Rozek Date: Fri, 28 May 2021 12:24:50 +0200 Subject: [PATCH 2/3] made "unlink" synchronous "unlink" either requires a callback or should be written as "unlinkSync" --- bin/commands/distil.js | 8 ++++---- vm/build/build | 11 +++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/bin/commands/distil.js b/bin/commands/distil.js index eb4b151..18c0907 100644 --- a/bin/commands/distil.js +++ b/bin/commands/distil.js @@ -111,7 +111,7 @@ function parseCommand (args) { for (i = 0, l = files.length; i < l; i++) { outstanding++; - distilFile(files[i][0], files[i][1], args.switches, function () { + distilFile(files[i][0], files[i][1], args.switches, function () { if (!--outstanding) success(); }); @@ -161,13 +161,13 @@ function compile (filename, switches, callback) { if (err) { errPart = err.message.split(/:\s?/); if (errPart[1] != 'luac') throw err; - + console.error(COLORS.RED + 'Luac compile error in file ' + errPart[2] + ' on line ' + errPart[3] + ':\n\t' + errPart[4] + COLORS.RESET); return; } callback(fs.readFileSync(luacFilename, 'binary').toString()); - fs.unlink(luacFilename); + fs.unlinkSync(luacFilename); }); } @@ -176,7 +176,7 @@ function compile (filename, switches, callback) { function distil (source, switches, callback) { compile(source, switches, function (bytecode) { - + var parser = new Parser(), config = { stripDebugging: switches.stripDebugging, diff --git a/vm/build/build b/vm/build/build index 575005c..7021489 100755 --- a/vm/build/build +++ b/vm/build/build @@ -34,7 +34,7 @@ * * Note: Requires Google Closure Compiler to be installed in /usr/local/bin * https://developers.google.com/closure/compiler/ - * + * * Examples: * ./build Builds JavaScript lib files. * ./build -swc Builds JavaScript and ActionScript lib files. @@ -66,7 +66,7 @@ var switches = getSwitches(process.argv), '../src/jit.js', '../src/lib.js', '../src/utils.js', - '../src/output.js' + '../src/output.js' ], OUTPUT_FILENAME = '../moonshine.js', HEADER_FILENAME = './header.js', @@ -165,7 +165,7 @@ function minifyLibrary () { appendFile(output, filename); fs.closeSync(output); - fs.unlink(filename); + fs.unlinkSync(filename); console.log('File written: ' + MINIFIED_OUTPUT_FILENAME); if (switches['-module']) buildModule(); @@ -190,7 +190,7 @@ function buildSWC () { exec(cmd, function (err) { if (err) throw err; - fs.unlink(filename); + fs.unlinkSync(filename); console.log('File written: ' + SWC_OUTPUT_FILENAME); }); @@ -210,8 +210,7 @@ function buildModule () { fs.writeSync(output, 'define(function(require,exports,module){\n'); appendFile(output, MINIFIED_OUTPUT_FILENAME); fs.writeSync(output, '\n});'); - + fs.closeSync(output); console.log('File written: ' + MODULE_FILENAME); } - From 0895fef78a7b610ef3aa94b38373dbf5dd112cc2 Mon Sep 17 00:00:00 2001 From: Andreas Rozek Date: Fri, 28 May 2021 12:30:26 +0200 Subject: [PATCH 3/3] Update package.json update to newer versions of Express.js and Socket.io --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 444363b..7a769e2 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "url": "https://github.com/gamesys/moonshine/issues" }, "dependencies": { - "express": "3.2.5", - "socket.io": "0.9.14" + "express": "^3.21.2", + "socket.io": "^4.1.2" } -} \ No newline at end of file +}