Socket
Socket
Sign inDemoInstall

workbox-build

Package Overview
Dependencies
Maintainers
4
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workbox-build - npm Package Compare versions

Comparing version 3.0.0-alpha.5 to 3.0.0-alpha.6

LICENSE

2

build/cdn-details.json

@@ -5,3 +5,3 @@ {

"releasesDir": "releases",
"latestVersion": "3.0.0-alpha.5"
"latestVersion": "3.0.0-alpha.6"
}

@@ -18,3 +18,7 @@ 'use strict';

*/
var assert = require('assert');
var cdn = require('../cdn-details.json');
var errors = require('./errors');

@@ -30,2 +34,4 @@ var getCDNOrigin = function getCDNOrigin() {

var getModuleUrl = function getModuleUrl(moduleName, buildType) {
assert(moduleName, errors['no-module-name']);
if (buildType) {

@@ -32,0 +38,0 @@ var pkgJson = require(`${moduleName}/package.json`);

@@ -103,3 +103,3 @@ 'use strict';

if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
_context.next = 38;
_context.next = 49;
break;

@@ -115,17 +115,37 @@ }

_context.prev = 19;
_iterator2 = (0, _getIterator3.default)(BUILD_TYPES);
case 21:
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
_context.next = 32;
break;
}
for (_iterator2 = (0, _getIterator3.default)(BUILD_TYPES); !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
buildType = _step2.value;
srcPath = useBuildType(defaultPathToLibrary, buildType);
destPath = path.join(workboxDirectoryPath, path.basename(srcPath));
buildType = _step2.value;
copyPromises.push(fse.copy(srcPath, destPath));
copyPromises.push(fse.copy(`${srcPath}.map`, `${destPath}.map`));
if (!(library === 'workbox-sw' && buildType === BUILD_TYPES[0])) {
_context.next = 25;
break;
}
_context.next = 27;
return _context.abrupt('continue', 29);
case 25:
srcPath = useBuildType(defaultPathToLibrary, buildType);
destPath = path.join(workboxDirectoryPath, path.basename(srcPath));
copyPromises.push(fse.copy(srcPath, destPath));
copyPromises.push(fse.copy(`${srcPath}.map`, `${destPath}.map`));
case 29:
_iteratorNormalCompletion2 = true;
_context.next = 21;
break;
case 23:
_context.prev = 23;
case 32:
_context.next = 38;
break;
case 34:
_context.prev = 34;
_context.t0 = _context['catch'](19);

@@ -135,5 +155,5 @@ _didIteratorError2 = true;

case 27:
_context.prev = 27;
_context.prev = 28;
case 38:
_context.prev = 38;
_context.prev = 39;

@@ -144,7 +164,7 @@ if (!_iteratorNormalCompletion2 && _iterator2.return) {

case 30:
_context.prev = 30;
case 41:
_context.prev = 41;
if (!_didIteratorError2) {
_context.next = 33;
_context.next = 44;
break;

@@ -155,9 +175,9 @@ }

case 33:
return _context.finish(30);
case 44:
return _context.finish(41);
case 34:
return _context.finish(27);
case 45:
return _context.finish(38);
case 35:
case 46:
_iteratorNormalCompletion = true;

@@ -167,8 +187,8 @@ _context.next = 12;

case 38:
_context.next = 44;
case 49:
_context.next = 55;
break;
case 40:
_context.prev = 40;
case 51:
_context.prev = 51;
_context.t1 = _context['catch'](10);

@@ -178,5 +198,5 @@ _didIteratorError = true;

case 44:
_context.prev = 44;
_context.prev = 45;
case 55:
_context.prev = 55;
_context.prev = 56;

@@ -187,7 +207,7 @@ if (!_iteratorNormalCompletion && _iterator.return) {

case 47:
_context.prev = 47;
case 58:
_context.prev = 58;
if (!_didIteratorError) {
_context.next = 50;
_context.next = 61;
break;

@@ -198,22 +218,22 @@ }

case 50:
return _context.finish(47);
case 61:
return _context.finish(58);
case 51:
return _context.finish(44);
case 62:
return _context.finish(55);
case 52:
_context.prev = 52;
_context.next = 55;
case 63:
_context.prev = 63;
_context.next = 66;
return _promise2.default.all(copyPromises);
case 55:
case 66:
return _context.abrupt('return', workboxDirectoryName);
case 58:
_context.prev = 58;
_context.t2 = _context['catch'](52);
case 69:
_context.prev = 69;
_context.t2 = _context['catch'](63);
throw Error(`${errors['unable-to-copy-workbox-libraries']} ${_context.t2}`);
case 61:
case 72:
case 'end':

@@ -223,3 +243,3 @@ return _context.stop();

}
}, _callee, undefined, [[10, 40, 44, 52], [19, 23, 27, 35], [28,, 30, 34], [45,, 47, 51], [52, 58]]);
}, _callee, undefined, [[10, 51, 55, 63], [19, 34, 38, 46], [39,, 41, 45], [56,, 58, 62], [63, 69]]);
}));

