next.js
22ac035b - Normalize filepaths when parsing patterns from js values (#80511)

Commit
225 days ago
Normalize filepaths when parsing patterns from js values (#80511) ## Normalize Windows file paths in pattern construction When interpreting js_values as `Pattern` objects for interpretation, normalize windows file endings away. Also enable debug_assertions in unit tests. ### Why? Enabling debug assertions on CI will prevent us from making mistakes ### Alternates? Honestly, i am kind of confused about where to put this logic https://vercel.slack.com/archives/C03EWR7LGEN/p1749854016509599?thread_ts=1749833045.978729&cid=C03EWR7LGEN `Pattern::normalize` and `Pattern::with_normalized_path` are both reasonable alternatives. However, the fact that `normalize` doesn't call `with_normalized_path` was a bit concerning, as was the complex nature of the Pattern type. Fixes PACK-3279 Part of PACK-4578
Author
Parents
Loading