Skip to content

[Replacement]: Replace tmp-promise with Node mkdtempDisposable() #719

@slorber

Description

@slorber

Package to replace

tmp-promise

Suggested replacement(s)

After seeing https://bsky.app/profile/43081j.com/post/3mmvqatbfr22r, I tried to migrate away from tmp-promise used in our unit tests.

Turns out Explicit Resource Management + Node native API mkdtempDisposable() is a good alternative and could even simplify unit tests (no manual cleanup needed), although the syntax might feel a bit awkward (no void operator, no await using {destructured}.

See lib removal PR PR facebook/docusaurus#12106

Manifest type

native (replaceable by a built-in platform feature)

Rationale

Unneeded lib, similar to tmp, temp, and others

Availability

Node v24.4.0

Code example (optional)

Many here: facebook/docusaurus#12106

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedUsed to signal if a suggested replacement has been accepted.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions