diff --git a/CHANGELOG.md b/CHANGELOG.md index 539dbda..25f133e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # CHANGELOG +## tmp v0.2.1 + +- [#250](https://github.com/raszi/node-tmp/issues/250) + + ***FEATURE*** + + New option `tmpdir` that allows users to override the system's tmpdir. + + ``` + tmp.dirSync({tmpdir: '/mnt/tmp'}); + ``` + + ***BUG FIX*** + + Changes to options will no longer leak out. + ## tmp v0.2.0 - drop support for node version < v8.17.0 diff --git a/README.md b/README.md index 2e5572e..bb20fb7 100644 --- a/README.md +++ b/README.md @@ -350,6 +350,7 @@ All options are optional :) absolute paths are fine as long as they point to a location under the system's default temporary directory. Any directories along the so specified path must exist, otherwise a ENOENT error will be thrown upon access, as tmp will not check the availability of the path, nor will it establish the requested path for you. + * `tmpdir`: allows you to override the system's root tmp directory * `tries`: how many times should the function try to get a unique filename before giving up, default `3` * `keep`: signals that the temporary file or directory should not be deleted on exit, default is `false` * In order to clean up, you will have to call the provided `cleanupCallback` function manually. diff --git a/docs/global.html b/docs/global.html index e225ad4..a203ace 100644 --- a/docs/global.html +++ b/docs/global.html @@ -908,7 +908,7 @@
tmpdir
unsafeCleanup
tmpdir
: allows you to override the system's root tmp directorytries
: how many times should the function try to get a unique filename before giving up, default 3
keep
: signals that the temporary file or directory should not be deleted on exit, default is false