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

fix: Fetch handler hacks for Mirage #9199

Merged
merged 2 commits into from
Jan 10, 2024
Merged

fix: Fetch handler hacks for Mirage #9199

merged 2 commits into from
Jan 10, 2024

Conversation

gitKrystan
Copy link
Contributor

@gitKrystan gitKrystan commented Jan 9, 2024

Description

  • Allow store.request to be intercepted by Mirage
    • This is necessary because Mirage doesn't mock fetch until after EmberData closes over fetch.
  • Don't cloneResponse for Mirage mock responses
    • This is necessary because Mirage does not implement Response.body, which is required for cloneResponse. Since cloneResponse only exists because updating the headers on a real Response isn't allowed (but Mirage also--conveniently--doesn't implement this limitation), we can just update the headers on the Mirage mock response instead.

Notes for the release

@gitKrystan gitKrystan changed the base branch from main to lts-4-12 January 9, 2024 19:04
@gitKrystan gitKrystan changed the title fetch for mirage fix: Fetch handler hacks for Mirage Jan 9, 2024
@gitKrystan gitKrystan added 🎯 release PR should be backported to release 🏷️ bug This PR primarily fixes a reported issue lts-4-12 Long Term LTS Maintenance labels Jan 9, 2024
@github-actions github-actions bot added the backport-lts PR targets the current lts branch label Jan 9, 2024
@gitKrystan gitKrystan removed the 🎯 release PR should be backported to release label Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-lts PR targets the current lts branch 🏷️ bug This PR primarily fixes a reported issue lts-4-12 Long Term LTS Maintenance
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants