-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade of rimraf causes issue #295
Comments
kevinoid
added a commit
to kevinoid/node-tmp
that referenced
this issue
Feb 28, 2024
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})`. Fixes: 00bb5b2 ("Update rimraf and drop old Node compatibility") Fixes: raszi#295 Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
kevinoid
added a commit
to kevinoid/node-tmp
that referenced
this issue
Feb 28, 2024
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})`. Fixes: 00bb5b2 ("Update rimraf and drop old Node compatibility") Fixes: raszi#295 Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
kevinoid
added a commit
to kevinoid/node-tmp
that referenced
this issue
Feb 29, 2024
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})`. Fixes: 00bb5b2 ("Update rimraf and drop old Node compatibility") Fixes: raszi#295 Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
kevinoid
added a commit
to kevinoid/node-tmp
that referenced
this issue
Feb 29, 2024
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})`. Fixes: 00bb5b2 ("Update rimraf and drop old Node compatibility") Fixes: raszi#295 Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
kevinoid
added a commit
to kevinoid/node-tmp
that referenced
this issue
Feb 29, 2024
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: raszi#295 Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
moyitpro
pushed a commit
to chikorita157/Sharkey-sakura
that referenced
this issue
Apr 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Operating System
NodeJS Version
Tmp Version
0.2.2
Expected Behavior
No behavior changes to previous version
Experienced Behavior
When calling
node-tmp/lib/tmp/prepareRemoveCallback
I get the error:TypeError: removeFunction is not a function
The function is called by the
tmp-promise
library.This problem disappears by re-setting the version of
rimraf
to 3.The text was updated successfully, but these errors were encountered: