diff --git a/.travis.yml b/.travis.yml index 0cf166baac..7aadac0a75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,10 @@ cache: directories: - ".meteor" - ".babel-cache" -script: TEST_PACKAGES_EXCLUDE="less" phantom=false ./packages/test-in-console/run.sh +script: + - export TEST_PACKAGES_EXCLUDE="less" + - export phantom=false + - travis_retry ./packages/test-in-console/run.sh sudo: false env: - CXX=g++-4.8 diff --git a/History.md b/History.md index afb011f516..69ebe569e1 100644 --- a/History.md +++ b/History.md @@ -5,7 +5,15 @@ * Cordova has been updated from version 7 to 9. We recommend that you test your features that are taking advantage of Cordova plugins to be sure they are still working as expected. + +* Because MongoDB since 3.4 no longer supports 32-bit Windows, Meteor 1.10 has + also dropped support for 32-bit Windows. In other words, Meteor 1.10 supports + 64-bit Mac, Windows 64-bit, and Linux 64-bit. +### Migration Steps +N/A + +### Changes * The version of MongoDB used by Meteor in development has been updated from 4.0.6 to 4.2.1, and the `mongodb` driver package has been updated from 3.2.7 to 3.4.0, thanks to [@klaussner](https://github.com/klaussner). @@ -73,6 +81,11 @@ N/A * Updated V8 to [release v7.8](https://v8.dev/blog/v8-release-78) which includes improvements in performance, for example, object destructuring now is as fast as the equivalent variable assignment. * [12.15.0](https://nodejs.org/en/blog/release/v12.15.0/) +* `cursor.observeChanges` now accepts a second options argument. + If your observer functions do not mutate the passed arguments, you can specify + `{ nonMutatingCallbacks: true }`, which improves performance by reducing + the amount of data copies. + ## v1.9, 2020-01-09 ### Breaking changes diff --git a/meteor b/meteor index c1280507c7..0f3b530601 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=12.16.1.3 +BUNDLE_VERSION=12.16.1.4 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. diff --git a/packages/accounts-base/accounts_server.js b/packages/accounts-base/accounts_server.js index fc0d35a89d..afed16aba8 100644 --- a/packages/accounts-base/accounts_server.js +++ b/packages/accounts-base/accounts_server.js @@ -895,7 +895,7 @@ export class AccountsServer extends AccountsCommon { // The onClose callback for the connection takes care of // cleaning up the observe handle and any other state we have // lying around. - }); + }, { nonMutatingCallbacks: true }); // If the user ran another login or logout command we were waiting for the // defer or added to fire (ie, another call to _setLoginToken occurred), diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 0ea2c05a6c..5e023cb059 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "1.5.0", + version: "1.6.0-beta110.8", }); Package.onUse(api => { diff --git a/packages/accounts-oauth/package.js b/packages/accounts-oauth/package.js index 484fe7e125..1b21c89251 100644 --- a/packages/accounts-oauth/package.js +++ b/packages/accounts-oauth/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth-based login services", - version: "1.1.16", + version: "1.2.0-beta110.8", }); Package.onUse(api => { diff --git a/packages/accounts-password/package.js b/packages/accounts-password/package.js index a390f09660..18190e2379 100644 --- a/packages/accounts-password/package.js +++ b/packages/accounts-password/package.js @@ -5,7 +5,7 @@ Package.describe({ // 2.2.x in the future. The version was also bumped to 2.0.0 temporarily // during the Meteor 1.5.1 release process, so versions 2.0.0-beta.2 // through -beta.5 and -rc.0 have already been published. - version: "1.5.3" + version: "1.6.0-beta110.8" }); Package.onUse(api => { diff --git a/packages/appcache/appcache-server.js b/packages/appcache/appcache-server.js index ca4f97eded..52613b83ae 100755 --- a/packages/appcache/appcache-server.js +++ b/packages/appcache/appcache-server.js @@ -261,10 +261,12 @@ function eachResource({ } function sizeCheck() { - const sizes = [ // Check size of each known architecture independently. + const RESOURCE_SIZE_LIMIT = 5 * 1024 * 1024; // 5MB + const largeSizes = [ // Check size of each known architecture independently. "web.browser", "web.browser.legacy", - ].reduce((filt, arch) => { + ].filter((arch) => !!WebApp.clientPrograms[arch]) + .map((arch) => { let totalSize = 0; WebApp.clientPrograms[arch].manifest.forEach(resource => { @@ -275,22 +277,21 @@ function sizeCheck() { } }); - if (totalSize > 5 * 1024 * 1024) { - filt.push({ - arch, - size: totalSize - }); + return { + arch, + size: totalSize, } - return filt; - }, []); - if (sizes.length > 0) { + }) + .filter(({ size }) => size > RESOURCE_SIZE_LIMIT); + + if (largeSizes.length > 0) { Meteor._debug([ "** You are using the appcache package, but the size of", "** one or more of your cached resources is larger than", "** the recommended maximum size of 5MB which may break", "** your app in some browsers!", "** ", - ...sizes.map(data => `** ${data.arch}: ${(data.size / 1024 / 1024).toFixed(1)}MB`), + ...largeSizes.map(data => `** ${data.arch}: ${(data.size / 1024 / 1024).toFixed(1)}MB`), "** ", "** See http://docs.meteor.com/#appcache for more", "** information and fixes." diff --git a/packages/boilerplate-generator/package.js b/packages/boilerplate-generator/package.js index 0e8ebfef77..66734ecdcf 100644 --- a/packages/boilerplate-generator/package.js +++ b/packages/boilerplate-generator/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Generates the boilerplate html from program's manifest", - version: '1.6.0' + version: '1.7.0-beta110.8' }); Npm.depends({ diff --git a/packages/facebook-oauth/package.js b/packages/facebook-oauth/package.js index 0ed950e060..57ce8b34f6 100644 --- a/packages/facebook-oauth/package.js +++ b/packages/facebook-oauth/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Facebook OAuth flow", - version: "1.7.0" + version: "1.7.0-beta110.8" }); Package.onUse(api => { diff --git a/packages/launch-screen/package.js b/packages/launch-screen/package.js index 52d688d784..2381face64 100644 --- a/packages/launch-screen/package.js +++ b/packages/launch-screen/package.js @@ -6,7 +6,7 @@ Package.describe({ // between such packages and the build tool. name: 'launch-screen', summary: 'Default and customizable launch screen on mobile.', - version: '1.2.0' + version: '1.2.0-beta110.8' }); Cordova.depends({ diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 3f8c982f8e..38b2b1f25f 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "The Meteor command-line tool", - version: '1.9.2' + version: '1.10.0-beta.8' }); Package.includeTool(); diff --git a/packages/minimongo/local_collection.js b/packages/minimongo/local_collection.js index 5ea83843e0..e767137089 100644 --- a/packages/minimongo/local_collection.js +++ b/packages/minimongo/local_collection.js @@ -669,17 +669,18 @@ LocalCollection._CachingChangeObserver = class _CachingChangeObserver { this.docs = new OrderedDict(MongoID.idStringify); this.applyChange = { addedBefore: (id, fields, before) => { - const doc = EJSON.clone(fields); + // Take a shallow copy since the top-level properties can be changed + const doc = { ...fields }; doc._id = id; if (callbacks.addedBefore) { - callbacks.addedBefore.call(this, id, fields, before); + callbacks.addedBefore.call(this, id, EJSON.clone(fields), before); } // This line triggers if we provide added with movedBefore. if (callbacks.added) { - callbacks.added.call(this, id, fields); + callbacks.added.call(this, id, EJSON.clone(fields)); } // XXX could `before` be a falsy ID? Technically @@ -701,10 +702,11 @@ LocalCollection._CachingChangeObserver = class _CachingChangeObserver { this.docs = new LocalCollection._IdMap; this.applyChange = { added: (id, fields) => { - const doc = EJSON.clone(fields); + // Take a shallow copy since the top-level properties can be changed + const doc = { ...fields }; if (callbacks.added) { - callbacks.added.call(this, id, fields); + callbacks.added.call(this, id, EJSON.clone(fields)); } doc._id = id; @@ -1330,7 +1332,12 @@ LocalCollection._observeFromObserveChanges = (cursor, observeCallbacks) => { callbacks: observeChangesCallbacks }); - const handle = cursor.observeChanges(changeObserver.applyChange); + // CachingChangeObserver clones all received input on its callbacks + // So we can mark it as safe to reduce the ejson clones. + // This is tested by the `mongo-livedata - (extended) scribbling` tests + changeObserver.applyChange._fromObserve = true; + const handle = cursor.observeChanges(changeObserver.applyChange, + { nonMutatingCallbacks: true }); suppressed = false; diff --git a/packages/minimongo/package.js b/packages/minimongo/package.js index 047682d2a7..f5798f3676 100644 --- a/packages/minimongo/package.js +++ b/packages/minimongo/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor's client-side datastore: a port of MongoDB to Javascript", - version: '1.4.5' + version: '1.5.0-beta110.8' }); Package.onUse(api => { diff --git a/packages/mobile-experience/package.js b/packages/mobile-experience/package.js index 43da7982c3..b2f974162a 100644 --- a/packages/mobile-experience/package.js +++ b/packages/mobile-experience/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'mobile-experience', - version: '1.1.0', + version: '1.1.0-beta110.8', summary: 'Packages for a great mobile user experience', documentation: 'README.md' }); diff --git a/packages/mobile-status-bar/package.js b/packages/mobile-status-bar/package.js index 1b7aa76127..bb5e13cd60 100644 --- a/packages/mobile-status-bar/package.js +++ b/packages/mobile-status-bar/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'mobile-status-bar', summary: "Good defaults for the mobile status bar", - version: "1.1.0" + version: "1.1.0-beta110.8" }); Cordova.depends({ diff --git a/packages/mongo/collection.js b/packages/mongo/collection.js index a610481ba6..30d6c82da7 100644 --- a/packages/mongo/collection.js +++ b/packages/mongo/collection.js @@ -372,7 +372,10 @@ Object.assign(Mongo.Collection, { removed: function (id) { sub.removed(collection, id); } - }); + }, + // Publications don't mutate the documents + // This is tested by the `livedata - publish callbacks clone` test + { nonMutatingCallbacks: true }); // We don't call sub.ready() here: it gets called in livedata_server, after // possibly calling _publishCursor on multiple returned cursors. diff --git a/packages/mongo/mongo_driver.js b/packages/mongo/mongo_driver.js index 4be68220e6..40a36b42bf 100644 --- a/packages/mongo/mongo_driver.js +++ b/packages/mongo/mongo_driver.js @@ -918,7 +918,7 @@ Cursor.prototype.observe = function (callbacks) { return LocalCollection._observeFromObserveChanges(self, callbacks); }; -Cursor.prototype.observeChanges = function (callbacks) { +Cursor.prototype.observeChanges = function (callbacks, options = {}) { var self = this; var methods = [ 'addedAt', @@ -931,8 +931,8 @@ Cursor.prototype.observeChanges = function (callbacks) { ]; var ordered = LocalCollection._observeChangesCallbacksAreOrdered(callbacks); - // XXX: Can we find out if callbacks are from observe? - var exceptionName = ' observe/observeChanges callback'; + let exceptionName = callbacks._fromObserve ? 'observe' : 'observeChanges'; + exceptionName += ' callback'; methods.forEach(function (method) { if (callbacks[method] && typeof callbacks[method] == "function") { callbacks[method] = Meteor.bindEnvironment(callbacks[method], method + exceptionName); @@ -940,7 +940,7 @@ Cursor.prototype.observeChanges = function (callbacks) { }); return self._mongo._observeChanges( - self._cursorDescription, ordered, callbacks); + self._cursorDescription, ordered, callbacks, options.nonMutatingCallbacks); }; MongoConnection.prototype._createSynchronousCursor = function( @@ -1241,7 +1241,7 @@ MongoConnection.prototype.tail = function (cursorDescription, docCallback, timeo }; MongoConnection.prototype._observeChanges = function ( - cursorDescription, ordered, callbacks) { + cursorDescription, ordered, callbacks, nonMutatingCallbacks) { var self = this; if (cursorDescription.options.tailable) { @@ -1282,7 +1282,10 @@ MongoConnection.prototype._observeChanges = function ( } }); - var observeHandle = new ObserveHandle(multiplexer, callbacks); + var observeHandle = new ObserveHandle(multiplexer, + callbacks, + nonMutatingCallbacks, + ); if (firstHandle) { var matcher, sorter; diff --git a/packages/mongo/mongo_livedata_tests.js b/packages/mongo/mongo_livedata_tests.js index 30ea3c10e1..8f77d1c822 100644 --- a/packages/mongo/mongo_livedata_tests.js +++ b/packages/mongo/mongo_livedata_tests.js @@ -560,6 +560,80 @@ Tinytest.addAsync("mongo-livedata - scribbling, " + idGeneration, function (test onComplete(); }); +if (Meteor.isServer) { + Tinytest.addAsync("mongo-livedata - extended scribbling, " + idGeneration, function (test, onComplete) { + function error() { + throw new Meteor.Error('unsafe object mutation'); + } + + const denyModifications = { + get(target, key) { + const type = Object.prototype.toString.call(target[key]); + if (type === '[object Object]' || type === '[object Array]') { + return freeze(target[key]); + } else { + return target[key]; + } + }, + set: error, + deleteProperty: error, + defineProperty: error, + }; + + // Object.freeze only throws in silent mode + // So we make our own version that always throws. + function freeze(obj) { + return new Proxy(obj, denyModifications); + } + + const origApplyCallback = ObserveMultiplexer.prototype._applyCallback; + ObserveMultiplexer.prototype._applyCallback = function(callback, args) { + // Make sure that if anything touches the original object, this will throw + return origApplyCallback.call(this, callback, freeze(args)); + } + + const run = test.runId(); + const coll = new Mongo.Collection(`livedata_test_scribble_collection_${run}`, collectionOptions); + const expectMutatable = (o) => { + try { + o.a[0].c = 3; + } catch (error) { + test.fail(); + } + } + const expectNotMutatable = (o) => { + try { + o.a[0].c = 3; + test.fail(); + } catch (error) {} + } + const handle = coll.find({run}).observe({ + addedAt: expectMutatable, + changedAt: function(id, o) { + expectMutatable(o); + } + }); + + const handle2 = coll.find({run}).observeChanges({ + added: expectNotMutatable, + changed: function(id, o) { + expectNotMutatable(o); + } + }, { nonMutatingCallbacks: true }); + + runInFence(function () { + coll.insert({run, a: [ {c: 1} ]}); + coll.update({run}, { $set: { 'a.0.c': 2 } }); + }); + + handle.stop(); + handle2.stop(); + + ObserveMultiplexer.prototype._applyCallback = origApplyCallback; + onComplete(); + }); +} + Tinytest.addAsync("mongo-livedata - stop handle in callback, " + idGeneration, function (test, onComplete) { var run = Random.id(); var coll; diff --git a/packages/mongo/observe_multiplex.js b/packages/mongo/observe_multiplex.js index aa766bc07f..6e8f9349f6 100644 --- a/packages/mongo/observe_multiplex.js +++ b/packages/mongo/observe_multiplex.js @@ -155,11 +155,7 @@ _.extend(ObserveMultiplexer.prototype, { return; // First, apply the change to the cache. - // XXX We could make applyChange callbacks promise not to hang on to any - // state from their arguments (assuming that their supplied callbacks - // don't) and skip this clone. Currently 'changed' hangs on to state - // though. - self._cache.applyChange[callbackName].apply(null, EJSON.clone(args)); + self._cache.applyChange[callbackName].apply(null, args); // If we haven't finished the initial adds, then we should only be getting // adds. @@ -179,7 +175,8 @@ _.extend(ObserveMultiplexer.prototype, { return; var callback = handle['_' + callbackName]; // clone arguments so that callbacks can mutate their arguments - callback && callback.apply(null, EJSON.clone(args)); + callback && callback.apply(null, + handle.nonMutatingCallbacks ? args : EJSON.clone(args)); }); }); }, @@ -199,8 +196,8 @@ _.extend(ObserveMultiplexer.prototype, { self._cache.docs.forEach(function (doc, id) { if (!_.has(self._handles, handle._id)) throw Error("handle got removed before sending initial adds!"); - var fields = EJSON.clone(doc); - delete fields._id; + const { _id, ...fields } = handle.nonMutatingCallbacks ? doc + : EJSON.clone(doc); if (self._ordered) add(id, fields, null); // we're going in order, so add at end else @@ -211,7 +208,9 @@ _.extend(ObserveMultiplexer.prototype, { var nextObserveHandleId = 1; -ObserveHandle = function (multiplexer, callbacks) { + +// When the callbacks do not mutate the arguments, we can skip a lot of data clones +ObserveHandle = function (multiplexer, callbacks, nonMutatingCallbacks = false) { var self = this; // The end user is only supposed to call stop(). The other fields are // accessible to the multiplexer, though. @@ -231,6 +230,7 @@ ObserveHandle = function (multiplexer, callbacks) { }); self._stopped = false; self._id = nextObserveHandleId++; + self.nonMutatingCallbacks = nonMutatingCallbacks; }; ObserveHandle.prototype.stop = function () { var self = this; diff --git a/packages/mongo/package.js b/packages/mongo/package.js index c05b92ced7..64f97c96f4 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: '1.8.1' + version: '1.9.0-beta110.8' }); Npm.depends({ @@ -71,6 +71,7 @@ Package.onUse(function (api) { api.export('MongoInternals', 'server'); api.export("Mongo"); + api.export('ObserveMultiplexer', 'server', {testOnly: true}); api.addFiles(['mongo_driver.js', 'oplog_tailing.js', 'observe_multiplex.js', 'doc_fetcher.js', diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 236c024f36..169a9239d4 100644 --- a/packages/npm-mongo/package.js +++ b/packages/npm-mongo/package.js @@ -3,7 +3,7 @@ Package.describe({ summary: "Wrapper around the mongo npm package", - version: "3.5.0", + version: "3.5.0-beta110.8", documentation: null }); diff --git a/packages/oauth/package.js b/packages/oauth/package.js index 54f13f1767..2a739b3f07 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.8" + version: "1.3.0-beta110.8" }); Package.onUse(api => { diff --git a/packages/oauth1/package.js b/packages/oauth1/package.js index 11dc87fc7d..73bed1a5a7 100644 --- a/packages/oauth1/package.js +++ b/packages/oauth1/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth1-based login services", - version: "1.2.2", + version: "1.3.0-beta110.8", }); Package.onUse(api => { diff --git a/packages/webapp/package.js b/packages/webapp/package.js index 68af50c1db..30844811aa 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: '1.8.2' + version: '1.9.0-beta110.8' }); Npm.depends({"basic-auth-connect": "1.0.0", @@ -20,9 +20,9 @@ Npm.strip({ }); Cordova.depends({ - 'cordova-plugin-whitelist': '1.3.3', - 'cordova-plugin-wkwebview-engine': '1.1.4', - 'cordova-plugin-meteor-webapp': '1.7.0' + 'cordova-plugin-whitelist': '1.3.4', + 'cordova-plugin-wkwebview-engine': '1.2.1', + 'cordova-plugin-meteor-webapp': '1.8.0' }); Package.onUse(function (api) { diff --git a/packages/webapp/webapp_server.js b/packages/webapp/webapp_server.js index 12ba0cf505..2cc63fa21c 100644 --- a/packages/webapp/webapp_server.js +++ b/packages/webapp/webapp_server.js @@ -404,6 +404,12 @@ WebAppInternals.staticFilesMiddleware = async function ( identifyBrowser(req.headers["user-agent"]), ); + if (! hasOwn.call(WebApp.clientPrograms, arch)) { + // We could come here in case we run with some architectures excluded + next(); + return; + } + // If pauseClient(arch) has been called, program.paused will be a // Promise that will be resolved when the program is unpaused. const program = WebApp.clientPrograms[arch]; @@ -987,6 +993,19 @@ function runWebAppServer() { request.browser, ); + if (! hasOwn.call(WebApp.clientPrograms, arch)) { + // We could come here in case we run with some architectures excluded + headers['Cache-Control'] = 'no-cache'; + res.writeHead(404, headers); + if (Meteor.isDevelopment) { + res.end(`No client program found for the ${arch} architecture.`); + } else { + // Safety net, but this branch should not be possible. + res.end("404 Not Found"); + } + return; + } + // If pauseClient(arch) has been called, program.paused will be a // Promise that will be resolved when the program is unpaused. await WebApp.clientPrograms[arch].paused; diff --git a/scripts/admin/copy-dev-bundle-from-jenkins.sh b/scripts/admin/copy-dev-bundle-from-jenkins.sh index af7cb75829..ab6bfdb13a 100755 --- a/scripts/admin/copy-dev-bundle-from-jenkins.sh +++ b/scripts/admin/copy-dev-bundle-from-jenkins.sh @@ -39,7 +39,7 @@ echo Found build $DIRNAME trap "echo Found surprising number of tarballs." EXIT # Check to make sure the proper number of each kind of file is there. aws s3 ls s3://com.meteor.jenkins/$DIRNAME/ | \ - perl -nle 'if (/\.tar\.gz/) { ++$TAR } else { die "something weird" } END { exit !($TAR == 4) }' + perl -nle 'if (/\.tar\.gz/) { ++$TAR } else { die "something weird" } END { exit !($TAR == 3) }' trap - EXIT diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 5147a9be41..c5eb9cf44a 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.9.2-rc.1", + "version": "1.10-beta.8", "recommended": false, "official": false, "description": "Meteor" diff --git a/scripts/generate-dev-bundle.ps1 b/scripts/generate-dev-bundle.ps1 index aa9f36b0bf..d1f239f864 100644 --- a/scripts/generate-dev-bundle.ps1 +++ b/scripts/generate-dev-bundle.ps1 @@ -72,9 +72,6 @@ Function Add-7ZipTool { $webclient.DownloadFile("http://www.7-zip.org/a/7z1604-extra.7z", $extraArchive) $pathToExtract = 'x64/7za.exe' - if ($PLATFORM -eq "windows_x86") { - $pathToExtract = '7za.exe' - } Write-Host 'Placing 7za.exe from extra.7z in \bin...' -ForegroundColor Magenta & "$system7zip" e $extraArchive -o"$dirTemp" $pathToExtract | Out-Null @@ -118,11 +115,7 @@ Function Add-NodeAndNpm { $nodeUrlBase = 'https://nodejs.org/dist' } - if ($PLATFORM -eq "windows_x86") { - $nodeArchitecture = 'win-x86' - } else { - $nodeArchitecture = 'win-x64' - } + $nodeArchitecture = 'win-x64' # Various variables which are used as part of directory paths and # inside Node release and header archives. @@ -231,7 +224,6 @@ Function Add-Mongo { # Mongo >= 3.4 no longer supports 32-bit (x86) architectures, so we package # the latest 3.2 version of Mongo for those builds and >= 3.4 for x64. $mongo_filenames = @{ - windows_x86 = "mongodb-win32-i386-${MONGO_VERSION_32BIT}" windows_x64 = "mongodb-win32-x86_64-2012plus-${MONGO_VERSION_64BIT}" } diff --git a/tools/cli/commands.js b/tools/cli/commands.js index 222e713465..d43dfc5ddd 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -162,6 +162,16 @@ export function parseRunTargets(targets) { }); }; +const excludableWebArchs = ['web.browser', 'web.browser.legacy', 'web.cordova']; +function filterWebArchs(webArchs, excludeArchsOption) { + if (excludeArchsOption) { + const excludeArchs = excludeArchsOption.trim().split(/\s*,\s*/) + .filter(arch => excludableWebArchs.includes(arch)); + webArchs = webArchs.filter(arch => !excludeArchs.includes(arch)); + } + return webArchs; +} + /////////////////////////////////////////////////////////////////////////////// // options that act like commands /////////////////////////////////////////////////////////////////////////////// @@ -318,7 +328,8 @@ var runCommandOptions = { // Allow the version solver to make breaking changes to the versions // of top-level dependencies. 'allow-incompatible-update': { type: Boolean }, - 'extra-packages': { type: String } + 'extra-packages': { type: String }, + 'exclude-archs': { type: String } }, catalogRefresh: new catalog.Refresh.Never() }; @@ -399,6 +410,7 @@ function doRunCommand(options) { webArchs.push("web.cordova"); } } + webArchs = filterWebArchs(webArchs, options['exclude-archs']); let cordovaRunner; if (!_.isEmpty(runTargets)) { @@ -1635,7 +1647,9 @@ testCommandOptions = { // For 'test-packages': Run in "full app" mode 'full-app': { type: Boolean, 'default': false }, - 'extra-packages': { type: String } + 'extra-packages': { type: String }, + + 'exclude-archs': { type: String } } }; @@ -1978,6 +1992,11 @@ var runTestAppForPackages = function (projectContext, options) { minifyMode: options.production ? 'production' : 'development' }; buildOptions.buildMode = "test"; + let webArchs = projectContext.platformList.getWebArchs(); + if (options.cordovaRunner) { + webArchs.push("web.cordova"); + } + buildOptions.webArchs = filterWebArchs(webArchs, options['exclude-archs']); if (options.deploy) { // Run the constraint solver and build local packages. diff --git a/tools/cli/dev-bundle.js b/tools/cli/dev-bundle.js index 9589dd9364..a89946e73e 100644 --- a/tools/cli/dev-bundle.js +++ b/tools/cli/dev-bundle.js @@ -189,10 +189,7 @@ function makeStatTest(method) { function getHostArch() { if (process.platform === "win32") { - if (process.arch === "x64") { - return "os.windows.x86_64"; - } - return "os.windows.x86_32"; + return "os.windows.x86_64"; } if (process.platform === "linux") { diff --git a/tools/cli/help.txt b/tools/cli/help.txt index 300f04e704..e5b919d555 100644 --- a/tools/cli/help.txt +++ b/tools/cli/help.txt @@ -103,6 +103,9 @@ Options: version constraints. --extra-packages Run with additional packages (comma separated, for example: --extra-packages "package-name1, package-name2@1.2.3") + --exclude-archs Don't create bundles for certain web architectures + (comma separated, for example: + --exclude-archs "web.browser.legacy, web.cordova") >>> debug Run the project with server-side debugging enabled. @@ -713,6 +716,9 @@ Options: --driver-package Name of the optional test driver package to use to run tests and display results. For example: --driver-package practicalmeteor:mocha + --exclude-archs Don't create test bundles for certain web architectures + (comma separated, for example: + --exclude-archs "web.browser.legacy, web.cordova") >>> self-test Run tests of the 'meteor' tool. diff --git a/tools/tests/apps/modules/package-lock.json b/tools/tests/apps/modules/package-lock.json index 2351624583..0bfa075a4a 100644 --- a/tools/tests/apps/modules/package-lock.json +++ b/tools/tests/apps/modules/package-lock.json @@ -12,24 +12,123 @@ } }, "@babel/core": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.2.tgz", - "integrity": "sha512-eeD7VEZKfhK1KUXGiyPFettgF3m513f8FoBSWiQ1xTvl1RAopLs42Wp9+Ze911I6H0N9lNqJMDgoZT7gHsipeQ==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.4.tgz", + "integrity": "sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==", "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.2", - "@babel/helpers": "^7.7.0", - "@babel/parser": "^7.7.2", - "@babel/template": "^7.7.0", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.7.2", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helpers": "^7.8.4", + "@babel/parser": "^7.8.4", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.4", + "@babel/types": "^7.8.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", "json5": "^2.1.0", "lodash": "^4.17.13", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/generator": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", + "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", + "requires": { + "@babel/types": "^7.8.3", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==" + }, + "@babel/template": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/traverse": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", + "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.4", + "@babel/types": "^7.8.3", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "@babel/types": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/generator": { @@ -78,9 +177,9 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==" + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==" }, "@babel/helper-split-export-declaration": { "version": "7.7.0", @@ -91,13 +190,111 @@ } }, "@babel/helpers": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.0.tgz", - "integrity": "sha512-VnNwL4YOhbejHb7x/b5F39Zdg5vIQpUUNzJwx0ww1EcVRt41bbGRZWhAURrfY32T5zTT3qwNOQFWpn+P0i0a2g==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz", + "integrity": "sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==", "requires": { - "@babel/template": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0" + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.4", + "@babel/types": "^7.8.3" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/generator": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", + "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", + "requires": { + "@babel/types": "^7.8.3", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/highlight": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", + "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==" + }, + "@babel/template": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/traverse": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", + "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.4", + "@babel/types": "^7.8.3", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "@babel/types": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/highlight": { @@ -116,26 +313,26 @@ "integrity": "sha512-bqv+iCo9i+uLVbI0ILzKkvMorqxouI+GbV13ivcARXn9NNEabi2IEz912IgNpT/60BNXac5dgcfjb94NjsF33A==" }, "@babel/plugin-proposal-do-expressions": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-do-expressions/-/plugin-proposal-do-expressions-7.6.0.tgz", - "integrity": "sha512-qJDaoBDbLySwU1tG0jbAomOwz8W1PEiiiK0iLQAnHLr4PYIMVX4ltDGkj3uAKx4HDs1WJ0tozGW1zAQjuTIiWg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-do-expressions/-/plugin-proposal-do-expressions-7.8.3.tgz", + "integrity": "sha512-NoMcN+0+SS1DVswjDCfz+Jfm9ViOYuFtv1lm0QInEugbEXK2iH3jeSq38WmIiTP+2QKqo2zt8xku77gqHINZkw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-do-expressions": "^7.2.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-do-expressions": "^7.8.3" } }, "@babel/plugin-syntax-do-expressions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-do-expressions/-/plugin-syntax-do-expressions-7.2.0.tgz", - "integrity": "sha512-/u4rJ+XEmZkIhspVuKRS+7WLvm7Dky9j9TvGK5IgId8B3FKir9MG+nQxDZ9xLn10QMBvW58dZ6ABe2juSmARjg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-do-expressions/-/plugin-syntax-do-expressions-7.8.3.tgz", + "integrity": "sha512-puRiUTVDQ69iRX41eeVWqOftZK31waWqZfwKB/TGzPfgi7097twx/DpwfOfyqEGqYtvpQF3jpHwT6UBzvSyAjw==", "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/runtime": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.7.tgz", - "integrity": "sha512-uCnC2JEVAu8AKB5do1WRIsvrdJ0flYx/A/9f/6chdacnEZ7LmavjdsDXr5ksYBegxtuTPR5Va9/+13QF/kFkCA==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.4.tgz", + "integrity": "sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==", "requires": { "regenerator-runtime": "^0.13.2" }, @@ -656,6 +853,11 @@ "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-2.5.4.tgz", "integrity": "sha1-OMYYhRPhQDCUjsblz2VSPZd5KZs=" }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==" + }, "github": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/github/-/github-0.2.4.tgz", @@ -1927,9 +2129,9 @@ "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" }, "resolve": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", - "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "requires": { "path-parse": "^1.0.6" } diff --git a/tools/tests/apps/modules/package.json b/tools/tests/apps/modules/package.json index 2c633120b2..c7e2597040 100644 --- a/tools/tests/apps/modules/package.json +++ b/tools/tests/apps/modules/package.json @@ -4,9 +4,9 @@ "description": "Test app exercising many aspects of the Meteor module system.", "private": true, "dependencies": { - "@babel/core": "^7.7.2", - "@babel/plugin-proposal-do-expressions": "^7.6.0", - "@babel/runtime": "^7.7.7", + "@babel/core": "^7.8.4", + "@babel/plugin-proposal-do-expressions": "^7.8.3", + "@babel/runtime": "^7.8.4", "@polymer/lit-element": "0.7.1", "@wry/context": "^0.4.0", "acorn": "file:imports/links/acorn", diff --git a/tools/tests/apps/modules/tests.js b/tools/tests/apps/modules/tests.js index 70ea53de36..fdd280369b 100644 --- a/tools/tests/apps/modules/tests.js +++ b/tools/tests/apps/modules/tests.js @@ -402,15 +402,19 @@ describe("local node_modules", () => { }); it("can import @babel/runtime/helpers/esm/*", () => { - function check(exports) { - assert.strictEqual(typeof exports.default, "function"); - } - check(require("@babel/runtime/helpers/esm/asyncIterator.js")); - check(require("@babel/runtime/helpers/esm/createClass.js")); - check(require("@babel/runtime/helpers/esm/getPrototypeOf.js")); - check(require("@babel/runtime/helpers/esm/inherits.js")); - check(require("@babel/runtime/helpers/esm/toArray.js")); - check(require("@babel/runtime/helpers/esm/typeof.js")); + import asyncIterator from "@babel/runtime/helpers/esm/asyncIterator.js"; + import createClass from "@babel/runtime/helpers/esm/createClass.js"; + import getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf.js"; + import inherits from "@babel/runtime/helpers/esm/inherits.js"; + import toArray from "@babel/runtime/helpers/esm/toArray.js"; + import _typeof from "@babel/runtime/helpers/esm/typeof.js"; + + assert.strictEqual(typeof asyncIterator, "function"); + assert.strictEqual(typeof createClass, "function"); + assert.strictEqual(typeof getPrototypeOf, "function"); + assert.strictEqual(typeof inherits, "function"); + assert.strictEqual(typeof toArray, "function"); + assert.strictEqual(typeof _typeof, "function"); }); it('can import packages with broken "module" fields', () => { diff --git a/tools/utils/archinfo.ts b/tools/utils/archinfo.ts index e3503d17b5..4d77c2d853 100644 --- a/tools/utils/archinfo.ts +++ b/tools/utils/archinfo.ts @@ -64,7 +64,6 @@ const utils = require('./utils'); * hardware is virtually extinct. Meteor has never supported it and * nobody has asked for it. * - * os.windows.x86_32 * os.windows.x86_64 * Once, on the far side of yesterday, there was not a 64-bit * build of Meteor for Windows, due to the belief that Node didn't @@ -76,6 +75,7 @@ const utils = require('./utils'); * platforms show clear performance benefits over their 32-bit * siblings (e.g. 7-zip, et.al), so Meteor should also try to offer * that same benefit by building and offering a 64-bit version. + * Meteor no longer supports Windows 32-bit. * * To be (more but far from completely) precise, the ABI for os.* * architectures includes a CPU type, a mode in which the code will be @@ -131,7 +131,6 @@ export const VALID_ARCHITECTURES: Record = { "os.osx.x86_64": true, "os.linux.x86_64": true, "os.windows.x86_64": true, - "os.windows.x86_32": true, }; // Returns the fully qualified arch of this host -- something like @@ -170,12 +169,8 @@ export function host() { } else { throw new Error(`Unsupported architecture: ${machine}`); } - } else if (platform === "win32") { - if (process.arch === "x64") { - _host = "os.windows.x86_64"; - } else { - _host = "os.windows.x86_32"; - } + } else if (platform === "win32" && process.arch === "x64") { + _host = "os.windows.x86_64"; } else { throw new Error(`Unsupported operating system: ${platform}`); }