You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to update ember-data's fastboot tests from v0.2. v0.3 works fine.
Starting in 0.4 however @ember/jquery seems to fail to correctly import jquery into the vendor shim and thus no jQuery global is present. No other dependencies are being changed and our fastboot version, ember-source version, and @ember/jquery is the latest release in all cases.
I haven't been able to determine what changed between 0.3 and 0.4 to trigger this (there are very few changes that aren't dependency changes), but wanted to surface this here in case anyone using jQuery still bumps into an error telling them they need to install ember-fetch after upgrading to 0.4 or 0.5.
Edit: after looking through the codepaths it seems the jQuery global check was a red herring, it's always false in fastboot. When using jQuery najax needs to be installed, this used to be brought by fastboot itself but that support was changed in 3.x which v0.4 here bumped to (a deprecation would have been nice, but oh well). The solution here was to install the beta of ember-cli-fastboot 3.x, the latest fastboot, the latest najax, and to configure config/fastboot-testing.js
module.exports={resilient: true,buildSandboxGlobals(defaultGlobals){constadditionalGlobals={};try{constnajax=require('najax');// eslint-disable-lineadditionalGlobals.najax=najax;}catch(e){// we only add the global if najax is installed}returnObject.assign({},defaultGlobals,additionalGlobals);},};
The text was updated successfully, but these errors were encountered:
I've traced this down to #328 from @thoov which bumped this to bring a version of fastboot (3.x) that isn't actually available via any version of ember-cli-fastboot (which uses fastboot 2.x). It seems the ember-fastboot project has failed to release a new version of ember-cli-fastboot in quite a long time.
While the jQuery issue isn't with this repo, I'd suggest downgrading fastboot to 2.x to match what users can actually install.
I'm trying to update ember-data's fastboot tests from v0.2. v0.3 works fine.
Starting in 0.4 however
@ember/jquery
seems to fail to correctly import jquery into the vendor shim and thus no jQuery global is present. No other dependencies are being changed and our fastboot version, ember-source version, and @ember/jquery is the latest release in all cases.I haven't been able to determine what changed between 0.3 and 0.4 to trigger this (there are very few changes that aren't dependency changes), but wanted to surface this here in case anyone using jQuery still bumps into an error telling them they need to install ember-fetch after upgrading to 0.4 or 0.5.
Edit: after looking through the codepaths it seems the jQuery global check was a red herring, it's always false in fastboot. When using jQuery najax needs to be installed, this used to be brought by fastboot itself but that support was changed in 3.x which v0.4 here bumped to (a deprecation would have been nice, but oh well). The solution here was to install the beta of
ember-cli-fastboot 3.x
, the latest fastboot, the latest najax, and to configureconfig/fastboot-testing.js
The text was updated successfully, but these errors were encountered: