Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: raszi/node-tmp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.2
Choose a base ref
...
head repository: raszi/node-tmp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.2.3
Choose a head ref
  • 9 commits
  • 14 files changed
  • 3 contributors

Commits on Feb 29, 2024

  1. Use fs.rm() instead of rimraf

    A regression occurred in 0.2.2 which can be reproduced using:
    
    ```js
    const assert = require('assert');
    const tmp = require('tmp');
    tmp.dir({ unsafeCleanup: true }, (err, path, cleanup) => {
      assert.ifError(err);
      cleanup(assert.ifError);
    });
    ```
    This works with 0.2.1.  With 0.2.2 it fails with:
    
        /path/to/tmp/node-tmp/lib/tmp.js:358
                return removeFunction(fileOrDirName, next || function() {});
                       ^
    
        TypeError: removeFunction is not a function
            at _cleanupCallback (/path/to/tmp/node-tmp/lib/tmp.js:358:16)
            at /path/to/tmp/node-tmp/repro.js:5:3
            at _dirCreated (/path/to/tmp/node-tmp/lib/tmp.js:207:7)
            at FSReqCallback.oncomplete (node:fs:192:23)
    
    This occurs because 00bb5b2 upgraded
    the rimraf dependency from ^3.0.0 to ^5.0.5 without handling the change
    to a `Promise`-based API in 4.0.0
    (isaacs/rimraf@a71e7f9)
    or the removal of the default export in 5.0.0
    (isaacs/rimraf@c7a3fd4).
    
    This commit fixes the issue by dropping the `rimraf` dependency in favor
    of `fs.rm({recursive: true})`.
    
    It also updates the nodejs engine version to 14.14, when `fs.rm()` was
    added.
    
    Fixes: 00bb5b2 ("Update rimraf and drop old Node compatibility")
    Fixes: #295
    Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
    kevinoid committed Feb 29, 2024
    Copy the full SHA
    eafb034 View commit details
  2. Merge pull request #296 from kevinoid/drop-rimraf

    Use fs.rm() instead of rimraf
    raszi authored Feb 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6ed89d5 View commit details
  3. Update version

    raszi committed Feb 29, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    raszi KARASZI István
    Copy the full SHA
    b8f7d78 View commit details
  4. Verified

    This commit was signed with the committer’s verified signature.
    raszi KARASZI István
    Copy the full SHA
    062efbb View commit details
  5. Ignore .env

    raszi committed Feb 29, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    raszi KARASZI István
    Copy the full SHA
    4aba61e View commit details
  6. Update changelog

    raszi committed Feb 29, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    raszi KARASZI István
    Copy the full SHA
    4057ffa View commit details
  7. Add .tool-versions

    raszi committed Feb 29, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    raszi KARASZI István
    Copy the full SHA
    7a82d1f View commit details
  8. Fix formatting

    raszi committed Feb 29, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    raszi KARASZI István
    Copy the full SHA
    998eec5 View commit details
  9. Merge pull request #297 from raszi/feat/release-v0.2.3

    feat: release v0.2.3
    raszi authored Feb 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5f0b252 View commit details
Showing with 845 additions and 5,494 deletions.
  1. +2 −0 .gitignore
  2. +4 −6 CHANGELOG.md
  3. +6 −1 README.md
  4. +519 −519 docs/global.html
  5. +4 −4 docs/index.html
  6. +23 −4 docs/tmp.js.html
  7. +22 −3 lib/tmp.js
  8. +231 −4,920 package-lock.json
  9. +3 −5 package.json
  10. +8 −8 test/dir-sync-test.js
  11. +8 −8 test/dir-test.js
  12. +7 −7 test/file-sync-test.js
  13. +6 −6 test/file-test.js
  14. +2 −3 test/inband-standard.js
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
node_modules/
coverage/
.env
.idea/
.tool-versions
.*.swp
.changelog
CHANGELOG.new.md
10 changes: 4 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@


## v0.2.2 (2022-08-26)
## v0.2.2 (2024-02-28)

#### :bug: Bug Fix
* [#278](https://github.com/raszi/node-tmp/pull/278) Closes [#268](https://github.com/raszi/node-tmp/issues/268): Revert "fix #246: remove any double quotes or single quotes… ([@mbargiel](https://github.com/mbargiel))

#### :memo: Documentation
* [#279](https://github.com/raszi/node-tmp/pull/279) Closes [#266](https://github.com/raszi/node-tmp/issues/266): move paragraph on graceful cleanup to the head of the documentation ([@silkentrance](https://github.com/silkentrance))

#### :house: Internal
* switch to GitHub Actions
* fix tests for node >= 16

#### Committers: 3
#### Committers: 5
- Carsten Klein ([@silkentrance](https://github.com/silkentrance))
- Dave Nicolson ([@dnicolson](https://github.com/dnicolson))
- KARASZI István ([@raszi](https://github.com/raszi))
- Maxime Bargiel ([@mbargiel](https://github.com/mbargiel))
- [@robertoaceves](https://github.com/robertoaceves)

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -53,9 +53,14 @@ introduced tmpdir option.

See the [CHANGELOG](./CHANGELOG.md) for more information.

### Version 0.2.3

- Node version <= 14.4 has been dropped.
- rimraf has been dropped from the dependencies

### Version 0.2.2

Since version 0.2.2, all support for node version <= 12 has been dropped.
Since version 0.2.2, all support for node version <= 14 has been dropped.

### Version 0.1.0

Loading