Skip to content

prevent writing to config regardless of cwd#74

Merged
dskvr merged 4 commits intomainfrom
bugfix/tests-overwrite-bunkerPubkey
Mar 11, 2026
Merged

prevent writing to config regardless of cwd#74
dskvr merged 4 commits intomainfrom
bugfix/tests-overwrite-bunkerPubkey

Conversation

@dskvr
Copy link

@dskvr dskvr commented Mar 7, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 7, 2026 16:08
Copy link

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 aims to prevent tests from writing to the real project .nsite/config.json regardless of the current working directory by adding an explicit “test mode” signal and strengthening write guards in config writing code.

Changes:

  • Add DENO_TESTING env flag in global test setup and use it in writeProjectFile to block default config writes during tests.
  • Add additional guarding in writeProjectFile to prevent tests from writing to non-temp paths even when configPath is explicitly provided.
  • Change deploy upload server resolution to stop merging in the user’s kind 10063 Blossom server list, and update the repo’s .nsite/config.json server list.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
tests/test-setup-global.ts Sets a new env flag intended to identify the test runtime.
src/lib/config.ts Updates config-writing logic to detect test mode and block writes to “real” paths.
src/commands/deploy.ts Changes how upload servers are resolved (no longer merges user 10063 server list).
.nsite/config.json Updates the checked-in project config server list.

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

You can also share your feedback on Copilot code review. Take the survey.

@dskvr dskvr requested a review from hzrd149 March 9, 2026 11:31
dskvr and others added 3 commits March 9, 2026 12:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dskvr dskvr merged commit 4af9f1d into main Mar 11, 2026
3 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.

2 participants