-
Notifications
You must be signed in to change notification settings - Fork 159
Add fetch API globals
#898
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
base: master
Are you sure you want to change the base?
Conversation
30d6ac7 to
fe45dbd
Compare
|
Nice work picking this up @bobisjan . Let me know if there's anything I can help with |
3d22481 to
88fbb08
Compare
| `Using fetch with relative URL ${url}, but application instance has not been initialized yet.` | ||
| ); | ||
| } | ||
| // Old Prember version is not sending protocol |
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.
@gilest, should be old versions of prember still supported? Based on the changelog the 1.0.2+ send protocol correctly https://github.com/ef4/prember/blob/master/CHANGELOG.md#102---2019-01-06
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.
I see. Is that patch incompatible with the changes you are making?
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.
Nope, this workaround should still work for prember < 1.0.2, hence it can stay here if it make sense 🙌
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.
I would guess most prember users are on the latest version but if the workaround can stay that is ideal
f405ce6 to
24aba7b
Compare
| pkg.dependencies['fastboot-express-middleware'] = | ||
| process.env.npm_package_dependencies_fastboot_express_middleware; | ||
| pkg.dependencies['fastboot'] = `file:${path.resolve(__dirname, '../../fastboot')}` | ||
| pkg.dependencies['fastboot-express-middleware'] = `file:${path.resolve(__dirname, '../../fastboot-express-middleware')}` |
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 fixes Legacy Mocha Tests, where fetch was undefined during initialisation.
|
CI is ✅ except tests related to |
| } | ||
|
|
||
| export default { | ||
| name: 'fastboot:fetch', // `ember-fetch` addon registers as `fetch` |
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.
Should be ember-fetch add-on also removed from test apps in the PR?
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.
Since we're providing fetch directly now I think maybe the ember-fetch package should be removed
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.
Done, tests are passing now 🤞
639dd38 to
653ac1c
Compare
This is an attempt to follow ember-cli/ember-fetch#656 (comment)