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.