Skip to content

Finish the documentation#22

Merged
pmcelhaney merged 2 commits into
mainfrom
copilot/finish-documentation
Mar 31, 2026
Merged

Finish the documentation#22
pmcelhaney merged 2 commits into
mainfrom
copilot/finish-documentation

Conversation

Copilot AI commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

The README had several gaps between the documented API and the actual implementation.

Changes

  • Fixed destructuring exampleread was used in the snippet but missing from the destructured parameters
  • Documented variadic path() — added path("a", "b", "c") example to reflect the actual ...relativePaths signature
  • Multiple callbacks — new section documenting that usingTemporaryFiles() accepts N callbacks sharing the same temp directory, executed in order
  • Debug mode — new section documenting USING_TEMPORARY_FILES_DEBUG=1, which retains the temp directory under CWD for post-run inspection
  • Improved inline comments — noted that add/addDirectory create parent directories, that read defaults to utf8, and added a base64 encoding example
await usingTemporaryFiles(async ({ path, add, addDirectory, read, remove }) => {
  path("a", "b", "c");                        // variadic segments joined
  await add("nested/file.txt", "content");     // creates parent dirs automatically
  const text = await read("nested/file.txt"); // defaults to utf8
  const bin  = await read("img.png", "base64");
});

Copilot AI linked an issue Mar 31, 2026 that may be closed by this pull request
@changeset-bot

changeset-bot Bot commented Mar 31, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3fc13d1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Agent-Logs-Url: https://github.com/pmcelhaney/using-temporary-files/sessions/695ed359-3392-497c-9c73-97ba30b7a579

Co-authored-by: pmcelhaney <51504+pmcelhaney@users.noreply.github.com>
Copilot AI changed the title [WIP] Update documentation to finalize content Finish the documentation Mar 31, 2026
Copilot AI requested a review from pmcelhaney March 31, 2026 11:18
@pmcelhaney pmcelhaney marked this pull request as ready for review March 31, 2026 11:19
@pmcelhaney pmcelhaney merged commit 1e3faad into main Mar 31, 2026
4 checks passed
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.

Finish the documentation

2 participants