@@ -226,0 +246,0 @@

@@ -110,3 +110,5 @@ 'use strict';

'invalid-network-timeout-seconds': ol`When using networkTimeoutSeconds, you
must set the handler to 'networkFirst'.`
must set the handler to 'networkFirst'.`,
'no-module-name': ol`You must provide a moduleName parameter when calling
getModuleUrl().`
};

@@ -105,3 +105,3 @@ 'use strict';

plugins.push(`${pluginString}(${(0, _stringify2.default)(pluginConfig)})`);
plugins.push(`new ${pluginString}(${(0, _stringify2.default)(pluginConfig)})`);
}

@@ -108,0 +108,0 @@ } catch (err) {

{
"name": "workbox-build",
"version": "3.0.0-alpha.5",
"version": "3.0.0-alpha.6",
"description": "A module that integrates into your build process, helping you generate a manifest of local files that workbox-sw should precache.",

@@ -29,12 +29,12 @@ "keywords": [

"lodash.template": "^4.4.0",
"workbox-background-sync": "^3.0.0-alpha.5",
"workbox-broadcast-cache-update": "^3.0.0-alpha.5",
"workbox-cache-expiration": "^3.0.0-alpha.5",
"workbox-cacheable-response": "^3.0.0-alpha.5",
"workbox-core": "^3.0.0-alpha.5",
"workbox-google-analytics": "^3.0.0-alpha.5",
"workbox-precaching": "^3.0.0-alpha.5",
"workbox-routing": "^3.0.0-alpha.5",
"workbox-strategies": "^3.0.0-alpha.5",
"workbox-sw": "^3.0.0-alpha.5"
"workbox-background-sync": "^3.0.0-alpha.6",
"workbox-broadcast-cache-update": "^3.0.0-alpha.6",
"workbox-cache-expiration": "^3.0.0-alpha.6",
"workbox-cacheable-response": "^3.0.0-alpha.6",
"workbox-core": "^3.0.0-alpha.6",
"workbox-google-analytics": "^3.0.0-alpha.6",
"workbox-precaching": "^3.0.0-alpha.6",
"workbox-routing": "^3.0.0-alpha.6",
"workbox-strategies": "^3.0.0-alpha.6",
"workbox-sw": "^3.0.0-alpha.6"
},

@@ -41,0 +41,0 @@ "main": "build/index.js",

@@ -5,3 +5,3 @@ {

"releasesDir": "releases",
"latestVersion": "3.0.0-alpha.5"
"latestVersion": "3.0.0-alpha.6"
}

@@ -16,3 +16,7 @@ /*

*/
const assert = require('assert');
const cdn = require('../cdn-details.json');
const errors = require('./errors');

@@ -28,2 +32,4 @@ const getCDNOrigin = () => {

const getModuleUrl = (moduleName, buildType) => {
assert(moduleName, errors['no-module-name']);
if (buildType) {

@@ -30,0 +36,0 @@ const pkgJson = require(`${moduleName}/package.json`);

@@ -68,2 +68,9 @@ /*

for (const buildType of BUILD_TYPES) {
// Special-case logic for workbox-sw, which only has a single build type.
// This prevents a race condition with two identical copy promises;
// see https://github.com/GoogleChrome/workbox/issues/1180
if (library === 'workbox-sw' && buildType === BUILD_TYPES[0]) {
continue;
}
const srcPath = useBuildType(defaultPathToLibrary, buildType);

@@ -70,0 +77,0 @@ const destPath = path.join(workboxDirectoryPath,

@@ -110,2 +110,4 @@ /*

must set the handler to 'networkFirst'.`,
'no-module-name': ol`You must provide a moduleName parameter when calling
getModuleUrl().`,
};

@@ -63,3 +63,3 @@ /*

plugins.push(`${pluginString}(${JSON.stringify(pluginConfig)})`);
plugins.push(`new ${pluginString}(${JSON.stringify(pluginConfig)})`);
}

@@ -66,0 +66,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc