@quintype/framework 7.7.6 → 7.8.0-disable-sw.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [7.7.7](https://github.com/quintype/quintype-node-framework/compare/v7.7.0...v7.7.7) (2022-07-29)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * remove prerender query param after the prerender check ([#314](https://github.com/quintype/quintype-node-framework/issues/314)) ([94eac28](https://github.com/quintype/quintype-node-framework/commit/94eac28bfd04483cc665c5ce4d2fc8768c84a31b))
11
+ * remove prerender query param after the prerender check [#314](https://github.com/quintype/quintype-node-framework/issues/314) ([#317](https://github.com/quintype/quintype-node-framework/issues/317)) ([0067d81](https://github.com/quintype/quintype-node-framework/commit/0067d81fe545a726948db14a44768876b41f6ba8))
12
+
5
13
  ### [7.7.6](https://github.com/quintype/quintype-node-framework/compare/v7.7.5...v7.7.6) (2022-07-28)
6
14
 
7
15
 
@@ -6,8 +6,10 @@ export function registerServiceWorker({
6
6
  navigator = global.navigator,
7
7
  mountAt = global.qtMountAt || "",
8
8
  version = 0,
9
+ page = {}
9
10
  }) {
10
- if (enableServiceWorker && navigator.serviceWorker) {
11
+ const enableServiceWorkerVal = typeof enableServiceWorker === "function" ? enableServiceWorker(page) : enableServiceWorker;
12
+ if (enableServiceWorkerVal && navigator.serviceWorker) {
11
13
  const location =
12
14
  serviceWorkerLocation === "/OneSignalSDKWorker.js"
13
15
  ? `${serviceWorkerLocation}?version=${version}`
package/client/start.js CHANGED
@@ -244,7 +244,7 @@ function runWithTiming(name, f) {
244
244
  * @param {Object} opts Options
245
245
  * @param {function} opts.preRenderApplication Render a part of the application on boot. See [preRenderApplication](https://developers.quintype.com/malibu/isomorphic-rendering/client-side-architecture.html#prerenderapplication)
246
246
  * @param {(function|string)} opts.fcmMessagingSenderId Enable Firebase Cloud Messaging for push notifications
247
- * @param {boolean} opts.enableServiceWorker Should service worker be enabled
247
+ * @param {(function|boolean)} opts.enableServiceWorker Should service worker be enabled
248
248
  * @param {string} opts.serviceWorkerLocation Location of the service worker (default: /service-worker.js). Note, if using mountAt, this is relative to the mount point.
249
249
  * @param {number} opts.appVersion App Version. See [Updating App Version](https://developers.quintype.com/malibu/tutorial/updating-app-version)
250
250
  * @returns {Redux} The store that was created
@@ -295,7 +295,7 @@ export function startApp(renderApplication, reducers, opts) {
295
295
  const { config: { "theme-attributes": pageThemeAttributes = {} } = {} } = page;
296
296
  const version = pageThemeAttributes["cache-burst"] || app.getAppVersion();
297
297
 
298
- const serviceWorkerPromise = registerServiceWorker({ ...opts, version });
298
+ const serviceWorkerPromise = registerServiceWorker({ ...opts, version, page });
299
299
 
300
300
  setupServiceWorkerUpdates(serviceWorkerPromise, app, store, page, opts);
301
301
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/framework",
3
- "version": "7.7.6",
3
+ "version": "7.8.0-disable-sw.0",
4
4
  "description": "Libraries to help build Quintype Node.js apps",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "scripts": {
11
11
  "prepublishOnly": "npm test && ./bin-dev-scripts/standard-version-release.sh",
12
- "test": "NODE_ENV=test npx mocha --timeout 5000 --recursive --require ./test/babel",
12
+ "test": "NODE_ENV=test npx mocha --recursive --require ./test/babel",
13
13
  "watch-test": "NODE_ENV=test npx mocha --recursive --watch --require ./test/babel",
14
14
  "coverage": "nyc --all npm test",
15
15
  "coverage-html": "nyc --all --reporter=html npm test",
@@ -31,7 +31,7 @@
31
31
  "homepage": "https://github.com/quintype/quintype-node-framework#readme",
32
32
  "dependencies": {
33
33
  "@ampproject/toolbox-optimizer": "2.8.3",
34
- "@quintype/amp": "^2.4.26",
34
+ "@quintype/amp": "^2.4.28",
35
35
  "@quintype/backend": "^2.3.1",
36
36
  "@quintype/components": "^3.0.0",
37
37
  "@quintype/prerender-node": "^3.2.26",