A drop-in destination change no longer makes a landing verify every bundle
landing-preconditions verified EVERY bundle whenever vite.doxa-maps-build-config.json changed, but two of its keys build nothing: dropin (where sync-dropin copies to) and the "//" comment keys. Changing dropin.dest cost a full verification, about 10 minutes, for no possible staleness. The config now counts as a build change only when another key differs. Checked on real history both ways: the dropin.dest fix is not a build change; the posterSources flip is.
This commit is contained in:
parent
e210ca7ef7
commit
bfce5fb95e
1 changed files with 16 additions and 1 deletions
|
|
@ -117,7 +117,22 @@ if (process.env.DOXA_SKIP_FRESHNESS === '1') {
|
|||
const deps = (ref) => { try { const j = JSON.parse(run('git', ['show', `${ref}:package.json`]).stdout); return JSON.stringify([j.dependencies, j.devDependencies]) } catch { return '' } }
|
||||
return deps(base) !== deps('HEAD')
|
||||
}
|
||||
const everything = !base || pkgDepsChanged() || changed.some((f) => /^(vite\.config\.js$|bun\.lockb?$|vite\.doxa-maps-build-config\.json$)/.test(f))
|
||||
// The build config reaches every bundle only through a key the BUILD reads. dropin (where sync-dropin copies
|
||||
// to) and the "//" comment keys build nothing: a dropin.dest fix verified every bundle, ~10 min, for nothing.
|
||||
const buildCfgChanged = () => {
|
||||
const CFG = 'vite.doxa-maps-build-config.json'
|
||||
if (!changed.includes(CFG) || !base) return false
|
||||
const keys = (ref) => {
|
||||
try {
|
||||
const j = JSON.parse(run('git', ['show', `${ref}:${CFG}`]).stdout)
|
||||
for (const k of Object.keys(j)) if (k === 'dropin' || k.startsWith('//')) delete j[k]
|
||||
return JSON.stringify(j)
|
||||
} catch { return null }
|
||||
}
|
||||
const a = keys(base), b = keys('HEAD')
|
||||
return a === null || b === null || a !== b
|
||||
}
|
||||
const everything = !base || pkgDepsChanged() || buildCfgChanged() || changed.some((f) => /^(vite\.config\.js$|bun\.lockb?$)/.test(f))
|
||||
const libChanged = changed.filter((f) => f.startsWith('library/'))
|
||||
const shared = everything || libChanged.length > 0
|
||||
const own = new Set(changed.map((f) => (f.match(/^plugin-designs\/([^/]+)\//) || [])[1]).filter(Boolean))
|
||||
|
|
|
|||
Loading…
Reference in a new issue