Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates typing for Request.queryParams #1027

Merged
merged 4 commits into from
May 16, 2023
Merged

Conversation

@IanVS
Copy link
Collaborator

IanVS commented May 20, 2022

@jasikpark could you force-push to this branch to trigger a new run? I'm curious if it will still fail, and I can't trigger a re-run (maybe it's too old)

@jasikpark
Copy link
Contributor Author

@IanVS mind approving the CI run?

@IanVS
Copy link
Collaborator

IanVS commented Mar 21, 2023

@cah-brian-gantzler how will we handle types when we swap out MSW for pretender? For instance, in this PR, we can see that the queryParams comes from pretender, which uses route-recognzier, which has a type: https://github.com/tildeio/route-recognizer/blob/0a44fd86081ef425071839d3184e72fd2916d6fe/lib/route-recognizer.ts#L433

If one were to swap out MSW, would the types here change, I guess?

@jasikpark
Copy link
Contributor Author

thx for the approval! i don't have merge perms, so merge when you think it's ready to be

@cah-brian-gantzler
Copy link
Collaborator

@IanVS
The query params are the params at the end of the url. The url is is the same wether its pretender or msw. I do not believe this would change at all.

@jasikpark
Copy link
Contributor Author

so this can merge then?

@cah-brian-gantzler
Copy link
Collaborator

I am ok with this being merged

@jasikpark
Copy link
Contributor Author

mind clicking the button for me then? I don't have the permissions for merging my own PR

@IanVS
Copy link
Collaborator

IanVS commented May 16, 2023

I will do it in a minute after giving one more quick look.

@IanVS
Copy link
Collaborator

IanVS commented May 16, 2023

The url is is the same wether its pretender or msw. I do not believe this would change at all.

Yes, but the fake Request object that is given to the route callbacks comes from pretender today, and presumably from MSW if that gets swapped out. Happy to run with this, but I think there may be nuances in the types if we allow changing out the mock layer.

@IanVS IanVS merged commit 4a4d9f6 into miragejs:master May 16, 2023
@cah-brian-gantzler
Copy link
Collaborator

If you find anything out would be interested

@jasikpark jasikpark deleted the patch-1 branch May 16, 2023 19:23
smeijer pushed a commit to magicbell-io/magicbell-js that referenced this pull request Nov 21, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [miragejs](https://togithub.com/miragejs/miragejs) | [`^0.1.47` ->
`^0.1.48`](https://renovatebot.com/diffs/npm/miragejs/0.1.47/0.1.48) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/miragejs/0.1.48?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/miragejs/0.1.48?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/miragejs/0.1.47/0.1.48?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/miragejs/0.1.47/0.1.48?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>miragejs/miragejs (miragejs)</summary>

###
[`v0.1.48`](https://togithub.com/miragejs/miragejs/releases/tag/v0.1.48)

[Compare
Source](https://togithub.com/miragejs/miragejs/compare/v0.1.47...v0.1.48)

#### What's Changed

🚀 **Enhancements**

- Add Middleware support via `server.middleware = [/*...*/]` by
[@&#8203;osi-jehrlich](https://togithub.com/osi-jehrlich) in
[miragejs/miragejs#1089
- Allow for keyForId and valueForId on the serializer by
[@&#8203;cah-brian-gantzler](https://togithub.com/cah-brian-gantzler) in
[miragejs/miragejs#1086

🐛 **Bugfixes**

- Don't require testConfig for timing to respect environment. by
[@&#8203;rmjohnson-olo](https://togithub.com/rmjohnson-olo) in
[miragejs/miragejs#1080
- Update typing for `Request.queryParams` by
[@&#8203;jasikpark](https://togithub.com/jasikpark) in
[miragejs/miragejs#1027

🏠 **Internal**

- Simplify lodash dependencies by
[@&#8203;mansona](https://togithub.com/mansona) in
[miragejs/miragejs#1091

#### New Contributors

- [@&#8203;jasikpark](https://togithub.com/jasikpark) made their first
contribution in
[miragejs/miragejs#1027
- [@&#8203;rmjohnson-olo](https://togithub.com/rmjohnson-olo) made their
first contribution in
[miragejs/miragejs#1080
- [@&#8203;osi-jehrlich](https://togithub.com/osi-jehrlich) made their
first contribution in
[miragejs/miragejs#1089

**Full Changelog**:
miragejs/miragejs@v0.1.47...v0.1.48

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am every weekday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/magicbell-io/magicbell-js).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants