39 Commits

Author SHA1 Message Date
Nate Fischer
ac0ff873f1 refactor: add config.reset() and .resetForTesting() (#641)
Add .reset() and .resetForTesting() to shell.config and use .resetForTesting()
as a standard set-up for unit tests.
2017-01-07 22:40:38 -08:00
Nate Fischer
2da9ab55be fix: allow non-normalized paths as input to mkdir (#635)
Adds tests to make sure that non-normalized paths (i.e. path/to/./dir) are
valid for a few commands, including mkdir() which previously failed when given
the -p flag.

Fixes #634
2017-01-07 18:06:15 -08:00
Brandon Freitag
7fa4b995bf Finalize moving to ava (#630)
* Move ava-test/ directory to test/

* Remove unnecessary run-tests.js script

* Run only ava during npm test script
2016-12-20 11:27:02 -08:00
Nate Fischer
d9e3008c85 test: refactor cp tests to ava (#565)
* test: refactor cp tests to ava

* refactor: use `utils.` syntax for utilities
2016-11-20 13:11:32 -08:00
Nate Fischer
7a82946a8d fix: maxdepth doesn't limit total number of copies (#549)
* fix: maxdepth doesn't limit total number of copies

Prevent maxdepth from limiting the total number of copies, only allow it to
limit the maximum depth

Fixes #547

* refactor: make `depth` be its own argument
2016-11-10 00:18:04 -08:00
Gyandeep Singh
93ea025755 Revert "refactor: replace fs.existsSync" (fixes #531) (#532)
This reverts commit ab8cf5a8e027b28fc7b784587e4339d2b6d0f08f.
2016-10-17 20:14:43 -07:00
Nate Fischer
d057e075a7 feat: cp -u option (#527)
Only update when the source file is older than the destination, or the
destination file is missing.

Fixes #526
2016-10-14 15:39:59 -07:00
Nate Fischer
ab8cf5a8e0 refactor: replace fs.existsSync (#509)
* refactor: replace fs.existsSync

* fix: add support for v0.10
2016-08-20 18:28:49 -07:00
Nate Fischer
2395214fee chore: switch to eslint (#504)
* chore: switch to eslint

* fix: works on older versions of NodeJS now

* chore: fix curly braces

* chore: fix indents and remove jshint references
2016-08-07 12:16:29 -07:00
Nate Fischer
5339375db0 fix(cp): -n option no longer raises error (#466)
Fixes #465
2016-06-28 00:27:33 -07:00
Nate Fischer
56fbf5c414 feat(cp): -P option, plus better handling of symlinks (#421) 2016-04-08 15:34:54 -07:00
Charles Verge
dad3ad8d72 Add cp test to ensure -L does not change -r behavior and update test cases to handle non admin windows test execution 2016-03-24 22:32:55 -03:00
Charles Verge
61cb383859 issue-407: Add regular files unit tests and fix symlink copy behavior 2016-03-24 22:32:55 -03:00
Charles Verge
2245536e8b feat(cp): add -L/follow symlink option
Closes #232
2016-03-20 19:11:01 -07:00
Nate Fischer
27a760299c refactor: more commands return ShellStrings, tests for code 2016-03-15 19:48:13 -07:00
Nate Fischer
4b951ce4c6 refactor(cp): clean up code and fix #376
Fixes issue in #376. Simplifies the code, and slight perf win.
2016-03-05 17:54:17 -08:00
Nate Fischer
17a23bd4bb Add unit tests to prevent regression (see #376) 2016-02-29 03:05:33 -08:00
Nate Fischer
6ebc2d3db7 refactor(shellstring): return consistent objects
- fix(string): no longer overrides string prototype
 - exec() now returns a ShellString object
2016-02-19 14:54:30 -08:00
Nate Fischer
04f891f785 feat(glob): use glob module for globbing
Switch to the glob module to do shell globbing. Fixes a bug in `cp()` where
hidden files were not copied recursively.
2016-02-16 03:11:04 -08:00
Nate Fischer
8377b927bf fix(cp): add -n option, make -f default behavior 2016-02-03 21:13:48 -08:00
Burak Yigit Kaya
175f5e1efd Fix tests on Windows 2016-01-27 22:53:31 +02:00
Ari Porad
2c63ecf461 Merge pull request #271 from freitagbr/fix-cp-behavior
Fix cp to match unix behavior
2016-01-15 16:26:31 -08:00
Brandon Freitag
5b7bbe8d8b Update broken tests with new cp behavior 2016-01-14 02:36:53 -08:00
Nate Fischer
74f1ff8748 Commands that have multiple errors now produce cleaner log output. Errors are
echoed to stderr. exec() supports a new stderr field.
2016-01-12 17:02:19 -08:00
Brandon Freitag
9c8db201ca Add test for added cp behavior 2016-01-11 01:32:55 -08:00
Artur Adib
193968a978 remove old shims 2013-09-21 10:19:38 -04:00
Artur Adib
537ba1c3a7 cp preserves mode bits 2013-09-02 14:13:04 -04:00
Artur Adib
ef795af7e4 adding jshint to tests; all tests pass 2012-12-27 16:32:31 -05:00
Artur Adib
cba4f22a64 simplify fix for issue #44 2012-12-24 10:54:03 -05:00
Marcus Stade
5c8040b3fd Fixes arturadib/shelljs#44 2012-12-24 02:46:28 +01:00
Artur Adib
e4d9dabe52 introducing config.silent, config.fatal
deprecates silent()
2012-12-01 09:48:23 -05:00
Artur Adib
40c98d3b1f fixes #15; "cp -R src/ dest" bug 2012-09-23 15:38:44 -04:00
Artur Adib
88292eacf8 ls() and find() return arrays 2012-03-22 10:12:16 -04:00
Artur Adib
11614fd516 Deprecated: verbose() and exists() 2012-03-15 14:20:10 -04:00
Artur Adib
e76cfa9fa1 add support to array arguments 2012-03-02 15:51:44 -05:00
Artur Adib
1739ee3bb3 sed 2012-03-01 21:36:16 -05:00
Artur Adib
ca71bb8380 ls, cp pass 2012-03-01 21:11:34 -05:00
Artur Adib
b1199823cd progress 2012-03-01 20:55:29 -05:00
Artur Adib
f4a2ae3379 first commit 2012-03-01 20:22:44 -05:00