This swaps out quote characters to limit how often we need to escape
strings. This is just to improve code readability.
Almost all of the changes could be done without changes to .eslintrc,
however this amends the lint rule to also permit backtick strings which
can be useful to eliminate a few extra instances of quote escaping.
Fixes issue #788
Test: npm run lint
Adds two new methods to src/common.js, common.statFollowLinks and common.statNoFollowLinks, which wrap fs.statSync and fs.lstatSync, respectively. This change is meant to improve readability and clarify intent.
* Add common.statFollowLinks and common.statNoFollowLinks
* Replace fs.statSync and fs.lstatSync in source files
This updates tests for `AVA` 19.0.0+.
`AVA` 0.18.0 has a breaking change which changes the current working directory
for tests. As a result, we need to change 'resources' -> 'test/resources' (and
similar path changes).
`AVA` 0.19.0 has a breaking change that all tests must run at least one assert.
This breaking change was already resolved by #746, so no change was necessary in
this PR.
This updates to `AVA` 0.21.0, since there are no other breaking changes.
* fix(cat): do not cat directories
Fixes#707
* fix(head): do not let head() read directories
Also fixes a typo
* fix(sort): do not sort directories
Also fixes a typo
* fix(tail): do not let tail() read directories
Also fixes a typo
* fix(uniq): do not let uniq() read directories
We also had a test which called sort() instead of uniq(), so we never
actually tested the missing-file case. This fixes that as well.
This also throws an error for using a directory as output.
* fix(pipe): fix breakages with piped commands