636 Commits

Author SHA1 Message Date
Brandon Freitag
ded1a3e4a3 Fix: rm behavior regarding symlinks (#598)
* Treat files and symlinks separately

* Remove -f flag from dir symlink test

* Simplify control flow
2016-12-08 23:45:35 -08:00
Nate Fischer
a7ca4d6a8a test: refactor grep tests to AVA (#606) 2016-12-08 23:19:42 -08:00
Nate Fischer
94d65a32f8 test: refactor uniq tests to AVA (#603) 2016-12-08 23:13:00 -08:00
Nate Fischer
ffb1cf3db9 chore: switch to files attribute from npmignore (#613)
Prefer the `files` attribute over `.npmignore` to minimize the bytes users
download when installing ShellJS. This cuts the size down from ~1.8M to ~1.2M.
2016-12-08 22:26:49 -08:00
Nate Fischer
40273b73c4 test: refactor 'test' command tests to AVA (#612) 2016-12-08 22:10:58 -08:00
Nate Fischer
c3811f7e66 test: refactor find tests to AVA (#611) 2016-12-08 21:47:08 -08:00
Nate Fischer
f06c5845e9 test: refactor pipe tests to AVA (#608) 2016-12-08 21:36:49 -08:00
Nate Fischer
66fa1048aa test: refactor sort tests to AVA (#602) 2016-12-08 21:36:22 -08:00
Nate Fischer
ef68bd32af test: refactor tail tests to AVA (#601) 2016-12-08 21:36:09 -08:00
Nate Fischer
1cdb051876 test: refactor head tests to AVA (#600) 2016-12-08 21:35:53 -08:00
Nate Fischer
c51abffc5c test: refactor mv tests to AVA (#597) 2016-12-08 21:35:39 -08:00
Nate Fischer
947e47ebb6 test: refactor pwd tests to AVA (#582) 2016-12-08 20:14:44 -08:00
Brandon Freitag
76370ed946 Remove files related to lgtm.co (#596) 2016-12-07 21:59:51 -08:00
Brandon Freitag
5ded216dc2 Use Object.assign if possible (#593)
* Fix typo

* Set objectAssign to Object.assign if defined

* Use correct terminology
2016-12-07 12:11:40 -08:00
Brandon Freitag
e4b71f0a23 Add ability to configure error from parseOptions (#594) 2016-12-06 23:52:02 -08:00
Nate Fischer
6b15577541 test: refactor exec tests to AVA (#574)
* test: refactor exec tests to AVA

* change single quotes to double quotes for Win
2016-11-30 21:14:49 -08:00
Nate Fischer
b0d00ea031 test: refactor set tests to AVA (#576) 2016-11-27 13:14:04 -08:00
Nate Fischer
a8b5933545 test: refactor which tests to AVA (#580) 2016-11-27 11:48:40 -08:00
Nate Fischer
00dd0f6641 test: refactor plugin tests to AVA (#579) 2016-11-27 11:48:18 -08:00
Nate Fischer
c78eecdff0 test: refactor tempdir tests to AVA (#581) 2016-11-25 11:03:05 -08:00
Nate Fischer
f225f35dda test: refactor rm tests to AVA (#586) 2016-11-25 10:59:17 -08:00
Nate Fischer
e52caa5e25 test: refactor echo tests to AVA (#575) 2016-11-25 10:58:42 -08:00
Nate Fischer
2f3aea3643 test: refactor env tests to AVA (#573) 2016-11-24 03:06:33 -08:00
Nate Fischer
49b7dbd7a2 test: refactor toEnd tests to AVA (#578) 2016-11-24 01:29:14 -08:00
Nate Fischer
895bbf3ae6 test: refactor dirs tests to AVA (#572) 2016-11-23 23:11:26 -08:00
Nate Fischer
f92407e032 test: refactor common tests to AVA (#570) 2016-11-23 23:09:53 -08:00
Nate Fischer
2d1d68e9ea test: refactor chmod tests to AVA (#569) 2016-11-23 23:09:30 -08:00
Nate Fischer
612e51b897 test: refactor to tests to AVA (#577) 2016-11-23 23:05:08 -08:00
Nate Fischer
106e05fc45 test: refactor config tests to AVA (#571) 2016-11-23 22:38:46 -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
0743004717 test: refactor cat tests to ava (#564)
* test: refactor cat tests to ava

* refactor: only set config.silent once
2016-11-20 13:10:58 -08:00
Nate Fischer
81e2803c45 test: set up ava and move cd.js (#561)
* test: set up ava and move cd.js

Set up ava as the new test framework. Migrate the tests for the cd command to
use the ava framework.

* refactor: reorder imports, remove useless dep
2016-11-18 19:50:36 -08:00
Brandon Freitag
12c103fc43 Update sed documentation regarding capture groups (#558)
* Update sed documentation regarding capture groups

* Remove unix sed example for brevity

* Regen README
2016-11-17 21:37:42 -08:00
Nate Fischer
4a1bce8815 fix: handle code-less errors more carefully in exec (#554)
If an error exists, but has no error code, it defaults to 1 (a common code for
most Unix commands). Tests have been omitted since this is an edge case that is
difficult to reproduce.

Fixes #536
2016-11-16 21:51:08 -08:00
Brandon Freitag
c6e4c40b5a Add Brandon Freitag to maintainers/contributors (#553) 2016-11-10 00:36:47 -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
Nathan Phillip Brink
3bc0852702 Get pipe tests running on Windows. (#550)
* Get pipe tests running on Windows.

I used the FIND command which ships with Windows as something to
pass data through.

The test checks that a POSIX-like find(1) exists and skips the tests
if this condition is true because Windows-provided FIND is incompatible
with find(1).

* Remove obvious comments.

Requested by @nfischer. I removed both the unix-specific and Windows
specific comments because I figure they both fall under being too
obvious based on being in the process.platform conditional.

* Make FIND usage cleaner and document it.

* Use shx grep to make pipe tests portable.

Discussed in #550. To test piping and its interaction with
real processes, a shellout is necessary. But on Windows,
you cannot rely on utilities like grep(1) being around.
Using shx, we can write portable code. Otherwise, the
tests have to be conditional on the platform and be
way more complicated.
2016-11-08 20:51:06 -08:00
Brandon Freitag
9bc498e512 Fix lint warning (#543)
* Fix lint warning

* Add a TODO to refactor loop
2016-11-01 21:38:00 -07:00
Nate Fischer
459d54b1da chore: remove v0.10 from Travis CI (#540)
This version of Node was already unsupported as of ShellJS v0.7
2016-11-01 00:36:07 -07:00
Nate Fischer
1dbca24444 chore: add Node v7 for CI (#539) 2016-10-28 03:36:04 -07:00
Nate Fischer
1a15022f27 0.7.5 v0.7.5 2016-10-26 22:50:10 -07:00
Nate Fischer
280c7fc7bb docs(changelog): updated by Nate Fischer [ci skip] 2016-10-26 22:41:07 -07:00
Nate Fischer
4975b54a4f feat: plugin.error() takes an options parameter (#535)
This implements the following options: `continue`, `code`, `prefix`, & `silent`.

Fixes #522, #523
2016-10-23 23:17:42 -07:00
Gyandeep Singh
93ea025755 Revert "refactor: replace fs.existsSync" (fixes #531) (#532)
This reverts commit ab8cf5a8e027b28fc7b784587e4339d2b6d0f08f.
2016-10-17 20:14:43 -07:00
Gyandeep Singh
9bf98dece9 Fix: Remove default glob from shell.test (fixes #529) (#530) 2016-10-17 11:00:04 -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
35cef9a4ae chore: add downloads per month on README (#513) 2016-08-27 14:32:35 -07:00
Nate Fischer
3986d61346 docs(changelog): updated by Nate Fischer [ci skip] 2016-08-25 18:28:01 -07:00
Nate Fischer
9eb9bf9773 0.7.4 v0.7.4 2016-08-25 18:27:14 -07:00
Nate Fischer
45f719de75 fix: echo supports -e option properly (#511) 2016-08-23 19:36:05 -07:00