Nate Fischer
1a31356343
refactor: use require instead of import
...
No change to logic. This swaps over tests to use require() since
everything is currently designed for the commonjs module system.
2025-04-07 22:44:24 -07:00
Nate Fischer
6b3c7b1e44
refactor: don't expose tempdir in common.state ( #903 )
...
Previously, the cached `tempdir` value was stored in `common.state`.
Unlike the other `common.state` values, this isn't immediately useful to
other commands (they can just call the tempdir API). So, this moves the
cached value into `tempdir.js`.
This also adds a unit test for the caching behavior, and exposes
test-only helpers to verify this behavior.
Finally, this adds a note to `common.state` that values should generally
be considered read-only, since this can be important for customized
behavior. Although, I recognize our code base has one exception to this
rule (`echo()`), we should strive to maintain this.
Fixes #902
Test: Added a unit test.
2018-11-08 23:00:22 -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
c78eecdff0
test: refactor tempdir tests to AVA ( #581 )
2016-11-25 11:03:05 -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
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
Artur Adib
193968a978
remove old shims
2013-09-21 10:19:38 -04:00
Artur Adib
21f721cb45
more stringent jshint; catch leaks/undefs
2013-09-21 10:12:28 -04:00
Stephen Mathieson
023962cfff
changes per @arturadib's code review
2013-06-12 11:23:56 -04:00
Stephen Mathieson
0ce07eee07
tempdir: use os.tmpDir when possible
2013-06-08 18:57:19 -04:00
Artur Adib
ef795af7e4
adding jshint to tests; all tests pass
2012-12-27 16:32:31 -05:00
Artur Adib
e4d9dabe52
introducing config.silent, config.fatal
...
deprecates silent()
2012-12-01 09:48:23 -05:00
Artur Adib
11614fd516
Deprecated: verbose() and exists()
2012-03-15 14:20:10 -04:00
Artur Adib
56dd17df8a
exists(), tempdir()
2012-03-02 10:34:45 -05:00
Artur Adib
1739ee3bb3
sed
2012-03-01 21:36:16 -05:00
Artur Adib
f4a2ae3379
first commit
2012-03-01 20:22:44 -05:00