29 Commits

Author SHA1 Message Date
Mani Maghsoudlou
b02eea6a37 Use strict assert in all tests (#569) 2018-04-19 07:28:45 -04:00
Ryan Zimmerman
20c82ab4dd
Run stricter linter to cleanup problems and force ES6 usage (#566)
Also shorten fs.write() promise code
2018-04-10 08:12:12 -04:00
Mani Maghsoudlou
6b90ccf962 move: rewrite move to use fs.rename (#549)
* rewrite move to use fs.rename

* add old tests

* use strictEqual for error message assertion

* refactor move, remove comments

* fix move when overwrite is true and dest exists

* remove unnecessary checking of EPERM error
2018-04-06 11:25:57 -04:00
Mani Maghsoudlou
fe0bfe2931 Rewrite copy to use recursive pattern for dirs, add more tests 2017-10-20 13:43:08 -07:00
Mani Maghsoudlou
d99d8a19d6 Fix isSrcSubdir() split bug 2017-07-09 22:30:01 -07:00
Mani Maghsoudlou
f8f441ae63 Refactor isSrcSubdir() in move 2017-07-09 22:22:07 -07:00
Mani Maghsoudlou
16dc81e1f8 Fix the issue of moving into itself 2017-07-09 21:31:44 -07:00
RyanZim
5bfcb64b21 move() should error when src & dest are the same and src doesn't exist
Fixes #414; bug introduced in #378
2017-05-02 19:29:51 -04:00
RyanZim
03b2080b7e Universalify fs-extra methods 2017-04-26 10:04:07 -04:00
RyanZim
afab94b7eb Don't override move & moveSync test's timeouts 2017-03-27 10:49:09 -04:00
JP Richardson
efe0d80be4 Merge pull request #378 from jdalton/move-check
Don't move when source and dest paths are the same.
2017-03-14 01:01:57 -05:00
John-David Dalton
8d978db84d Don't move when source and dest paths are the same. 2017-03-13 10:48:58 -07:00
Mani Maghsoudlou
a4f6481ebf docs/readJson.md: Refactor example for readJson method, refactor move and moveSync tests descriptions 2017-03-08 14:38:25 -08:00
Tony Valderrama
3a3912ab23 move(): fall back to streams when hard links aren't supported 2017-03-02 14:07:25 -08:00
JPeer264
ebd22661a3 Refactor test move 2017-02-25 17:24:48 +01:00
JPeer264
3843d5fb52 Refactor move 2017-02-18 18:30:02 +01:00
JP Richardson
cc1aaa949e Merge pull request #335 from jprichardson/move-tests
Refactor move() tests
2017-01-01 13:24:57 -06:00
RyanZim
fde5b026d5 Refactor move() tests
- Refactor legacy setup
- Merge move-clobber.test.js into move.test.js
- Add more complete testing for overwrite option
- Remove fixtures directory, create fixtures with code
2016-12-31 13:45:41 -05:00
RyanZim
90cbf82510 Cleanup lib/move/index.js 2016-12-31 11:26:19 -05:00
RyanZim
5be5ae3053 Rename clobber to overwrite
Keep clobber for backwards compatibility

Fixes #172
2016-12-29 17:38:45 -05:00
RyanZim
fd3c9e6998 Remove move()'s broken limit option 2016-11-14 16:55:14 -05:00
Nathan Phillip Brink
57d5a39931 Fix move clobber tests to work around graceful-fs bug.
When trying to rename a directory over another directory, graceful-fs-4.1.10
(maybe other versions?) takes 1 minute to fail the call with an error.
This causes the test to timeout. The workaround is to increase the timeout
of that one test to 1m30s.

See https://github.com/isaacs/node-graceful-fs/issues/98
2016-11-14 11:11:52 -05:00
RyanZim
a837927988 Inline rimraf
We aren't using rimraf's glob support, and glob is a rather large
dependency.

Changes:

- Remove glob support from rimraf
- Remove move()'s dependency on rimraf; use fs-extra.remove instead
- Make rimraf a devDependency; it is used in the tests
2016-10-28 15:46:30 -04:00
bartland
22c19fe1d0 move.test modified to support testing files with both LF (NIX) and
CRLF (Windows) line endings. This commit fixes #188.
2015-10-31 12:36:12 +11:00
Nick Santos
24948a4e0c More robust handling of errors moving across virtual drives
Discovered while investigating
https://github.com/Medium/phantomjs/issues/341
where moving a directory across virtual drives caused an
EXDEV error that shunted things down the "move file"
instead of "move directory" codepath
2015-08-06 23:52:15 -04:00
JP Richardson
49726e8718 lib/move/__tests__: moved 2015-06-24 10:39:45 -05:00
JP Richardson
3304feb1bb lib/move/index: fix regression (forgot to export move) 2015-06-17 06:59:58 -05:00
JP Richardson
acc4def0de lib/move: moved default options 2015-06-17 06:49:17 -05:00
JP Richardson
bcc1b77591 lib/move/index: from lib/move 2015-06-17 06:39:42 -05:00