npm / tempy
tempy
What changed in tempy 1 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.
11 breaking1 security2 new APIs and options2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittempy 313 changes
Breaking changes 9
Node.js 14 is now required to use tempy.
Use the named export rootTemporaryDirectory instead of tempy.root.
Use the named export temporaryDirectory instead of tempy.directory.
Use the named export temporaryDirectoryTask instead of tempy.directory.task.
Use the named export temporaryFile instead of tempy.file.
Use the named export temporaryFileTask instead of tempy.file.task.
Use the named export temporaryWrite instead of tempy.write.
Use the named export temporaryWriteSync instead of tempy.writeSync.
Use the named export temporaryWriteTask instead of tempy.write.task.
Security 1
Options are hardened to prevent path traversal when passed untrusted input; they are not meant to accept untrusted input.
New APIs and options 2
Adds the parentDirectory option.
Adds the rootDirectory option.
Fixes and other changes 1
Increases cleanup retry attempts to handle Windows file locking.
tempy 22 changes
Breaking changes 2
Node.js 12.20 is now required.
The package is now pure ESM, affecting how developers import and use it.
tempy 11 changes
Fixes and other changes 1
The .task methods now reflect return values from callbacks.