Commit 1d6cd0e
committed
test(snapshots): pin the blank-line layout package managers repaint nondeterministically
pnpm decides at runtime whether to print its self-update banner box, and
its progress repainting shifts how many blank lines surround section
headers, per-project change-summary rows, and the "Done in" line; yarn
appends "in Xs Ys" to its completion line only when a step is slow
enough to time. Each of these raced the recorded baselines.
Strip the banner box (guarded to boxes containing "Update available"),
normalize yarn's completion tail, pin one blank line before dependency
sections and "Done in", pin change-summary rows flush against the
previous line, collapse longer blank runs, and trim trailing blanks.
These normalizations run after every rule that strips whole lines
(stack frames, progress rows, the banner itself) so a strip leaves the
same layout as output where the stripped text never appeared.
Path redaction gains two pairs: the dunce-canonicalized variant of each
redacted path, because tools that canonicalize (pnpm link, yarn portals)
print the resolved form of macOS /private symlinks, and the case root as
<case>, because fixtures may create siblings of the workspace whose
paths tools echo back.
Re-record the baselines the pinned layout changes.
Part of #2116.1 parent 484349e commit 1d6cd0e
53 files changed
Lines changed: 123 additions & 112 deletions
File tree
- crates/vite_cli_snapshots/tests/cli_snapshots
- fixtures
- command_config_yarn1/snapshots
- command_pack_yarn4_with_workspace/snapshots
- command_rebuild_pnpm11/snapshots
- command_staged_with_config/snapshots
- create_generator_monorepo/snapshots
- migration_eslint_legacy/snapshots
- migration_eslint_monorepo_package_only/snapshots
- migration_eslint_monorepo_plugins_in_packages/snapshots
- migration_eslint_monorepo/snapshots
- migration_eslint_nuxt_skip/snapshots
- migration_existing_husky_v8_hooks/snapshots
- migration_existing_husky_v8_multi_hooks/snapshots
- migration_framework_shim_astro_vue/snapshots
- migration_framework_shim_astro/snapshots
- migration_framework_shim_vue/snapshots
- migration_husky_catalog_version/snapshots
- migration_husky_latest_dist_tag/snapshots
- migration_husky_v8_preserves_lint_staged/snapshots
- migration_lint_staged_ts_config/snapshots
- migration_lintstagedrc_not_support/snapshots
- migration_monorepo_bun/snapshots
- migration_monorepo_husky_v8_preserves_lint_staged/snapshots
- migration_monorepo_pnpm/snapshots
- migration_monorepo_yarn4/snapshots
- migration_not_supported_npm8_2/snapshots
- migration_not_supported_pnpm9_4/snapshots
- migration_not_supported_vite6/snapshots
- migration_not_supported_vitest3/snapshots
- migration_nvmrc_node_alias/snapshots
- migration_other_hook_tool/snapshots
- migration_partially_migrated_pre_commit/snapshots
- migration_prettier_eslint_combo/snapshots
- migration_prettier_ignore_unknown/snapshots
- migration_prettier_lint_staged/snapshots
- migration_prettier_pkg_json/snapshots
- migration_prettier/snapshots
- migration_standalone_bun_install/snapshots
- migration_standalone_npm/snapshots
- migration_standalone_pnpm/snapshots
- migration_standalone_yarn4_idempotent/snapshots
- migration_standalone_yarn_below_catalog/snapshots
- migration_subpath/snapshots
- migration_upgrade_vitest_exact_peer_yarn4/snapshots
- pm_version/snapshots
- shim_recursive_npm_run/snapshots
- test_managed_package_manager_path/snapshots
- yarn_install_with_options/snapshots
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| |||
Lines changed: 0 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 31 | | |
42 | 32 | | |
43 | 33 | | |
| |||
Lines changed: 0 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
9 | 7 | | |
10 | 8 | | |
11 | | - | |
12 | 9 | | |
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
18 | | - | |
19 | 15 | | |
20 | 16 | | |
21 | | - | |
22 | 17 | | |
23 | 18 | | |
24 | 19 | | |
| |||
32 | 27 | | |
33 | 28 | | |
34 | 29 | | |
35 | | - | |
36 | 30 | | |
37 | 31 | | |
38 | | - | |
39 | 32 | | |
40 | 33 | | |
41 | 34 | | |
42 | 35 | | |
43 | 36 | | |
44 | 37 | | |
45 | 38 | | |
46 | | - | |
47 | 39 | | |
48 | 40 | | |
49 | | - | |
50 | 41 | | |
51 | 42 | | |
52 | 43 | | |
53 | 44 | | |
54 | | - | |
55 | 45 | | |
56 | 46 | | |
57 | | - | |
58 | 47 | | |
59 | 48 | | |
60 | | - | |
61 | 49 | | |
62 | 50 | | |
63 | 51 | | |
64 | | - | |
65 | 52 | | |
66 | 53 | | |
67 | | - | |
68 | 54 | | |
69 | 55 | | |
70 | 56 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
0 commit comments