From 9380be530880d744dad76c93ad632bd1ebbf5910 Mon Sep 17 00:00:00 2001 From: skirunman Date: Tue, 19 Dec 2017 15:59:04 -0800 Subject: [PATCH 1/4] Fix cordova lib dependency (#9487) `cordova-lib@7.1.0` should use `cordova-common@2.1.1` --- tools/cordova/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', }; From 85c8dc3ec516ef13b04742df944e80a5981661c1 Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Wed, 20 Dec 2017 11:37:23 -0500 Subject: [PATCH 2/4] Update minifier-js uglify-es dependency to latest version (#9483) --- History.md | 4 ++-- .../minifier-js/.npm/package/npm-shrinkwrap.json | 12 ++++++------ packages/minifier-js/package.js | 4 ++-- packages/standard-minifier-js/package.js | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/History.md b/History.md index 782804b59f..073dfb80b6 100644 --- a/History.md +++ b/History.md @@ -83,7 +83,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. @@ -137,7 +137,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/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 c1b9373913..571aa3ffd2 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" + version: "2.3.1" }); Npm.depends({ - "uglify-es": "3.1.9" + "uglify-es": "3.2.2" }); Package.onUse(function (api) { diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 82f33ad28f..322c5e62e3 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', + version: '2.3.1', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); From f6fcc5633e985d8c302f91868a465344ef697ac7 Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Wed, 20 Dec 2017 11:45:55 -0500 Subject: [PATCH 3/4] Unescape ampersands in oauth redirect URLs (#9484) When using the `oauth` package "redirect" `loginStyle`, the redirect URL is escaped before it is embedded in the HTML page that is used to finalize the oauth process. This escaped redirect URL is then assigned directly to `window.location` to finalize the redirect. Browsers can properly handle most of the escaped URL components, with the exception of HTML entity based ampersands: `&`. The `&`'s are left in the redirect URL after the redirect has completed, leading to broken redirects in some cases. This commit makes sure `&`'s are converted back to `&`'s before the redirect URL is assigned to `window.location`. Fixes #9279 --- packages/oauth/end_of_redirect_response.js | 7 +++++-- packages/oauth/package.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) 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) { From 23e3ac96771bd8c2711659205485f4bcea502849 Mon Sep 17 00:00:00 2001 From: Kevin Newman Date: Mon, 18 Dec 2017 02:04:25 -0500 Subject: [PATCH 4/4] Prefetch dynamic modules when appcache is active (#9482) --- packages/dynamic-import/dynamic-versions.js | 54 +++++++++++++++++++++ 1 file changed, 54 insertions(+) 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); +}