Fix use of tmp.dir() with dir option#309
Merged
raszi merged 1 commit intoraszi:masterfrom Aug 8, 2025
Merged
Conversation
4 tasks
Owner
|
Released as v2.0.5 |
paulfitz
pushed a commit
to gristlabs/grist-core
that referenced
this pull request
Aug 11, 2025
## Context See #1753 But the tests fail. It fixes a vulnerability (with a low score): GHSA-52f5-9888-hmc6 EDIT: I also have found that the CI does not pass due to a regression by the `tmp` library: raszi/node-tmp#309 ## Proposed solution 1. Also upgrade the type definition 2. Adapt the tests to make it compile 3. See whether the CI passes 👀 4. Fix the node-tmp library ([Pull-Request accepted](raszi/node-tmp#309)) 5. Remove any type override of `tmp`, remove use of Bluebirds' `promisifyAll` (I am not very comfortable with altering the prototype globally) and rather use the already imported library `tmp-promise`. ## Has this been tested? <!-- Put an `x` in the box that applies: --> - [x] 👍 yes, I added tests to the test suite - [ ] 💭 no, because this PR is a draft and still needs work - [ ] 🙅 no, because this is not relevant here - [ ] 🙋 no, because I need help <!-- Detail how we can help you --> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Passing the
diroption totmp.dir()results in a strange error:Fix proposal
pathis defined but refers to thenode:pathlibrary):node-tmp/lib/tmp.js
Line 469 in 08fa3ab
inbandStandardto check passing thediroptionMy guess is that the variable that should have been used is
pathToResolvelike in the implementation of_resolvePathSync:node-tmp/lib/tmp.js
Line 487 in 08fa3ab
The new tests fail without the fix and pass with the fix.