* Test on more modern Node versions
* Fix tests and note that deprecated constants are not exported
Since https://github.com/nodejs/node/pull/49686, they are not
enumerable properties, so Object.assign doesn't re-export them.
Attempting to directly export them would trigger the deprecation
warning.
* Remove process.cwd() trick from test files
* BREAKING: Switch from main to exports
* Add fs-extra/esm ESM named import module, with just fs-extra methods
Fixes#746
* Revert "Remove check for fs.realpath.native support, since it's everywhere (#887)"
This reverts commit f4a880d29c3a699c0695755fe8533d786c55f65f.
* Added warning and fallback support for missing fs.realpath.native
Signed-off-by: Lam Wei Li <peteriman@mail.com>
* Removed NodeJS check and fs.realpath.native fallback
Signed-off-by: Lam Wei Li <peteriman@mail.com>
* Leaving original listener intact during test and better phasing for warning
Signed-off-by: Lam Wei Li <peteriman@mail.com>
* Using done() for proper async test
Signed-off-by: Lam Wei Li <peteriman@mail.com>
* Updated comments for clarity
Co-authored-by: Ryan Zimmerman <17342435+RyanZim@users.noreply.github.com>
Co-authored-by: Ryan Zimmerman <17342435+RyanZim@users.noreply.github.com>
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This test tries to create a directory where the current user does not have the
permissions to do so and expects a failure. However, the root user is by design
always allowed to do that (ignoring file permissions). So we must skip the test
in these cases then.
Fixes#898
Co-authored-by: Ryan Zimmerman <opensrc@ryanzim.com>
* move: do not create parent directory if it is root
* fix move-sync test
* move-sync test: remove dest after test is done
* remove debug log
* remove dest in afterEach
* call done() after test is done
* Upgrade jsonfile
Fixes#745
* Test from main entry point
* Make outputJson() mutation-proof
Fixes#702
* Update outputJsonSync() to match async implementation
* BREAKING: Use internal fork of make-dir for mkdirs implementation
Resolves#619
Everything should work similarly to how it did before; except that
we no longer return a file path on success (to match fs.mkdir).
Also, errors may be different.
* Hopefully fix Windows tests
- Error codes are different
- Match fs.mkdir behavior on Windows when creating root
* Port https://github.com/sindresorhus/make-dir/pull/24
* Add comment for clarity
* Use at-least-node for version sniffing
* Consistent error codes across OSes
* Allow different error codes on different Node versions
* Refactor internal getStats() util
Fixes#762
* Proper promise tests for copy()
Our hacky tests don't play well with multiple layers of
callback/promise switching
* Simplify internal checkParentPaths()
* Port improvments to sync methods