facebook / facebook/jscodeshift
Potential minor bug: temp's tracking feature is not used
- Dominant language
- JavaScript
- Stars
- 10k
- Forks
- 498
- PR merge metrics
- No merged PRs in 30d
Description
Without using `temp.track()`, it no longer automatically tracks the files to clean up. Because jscodeshift uses `temp.cleanupSync()` (instead of `temp.cleanup()`, which passes errors when `temp.track()` is not used), errors may be silenced and temporary files may remain after jscodeshift's processes close.
From `temp`'s readme:
> ### Want Cleanup? Make sure you ask for it.
>
> As noted in the example above, if you want temp to track the files and
directories it creates and handle removing those files and directories
on exit, you must call `track()`. The `track()` function is chainable,
and it's recommended that you call it when requiring the module.
>
> ```javascript
> var temp = require("temp").track();
> ```
>
> Why is this necessary? In pre-0.6 versions of temp, tracking was
automatic. While this works great for scripts and
[Grunt tasks](http://gruntjs.com/), it's not so great for long-running
server processes. Since that's arguably what Node.js is _for_, you
have to opt-in to tracking.
>
> But it's easy.
Contributor guide
Assessment
This issue has not been assessed yet.