* Added `smokeEmailTest` function which sets up test stream
* Splits the previously combined tests into multiple tests
* Created test that catches error in PR #6916, caught in #7123
* Confirmed regression without 6e071838af
The previous use of `Npm.require()` yielded at this point of logging,
which could lead to logging out of order (!) and failing self-tests
in particular.
This method is intended to help compiler plugins other than ecmascript
process inputFiles using the BabelCompiler.
For example: https://github.com/meteor/meteor/pull/6691
Full comments: https://github.com/meteor/meteor/issues/6351#issuecomment-220944251
This commit implements optional "babel-{plugin,preset}-" prefixing and
.__esModule logic (point 2), and gives users more control over load order
by turning their plugins into a preset that loads between
babel-preset-meteor and the default plugins (point 4.i).
As time goes on, Meteor should consider moving some transforms out of the
babel-preset-meteor preset and into the babelOptions.plugins list, so that
they can be preempted by user presets.
In addition to package.json files with "babel" sections, BabelCompiler now
supports .babelrc files, though in both cases only the "presets" and
"plugins" fields are respected. If a .babelrc file is found, package.json
files are ignored.
Additional presets and plugins are now *prepended* to the original
babelOptions.{presets,plugins} lists, so that the custom plugins have a
chance to handle syntax differently than babel-preset-meteor would.
The inputFile.getPackageJson method has been replaced by a more general
method, inputFile.findControlFile.
Fixes#6351.
Switching immediately to module.import and module.export for package code
would make it difficult for package authors to use Meteor 1.3.3 to publish
packages that still work in apps using older versions of Meteor. There's
nothing wrong with compiling import/export statements to module.import and
module.export in application code, however, because apps only need to work
with one version of Meteor.
For #4235. The previous version worked for most simple cases but was not actually correct. The idea is this function returns a "prototypical" document that can be tested by the oplog query -- this was returning `true` which tended to match but wasn't actually right.
When the babel-compiler package is processing files, it will now read
their package.json files looking for a "babel" section with "presets" or
"plugins" fields. If found, these presets or plugins will be appended to
the existing babelOptions.presets or babelOptions.plugins arrays.
Note that no other Babel options are currently supported, and the
"babel-preset-meteor" preset cannot be removed, though additional presets
and/or plugins can be added to it. This is by design: Meteor cannot
support your configuration it uses babel-preset-meteor, at least.
The preset and/or plugin modules listed in package.json must be installed
locally somewhere such that the given file can import them. If they are
top-level identifiers, they will be prefixed with "babel-plugin-" or
"babel-preset-", the same as Babel does it. Otherwise they will be
required as-is, so that you can implement your own Babel plugins locally,
rather than always using plugins installed from npm.
See the included tests for a concrete example.
Fixes#6351.
- No error is thrown when constructing a Mongo.Collection twice for the same name if _suppressSameNameError option is true
- If mutation methods were already created for a named collection, we skip them and do not throw an error
- Mongo.Collection constructor takes a new option, defineMutationMethods, which can be set to false to skip creating the default mutation methods
- _defineMutationMethods function performance is slightly improved by returning earlier if there is no need to loop through method types
Note that this may be a breaking change for server-side code that uses
Promise.denodeify, Promise.nodeify, Function.prototype.async, or
Function.prototype.asyncApply, since those APIs have been removed for the
sake of simplicity.
This is an adaptation of @tmeasday's 74230beba8 test that he created for meteor/meteor#5680. Due to occasional failures, it now uses sinon's `lolex` npm library to allow us to control the setTimeout/setInterval within the test itself, providing for tick-accurate testing. Also nifty because it allows the test to finish in less time than it actually takes.