|
1 | 1 | import { stripVTControlCharacters } from 'node:util' |
2 | 2 | import { css, html, js, json, test } from '../utils' |
3 | 3 |
|
4 | | -test( |
| 4 | +test.only( |
5 | 5 | 'upgrades half-upgraded v3 project to v4 (pnpm)', |
6 | 6 | { |
7 | 7 | fs: { |
@@ -34,20 +34,25 @@ test( |
34 | 34 | }, |
35 | 35 | async ({ exec, expect }) => { |
36 | 36 | // Ensure we are in a git repo |
37 | | - await exec('git init') |
38 | | - await exec('git add --all') |
39 | | - await exec('git commit -m "before migration" --allow-empty') |
| 37 | + // await exec('git init') |
| 38 | + // await exec('git add --all') |
| 39 | + // await exec('git commit -m "before migration" --allow-empty') |
40 | 40 |
|
41 | 41 | // Fully upgrade to v4 |
| 42 | + console.log('[START] Upgrade') |
42 | 43 | await exec('pnpm exec upgrade') |
| 44 | + console.log('[END] Upgrade') |
43 | 45 |
|
44 | 46 | // Undo all changes to the current repo. This will bring the repo back to a |
45 | 47 | // v3 state, but the `node_modules` will now have v4 installed. |
| 48 | + console.log('[START] Clean git') |
46 | 49 | await exec('git reset --hard') |
47 | 50 | await exec('git clean -df') |
| 51 | + console.log('[END] Clean git') |
48 | 52 |
|
49 | 53 | // Re-running the upgrade should result in an error |
50 | 54 | return expect(() => { |
| 55 | + console.log('[START] Upgrade again') |
51 | 56 | return exec('pnpm exec upgrade', {}, { ignoreStdErr: true }).catch((e) => { |
52 | 57 | // Replacing the current version with a hardcoded `v4` to make it stable |
53 | 58 | // when we release new minor/patch versions. |
|
0 commit comments