Skip to content

chore(deps-dev): remove tempy - #1313

Open
devill wants to merge 5 commits into
mainfrom
devill/drop-tempy
Open

chore(deps-dev): remove tempy#1313
devill wants to merge 5 commits into
mainfrom
devill/drop-tempy

Conversation

@devill

@devill devill commented Aug 1, 2026

Copy link
Copy Markdown
Member

Closes #1303 by removing the dependency rather than upgrading it.

Why #1303 can't be merged. tempy 3 breaks scripts/changelog.js twice over: it is ESM-only with a top-level await, so require('tempy') throws ERR_REQUIRE_ASYNC_MODULE, and file() was renamed to temporaryFile(). Neither shows up in CI, because nothing there runs the changelog script — it is invoked by hand after npm version. The break would land at the next release.

Why the dependency can go. tempy was used for exactly one thing: a scratch path to prepend the new release notes to docs/documentation/CHANGELOG.md. The script wrote the notes to that temp file, appended the existing changelog to it, then copied the result back. Concatenating in memory and writing once does the same job in one line and needs no temp file at all.

Verified by running pnpm run changelog before and after the refactor and diffing the generated CHANGELOG.md — byte-identical. pnpm test (43 suites / 901 tests) and pnpm run lint are green.

devill added 2 commits August 1, 2026 14:04
The script wrote the new notes to a temp file, appended the existing
changelog to it, then copied the whole thing back. Concatenating in memory
and writing once says the same thing in one line, and drops the only reason
this script needed a temp-file library. Output is byte-identical.
Nothing imports it since the previous commit. This also closes #1303: tempy
3 is ESM-only with a top-level await, so `require('tempy')` throws
ERR_REQUIRE_ASYNC_MODULE, and `file()` was renamed to `temporaryFile()`.
Neither shows up in CI because nothing there runs the changelog script — it
would have failed at the next release.
@devill
devill requested a review from Rupesh-ark August 1, 2026 12:07
Rupesh-ark
Rupesh-ark previously approved these changes Aug 2, 2026

@Rupesh-ark Rupesh-ark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Rupesh-ark Rupesh-ark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This keeps the changelog script CommonJS compatible and removes an unnecessary dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants