# What changed in tempy

> 16 changes in tempy 1 to 3 from its official release notes, upgrade guides and advisories: 11 breaking, 1 security, 2 new APIs and options. Each one cited. Sources checked 2026-10-23. HTML: https://unstale.sh/npm/tempy/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## tempy 3

### Breaking changes

- Node.js 14 is now required to use tempy. (3.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.0.0)
- Use the named export rootTemporaryDirectory instead of tempy.root. (3.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.0.0)
- Use the named export temporaryDirectory instead of tempy.directory. (3.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.0.0)
- Use the named export temporaryDirectoryTask instead of tempy.directory.task. (3.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.0.0)
- Use the named export temporaryFile instead of tempy.file. (3.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.0.0)
- Use the named export temporaryFileTask instead of tempy.file.task. (3.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.0.0)
- Use the named export temporaryWrite instead of tempy.write. (3.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.0.0)
- Use the named export temporaryWriteSync instead of tempy.writeSync. (3.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.0.0)
- Use the named export temporaryWriteTask instead of tempy.write.task. (3.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.0.0)

### Security

- Options are hardened to prevent path traversal when passed untrusted input; they are not meant to accept untrusted input. (3.1.1) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.1.1)

### New APIs and options

- Adds the parentDirectory option. (3.2.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.2.0)
- Adds the rootDirectory option. (3.2.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.2.0)

### Fixes and other changes

- Increases cleanup retry attempts to handle Windows file locking. (3.2.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v3.2.0)

## tempy 2

### Breaking changes

- Node.js 12.20 is now required. (2.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v2.0.0)
- The package is now pure ESM, affecting how developers import and use it. (2.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v2.0.0)

## tempy 1

### Fixes and other changes

- The .task methods now reflect return values from callbacks. (1.0.0) — [release notes](https://github.com/sindresorhus/tempy/releases/tag/v1.0.0)
