codingjoe / codingjoe/esupgrade
Transformer: URL parsing/regex routing to URLPattern
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 2
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 6
Description
## Summary
Add a transformer that upgrades common URL regex/parsing routing patterns to `URLPattern`.
## Target transformation
Examples to support where safe:
- `new URL(u).pathname` + regex `.test/.exec` route checks -> `new URLPattern({ pathname: ... }).test/exec(...)`
- Manual host/path combination checks -> one `URLPattern` with `hostname` + `pathname`.
## Scope
- Baseline category: newly available (URLPattern became newly available in Sep 2025).
- Focus only on patterns that can be converted with high confidence.
## Acceptance criteria
- Add transformer implementation in `src/newlyAvailable/`.
- Export from `src/newlyAvailable.js`.
- Add comprehensive tests in `tests/newlyAvailable/`.
- Document in `README.md` with safe transformation constraints.
## Sources
- https://web.dev/blog/baseline-urlpattern
- https://web.dev/blog/baseline-digest-sep-2025
Contributor guide
Assessment
This issue has not been assessed yet.