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.
This is a backport of 69a1ff7.
Fix naive checks for properties being set of the form obj[key] into the
proper form Object.hasOwnProperty.call(obj, key). The reason for this
is that if the key has a value of a built-in property like 'constructor'
then a check of the form obj[key] will always return true even if that
property hasn't been set on the object.
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.