diff --git a/package.json b/package.json index 2b2e8a413..32567e2a9 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,9 @@ "release-it-lerna-changelog": "^3.1.0", "release-it-yarn-workspaces": "^2.0.0" }, + "resolutions": { + "fastboot": "4.1.1" + }, "publishConfig": { "registry": "https://registry.npmjs.org" }, diff --git a/packages/ember-cli-fastboot/fastboot/instance-initializers/fetch.js b/packages/ember-cli-fastboot/fastboot/instance-initializers/fetch.js index d2768fe05..498e054c7 100644 --- a/packages/ember-cli-fastboot/fastboot/instance-initializers/fetch.js +++ b/packages/ember-cli-fastboot/fastboot/instance-initializers/fetch.js @@ -1,6 +1,8 @@ function initialize(instance) { let { request } = instance.lookup('service:fastboot'); - fetch.__fastbootRequest = request; + if (fetch) { + fetch.__fastbootRequest = request; + } } export default { diff --git a/test-packages/custom-fastboot-app/public/custom-index.html b/test-packages/custom-fastboot-app/public/custom-index.html index a21d3d3e3..627f0c40a 100644 --- a/test-packages/custom-fastboot-app/public/custom-index.html +++ b/test-packages/custom-fastboot-app/public/custom-index.html @@ -13,7 +13,9 @@ - +
+ +
diff --git a/test-packages/ember-cli-fastboot-testing-app/tests/index.html b/test-packages/ember-cli-fastboot-testing-app/tests/index.html index 6b1376eb4..832638d29 100644 --- a/test-packages/ember-cli-fastboot-testing-app/tests/index.html +++ b/test-packages/ember-cli-fastboot-testing-app/tests/index.html @@ -21,12 +21,8 @@ {{content-for "body"}} {{content-for "test-body"}} -
-
-
-
-
-
+
+
diff --git a/yarn.lock b/yarn.lock index f7750df50..f1d19ba3d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6966,14 +6966,14 @@ fastboot-transform@^0.1.3: convert-source-map "^1.5.1" fastboot@^3.0.3: - version "3.3.2" - resolved "https://registry.yarnpkg.com/fastboot/-/fastboot-3.3.2.tgz#bf1ac7b01937846b63423a88138e13eb50406d2e" - integrity sha512-2NKTW32GvEsDyBrdw1trW1JsbS+9/7sAQuKwkht12mNitimRrSKVLP2AxsM/HSXQE+aiET4XCfKdyeIy0kQbKQ== + version "4.1.1" dependencies: + abortcontroller-polyfill "^1.7.3" chalk "^4.1.2" cookie "^0.4.1" debug "^4.3.3" jsdom "^19.0.0" + node-fetch "^2.6.7" resolve "^1.22.0" simple-dom "^1.4.0" source-map-support "^0.5.21"