648 Commits

Author SHA1 Message Date
Nate Fischer
c95d331be0 test: refactor shjs tests to AVA (#625) 2016-12-20 00:12:59 -08:00
Nate Fischer
63041b74d6 test: refactor pushd tests to AVA (#627) 2016-12-19 22:51:54 -08:00
Nate Fischer
057a8c89fc test: refactor popd tests to AVA (#626) 2016-12-19 22:48:11 -08:00
Nate Fischer
1548b3da00 refactor: list all commands in commands.json (#616)
* refactor: list all commands in commands.json

This also changes the order of commands in the docs, due to how I changed
the doc-generating script.

* fix lint error and alphabetize command list
2016-12-14 17:57:11 -08:00
Nate Fischer
51fea9b7f0 test: refactor global tests to AVA (#605) 2016-12-14 13:57:40 -08:00
Nate Fischer
1ed8a173e1 test: remove tests for make (deprecated) (#624) 2016-12-14 07:09:09 -08:00
Brandon Freitag
927758f714 Ignore test temp directories during linting (#623) 2016-12-14 07:06:15 -08:00
Nate Fischer
b26284a319 test: refactor ls to use AVA (#609) 2016-12-13 21:13:41 -08:00
Nate Fischer
5bd6ac8896 test: refactor sed tests to AVA (#607) 2016-12-09 10:27:02 -08:00
Nate Fischer
0bb686d758 test: refactor touch tests to AVA (#604) 2016-12-09 10:26:52 -08:00
Nate Fischer
4c82369690 test: refactor mkdir tests to AVA (#599) 2016-12-09 10:26:43 -08:00
Nate Fischer
6f26d52eab test: refactor ln tests to AVA (#610) 2016-12-09 01:25:10 -08:00
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