code-foundry 0.30.2 → 0.30.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/commands/fleet.mjs +5 -1
- package/src/commands/sync.mjs +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.30.3](https://github.com/0xPlayerOne/code-foundry/compare/v0.30.2...v0.30.3) (2026-07-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **fleet:** branch upgrades from remote staging ([58d4389](https://github.com/0xPlayerOne/code-foundry/commit/58d43890436789ec5289e0aaeea71dea0375a140))
|
|
9
|
+
|
|
3
10
|
## [0.30.2](https://github.com/0xPlayerOne/code-foundry/compare/v0.30.1...v0.30.2) (2026-07-29)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
package/src/commands/fleet.mjs
CHANGED
|
@@ -66,7 +66,11 @@ function upgradeRepository(repository, source, version) {
|
|
|
66
66
|
const branch = `codex/code-foundry-upgrade-${version.replace(/^v/, '')}`
|
|
67
67
|
const temporary = mkdtempSync(join(tmpdir(), 'code-foundry-fleet-'))
|
|
68
68
|
try {
|
|
69
|
-
const
|
|
69
|
+
const fetch = spawnSync('git', ['-C', repository.path, 'fetch', 'origin', 'staging', '--quiet'], { encoding: 'utf8' })
|
|
70
|
+
if (fetch.status !== 0) return { path: repository.path, status: 'skipped', reason: fetch.stderr.trim() || 'unable to refresh staging baseline' }
|
|
71
|
+
const baseline = spawnSync('git', ['-C', repository.path, 'rev-parse', 'origin/staging'], { encoding: 'utf8' })
|
|
72
|
+
if (baseline.status !== 0) return { path: repository.path, status: 'skipped', reason: 'remote staging branch is unavailable' }
|
|
73
|
+
const add = spawnSync('git', ['-C', repository.path, 'worktree', 'add', '-b', branch, temporary, baseline.stdout.trim()], { encoding: 'utf8' })
|
|
70
74
|
if (add.status !== 0) return { path: repository.path, status: 'skipped', reason: add.stderr.trim() || 'unable to create isolated worktree' }
|
|
71
75
|
const result = syncRepository({ target: temporary, source, force: false })
|
|
72
76
|
if (!result.changed.length) return { path: repository.path, status: 'unchanged', branch }
|
package/src/commands/sync.mjs
CHANGED
|
@@ -64,7 +64,8 @@ export function syncRepository(options) {
|
|
|
64
64
|
const languages = configured(config.languages, detectLanguages(target).join(','))
|
|
65
65
|
const features = configured(config.features, 'all')
|
|
66
66
|
const runtimeRepository = configured(config.runtime_repository, '0xPlayerOne/code-foundry')
|
|
67
|
-
const
|
|
67
|
+
const sourceRuntimeRef = `v${readPackageVersion(source)}`
|
|
68
|
+
let runtimeRef = configured(config.runtime_ref, sourceRuntimeRef)
|
|
68
69
|
const toolchain = configured(config.toolchain, 'auto')
|
|
69
70
|
const overlays = overlayPolicy(target, config)
|
|
70
71
|
if (!['auto', 'native', 'mise'].includes(toolchain)) {
|
|
@@ -73,6 +74,18 @@ export function syncRepository(options) {
|
|
|
73
74
|
const license = configured(config.license, existsSync(join(target, 'LICENSE')) ? 'preserve' : 'gpl-3.0-or-later')
|
|
74
75
|
const changed = []
|
|
75
76
|
|
|
77
|
+
// Keep normal semver pins current during sync while preserving intentional
|
|
78
|
+
// refs such as `main`, `staging`, or a custom immutable SHA.
|
|
79
|
+
if (existingConfig.runtime_ref && /^v\d+\.\d+\.\d+$/.test(existingConfig.runtime_ref) && existingConfig.runtime_ref !== sourceRuntimeRef) {
|
|
80
|
+
runtimeRef = sourceRuntimeRef
|
|
81
|
+
const current = readFileSync(configPath, 'utf8')
|
|
82
|
+
const updated = current.replace(/^runtime_ref:\s*.*$/m, `runtime_ref: ${sourceRuntimeRef}`)
|
|
83
|
+
if (updated !== current) {
|
|
84
|
+
changed.push('.github/code-foundry.yml')
|
|
85
|
+
writeOrReport(configPath, updated, dryRun)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
76
89
|
for (const file of standardFiles) {
|
|
77
90
|
if (!shouldInclude(file, languages, features, config)) continue
|
|
78
91
|
const sourceFile = sourcePath(source, file)
|