Skip to content

Commit f1c997f

Browse files
committed
fix: deleting READNE.md during upgrade
1 parent 958ef0f commit f1c997f

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

docs/adr/0004-detach-and-upgrade-product-files.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ product README with `docs/README.md`, an operator-focused instance README, then
1616
instance.
1717

1818
`npm run upgrade` refreshes product-owned paths from upstream while protecting instance-owned paths such as `custom/`,
19-
`wrangler.toml`, and `.dev.vars`.
19+
`wrangler.toml`, `.dev.vars`, and `README.md`.
2020

2121
The default upgrade path includes product files such as `defaults/`, `scripts/`, `package.json`, `package-lock.json`,
22-
`README.md`, and `LICENSE`.
22+
and `LICENSE`. It does not refresh `README.md`, because `npm run detach` replaces the upstream README with the
23+
operator-focused instance README.
2324

2425
## Consequences
2526

2627
- New instances can start as independent repositories
2728
- Detached instances get an operator-focused README at the repository root
2829
- Upgrades can refresh product behavior without overwriting local configuration
30+
- Upgrades do not reintroduce the upstream product README into detached instances
2931
- Protected local paths remain the operator's responsibility
3032
- Release metadata and upstream workflow files do not leak into detached instances

scripts/upgrade.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { execFileSync, spawnSync } from "node:child_process";
88
const ROOT = process.cwd();
99
const DEFAULT_REMOTE = "https://github.com/vanityURLs/code.git";
1010
const DEFAULT_REF = "main";
11-
const DEFAULT_PATHS = ["defaults", "scripts", "package.json", "package-lock.json", "README.md", "LICENSE"];
12-
const PROTECTED_PATHS = ["custom", "wrangler.toml", ".dev.vars"];
11+
const DEFAULT_PATHS = ["defaults", "scripts", "package.json", "package-lock.json", "LICENSE"];
12+
const PROTECTED_PATHS = ["custom", "wrangler.toml", ".dev.vars", "README.md"];
1313

1414
function parseArgs(argv) {
1515
const args = {

0 commit comments

Comments
 (0)