Skip to content

Conversation

inancgumus
Copy link
Contributor

@inancgumus inancgumus commented Oct 15, 2025

What?

  • Renames the pattern matcher to make it more generic.
  • Removes duplicate and superfluous code.

Why?

  • These functions and types match strings and regexes, not just URLs.
  • Next, to simplify code, we'll use Match in WaitForRequest|Response.

Checklist

  • I have performed a self-review of my code.
  • I have run linter and tests locally (make check) and all pass.

Checklist: Documentation (only for k6 maintainers and if relevant)

Please do not merge this PR until the following items are filled out.

  • I have added the correct milestone and labels to the PR.
  • I have updated the release notes: link

Related PR(s)/Issue(s)

@inancgumus inancgumus added this to the v1.4.0 milestone Oct 15, 2025
@inancgumus inancgumus self-assigned this Oct 15, 2025
@inancgumus inancgumus force-pushed the refactor/pattern-matcher branch 2 times, most recently from be90817 to a340f59 Compare October 15, 2025 18:51
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 18:57 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 18:59 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the refactor/pattern-matcher branch from a340f59 to 12f4999 Compare October 15, 2025 19:01
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 19:07 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 19:09 — with GitHub Actions Inactive
@inancgumus inancgumus marked this pull request as ready for review October 15, 2025 19:15
@inancgumus inancgumus requested a review from a team as a code owner October 15, 2025 19:15
@inancgumus inancgumus requested review from codebien, joanlopez and oleiade and removed request for a team and codebien October 15, 2025 19:15
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 19:19 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 19:23 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 19:30 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 19:34 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 19:41 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the refactor/pattern-matcher branch from e4e0408 to 15e117e Compare October 15, 2025 19:42
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 19:48 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 19:50 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the refactor/pattern-matcher branch 2 times, most recently from 8dea890 to 8b8e04d Compare October 15, 2025 19:52
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 19:58 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 20:00 — with GitHub Actions Inactive
@inancgumus inancgumus changed the base branch from add/page-addRemoveEventListener to master October 15, 2025 20:39
@inancgumus inancgumus changed the base branch from master to add/page-addRemoveEventListener October 15, 2025 20:39
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 23:50 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 15, 2025 23:51 — with GitHub Actions Inactive
Base automatically changed from add/page-addRemoveEventListener to master October 16, 2025 11:38
@inancgumus inancgumus force-pushed the refactor/pattern-matcher branch from e29fe65 to 7f404c6 Compare October 16, 2025 11:41
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 16, 2025 11:47 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 16, 2025 11:49 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the refactor/pattern-matcher branch from 7f404c6 to 2b264b0 Compare October 16, 2025 15:58
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 16, 2025 16:04 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 16, 2025 16:08 — with GitHub Actions Inactive
Changes:
- Unexported: Not required except in the package.
- This function doesn't only matches URLs, its usage is broad. So, it
  doesn't make sense to name it as URLMatcher.
And fix some naming inconsistencies throughout.
It's a duplication and replaced by RegExMatcher.
It's an unnecessary indirection for a single-line JS execution.
We're also renaming related functions for consistency with RegExMatcher.
@inancgumus inancgumus force-pushed the refactor/pattern-matcher branch from 2b264b0 to bfcfcf4 Compare October 17, 2025 12:18
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 17, 2025 12:25 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing October 17, 2025 12:27 — with GitHub Actions Inactive
@inancgumus inancgumus merged commit acdfd0f into master Oct 20, 2025
40 checks passed
@inancgumus inancgumus deleted the refactor/pattern-matcher branch October 20, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants