Commit Graph

20653 Commits

Author SHA1 Message Date
Ben Newman
ce276aec96 Bump package versions for 1.6.1-rc.10 release. release/METEOR@1.6.1-rc.10 2018-01-19 19:29:47 -05:00
Ben Newman
c60bb394b6 Go back to writing .meteor-portable-2.json files asynchronously.
This reverts commit 4e4e204ab0.

This commit caused a strange regression in reliability of the Windows
dynamic-import self-test, which may be an indication of a deeper problem,
so it seems safest to revert this change for now.

In case empty .meteor-portable-2.json files are written, I've added an
additional check that the cached JSON value is a boolean.
2018-01-19 19:25:08 -05:00
Ben Newman
6ae14731a2 Avoid hiding errors due to missing dependencies of custom Babel plugins.
As illustrated by #9554, if a custom .babelrc plugin such as
@babel/plugin-proposal-optional-chaining imports a missing dependency such
as @babel/core, that failure causes inputFile.require to throw an
exception that looks a lot like @babel/plugin-proposal-optional-chaining
itself is missing, which can be confusing.

This change does not fix the underlying problem (the @babel/core package
still needs to be installed), but it does expose the exception so that the
developer can do something about it, rather than merely leaving the ?.
syntax uncompiled.

Here's the offending line of code:
47ce7e71c9/packages/babel-plugin-proposal-optional-chaining/src/index.js (L2)

Unfortunately, depending directly on @babel/core seems to be the policy
for Babel plugins, per this PR: https://github.com/babel/babel/pull/6778
2018-01-19 18:19:31 -05:00
Ben Newman
dc4be42cbc Fix for @scoped Babel plugin packages in .babelrc files. 2018-01-19 18:19:25 -05:00
Ben Newman
7ed0b4029b Update final release date of Meteor 1.6.1. 🎉 2018-01-19 18:19:04 -05:00
Ben Newman
9b8afa2026 Add note to History.md about removal of deprecated Meteor.uuid. 2018-01-18 21:57:26 -05:00
Ben Newman
bf7821809b Increase exit timeout of dynamic-import test to fix AppVeyor CI. 2018-01-18 21:57:26 -05:00
Ben Newman
8b3732e18b Bump package versions for 1.6.1-rc.9 release. release/METEOR@1.6.1-rc.9 2018-01-18 17:22:17 -05:00
Ben Newman
4e4e204ab0 Write .meteor-portable-2.json files synchronously.
Previously these files were written asynchronously in an attempt to
improve performance, since the success of the write is not critical.
While I stand by my claim that it's acceptable for these writes to fail, I
noticed recently that the async write was failing very often (resulting in
an empty .meteor-portable-2.json file). Switching to sync semantics
eliminated that problem with no noticeable loss of performance. In fact,
overall performance is likely better because of the future work saved by a
successful write.
2018-01-18 16:26:05 -05:00
Ben Newman
bcd0ac048b Improve node_modules portability scan.
In an attempt to fix #9552, recursively scan child directories of
directories that start with '@' characters, rather than treating the
parent directory as a potential npm package.

