Skip to content

Commit ac548a7

Browse files
elrrrrrrrclaude
andcommitted
test(pm): add eggjs/egg next branch smoke to Windows e2e
Windows has been unstable lately; mirror the Linux bash e2e case for `utoo install --from pnpm` on eggjs/egg (next) so we catch Windows-specific regressions in pnpm migration + workspace install at the same cadence as Linux/macOS. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 65b5f59 commit ac548a7

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

e2e/utoo-pm.ps1

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,40 @@ finally {
306306
Remove-Item -Recurse -Force $antdxDir -ErrorAction SilentlyContinue
307307
}
308308

309+
# Case: pnpm migration (eggjs/egg)
310+
Write-Yellow "Case: pnpm migration (eggjs/egg)"
311+
$eggDir = Join-Path $env:TEMP "utoo-e2e-egg-$(Get-Random)"
312+
try {
313+
git clone --branch next --single-branch --depth 1 https://github.com/eggjs/egg.git $eggDir
314+
Push-Location $eggDir
315+
316+
utoo install --from pnpm --ignore-scripts --registry=https://registry.npmjs.org
317+
if ($LASTEXITCODE -ne 0) { throw "utoo install --from pnpm failed for eggjs/egg" }
318+
319+
# Verify workspaces field was added to package.json
320+
node -e "const pkg = require('./package.json'); const ws = pkg.workspaces; if (!ws || !Array.isArray(ws)) throw new Error('workspaces not set'); if (!ws.includes('packages/*')) throw new Error('missing packages/*'); console.log(' workspaces:', ws.length, 'patterns');"
321+
if ($LASTEXITCODE -ne 0) { throw "workspaces field verification failed" }
322+
323+
# Verify overrides were added
324+
node -e "const pkg = require('./package.json'); if (!pkg.overrides) throw new Error('overrides not set'); if (!pkg.overrides.vite) throw new Error('vite override missing'); console.log(' overrides:', Object.keys(pkg.overrides).length, 'entries');"
325+
if ($LASTEXITCODE -ne 0) { throw "overrides field verification failed" }
326+
327+
# Verify .utoo.toml was created with catalogs
328+
if (-not (Test-Path ".utoo.toml")) { throw ".utoo.toml not created" }
329+
$tomlContent = Get-Content .utoo.toml -Raw
330+
if ($tomlContent -notmatch 'lodash') { throw "catalog missing lodash" }
331+
if ($tomlContent -notmatch 'path-to-regexp') { throw "named catalog missing" }
332+
333+
# Verify node_modules was created (install ran successfully)
334+
if (-not (Test-Path "node_modules")) { throw "node_modules not created" }
335+
336+
Write-Green "PASS: pnpm migration (eggjs/egg)"
337+
}
338+
finally {
339+
Pop-Location
340+
Remove-Item -Recurse -Force $eggDir -ErrorAction SilentlyContinue
341+
}
342+
309343
# Case: install-node + esbuild postinstall
310344
Write-Yellow "Case: install-node + esbuild"
311345
$esbuildDir = Join-Path $env:TEMP "utoo-e2e-esbuild-$(Get-Random)"

0 commit comments

Comments
 (0)