workbox-build
Advanced tools
Comparing version 3.2.0 to 3.3.0
@@ -5,3 +5,3 @@ { | ||
"releasesDir": "releases", | ||
"latestVersion": "3.2.0" | ||
"latestVersion": "3.3.0" | ||
} |
@@ -53,3 +53,4 @@ 'use strict'; | ||
maxEntries: joi.number().min(1), | ||
maxAgeSeconds: joi.number().min(1) | ||
maxAgeSeconds: joi.number().min(1), | ||
purgeOnQuotaError: joi.boolean().default(defaults.purgeOnQuotaError) | ||
}).or('maxEntries', 'maxAgeSeconds'), | ||
@@ -56,0 +57,0 @@ networkTimeoutSeconds: joi.number().min(1), |
@@ -20,2 +20,3 @@ 'use strict'; | ||
module.exports = { | ||
clientsClaim: false, | ||
globFollow: true, | ||
@@ -25,8 +26,8 @@ globIgnores: ['**/node_modules/**/*'], | ||
globStrict: true, | ||
importWorkboxFrom: 'cdn', | ||
injectionPointRegexp: /(\.precacheAndRoute\()\s*\[\s*\]\s*(\)|,)/, | ||
maximumFileSizeToCacheInBytes: 2 * 1024 * 1024, | ||
clientsClaim: false, | ||
navigateFallback: undefined, | ||
skipWaiting: false, | ||
importWorkboxFrom: 'cdn', | ||
injectionPointRegexp: /(\.precacheAndRoute\()\s*\[\s*\]\s*(\)|,)/ | ||
purgeOnQuotaError: false, | ||
skipWaiting: false | ||
}; |
'use strict'; | ||
var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray'); | ||
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/* | ||
@@ -19,7 +25,31 @@ Copyright 2017 Google Inc. | ||
// TODO (jeffposnick): More flexibility in case naming conventions change. | ||
// This is the build type that is expected to be present "by default". | ||
var DEFAULT_BUILD_TYPE = 'prod'; | ||
/** | ||
* Switches a string from using the "default" build type to an alternative | ||
* build type. In practice, this is used to swap out "prod" for "dev" in the | ||
* filename of a Workbox library. | ||
* | ||
* @param {string} source The path to a file, which will normally contain | ||
* DEFAULT_BUILD_TYPE somewhere in it. | ||
* @param {string} buildType The alternative build type value to swap in. | ||
* @return {string} source, with the last occurrence of DEFAULT_BUILD_TYPE | ||
* replaced with buildType. | ||
* @private | ||
*/ | ||
module.exports = function (source, buildType) { | ||
return source.replace(DEFAULT_BUILD_TYPE, buildType); | ||
// If we want the DEFAULT_BUILD_TYPE, then just return things as-is. | ||
if (buildType === DEFAULT_BUILD_TYPE) { | ||
return source; | ||
} | ||
// Otherwise, look for the last instance of DEFAULT_BUILD_TYPE, and replace it | ||
// with the new buildType. This is easier via split/join than RegExp. | ||
var parts = source.split(DEFAULT_BUILD_TYPE); | ||
// Join the last two split parts with the new buildType. (If parts only has | ||
// one item, this will be a no-op.) | ||
var replaced = parts.slice(parts.length - 2).join(buildType); | ||
// Take the remaining parts, if any exist, and join them with the replaced | ||
// part using the DEFAULT_BUILD_TYPE, to restore any other matches as-is. | ||
return [].concat((0, _toConsumableArray3.default)(parts.slice(0, parts.length - 2)), [replaced]).join(DEFAULT_BUILD_TYPE); | ||
}; |
{ | ||
"name": "workbox-build", | ||
"version": "3.2.0", | ||
"version": "3.3.0", | ||
"description": "A module that integrates into your build process, helping you generate a manifest of local files that workbox-sw should precache.", | ||
@@ -30,14 +30,14 @@ "keywords": [ | ||
"pretty-bytes": "^4.0.2", | ||
"workbox-background-sync": "^3.2.0", | ||
"workbox-broadcast-cache-update": "^3.2.0", | ||
"workbox-cache-expiration": "^3.2.0", | ||
"workbox-cacheable-response": "^3.2.0", | ||
"workbox-core": "^3.2.0", | ||
"workbox-google-analytics": "^3.2.0", | ||
"workbox-precaching": "^3.2.0", | ||
"workbox-range-requests": "^3.2.0", | ||
"workbox-routing": "^3.2.0", | ||
"workbox-strategies": "^3.2.0", | ||
"workbox-streams": "^3.2.0", | ||
"workbox-sw": "^3.2.0" | ||
"workbox-background-sync": "^3.3.0", | ||
"workbox-broadcast-cache-update": "^3.3.0", | ||
"workbox-cache-expiration": "^3.3.0", | ||
"workbox-cacheable-response": "^3.3.0", | ||
"workbox-core": "^3.3.0", | ||
"workbox-google-analytics": "^3.3.0", | ||
"workbox-precaching": "^3.3.0", | ||
"workbox-range-requests": "^3.3.0", | ||
"workbox-routing": "^3.3.0", | ||
"workbox-strategies": "^3.3.0", | ||
"workbox-streams": "^3.3.0", | ||
"workbox-sw": "^3.3.0" | ||
}, | ||
@@ -44,0 +44,0 @@ "main": "build/index.js", |
@@ -5,3 +5,3 @@ { | ||
"releasesDir": "releases", | ||
"latestVersion": "3.2.0" | ||
"latestVersion": "3.3.0" | ||
} |
@@ -58,2 +58,3 @@ /* | ||
maxAgeSeconds: joi.number().min(1), | ||
purgeOnQuotaError: joi.boolean().default(defaults.purgeOnQuotaError), | ||
}).or('maxEntries', 'maxAgeSeconds'), | ||
@@ -60,0 +61,0 @@ networkTimeoutSeconds: joi.number().min(1), |
@@ -18,2 +18,3 @@ /* | ||
module.exports = { | ||
clientsClaim: false, | ||
globFollow: true, | ||
@@ -23,8 +24,8 @@ globIgnores: ['**/node_modules/**/*'], | ||
globStrict: true, | ||
importWorkboxFrom: 'cdn', | ||
injectionPointRegexp: /(\.precacheAndRoute\()\s*\[\s*\]\s*(\)|,)/, | ||
maximumFileSizeToCacheInBytes: 2 * 1024 * 1024, | ||
clientsClaim: false, | ||
navigateFallback: undefined, | ||
purgeOnQuotaError: false, | ||
skipWaiting: false, | ||
importWorkboxFrom: 'cdn', | ||
injectionPointRegexp: /(\.precacheAndRoute\()\s*\[\s*\]\s*(\)|,)/, | ||
}; |
@@ -17,7 +17,34 @@ /* | ||
// TODO (jeffposnick): More flexibility in case naming conventions change. | ||
// This is the build type that is expected to be present "by default". | ||
const DEFAULT_BUILD_TYPE = 'prod'; | ||
/** | ||
* Switches a string from using the "default" build type to an alternative | ||
* build type. In practice, this is used to swap out "prod" for "dev" in the | ||
* filename of a Workbox library. | ||
* | ||
* @param {string} source The path to a file, which will normally contain | ||
* DEFAULT_BUILD_TYPE somewhere in it. | ||
* @param {string} buildType The alternative build type value to swap in. | ||
* @return {string} source, with the last occurrence of DEFAULT_BUILD_TYPE | ||
* replaced with buildType. | ||
* @private | ||
*/ | ||
module.exports = (source, buildType) => { | ||
return source.replace(DEFAULT_BUILD_TYPE, buildType); | ||
// If we want the DEFAULT_BUILD_TYPE, then just return things as-is. | ||
if (buildType === DEFAULT_BUILD_TYPE) { | ||
return source; | ||
} | ||
// Otherwise, look for the last instance of DEFAULT_BUILD_TYPE, and replace it | ||
// with the new buildType. This is easier via split/join than RegExp. | ||
const parts = source.split(DEFAULT_BUILD_TYPE); | ||
// Join the last two split parts with the new buildType. (If parts only has | ||
// one item, this will be a no-op.) | ||
const replaced = parts.slice(parts.length - 2).join(buildType); | ||
// Take the remaining parts, if any exist, and join them with the replaced | ||
// part using the DEFAULT_BUILD_TYPE, to restore any other matches as-is. | ||
return [ | ||
...parts.slice(0, parts.length - 2), | ||
replaced, | ||
].join(DEFAULT_BUILD_TYPE); | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
175360
73
3760
0
2
Updatedworkbox-core@^3.3.0
Updatedworkbox-precaching@^3.3.0
Updatedworkbox-routing@^3.3.0
Updatedworkbox-strategies@^3.3.0
Updatedworkbox-streams@^3.3.0
Updatedworkbox-sw@^3.3.0