Skip to content

fix: clean plugin test temp directories#25

Merged
thunderavi merged 1 commit into
mainfrom
codex/cleanup-plugin-temp-dirs
May 27, 2026
Merged

fix: clean plugin test temp directories#25
thunderavi merged 1 commit into
mainfrom
codex/cleanup-plugin-temp-dirs

Conversation

@thunderavi
Copy link
Copy Markdown
Owner

Summary

  • Move plugin/reload test temporary directories from the repository root to os.tmpdir().
  • Clean the generated plugin test directories with fs.rmSync(..., { recursive: true, force: true }).
  • Ignore future generated plugin temp folders and tsconfig.tsbuildinfo.
  • Remove already tracked generated tmp-easy-plugin-*, tmp-easy-plugin-reload-*, and tsconfig.tsbuildinfo files.

This is a clean maintainer version of the useful temp-directory cleanup approach from PR #2, without the unrelated dependency, TypeScript, frontend, or CI changes from that branch.

Closes #1

Testing

  • npm test -- tests/unit/plugins.test.js --runInBand
  • npm run verify
  • npm run typecheck
  • npm test -- --runInBand
  • npm run validate:production
  • npm run lint:easy
  • npm run test:coverage

Also verified that running the plugin tests creates 0 new tmp-easy-plugin-* directories in the repository root.

Copilot AI review requested due to automatic review settings May 27, 2026 17:12
@thunderavi thunderavi self-assigned this May 27, 2026
@thunderavi thunderavi moved this from Backlog to In progress in @thunderavi's Easy.Js May 27, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR prevents repository-root pollution from plugin unit tests by moving their temporary plugin directories to the OS temp directory and ensuring they are always deleted after each test run. It also cleans up already-tracked generated temp folders and ignores future generated artifacts (including TypeScript build info).

Changes:

  • Update plugin unit tests to create temp plugin/reload directories under os.tmpdir() and delete them in finally blocks via fs.rmSync(..., { recursive: true, force: true }).
  • Add .gitignore entries for tmp-easy-plugin-*, tmp-easy-plugin-reload-*, and tsconfig.tsbuildinfo.
  • Remove previously committed generated temp plugin directories and tsconfig.tsbuildinfo from the repository.

Reviewed changes

Copilot reviewed 61 out of 63 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.gitignore Ignore generated plugin test temp directories and TypeScript build info.
tests/unit/plugins.test.js Create plugin/reload temp dirs in os.tmpdir() and clean them up after tests.
tsconfig.tsbuildinfo Remove tracked TS build info output file.
tmp-easy-plugin-0NRnhP/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-0NRnhP/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-78wEGt/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-78wEGt/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-7QrAzY/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-7QrAzY/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-9MnZaD/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-9MnZaD/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-AE4KNe/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-AE4KNe/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-MdEHLs/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-MdEHLs/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-SXSifI/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-SXSifI/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-VmpBbA/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-VmpBbA/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-WvNtM5/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-WvNtM5/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-cwg5ge/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-cwg5ge/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-elTJXZ/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-elTJXZ/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-gan5xo/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-gan5xo/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-kY0KWa/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-kY0KWa/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-l4uin0/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-l4uin0/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-nddJ7S/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-nddJ7S/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-pzD6ku/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-pzD6ku/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-qJUv3x/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-qJUv3x/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-tNYrKw/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-tNYrKw/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-uQNl1p/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-uQNl1p/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-xwHChm/README.md Remove tracked generated plugin test temp content.
tmp-easy-plugin-xwHChm/sample.js Remove tracked generated plugin test temp content.
tmp-easy-plugin-reload-29hxA5/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-5Kolpd/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-7UMMGk/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-7pXFh5/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-CHVNLN/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-H8m4vp/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-JYxfaq/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-NYeFLR/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-USlKOy/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-VFUlHh/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-WRtH5K/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-bLOU2w/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-btQGX2/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-mGwrQy/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-mbLk7M/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-pJ852Y/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-qwW5dA/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-slWK0n/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-tx40dX/reload.js Remove tracked generated plugin reload test temp content.
tmp-easy-plugin-reload-xGT7SO/reload.js Remove tracked generated plugin reload test temp content.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +216 to +217
watchFile.mockRestore();
} finally {
@thunderavi thunderavi merged commit 4cf6704 into main May 27, 2026
4 checks passed
@thunderavi thunderavi deleted the codex/cleanup-plugin-temp-dirs branch May 27, 2026 17:19
@github-project-automation github-project-automation Bot moved this from In progress to Done in @thunderavi's Easy.Js May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Root directory pollution with temporary plugin/reload folders

2 participants