Remove the explicit ignoring of the exit status of the test scripts.
This makes the Travis CI build be considered a failure if one of the
tests fail. Also rewrite the fast-test script to use the test script.
Update old dependencies. Fix change in mocha causing it to not exist
afer the tests are done and a change in the command parsing causing the
tests to no longer be detected.
Update instructions, Dockerfile and Travis CI to use Node.js 10.
Specify that Node.js version 10 or greater is needed in the engines
section of package.json (note that this is only advisory.) And document
this as a breaking change in CHANGELOG.md.
Do not install git, tar and curl as these packages are installed by
default on Travis CI. Move the codecov upload to the travis script and
do not include the codecov token as it's not needed when uploaded from
Travis CI. Make the cover npm script into something that can be runned
locally and move the Travis CI version to a new ci-cover script. Remove
the verbose flag from the tar extration of the factorio headless server.
Use nyc instead of istanbul as the later has been deprecated and is no
longer being developed. Fix the cover and test scripts to work again
with nyc and add the output dir for nyc into .gitignore.
A 50 kb library is not needed to make a function run once, especially
not when it doesn't work. _.once does not modify the function passed to
it to only run once it returns a new function that only runs once.
Since the result of once was discarded, it had no effect.
Remove underscore and implement instanceManagement running once properly
with 3 lines of code.
This saved 30ms of the startup on my machine. Even if it saved a second
it's still pretty pointless as we're not depending on the master server
startup being super fast.
Replace the 10 MB of dependencies that is hash-files with a homebrew
Promise based implementation of hashFile that uses crypto and fs. This
somehow also ends up being the same amount of code as the one using
hash-files.
It's not supposed to be installed as a dependency in the first place,
and this seems like the wrong solution to there being too many stinking
dependencies to keep track the security of.
The 0.3.5 release of node-factorio-api removed the dependency to
documentation, which itself pulls in another 500 dependencies. Update
to 0.3.5 to avoid having this pulled in.
#add tailing of files to prevent lost data between factorio and clusterio
#move socketio connect to the bottom after the plugins are loaded
to prevent plugins not getting the connection event
#add some more transfer compression in different places
Move the contents of node_modules/_app into lib/ as there shouldn't be
any content in node_modules. This directory is automatically managed
and pruned by npm.
Add lib/ as a local package in package.json, this allows scripts
everywhere to require it's content as "lib/path" instead of relying on
local paths. This shadows the StdLib Node.js Bindings package, but I
could care less.
Change all requires with lib as a local path and _app to use just lib.
Switch to using fork of rcon-client where the commands and the responses
are not converted to ASCII before being sent over the wire. Should fix
the issue with Russian text showing up as garbled letters in the chat as
well as the issue with train schedules using >= and <= conditions.
If rcon-client upstream is updated with the utf8 patch this commit can
be reverted with the version the patch was included in.