diff --git a/History.md b/History.md index 867fc82e37..d183e8be05 100644 --- a/History.md +++ b/History.md @@ -86,7 +86,7 @@ * The `reify` npm package has been updated to version 0.13.5. -* The `minifier-js` package has been updated to use `uglify-es` 3.1.9. +* The `minifier-js` package has been updated to use `uglify-es` 3.2.2. * The `request` npm package used by the `http` package has been upgraded to version 2.83.0. @@ -140,7 +140,7 @@ * `Accounts.config` now supports a `bcryptRounds` option that overrides the default 10 rounds currently used to secure passwords. [PR #9044](https://github.com/meteor/meteor/pull/9044) - + * Developers running Meteor from an interactive shell within Emacs should notice a substantial performance improvement thanks to automatic disabling of the progress spinner, which otherwise reacts slowly. diff --git a/packages/dynamic-import/dynamic-versions.js b/packages/dynamic-import/dynamic-versions.js index a903477aca..41b749a2f7 100644 --- a/packages/dynamic-import/dynamic-versions.js +++ b/packages/dynamic-import/dynamic-versions.js @@ -30,3 +30,57 @@ exports.get = function (id) { return version; }; + +function getFlatModuleArray(tree) { + var parts = [""]; + var result = []; + + function walk(t) { + if (t && typeof t === "object") { + Object.keys(t).forEach(function (key) { + parts.push(key); + walk(t[key]); + parts.pop(); + }); + } else if (typeof t === "string") { + result.push(parts.join("/")); + } + } + + walk(tree); + + return result; +} + +// If Package.appcache is loaded, preload additional modules after the +// core bundle has been loaded. +function precacheOnLoad(event) { + // Check inside onload to make sure Package.appcache has had a chance to + // become available. + if (! Package.appcache) { + return; + } + + // Prefetch in chunks to reduce overhead. If we call module.prefetch(id) + // multiple times in the same tick of the event loop, all those modules + // will be fetched in one HTTP POST request. + function prefetchInChunks(modules, amount) { + Promise.all(modules.splice(0, amount).map(function (id) { + return module.prefetch(id); + })).then(function () { + if (modules.length > 0) { + prefetchInChunks(modules, amount); + } + }); + } + + // Get a flat array of modules and start prefetching. + prefetchInChunks(getFlatModuleArray(versions), 50); +} + +// Use window.onload to only prefetch after the main bundle has loaded. +if (global.addEventListener) { + global.addEventListener('load', precacheOnLoad, false); +} else if (global.attachEvent) { + global.attachEvent('onload', precacheOnLoad); +} diff --git a/packages/minifier-js/.npm/package/npm-shrinkwrap.json b/packages/minifier-js/.npm/package/npm-shrinkwrap.json index 294d474765..fab4fc6c85 100644 --- a/packages/minifier-js/.npm/package/npm-shrinkwrap.json +++ b/packages/minifier-js/.npm/package/npm-shrinkwrap.json @@ -2,9 +2,9 @@ "lockfileVersion": 1, "dependencies": { "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", + "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==" }, "source-map": { "version": "0.6.1", @@ -12,9 +12,9 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "uglify-es": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.1.9.tgz", - "integrity": "sha512-wVSiJKHDgDDFmxTVVvnbAH6IpamAFHYDI+5JvwPdaqIMnk8kRTX2JKwq1Fx7gb2+Jj5Dus8kzvIpKkWOMNU51w==" + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.2.2.tgz", + "integrity": "sha512-l+s5VLzFwGJfS+fbqaGf/Dfwo1MF13jLOF2ekL0PytzqEqQ6cVppvHf4jquqFok+35USMpKjqkYxy6pQyUcuug==" } } } diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 28b456ba50..fc564758a7 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,10 +1,10 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.3.0-beta161.19" + version: "2.3.1-beta161.19" }); Npm.depends({ - "uglify-es": "3.1.9" + "uglify-es": "3.2.2" }); Package.onUse(function (api) { diff --git a/packages/oauth/end_of_redirect_response.js b/packages/oauth/end_of_redirect_response.js index c91ec5eb4e..f196db2283 100644 --- a/packages/oauth/end_of_redirect_response.js +++ b/packages/oauth/end_of_redirect_response.js @@ -4,9 +4,12 @@ if (config.setCredentialToken) { sessionStorage[config.storagePrefix + config.credentialToken] = - config.credentialSecret; + config.credentialSecret; } - window.location = config.redirectUrl; + window.location = + config.redirectUrl + ? config.redirectUrl.replace(/&/g, "&") + : config.redirectUrl; })(); diff --git a/packages/oauth/package.js b/packages/oauth/package.js index a6e326f83e..2eef6fd84f 100644 --- a/packages/oauth/package.js +++ b/packages/oauth/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth-based services", - version: "1.2.0" + version: "1.2.1" }); Package.onUse(function (api) { diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 4d8dadacdf..64bb832f89 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.3.0-beta161.19', + version: '2.3.1-beta161.19', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/tools/cordova/index.js b/tools/cordova/index.js index 94a44a27d5..3a81d56850 100644 --- a/tools/cordova/index.js +++ b/tools/cordova/index.js @@ -9,7 +9,7 @@ export const CORDOVA_PLATFORMS = ['ios', 'android']; export const CORDOVA_DEV_BUNDLE_VERSIONS = { 'cordova-lib': '7.1.0', - 'cordova-common': '1.5.1', + 'cordova-common': '2.1.1', 'cordova-registry-mapper': '1.1.15', };