Repository navigation
Commit 917e090
committed
fix: accept a snapshot.managedPaths RegExp without a capture group
The schema documents a `snapshot.managedPaths` entry as "a RegExp matching a
managed directory", but `FileSystemInfo` read the managed directory out of
`match[1]`. A pattern written exactly as documented — with no capture group —
therefore reached `getManagedItem(undefined, path)` and failed the build with
`TypeError: Cannot read properties of undefined (reading 'length')` from inside
the snapshot layer, naming nothing the user wrote.
Fall back to the whole match, which is the directory the schema describes.1 parent 67b8346 commit 917e090
9 files changed
Lines changed: 70 additions & 2 deletions
File tree
- .changeset
- lib
- test/configCases/cache-dependencies/managed-paths-regexp
- node_modules/package
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1207 | 1207 | | |
1208 | 1208 | | |
1209 | 1209 | | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1210 | 1220 | | |
1211 | 1221 | | |
1212 | 1222 | | |
| |||
2663 | 2673 | | |
2664 | 2674 | | |
2665 | 2675 | | |
2666 | | - | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
2667 | 2680 | | |
2668 | 2681 | | |
2669 | 2682 | | |
| |||
3921 | 3934 | | |
3922 | 3935 | | |
3923 | 3936 | | |
3924 | | - | |
| 3937 | + | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
3925 | 3941 | | |
3926 | 3942 | | |
3927 | 3943 | | |
| |||
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Whitespace-only changes.
Whitespace-only changes.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments