The new FS module is an abstraction layer over the built-in fs module.
The main reason it exists is because I need an abstraction layer I can
disable writing from. But that'll be in another commit.
Currently, mine is better because:
- paths are always relative to PS's base directory
- Promises (seriously wtf Node Core what are you thinking)
- PS-style API: FS("foo.txt").write("bar") for easier argument order
- mkdirp
This also increases the minimum supported Node version from v6.0 to
v7.7, because we now use async/await. Sorry for the inconvenience!
This also drops the mock-fs-require-fix dependency
mock-fs-require-fix was always kind of a huge hack. It's no longer
necessary, with an FS API that does everything it used to.
This removes a lot of other hacks from test/main.js, which is nice.
I'm jumping the gun a bit since we're still a few weeks away from
Node 6 entering LTS, but ES6 support is a pretty big deal. I've waited
years for this! Seriously! Five years ago I was like "ES6 is just on
the horizon, soon I'll be able to refactor this ugly C-style for loop
into for-of!" Well, it's 2016 and for-of is still too slow, but at
least the rest of ES6 is finally usable.
Anyway, my next commit uses Node 6 features, and it's about time to
start refactoring for it, and any server who really doesn't want to use
a non-LTS Node release can wait a few weeks to update or use Babel or
something.
Also included in this commit is feature detection for the Node 6
features we use, so anyone not on Node 6 will at least get a nice and
clear message about it.
There's now a section for people experienced with setting up servers.
The section for people new to servers is now Windows-compatible again.
Fixes#2376
- add urkerab and Layell
- split off 'Major Contributors' section, mainly to make it easier to
keep in sync with the client's 'Major Contributors' section
PS now officially supports Node.js 4.x and later.
Unofficially, most versions of iojs are still supported, although
this will probably change as we start using more ES6 features.
These warnings were more important when the latest stable version of
node was broken. Now that the latest stable version has been fixed for
a while, these specific warnings are not necessary.
The `localsysop` setting is dangerous and allows an attack where an
attacker constructs a malicious webpage that makes a connection to
`localhost` on the appropriate port and then takes over the server.
Since the dev console can be used from `localhost` by default, this
would include the ability to run arbitrary code on the server computer.
Any server operator who browses the internet on the same computer
where she or he hosts the server (such as some small-time server
operators) would be vulnerable to having their computer taken
over merely by visiting any webpage on the internet under the
control of the attacker.
- Much more detailed set-up instructions, especially for Windows users
- Setting up an Administrator is now its own section and gets rephrased
- Added a Community section with links to IRC/forums
- Rearranged Contributors section, added Joim
> - "only supports singles battles"
> - mention NoScript as a possible pitfall for local testing; suggest Chrome
> - rephrase plans for hosting entirely local servers