Also, ignore directories that start with a '.' character, such as the
common node_modules/.bin directory.
2018-01-18 16:22:40 -05:00
Ben Newman
c2845baff7 Bump package versions for 1.6.1-rc.8 release. release/METEOR@1.6.1-rc.8 2018-01-17 18:09:01 -05:00
Ben Newman
cca0531112 Bump $BUNDLE_VERSION to 8.9.18 before rebuilding dev bundle. 2018-01-17 13:02:36 -05:00
Ben Newman
145fce2c4c Update meteor-babel to version 7.0.0-beta.38. 2018-01-17 13:01:21 -05:00
Ben Newman
66e2c5f894 Revert "Mark JS hot-code-push test "slow" so CircleCI will skip it."
This reverts commit 5ae7a0954d.
2018-01-16 20:24:53 -05:00
Ben Newman
e46a08daaf Fix meteor bundle-related self-tests. 2018-01-16 19:46:50 -05:00
Ben Newman
76ea47e4f7 Fix "constraint solver benchmark" self-test. 2018-01-16 18:56:04 -05:00
Ben Newman
bdfdd71c02 Fix ddp-heartbeat self-test. 2018-01-16 18:56:04 -05:00
Ben Newman
4e345b860a Bump package versions for 1.6.1-rc.7 release. release/METEOR@1.6.1-rc.7 2018-01-16 17:16:06 -05:00
Ben Newman
d0db2571e4 Guarantee all WebApp handler functions run in a Fiber.
https://github.com/VeliovGroup/Meteor-Files/issues/538
2018-01-16 16:58:57 -05:00
Ben Newman
c7a9d61a68 Allow processFilesFor{Target,Bundle,Package} to return a Promise.
This paves the way for compiler plugins to use normal async/await rather
than using fibers and/or futures to wait for async compilation to finish.
2018-01-16 16:58:48 -05:00
Christian Klaussner
9cc978eb90 Make "meteor-dev-bundle" and "meteor-dev-bundle-tool" packages private (#9542)
Since these packages aren't published to the npm registry, they can be made private to avoid unnecessary warnings about missing description, repository, and license fields when installing server dependencies and generating dev bundles.
2018-01-16 15:23:10 -05:00
Ben Newman
9e60539f11 Fall back to async for EPERM errors in files.rm_recursive.
Previously, the async fallback was only used in case of ENOTEMPTY errors,
but Windows appears to throw temporary EPERM errors as well. If the errors
are actually robust/non-temporary, the async version will fail, too.

Should help with #9540.
2018-01-16 11:05:40 -05:00
Ben Newman
d78bed0d47 Bump package versions for 1.6.1-rc.6 release. release/METEOR@1.6.1-rc.6 2018-01-15 18:27:17 -05:00
Ben Newman
abf695c94f Revert changes that made Match.{Where,Maybe,..} non-constructible.
https://github.com/meteor/meteor/issues/9383#issuecomment-345435819
2018-01-15 18:26:44 -05:00
Ben Newman
b06a6af335 Allow calling Mongo.Collection.{call,apply}(this, ...) from subclasses.
Fixes #9383.

A subclass contructor should generally invoke a superclass constructor with
appropriate arguments. Exactly how this happens has changed with the
advent of native ECMAScript class syntax.

With native ECMAScript class syntax, invoking the superclass constructor
requires calling super(...args), rather than calling the constructor as a
function against the instance object (this), which is now forbidden
because native ECMAScript class constructors are not callable.

The goal of making native constructors not callable was to prevent the
accidental omission of the `new` keyword. However, the old style of
calling the parent constructor function against the child instance almost
always used .call or .apply, so the ommission of `new` was not a mistake.

With that insight in mind, I have added two new static methods to
Mongo.Collection for the sake of backwards compatibility with existing
code that attempts to subclass Mongo.Collection.

These methods, .call and .apply, invoke a new (non-static) this.init
method against the provided instance. The this.init method is also invoked
by the actual constructor, so calling Mongo.Collection.apply(this, args)
works essentially the same way it used to, before native class syntax and
super(...). This trick effectively reenables calling Mongo.Collection.call
and .apply, facilitating subclassing by non-native function-based classes.
Note: both .call and .apply will throw if the provided child instance is
not instanceof Mongo.Collection.

Inheriting static properties can be difficult without native class syntax,
too. To avoid breaking some widely-used, partially correct idioms (such as
using a for-in loop to copy static properties from the superclass to the
subclass), I decided to make all the static properties of Mongo.Collection
(except for "call" and "apply") enumerable. Here's some code that
illustrates what would break if static methods remained non-enumerable:
d791a697a5/collection-hooks.js (L280-L284)

Though these tricks are clever in a way that doesn't feel entirely
bulletproof, they do fix most code that would have been broken by
converting Mongo.Collection to a native ECMAScript class (in Meteor
1.6.1), thus allowing us to avoid converting Mongo.Collection back to a
non-native function-based class.
2018-01-15 17:09:16 -05:00
Ben Newman
322cbe8593 Cherry-pick crosswalk fix for cordova-android@6.4.0.
https://github.com/meteor/meteor/pull/9274#discussion_r161547508

cc @menelike
2018-01-15 14:53:22 -05:00
Ben Newman
8decd67daf Bump package versions for 1.6.1-rc.5 release. release/METEOR@1.6.1-rc.5 2018-01-14 23:24:22 -05:00
Ben Newman
d29022fe20 Merge branch 'devel' into release-1.6.1 2018-01-14 23:22:59 -05:00
Theodor Diaconu
9236202115 Fixes #9531 - removing unnecessary check for Mongo.Collection (#9537) 2018-01-14 22:48:11 -05:00
Ben Newman
d470dbf509 Update cordova-android to version 6.4.0 to fix missing android-versions. 2018-01-14 18:07:22 -05:00
Ben Newman
b07c5cc328 Bump package versions for 1.6.1-rc.4 release. release/METEOR@1.6.1-rc.4 2018-01-14 17:48:52 -05:00
Ben Newman
2af81bbb87 Remove weak dependency on sockjs-shim package from ddp-client.
The sockjs-shim package was recently removed from core, and will probably
never be published without a prerelease suffix.
2018-01-14 17:48:50 -05:00
Ben Newman
c84561dfda Fix #9477 by implementing @klaussner's suggestion.
https://github.com/meteor/meteor/issues/9477#issuecomment-353975219
2018-01-14 17:39:02 -05:00
Ben Newman
fbdacbf560 Preserve /__cordova/manifest.json URLs, to fix #9526. 2018-01-14 16:32:47 -05:00
Ben Newman
b7567232e4 Merge branch 'devel' into release-1.6.1 2018-01-14 16:13:40 -05:00
Ben Newman
697a918dc3 Fix tests for now-deprecated stylus package.
The last version of stylus published did not contain a version of the
caching-compiler package that these tests now depend on, so I've removed
the extra architecture matching for the stylus package (not for less).
2018-01-14 16:09:54 -05:00
Ben Newman
5d22e1d25f Fix/strengthen "compiler plugins caching" self-tests.
To fix #9528, we included more information (the target architecture) in
cache keys for files compiled by CachedCoffeeScriptCompiler. Although this
change was right and necessary, it altered the caching behavior tested by
this self-test. Specifically, .coffee files must now be recompiled for the
os.* architecture, whereas previously code compiled for web.browser could
be accidentally reused on the server.
2018-01-14 16:09:49 -05:00
Ben Newman
620689f7de Include inputFile.getArch() in CoffeeScript cache key.
https://github.com/meteor/meteor/issues/9528#issuecomment-357530874

Fixes #9528.
2018-01-14 13:33:12 -05:00
Ben Newman
365804218f Remove sockjs-shim package and always polyfill SockJS, again.
Although it was tempting to avoid including the SockJS library in the
bundle for modern browsers, Meteor 1.6.2 will have a much better way of
managing this kind of differential bundling for modern/legacy browsers
(see PR #9439), and removing SockJS seems to lead to a worse experience
when native WebSockets end up failing, as @jamesmillerburgess discovered:
https://github.com/meteor/meteor/pull/9274#issuecomment-356214405
2018-01-12 15:49:41 -05:00
Ben Newman
ebe51997d6 Bump package versions for 1.6.1-rc.3 release. release/METEOR@1.6.1-rc.3 2018-01-12 12:20:49 -05:00
Ben Newman
de9bf8e29f Bump $BUNDLE_VERSION to 8.9.17 before rebuilding dev bundle. 2018-01-11 20:19:29 -05:00
Ben Newman
afe1ba7044 Update meteor-babel and reify to latest versions.
https://github.com/meteor/meteor/pull/9274#issuecomment-354870359
46109280c2
2018-01-11 20:17:07 -05:00
Ben Newman
49f9c7b087 Add failing ecmascript test-case of nested imports in class methods.
Thanks to @CaptainN for reporting this:
https://github.com/meteor/meteor/pull/9274#issuecomment-354870359
https://github.com/meteor/meteor/pull/9274#issuecomment-356988553

Only the `import { testExport as oyez } ...` in `method` is problematic
here, though I wanted to add some tests of class properties as well.
2018-01-11 20:17:07 -05:00
Ben Newman
d4bf359b71 Fix test warnings by depending on semver in package-version-parser. 2018-01-11 13:27:56 -05:00
Ben Newman
96d8d86638 Make CallbackLogger#expectNoResults more reliable.
We've seen some recent intermittent test failures because previous
CallbackLogger results were accidentally carried over when there should be
no results. This change allows running a callback function after resetting
logger._log.length to 0, to ensure the callback adds nothing to the log.
2018-01-11 13:27:54 -05:00
Ben Newman
667dd0700b Define global.Promise if missing. 2018-01-11 13:27:52 -05:00
Ben Newman
d9553a8243 Reenable cordova-builds self-test, which would have caught #9521.
Self-tests that are marked as "slow" are not run automatically for pull
requests, but they should be run before a release.

It was a mistake to publish the first Meteor 1.6.1 release candidate
without running these "slow" tests, as the cordova-builds test would have
caught the problem reported by @macrozone in #9521.

I've decided to remove the "slow" marker from this test, since it's
important for checking Cordova sanity, and clearly could fail.
2018-01-11 11:57:31 -05:00
Jesse Rosenberger
4a4b3dd2ed Bake the locale into the CircleCI build image. 2018-01-11 11:57:31 -05:00
Jesse Rosenberger
34ce287d31 Use a custom base image for CircleCI tests.
In order to install Gradle, which is required for Cordova tests to run
in the Meteor self-test suite, this image slightly builds upon the
CircleCI image we'd been using previously.
2018-01-11 11:57:31 -05:00
Ben Newman
fc822ce1e0 Attempt to run Circle CI tests in Docker containers with Android.
This is potentially a big change, though it should (with any luck) make
tests faster, and allow us to better test Cordova functionality (at least
as far as Android is concerned). For example, if this works, we won't have
to mark the "cordova builds with server options" self-test "slow" again,
which would (re)disable it during Circle CI test runs.

cc @abernix @hwillson
2018-01-11 11:57:31 -05:00