mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge branch 'devel' into release-1.5.2
This commit is contained in:
@@ -53,6 +53,12 @@
|
||||
* The `"env"` field is now supported in `.babelrc` files.
|
||||
[PR #8963](https://github.com/meteor/meteor/pull/8963)
|
||||
|
||||
* Files contained by `client/compatibility/` directories or added with
|
||||
`api.addFiles(files, ..., { bare: true })` are now evaluated before
|
||||
importing modules with `require`, which may be a breaking change if you
|
||||
depend on the interleaving of `bare` files with eager module evaluation.
|
||||
[PR #8972](https://github.com/meteor/meteor/pull/8972)
|
||||
|
||||
## v1.5.1, 2017-07-12
|
||||
|
||||
* Node has been upgraded to version 4.8.4.
|
||||
|
||||
@@ -233,8 +233,8 @@ _.extend(Module.prototype, {
|
||||
|
||||
_.each(this.files, file => {
|
||||
if (file.bare) {
|
||||
// Bare files will be added in between the synchronous require
|
||||
// calls in _chunkifyEagerRequires.
|
||||
// Bare files will be added before the synchronous require calls
|
||||
// in _chunkifyEagerRequires.
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -384,10 +384,9 @@ _.extend(Module.prototype, {
|
||||
},
|
||||
|
||||
// Adds require calls to the chunks array for all modules that should be
|
||||
// eagerly evaluated, and also includes bare files in the appropriate
|
||||
// order with respect to the require calls. Returns the name of the
|
||||
// variable that holds the main exports object, if api.mainModule was
|
||||
// used to define a main module.
|
||||
// eagerly evaluated, and also includes any bare files before the
|
||||
// require calls. Returns the name of the variable that holds the main
|
||||
// exports object, if api.mainModule was used to define a main module.
|
||||
_chunkifyEagerRequires(chunks, moduleCount, sourceWidth) {
|
||||
assert.ok(_.isArray(chunks));
|
||||
assert.ok(_.isNumber(moduleCount));
|
||||
@@ -396,8 +395,11 @@ _.extend(Module.prototype, {
|
||||
let exportsName;
|
||||
|
||||
// Now that we have installed everything in this package or
|
||||
// application, immediately require the non-lazy modules and
|
||||
// evaluate the bare files.
|
||||
// application, first evaluate the bare files, then require the
|
||||
// non-lazy (eager) modules.
|
||||
|
||||
const eagerModuleFiles = [];
|
||||
|
||||
_.each(this.files, file => {
|
||||
if (file.bare) {
|
||||
chunks.push("\n", file.getPrelinkedOutput({
|
||||
@@ -405,6 +407,12 @@ _.extend(Module.prototype, {
|
||||
noLineNumbers: this.noLineNumbers
|
||||
}));
|
||||
} else if (moduleCount > 0 && ! file.lazy) {
|
||||
eagerModuleFiles.push(file);
|
||||
}
|
||||
});
|
||||
|
||||
if (eagerModuleFiles.length > 0) {
|
||||
_.each(eagerModuleFiles, file => {
|
||||
if (file.mainModule) {
|
||||
exportsName = "exports";
|
||||
}
|
||||
@@ -415,8 +423,8 @@ _.extend(Module.prototype, {
|
||||
JSON.stringify("./" + file.installPath),
|
||||
");"
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return exportsName;
|
||||
}
|
||||
|
||||
@@ -593,7 +593,7 @@ var launchMongo = function (options) {
|
||||
'meteor',
|
||||
new mongoNpmModule.Server('127.0.0.1', options.port, {
|
||||
poolSize: 1,
|
||||
socketOptions: {connectTimeoutMS: 30000},
|
||||
socketOptions: {connectTimeoutMS: 60000},
|
||||
}),
|
||||
{safe: true});
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ selftest.define("modules - test app", function () {
|
||||
"--driver-package", "dispatch:mocha-phantomjs"
|
||||
);
|
||||
|
||||
run.waitSecs(180);
|
||||
run.waitSecs(60);
|
||||
run.match("App running at");
|
||||
run.match("SERVER FAILURES: 0");
|
||||
run.match("CLIENT FAILURES: 0");
|
||||
|
||||
Reference in New Issue
Block a user