29 Commits

Author SHA1 Message Date
Ryan Zimmerman
c8815e3ccf
BREAKING: Use fs.rm/rmSync where supported (#882)
Fixes #806

Technically a breaking change since this removes the undocumented
ability to pass options to remove*()
2021-04-08 13:36:04 -04:00
Federico Bozzini
f86c09949c
Do not check errors with instanceof (#805)
This fixes cross-VM type issues in Jest.

Backport of aa50e0298f
2020-06-03 16:11:23 -04:00
Ryan Zimmerman
28173ed31b
Fix tests on Node 14 (#800)
* Fix tests on Node 14

Fixes #798

writeFileSync requires a data parameter

* Add Node 14 to CI
2020-05-14 10:24:23 -04:00
Ryan Zimmerman
3c3865cad8
BREAKING: Drop old Node support (#751)
* BREAKING: Drop old Node support, require v10+

Update CI configs

* Remove references and test fencing for old Node versions

* Use object spread properties

* Use octal literal notation

* Use optional catch bindings
2020-02-04 17:30:40 -05:00
nacd
d6478d2217 fix flaky test in remove.test.js (#736) 2019-12-13 10:06:20 -05:00
Mani Maghsoudlou
0bc36ffd5e v8 release (#667)
* Remove secure-random from dev-deps (#610)

* fix ensureDir() doc

* moveSync: refactor to use renameSync

* copy*(): fix copying bind-mounted directories (#618)

* copy*(): fix copying bind-mounted dirs

* copy*(): fix case-insensitive-paths tests

* copy*(): refactor to check paths more efficiently

* destructure stats object after checking err

* move*(): check paths before moving

* move*(): add case-insensitive paths test

* remove unnecessary done callback from test

* copy*(): add new option checkPathsBeforeCopying

* update copy*() docs to include checkPathsBeforeCopying

* some reformatting

* copy*(): use fs.stat with bigint option

* move*(): refactor to use the internal stat functions

* move*(): add test for prevent moving identical

* disable graceful-fs in copy and move tests

* fix parsing node version

* tiny reformat

* update copy*() docs

* refactor parsing node version

* use semver to parse node version in tests
2019-05-11 10:08:57 -04:00
Pete Gonzalez
ddc1a2f9d4 Fix removeSync() to eliminate spurious ENOTEMPTY errors on Windows (#646)
Fix removeSync() to measure its retry interval in milliseconds instead of CPU cycles
2018-11-07 07:43:31 -05:00
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
RyanZim
ddb5cb47a5 Use octal notation for chmod values in rimraf.js
Backports 38b907fd64
Fixes #484
2017-10-18 15:00:34 -04:00
RyanZim
33fbe78c3d Apply upstream rimraf fixes
e8b10a79c2
d53235de86
e8cd6853ba
2017-07-10 15:23:25 -04:00
RyanZim
891f483cfc Upgrade standard 2017-04-26 10:13:40 -04:00
RyanZim
df125bebf7 Use pathExists() internally 2017-04-26 10:04:17 -04:00
RyanZim
03b2080b7e Universalify fs-extra methods 2017-04-26 10:04:07 -04:00
RyanZim
c179797ce5 Add else block to throw error from catch in removeSync() 2017-04-25 09:42:13 -04:00
RyanZim
55c5eb00dc Prevent callback from being called twice
Fixes #392
2017-03-16 13:27:33 -04:00
JPeer264
7bddeb5ec1 Refactor test remove (closes #355) 2017-02-25 17:32:48 +01:00
JPeer264
b9d8b45bfb Refactor rimraf 2017-02-19 22:51:01 +01:00
JPeer264
de64547045 Refactor remove/Sync 2017-02-17 22:28:45 +01:00
Nathan Phillip Brink
efc2b76caf
Fix remove() no-globbing tests to skip/pass on Windows 2016-11-15 16:32:50 +00:00
Nathan Phillip Brink
b610d40e53
Test that remove() ignores glob characters.
After looking at rimraf, I began to fear that node-fs-extra, which
is based on rimraf, might also automatically glob things. I find
this confusing when the API is being used as an overlay of the
node built-in fs module which never expands globs. This test
explicitly verifies that the remove() function does not follow
glob characters.
2016-11-15 16:32:50 +00: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
Zeus
1f49d10f18 Disable rimraf globbing since its not supported anywhere else within fs-extra
Add missing var declaration
2016-09-29 12:30:06 -07:00
Georgios Kalpakas
06a9c1a1fb tests: rename remote.test.js to remove.test.js 2016-09-11 01:26:08 +03:00
JP Richardson
955836b1ff lib/remove: removed alias 'delete()' 2015-08-28 15:16:31 -05:00
JP Richardson
25c1985ba1 JavaScript Standard Style 2015-08-28 15:14:10 -05:00
JP Richardson
ee763a7b34 lib/remove/__tests__: moved from tests/ 2015-06-20 07:50:40 -05:00
JP Richardson
a92821f85c lib/remove: moved alias 'delete' 2015-06-15 17:51:11 -05:00
JP Richardson
a197a87bd5 lib/remove/ created 2015-06-14 20:21:57 -05:00