Commit Graph

20677 Commits

Author SHA1 Message Date
Jesse Rosenberger
06c90caf8a Attempt to generate "docs" during CircleCI tests.
There have been a number of occasions where I have gone to bump the
Meteor docs to the next major version, only to find that the docs
deployment (which occurs in a separate repository; found at
https://github.com/meteor/docs) fails due to code-refactoring which has
taken place in its submodule (`code`, which is this Meteor codebase).

In order to provide early warning when a JSDoc declaration in the Meteor
code is going to (eventually) break the docs deployment which occurs in
a separate repository (https://github.com/meteor/docs), this commit
introduces a simple checkout and doc generation, in the same manner as
the docs would in its own repository, within the CircleCI workflow.

It's been configured in a way where it will not stop the normal Meteor
test-suite from running, however it will show a separate indicator on
GitHub pull-requests as to whether the generation of docs was successful
or not.
2018-01-29 20:35:09 +02:00
Hugh Willson
540dc00230 Add a self-test skip option (#9579)
* Add a self-test skip option

Meteor's CI infrastructure is configured to exclude certain
`self-test`'s on each run. These excludes are specified in
each CI environment's config file, and included when running
`meteor self-test`. Developers running `meteor self-test`
locally however are not using these excludes by default,
so developer's have to manually look up the current exclude
list from one of the CI configs, then add these excludes to
their own `meteor self-test` call manually.

This commit adds a new `skip` option to Meteor's `self-test`
system, that can be used to skip adding/running a defined
`self-test` (similar in concept to Mocha's `skip` feature).
This provides a way to skip the running of older
`self-test`'s that are no longer needed, but allows them to
be preserved in the `self-test` suite, for future reference.
With this functionality in place, and the older test suites
updated to use it, Meteor's base CI excludes no longer need
to be maintained in their respective config files. The
excludes are all managed at the source (the test definition),
and can be leveraged by anyone/anything calling
`meteor self-test`.

* Log message describing skipped test

* Add manually-ignored count to self-test summary

* Small comment correction

* History.md entry with PR link
2018-01-29 14:25:09 +02:00
Ben Newman
9cc9ff7f49 Actually depend on es5-shim so that Cordova can import it.
Another attempt to fix #9572. 🤞

cc @paulincai
2018-01-26 17:45:43 -05:00
Ben Newman
8415880b2e Remove api.use("promise") from Meteor babel-runtime package. 2018-01-26 12:27:02 -05:00
Ben Newman
1dc34f3872 Stop importing @babel/runtime/regenerator in Meteor babel-runtime package.
Because Promise.asyncApply is only defined on the server, and Meteor 1.6
no longer uses Regenerator to compile async/await and generator functions
on the server, this code no longer serves any meaningful purpose.

On top of that, the babel-runtime.js module is loaded on the client, so
this code was forcing the Regenerator runtime to be included in the client
JS bundle, even if generator functions were not used anywhere else in the
application.

The benefit of removing this @babel/runtime/regenerator dependency won't
be fully apparent until Meteor 1.6.2, since there are probably other
places in client code that depend on it, so it will probably still be
bundled in most applications. However, the new web.browser.legacy system
(#9439) should remove most of those dependencies for modern browsers, as
Meteor 1.6.2 will no longer use Regenerator to compile async/await and
generators for the modern JS bundle.
2018-01-26 12:17:56 -05:00
Ben Newman
1b34b81c75 Fix undefined Date constructor in Cordova es5-shim.
Fixes #9572.
2018-01-25 12:48:23 -05:00
Ben Newman
070acc01b0 Bump $BUNDLE_VERSION to 8.9.19 before rebuilding dev bundle. 2018-01-24 17:47:55 -05:00
Hugh Willson
dfc0702558 Upgrade to Mongo 3.6 (#9533)
Update the Meteor Tool to use Mongo 3.6.2 for 64-bit OS'
and Mongo 3.2.18 for 32-bit OS'. A few important mentions:

- As of Mongo 3.6, all Mongo binary downloads include
  SSL - there is no longer a non-SSL based download bundle
  (so it's a bit bigger, but that shouldn't be an issue).
- Using the `--nojournal` option with WiredTiger based
  replica sets is no longer supported (see
  https://jira.mongodb.org/browse/SERVER-30760). The
  `--nojournal` flag was added in
  bcfe072d52
  to help reduce the amount of disk space used by Mongo,
  but since this option is no longer supported, we'll
  have to live with the extra disk space usage.
- Add PR link to History.md
2018-01-24 22:01:46 +02:00
Ben Newman
1fec23f3b7 Always include es5-shim in Cordova JS bundles. (#9566)
Since Cordova renders boilerplate HTML at build time, and doesn't use the
server-render system through the webapp package, it's important that we
include es5-shim (and sham) statically for Cordova clients.

This logic will go away once we have the web.browser.legacy system to
control differential bundling (#9439), but for now it's necessary for any
Cordova clients that still don't have full ECMAScript 5 support.
2018-01-22 17:49:22 -05:00
Ben Newman
c0c2aa32d3 Remove stray packages/deprecated/stylus/.versions file. 2018-01-22 17:32:33 -05:00
Ben Newman
818ef0ed6e Merge pull request #9565 from meteor/undelete-deprecated-stylus-package-to-fix-caching-bug
Bring back deprecated stylus package in order to fix a caching bug.
2018-01-22 17:23:48 -05:00
Ben Newman
cb77875f38 Generate MultiFileCachingCompiler .cache filenames based on getCacheKey. (#9564)
Previously, .cache filenames were simply a hash of the absolute path of
the inputFile, which allowed for cache collisions (on disk) between the
same file compiled for different architectures (web.browser, os.*, ...).
Now, the .cache filenames are generated based on whatever information the
compiler plugin deems uniquely identifying about the input file: whatever
is returned from getCacheKey, plus the absolute path of the file.
2018-01-22 17:17:51 -05:00
Ben Newman
41161774d6 Bump stylus patch version to 2.513.14 and update references. 2018-01-22 16:28:04 -05:00
Ben Newman
f1f287893a Include inputFile.getArch() in StylusCompiler cache key.
Similar to this CachedCoffeeScriptCompiler change:
620689f7de

And this LessCompiler change: 8cadd4e215
2018-01-22 16:24:27 -05:00
Ben Newman
a5fc5b030e Bring back deprecated stylus package in order to fix a caching bug.
This code was recently removed in PR #9445, with this commit:
d644705aa8

Rather than removing deprecated code entirely from the codebase, I think
it's sufficient to keep it in packages/deprecated, and print a deprecation
notice whenever the package is used. This way it's clear that developers
should migrate to other similar packages, but we can still release
important patches for those who haven't been able to migrate yet.

cc @hwillson @abernix
2018-01-22 16:19:55 -05:00
Ben Newman
e7b6176bf1 Update runtime module system to latest version.
This update includes the following commit, which fixes a subtle bug with
package.json "main" module resolution:
d8142eb42e
2018-01-22 11:17:53 -05:00
Ben Newman
8cadd4e215 Include inputFile.getArch() in LessCompiler cache key.
Similar to this CachedCoffeeScriptCompiler change:
620689f7de
2018-01-21 11:31:04 -05:00
Ben Newman
7678c46f30 Bump caching-compiler package version to republish. 2018-01-21 11:31:02 -05:00
Ben Newman
37bda86cce Update dynamic-import test app to Meteor 1.6.1. 2018-01-20 17:19:04 -05:00
Ben Newman
4e21be3945 Update modules test app to Meteor 1.6.1. 2018-01-20 17:16:35 -05:00
Ben Newman
79b5ed8e65 Merge branch 'master' into devel 2018-01-20 17:05:15 -05:00
Ben Newman
6dd913454c Merge pull request #9274 from meteor/release-1.6.1
Release 1.6.1
2018-01-20 17:04:03 -05:00
Ben Newman
893426552d Remove pre-release suffixes from coffeescript packages. 2018-01-20 16:04:13 -05:00
Ben Newman
2c7616d221 Bump package versions for the official 1.6.1 release. release/METEOR@1.6.1 2018-01-20 15:50:01 -05:00
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