[PR #134] fix(install.ps1): preserve user settings.json instead of overwriting #136

Open
opened 2026-05-06 13:13:33 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/bwya77/vscode-dark-islands/pull/134
Author: @roshan-3
Created: 5/5/2026
Status: 🔄 Open

Base: mainHead: fix/preserve-user-settings-on-install


📝 Commits (1)

  • 1833d27 fix(install.ps1): merge into user settings.json instead of overwriting

📊 Changes

1 file changed (+55 additions, -5 deletions)

View changed files

📝 install.ps1 (+55 -5)

📄 Description

Summary

install.ps1 currently Copy-Item -Forces the bundled settings.json over the user's file, wiping unrelated keys (font, linters, theme, etc.). This PR deep-merges instead, with user keys winning on conflict. The .pre-islands-dark backup is still created.

The merge logic is lifted from install-antigravity.ps1 (already in this repo), so the approach is precedented. Only the conflict-resolution direction differs.

Addresses #86, #111, #128 (and the settings half of #102).

Behavior

User has Before After
Custom editor.fontFamily, python.*, theme, etc. Overwritten Preserved
custom-ui-style.stylesheet tweaks Wiped Deep-merged, user wins
Unparseable JSONC Overwritten anyway Left untouched
No existing file Bundled copied Unchanged

Known limitation

JSONC comments in the user's file get stripped (PowerShell can't roundtrip them). Backup preserves them verbatim. Proper fix needs a real JSONC parser, which is out of scope.

Out of scope

install.sh, extensions.json (#119), README warning (#132), replacing custom-ui-style (#123).

Test plan

  • Bundled settings.json parses through Strip-Jsonc + ConvertFrom-Json
  • Synthetic merge preserves user keys, adds Islands keys
  • (reviewer) Run on VS Code with customized settings.json
  • (reviewer) Run on VS Code with no settings.json

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bwya77/vscode-dark-islands/pull/134 **Author:** [@roshan-3](https://github.com/roshan-3) **Created:** 5/5/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/preserve-user-settings-on-install` --- ### 📝 Commits (1) - [`1833d27`](https://github.com/bwya77/vscode-dark-islands/commit/1833d27b43b88f2d75a2eeca4d269984d133c3c5) fix(install.ps1): merge into user settings.json instead of overwriting ### 📊 Changes **1 file changed** (+55 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `install.ps1` (+55 -5) </details> ### 📄 Description ## Summary `install.ps1` currently `Copy-Item -Force`s the bundled `settings.json` over the user's file, wiping unrelated keys (font, linters, theme, etc.). This PR deep-merges instead, with user keys winning on conflict. The `.pre-islands-dark` backup is still created. The merge logic is lifted from `install-antigravity.ps1` (already in this repo), so the approach is precedented. Only the conflict-resolution direction differs. Addresses #86, #111, #128 (and the settings half of #102). ## Behavior | User has | Before | After | |----------|--------|-------| | Custom `editor.fontFamily`, `python.*`, theme, etc. | Overwritten | Preserved | | `custom-ui-style.stylesheet` tweaks | Wiped | Deep-merged, user wins | | Unparseable JSONC | Overwritten anyway | Left untouched | | No existing file | Bundled copied | Unchanged | ## Known limitation JSONC comments in the user's file get stripped (PowerShell can't roundtrip them). Backup preserves them verbatim. Proper fix needs a real JSONC parser, which is out of scope. ## Out of scope `install.sh`, `extensions.json` (#119), README warning (#132), replacing `custom-ui-style` (#123). ## Test plan - [x] Bundled `settings.json` parses through Strip-Jsonc + ConvertFrom-Json - [x] Synthetic merge preserves user keys, adds Islands keys - [ ] (reviewer) Run on VS Code with customized `settings.json` - [ ] (reviewer) Run on VS Code with no `settings.json` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vscode-dark-islands#136
No description provided.