-
Notifications
You must be signed in to change notification settings - Fork 440
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
Support Pretender 2 #1392
Support Pretender 2 #1392
Conversation
This change does not, like originally intended, make Pretender a peer dependency. There's a lot of work and debate being done here, so in the mean time let's unlock `fetch` support in Mirage. Dependency changes ------------------ * pretender 1.6 => 2.1. I've locked at 2.1.0 until pretenderjs/pretender#235 is resolved. This will require code changes on our end, and thus I don't want this sliding from underneath us and causing unnecessary weeping and gnashing of teeth. * Add xg-wang/whatwg-fetch. Required for the upgrade. * fake-xml-http-request 1.4.0 => 2.0.0. Required for the upgrade. * route-recognizer 0.2.3 => 0.3.4. Required for the upgrade. * ember-cli-node-assets 0.1.4 => 0.2.2. Because why not! I'm kneed deep in this stuff, so I may as well keep this up to date.
@@ -144,15 +154,24 @@ module.exports = { | |||
} | |||
}; | |||
|
|||
function npmAsset(filePath) { | |||
function npmAsset(options = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactoring here required to silence a source maps warning for route-recognizer.
I'm fairly sure this works. I still need to smoke test this on a few apps of mine. I'm especially keen on ensuring that I think we can remove the Pretender shim too, but I haven't verified this yet. Theoretically Pretender provides such a shim now. |
"broccoli-stew": "^1.5.0", | ||
"broccoli-string-replace": "^0.1.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was moved around when installing the various dependencies.
Smoke test done, and I can report gold! |
Sick!! Was busy earlier this week, I know you pinged me about helping out. Sorry for being radio silent, and thank you so much James! |
Any chance of getting a release with this change? Would be awesome! |
This seems to be released since quite some time but fetch via mirage passthrough still doesn't work for me, getting |
Got it to work after all because it seems my problem was caused by the issue fixed by pretenderjs/pretender#280. Had to override pretender transitive dependency. |
@bjornharrtell yikes, sounds bad. So you're saying ember-cli-mirage wasn't intercepting fetch requests? |
@samselikoff yep, afraid so. |
Any chance you could provide a reproduction? |
This change does not, like originally intended, make Pretender a peer
dependency. There's a lot of work and debate being done here, so in the
mean time let's unlock
fetch
support in Mirage.Dependency changes
Switch back to whatwg-fetch pretenderjs/pretender#235 is resolved. This will require code changes
on our end, and thus I don't want this sliding from underneath us and
causing unnecessary weeping and gnashing of teeth.
in this stuff, so I may as well keep this up to date.