diff --git a/History.md b/History.md index 5bc6a3982d..3938c4cf0d 100644 --- a/History.md +++ b/History.md @@ -7,6 +7,12 @@ much more quickly, especially if you have many `node_modules` files. See https://github.com/meteor/meteor/pull/7668 for more details. +> Note: the `METEOR_PROFILE` environment variable now provides data for + server startup time as well as build time, which should make it easier + to tell which of your packages are responsible for slow startup times. + Please include the output of `METEOR_PROFILE=10 meteor run` with any + GitHub issue about rebuild performance. + * `npm` has been upgraded to version 3.10.9. * The `cordova-lib` npm package has been updated to 6.3.1, along with diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 0807aaef24..5f33d2e408 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.2.14-rc.2" + version: "1.2.14" }); Package.onUse(function (api) { diff --git a/packages/accounts-facebook/package.js b/packages/accounts-facebook/package.js index 461b0ca2f9..c323e43ebb 100644 --- a/packages/accounts-facebook/package.js +++ b/packages/accounts-facebook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Facebook accounts", - version: "1.0.11-rc.2" + version: "1.0.11" }); Package.onUse(function(api) { diff --git a/packages/accounts-github/package.js b/packages/accounts-github/package.js index f51fb41338..7646ea1108 100644 --- a/packages/accounts-github/package.js +++ b/packages/accounts-github/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Github accounts", - version: "1.0.11-rc.2" + version: "1.0.11" }); Package.onUse(function(api) { diff --git a/packages/accounts-google/package.js b/packages/accounts-google/package.js index 2d6b0a115f..1f71d41315 100644 --- a/packages/accounts-google/package.js +++ b/packages/accounts-google/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Google accounts", - version: "1.0.11-rc.2" + version: "1.0.11" }); Package.onUse(function(api) { diff --git a/packages/accounts-meetup/package.js b/packages/accounts-meetup/package.js index 076b96fe8e..637ab50659 100644 --- a/packages/accounts-meetup/package.js +++ b/packages/accounts-meetup/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Meetup accounts", - version: "1.0.11-rc.2" + version: "1.0.11" }); Package.onUse(function(api) { diff --git a/packages/accounts-meteor-developer/package.js b/packages/accounts-meteor-developer/package.js index 858cca3064..d15392912e 100644 --- a/packages/accounts-meteor-developer/package.js +++ b/packages/accounts-meteor-developer/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Meteor developer accounts", - version: "1.0.11-rc.2" + version: "1.0.11" }); Package.onUse(function (api) { diff --git a/packages/accounts-oauth/package.js b/packages/accounts-oauth/package.js index 9b9b99d7d2..ca6ba361c6 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.14-rc.2" + version: "1.1.14" }); Package.onUse(function (api) { diff --git a/packages/accounts-password/package.js b/packages/accounts-password/package.js index c39745b02e..430906f856 100644 --- a/packages/accounts-password/package.js +++ b/packages/accounts-password/package.js @@ -1,27 +1,27 @@ Package.describe({ summary: "Password support for accounts", - version: "1.3.1-rc.2" + version: "1.3.1" }); Package.onUse(function(api) { - api.use('npm-bcrypt@0.9.0', 'server'); + api.use('npm-bcrypt', 'server'); api.use([ - 'accounts-base@1.2.10', - 'srp@1.0.9', - 'sha@1.0.8', - 'ejson@1.0.12', - 'ddp@1.2.5' + 'accounts-base', + 'srp', + 'sha', + 'ejson', + 'ddp' ], ['client', 'server']); // Export Accounts (etc) to packages using this one. - api.imply('accounts-base@1.2.10', ['client', 'server']); + api.imply('accounts-base', ['client', 'server']); - api.use('email@1.1.16', ['server']); - api.use('random@1.0.10', ['server']); - api.use('check@1.2.3'); - api.use('underscore@1.0.9'); - api.use('ecmascript@0.5.7'); + api.use('email', ['server']); + api.use('random', ['server']); + api.use('check'); + api.use('underscore'); + api.use('ecmascript'); api.addFiles('email_templates.js', 'server'); api.addFiles('password_server.js', 'server'); diff --git a/packages/accounts-twitter/package.js b/packages/accounts-twitter/package.js index 67a9142d84..82ca9e64c8 100644 --- a/packages/accounts-twitter/package.js +++ b/packages/accounts-twitter/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Twitter accounts", - version: "1.1.12-rc.2" + version: "1.1.12" }); Package.onUse(function(api) { diff --git a/packages/accounts-ui-unstyled/package.js b/packages/accounts-ui-unstyled/package.js index 5186028d77..89de1e7976 100644 --- a/packages/accounts-ui-unstyled/package.js +++ b/packages/accounts-ui-unstyled/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Unstyled version of login widgets", - version: "1.1.13-rc.2" + version: "1.1.13" }); Package.onUse(function (api) { diff --git a/packages/accounts-weibo/package.js b/packages/accounts-weibo/package.js index bfb8438ff7..830c9a5748 100644 --- a/packages/accounts-weibo/package.js +++ b/packages/accounts-weibo/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Login service for Sina Weibo accounts", - version: "1.0.11-rc.2" + version: "1.0.11" }); Package.onUse(function(api) { diff --git a/packages/appcache/package.js b/packages/appcache/package.js index 0cd5db5e0d..78c0652a10 100644 --- a/packages/appcache/package.js +++ b/packages/appcache/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Enable the application cache in the browser", - version: "1.0.12-rc.2" + version: "1.0.12" }); Package.onUse(function (api) { diff --git a/packages/autoupdate/package.js b/packages/autoupdate/package.js index 70a0e21924..642f3c2c1c 100644 --- a/packages/autoupdate/package.js +++ b/packages/autoupdate/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Update the client when new client code is available", - version: '1.3.12-rc.2' + version: '1.3.12' }); Package.onUse(function (api) { diff --git a/packages/babel-compiler/babel.js b/packages/babel-compiler/babel.js index 8212945501..fc20af1d6e 100644 --- a/packages/babel-compiler/babel.js +++ b/packages/babel-compiler/babel.js @@ -1,9 +1,9 @@ -var meteorBabel = Npm.require('meteor-babel'); - /** * Returns a new object containing default options appropriate for */ function getDefaultOptions(extraFeatures) { + var meteorBabel = Npm.require('meteor-babel'); + // See https://github.com/meteor/babel/blob/master/options.js for more // information about what the default options are. var options = meteorBabel.getDefaultOptions(extraFeatures); @@ -22,11 +22,12 @@ Babel = { validateExtraFeatures: Function.prototype, compile: function (source, options) { + var meteorBabel = Npm.require('meteor-babel'); options = options || getDefaultOptions(); return meteorBabel.compile(source, options); }, setCacheDir: function (cacheDir) { - meteorBabel.setCacheDir(cacheDir); + Npm.require('meteor-babel').setCacheDir(cacheDir); } }; diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index d22eb8630b..24bff99a4d 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,7 +6,7 @@ Package.describe({ // isn't possible because you can't publish a non-recommended // release with package versions that don't have a pre-release // identifier at the end (eg, -dev) - version: '6.13.0-rc.2' + version: '6.13.0' }); Npm.depends({ diff --git a/packages/babel-runtime/package.js b/packages/babel-runtime/package.js index bb1bc9a05d..41a4e9224c 100644 --- a/packages/babel-runtime/package.js +++ b/packages/babel-runtime/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-runtime", summary: "Runtime support for output of Babel transpiler", - version: '0.1.12-rc.2', + version: '0.1.12', documentation: 'README.md' }); diff --git a/packages/base64/package.js b/packages/base64/package.js index 4548d124f8..7d4742aea2 100644 --- a/packages/base64/package.js +++ b/packages/base64/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Base64 encoding and decoding", - version: '1.0.10-rc.2' + version: '1.0.10' }); Package.onUse(function (api) { diff --git a/packages/binary-heap/package.js b/packages/binary-heap/package.js index 2e944f84f2..262bb06acd 100644 --- a/packages/binary-heap/package.js +++ b/packages/binary-heap/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Binary Heap datastructure implementation", - version: '1.0.10-rc.2' + version: '1.0.10' }); Package.onUse(function (api) { diff --git a/packages/boilerplate-generator/package.js b/packages/boilerplate-generator/package.js index fff1fe41d6..357701a5a2 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.0.11-rc.2' + version: '1.0.11' }); Package.onUse(function (api) { diff --git a/packages/browser-policy-common/package.js b/packages/browser-policy-common/package.js index ab0e5e397b..85c2554c3e 100644 --- a/packages/browser-policy-common/package.js +++ b/packages/browser-policy-common/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for browser-policy packages", - version: "1.0.11-rc.2" + version: "1.0.11" }); Package.onUse(function (api) { diff --git a/packages/browser-policy-content/package.js b/packages/browser-policy-content/package.js index 7c6ce008c6..4abffcb51e 100644 --- a/packages/browser-policy-content/package.js +++ b/packages/browser-policy-content/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Configure content security policies", - version: "1.0.12-rc.2" + version: "1.0.12" }); Package.onUse(function (api) { diff --git a/packages/browser-policy-framing/package.js b/packages/browser-policy-framing/package.js index 4882888677..a9ebddde15 100644 --- a/packages/browser-policy-framing/package.js +++ b/packages/browser-policy-framing/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Restrict which websites can frame your app", - version: "1.0.12-rc.2" + version: "1.0.12" }); Package.onUse(function (api) { diff --git a/packages/caching-compiler/package.js b/packages/caching-compiler/package.js index a70a141e5c..88795d4906 100644 --- a/packages/caching-compiler/package.js +++ b/packages/caching-compiler/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'caching-compiler', - version: '1.1.8-rc.2', + version: '1.1.8', summary: 'An easy way to make compiler plugins cache', documentation: 'README.md' }); diff --git a/packages/callback-hook/package.js b/packages/callback-hook/package.js index f9c87fc283..ece4b39e27 100644 --- a/packages/callback-hook/package.js +++ b/packages/callback-hook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Register callbacks on a hook", - version: '1.0.10-rc.2' + version: '1.0.10' }); Package.onUse(function (api) { diff --git a/packages/check/package.js b/packages/check/package.js index 83af2c52f2..f279ac070f 100644 --- a/packages/check/package.js +++ b/packages/check/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Check whether a value matches a pattern", - version: '1.2.4-rc.2' + version: '1.2.4' }); Package.onUse(function (api) { diff --git a/packages/code-prettify/package.js b/packages/code-prettify/package.js index 9d75a26f8b..abe0277061 100644 --- a/packages/code-prettify/package.js +++ b/packages/code-prettify/package.js @@ -8,7 +8,7 @@ var path = Npm.require('path'); Package.describe({ summary: "Syntax highlighting of code, from Google", - version: "1.0.11-rc.2" + version: "1.0.11" }); // XXX this code dumps symbols into the global namespace (directly diff --git a/packages/coffeescript-test-helper/package.js b/packages/coffeescript-test-helper/package.js index 7ee8137281..b79b10367e 100644 --- a/packages/coffeescript-test-helper/package.js +++ b/packages/coffeescript-test-helper/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Used by the coffeescript package's tests", - version: "1.0.8-rc.2" + version: "1.0.8" }); Package.onUse(function (api) { diff --git a/packages/coffeescript/package.js b/packages/coffeescript/package.js index a80bc74c9a..10a14b4c3f 100644 --- a/packages/coffeescript/package.js +++ b/packages/coffeescript/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Javascript dialect with fewer braces and semicolons", - version: "1.11.1-2-rc.2" + version: "1.11.1_2" }); Package.registerBuildPlugin({ diff --git a/packages/constraint-solver/package.js b/packages/constraint-solver/package.js index 81aacfc815..5f8f368bc9 100644 --- a/packages/constraint-solver/package.js +++ b/packages/constraint-solver/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Given the set of the constraints, picks a satisfying configuration", - version: "1.1.1-rc.2" + version: "1.1.1" }); Package.onUse(function (api) { diff --git a/packages/crosswalk/package.js b/packages/crosswalk/package.js index 77beb28e2c..ea2a82118b 100644 --- a/packages/crosswalk/package.js +++ b/packages/crosswalk/package.js @@ -1,7 +1,7 @@ Package.describe({ summary: "Makes your Cordova application use the Crosswalk WebView \ instead of the System WebView on Android", - version: '1.7.0-rc.2', + version: '1.7.0', documentation: null }); diff --git a/packages/ddp-client/package.js b/packages/ddp-client/package.js index 87872d2ca1..7816884263 100644 --- a/packages/ddp-client/package.js +++ b/packages/ddp-client/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor's latency-compensated distributed data client", - version: '1.3.2-rc.2', + version: '1.3.2', documentation: null }); diff --git a/packages/ddp-common/package.js b/packages/ddp-common/package.js index 91e974b445..341bca27ad 100644 --- a/packages/ddp-common/package.js +++ b/packages/ddp-common/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Code shared beween ddp-client and ddp-server", - version: '1.2.7-rc.2', + version: '1.2.7', documentation: null }); diff --git a/packages/ddp-rate-limiter/package.js b/packages/ddp-rate-limiter/package.js index 9c6db5f677..c442b116f9 100644 --- a/packages/ddp-rate-limiter/package.js +++ b/packages/ddp-rate-limiter/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ddp-rate-limiter', - version: '1.0.6-rc.2', + version: '1.0.6', // Brief, one-line summary of the package. summary: 'The DDPRateLimiter allows users to add rate limits to DDP' + ' methods and subscriptions.', diff --git a/packages/ddp-server/package.js b/packages/ddp-server/package.js index 5f59529af0..46975fff25 100644 --- a/packages/ddp-server/package.js +++ b/packages/ddp-server/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor's latency-compensated distributed data server", - version: '1.3.11-rc.2', + version: '1.3.11', documentation: null }); diff --git a/packages/diff-sequence/package.js b/packages/diff-sequence/package.js index d0687b886a..0725708bdc 100644 --- a/packages/diff-sequence/package.js +++ b/packages/diff-sequence/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "An implementation of a diff algorithm on arrays and objects.", - version: '1.0.7-rc.2', + version: '1.0.7', documentation: null }); diff --git a/packages/ecmascript-runtime/package.js b/packages/ecmascript-runtime/package.js index ef3b8b1fef..78b193e14e 100644 --- a/packages/ecmascript-runtime/package.js +++ b/packages/ecmascript-runtime/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "ecmascript-runtime", - version: "0.3.15-rc.2", + version: "0.3.15", summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set", git: "https://github.com/meteor/ecmascript-runtime", documentation: "README.md" diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index d70ae82d91..1678e3063f 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.5.9-rc.2', + version: '0.5.9', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md' }); diff --git a/packages/ejson/package.js b/packages/ejson/package.js index 69c9d4d2a5..27c712f5a3 100644 --- a/packages/ejson/package.js +++ b/packages/ejson/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Extended and Extensible JSON library", - version: '1.0.13-rc.2' + version: '1.0.13' }); Package.onUse(function (api) { diff --git a/packages/email/package.js b/packages/email/package.js index a08c273773..dad8b2d8b3 100644 --- a/packages/email/package.js +++ b/packages/email/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Send email messages", - version: "1.1.18-rc.2" + version: "1.1.18" }); Npm.depends({ diff --git a/packages/es5-shim/package.js b/packages/es5-shim/package.js index 391f2bbc70..e114a1b51a 100644 --- a/packages/es5-shim/package.js +++ b/packages/es5-shim/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "es5-shim", - version: "4.6.15-rc.2", + version: "4.6.15", summary: "Shims and polyfills to improve ECMAScript 5 support", documentation: "README.md" }); diff --git a/packages/facebook/package.js b/packages/facebook/package.js index b20a0f9984..1d8cbc7539 100644 --- a/packages/facebook/package.js +++ b/packages/facebook/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Facebook OAuth flow", - version: "1.2.10-rc.2" + version: "1.2.10" }); Package.onUse(function(api) { diff --git a/packages/facts/package.js b/packages/facts/package.js index 16ae442bcd..1c73053180 100644 --- a/packages/facts/package.js +++ b/packages/facts/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Publish internal app statistics", - version: '1.0.9-rc.2' + version: '1.0.9' }); Package.onUse(function (api) { diff --git a/packages/fastclick/package.js b/packages/fastclick/package.js index 401d0b5531..bef7ca2e6e 100755 --- a/packages/fastclick/package.js +++ b/packages/fastclick/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Faster touch events on mobile", - version: '1.0.13-rc.2' + version: '1.0.13' }); Package.onUse(function (api) { diff --git a/packages/force-ssl/package.js b/packages/force-ssl/package.js index f594861649..76f2e6a095 100644 --- a/packages/force-ssl/package.js +++ b/packages/force-ssl/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Require this application to use HTTPS", - version: "1.0.13-rc.2", + version: "1.0.13", prodOnly: true }); diff --git a/packages/geojson-utils/package.js b/packages/geojson-utils/package.js index 0fff917a6c..5ae045b046 100644 --- a/packages/geojson-utils/package.js +++ b/packages/geojson-utils/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'GeoJSON utility functions (from https://github.com/maxogden/geojson-js-utils)', - version: '1.0.10-rc.2' + version: '1.0.10' }); Package.onUse(function (api) { diff --git a/packages/github/package.js b/packages/github/package.js index 8c0fcda8f3..4481a19963 100644 --- a/packages/github/package.js +++ b/packages/github/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Github OAuth flow", - version: "1.1.9-rc.2" + version: "1.1.9" }); Package.onUse(function(api) { diff --git a/packages/google/package.js b/packages/google/package.js index f2c5f7a367..ef74f1aee7 100644 --- a/packages/google/package.js +++ b/packages/google/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Google OAuth flow", - version: "1.1.15-rc.2" + version: "1.1.15" }); Package.onUse(function(api) { diff --git a/packages/http/package.js b/packages/http/package.js index 6c5ef61ba8..1f84883aa1 100644 --- a/packages/http/package.js +++ b/packages/http/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Make HTTP calls to remote servers", - version: '1.2.10-rc.2' + version: '1.2.10' }); Npm.depends({ diff --git a/packages/id-map/package.js b/packages/id-map/package.js index ba61ce7ac3..a1931eb94f 100644 --- a/packages/id-map/package.js +++ b/packages/id-map/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Dictionary data structure allowing non-string keys", - version: '1.0.9-rc.2' + version: '1.0.9' }); Package.onUse(function (api) { diff --git a/packages/jquery/package.js b/packages/jquery/package.js index b65b8f4597..30fc96b32b 100644 --- a/packages/jquery/package.js +++ b/packages/jquery/package.js @@ -5,7 +5,7 @@ Package.describe({ // patch number instead of the wrap number, we're higher than that. // In fairness, there's no way to make an RC of a new version without // bumping the patch number. - version: '1.11.10-rc.2' + version: '1.11.10' }); Package.onUse(function (api) { diff --git a/packages/jshint/package.js b/packages/jshint/package.js index 93e88edb2a..431da88126 100644 --- a/packages/jshint/package.js +++ b/packages/jshint/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'jshint', - version: '1.1.7-rc.2', + version: '1.1.7', summary: 'Lint all your JavaScript files with JSHint.', documentation: 'README.md' }); diff --git a/packages/jsparse/package.js b/packages/jsparse/package.js index bb9818b12a..5e3f58d85e 100644 --- a/packages/jsparse/package.js +++ b/packages/jsparse/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Full-featured JavaScript parser", - version: "1.0.10-rc.2" + version: "1.0.10" }); Package.onUse(function (api) { diff --git a/packages/launch-screen/package.js b/packages/launch-screen/package.js index 115faf0765..9184130ea7 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.1.0-rc.2' + version: '1.1.0' }); Cordova.depends({ diff --git a/packages/less/package.js b/packages/less/package.js index 5daf17549a..e3c89499e6 100644 --- a/packages/less/package.js +++ b/packages/less/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'less', - version: '2.7.6-rc.2', + version: '2.7.6', summary: 'Leaner CSS language', documentation: 'README.md' }); diff --git a/packages/localstorage/package.js b/packages/localstorage/package.js index fcaad84d8a..3b4cc80c50 100644 --- a/packages/localstorage/package.js +++ b/packages/localstorage/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Simulates local storage on IE 6,7 using userData", - version: "1.0.12-rc.2" + version: "1.0.12" }); Package.onUse(function (api) { diff --git a/packages/logging/package.js b/packages/logging/package.js index 220caa62a8..deef99b0ca 100644 --- a/packages/logging/package.js +++ b/packages/logging/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Logging facility.", - version: '1.1.16-rc.2' + version: '1.1.16' }); Npm.depends({ diff --git a/packages/logic-solver/package.js b/packages/logic-solver/package.js index f2d905766d..f173dd5633 100644 --- a/packages/logic-solver/package.js +++ b/packages/logic-solver/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "General satisfiability solver for logic problems", - version: '2.0.7-rc.2' + version: '2.0.7' }); Package.on_use(function (api) { diff --git a/packages/markdown/package.js b/packages/markdown/package.js index 69fdc9d88f..0c97f5126a 100644 --- a/packages/markdown/package.js +++ b/packages/markdown/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Markdown-to-HTML processor", - version: "1.0.11-rc.2" + version: "1.0.11" }); Package.onUse(function (api) { diff --git a/packages/meetup/package.js b/packages/meetup/package.js index e2c578e659..ef51925996 100644 --- a/packages/meetup/package.js +++ b/packages/meetup/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meetup OAuth flow", - version: "1.6.5-rc.2" + version: "1.6.5" }); Package.onUse(function(api) { diff --git a/packages/meteor-developer/package.js b/packages/meteor-developer/package.js index f80b67a088..1453ce78b1 100644 --- a/packages/meteor-developer/package.js +++ b/packages/meteor-developer/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor developer accounts OAuth flow", - version: "1.1.10-rc.2" + version: "1.1.10" }); Package.onUse(function (api) { diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 042e251ce4..8c64e92fd7 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.4.2-rc.2' + version: '1.4.2' }); Package.includeTool(); diff --git a/packages/meteor/package.js b/packages/meteor/package.js index 4d351cf781..2753bc79a1 100644 --- a/packages/meteor/package.js +++ b/packages/meteor/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Core Meteor environment", - version: '1.6.0-rc.2' + version: '1.6.0' }); Package.registerBuildPlugin({ diff --git a/packages/meteor/startup_server.js b/packages/meteor/startup_server.js index 2a08396ac1..7d60372b5b 100644 --- a/packages/meteor/startup_server.js +++ b/packages/meteor/startup_server.js @@ -1,4 +1,19 @@ -Meteor.startup = function (callback) { +Meteor.startup = function startup(callback) { + if (process.env.METEOR_PROFILE) { + // Create a temporary error to capture the current stack trace. + var error = new Error("Meteor.startup"); + + // Capture the stack trace of the Meteor.startup call, excluding the + // startup stack frame itself. + Error.captureStackTrace(error, startup); + + callback.stack = error.stack + .split(/\n\s*/) // Split lines and remove leading whitespace. + .slice(0, 2) // Only include the call site. + .join(" ") // Collapse to one line. + .replace(/^Error: /, ""); // Not really an Error per se. + } + if (__meteor_bootstrap__.startupHooks) { __meteor_bootstrap__.startupHooks.push(callback); } else { diff --git a/packages/minifier-css/package.js b/packages/minifier-css/package.js index 31de5188e6..b27a0d395a 100644 --- a/packages/minifier-css/package.js +++ b/packages/minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "CSS minifier", - version: "1.2.15-rc.2" + version: "1.2.15" }); Npm.depends({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 1dcf7273fb..831c952eb2 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "1.2.15-rc.2" + version: "1.2.15" }); Npm.depends({ diff --git a/packages/minimongo/package.js b/packages/minimongo/package.js index 89945954e8..8ae9f077c1 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.0.18-rc.2' + version: '1.0.18' }); Package.onUse(function (api) { diff --git a/packages/mobile-status-bar/package.js b/packages/mobile-status-bar/package.js index 0a63caf5c0..48f264f1b1 100644 --- a/packages/mobile-status-bar/package.js +++ b/packages/mobile-status-bar/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Good defaults for the mobile status bar", - version: "1.0.13-rc.2" + version: "1.0.13" }); Cordova.depends({ diff --git a/packages/modules-runtime/.npm/package/npm-shrinkwrap.json b/packages/modules-runtime/.npm/package/npm-shrinkwrap.json index 3d95f909ec..ceac639e6f 100644 --- a/packages/modules-runtime/.npm/package/npm-shrinkwrap.json +++ b/packages/modules-runtime/.npm/package/npm-shrinkwrap.json @@ -1,9 +1,9 @@ { "dependencies": { "install": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/install/-/install-0.8.1.tgz", - "from": "install@0.8.1" + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/install/-/install-0.8.2.tgz", + "from": "install@0.8.2" } } } diff --git a/packages/modules-runtime/modules-runtime.js b/packages/modules-runtime/modules-runtime.js index b5f95185bc..30403e3fbc 100644 --- a/packages/modules-runtime/modules-runtime.js +++ b/packages/modules-runtime/modules-runtime.js @@ -4,6 +4,15 @@ var hasOwn = options.hasOwnProperty; // RegExp matching strings that don't start with a `.` or a `/`. var topLevelIdPattern = /^[^./]/; +if (typeof Profile === "function" && + process.env.METEOR_PROFILE) { + options.wrapRequire = function (require) { + return Profile(function (id) { + return "require(" + JSON.stringify(id) + ")"; + }, require); + }; +} + // This function will be called whenever a module identifier that hasn't // been installed is required. For backwards compatibility, and so that we // can require binary dependencies on the server, we implement the diff --git a/packages/modules-runtime/package.js b/packages/modules-runtime/package.js index 2ba8d41f41..2cf3791782 100644 --- a/packages/modules-runtime/package.js +++ b/packages/modules-runtime/package.js @@ -1,13 +1,13 @@ Package.describe({ name: "modules-runtime", - version: "0.7.7-rc.2", + version: "0.7.7", summary: "CommonJS module system", git: "https://github.com/benjamn/install", documentation: "README.md" }); Npm.depends({ - install: "0.8.1" + install: "0.8.2" }); Package.onUse(function(api) { diff --git a/packages/modules/package.js b/packages/modules/package.js index 112a3431c5..3b458fbb37 100644 --- a/packages/modules/package.js +++ b/packages/modules/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "modules", - version: "0.7.7-rc.2", + version: "0.7.7", summary: "CommonJS module system", documentation: "README.md" }); diff --git a/packages/mongo-id/package.js b/packages/mongo-id/package.js index 226c6141d5..a3fc9342e3 100644 --- a/packages/mongo-id/package.js +++ b/packages/mongo-id/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JS simulation of MongoDB ObjectIDs", - version: '1.0.6-rc.2', + version: '1.0.6', documentation: null }); diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 16c471bc73..f03f3ac16a 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.1.14-rc.2' + version: '1.1.14' }); Npm.depends({ diff --git a/packages/npm-bcrypt/package.js b/packages/npm-bcrypt/package.js index 393f3d3071..b070cc4a05 100644 --- a/packages/npm-bcrypt/package.js +++ b/packages/npm-bcrypt/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Wrapper around the bcrypt npm package", - version: "0.9.2-rc.2", + version: "0.9.2", documentation: null }); diff --git a/packages/npm-mongo/package.js b/packages/npm-mongo/package.js index 83aaf2b551..8a21cb4846 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: '2.2.11-2-rc.2', + version: '2.2.11_2', documentation: null }); diff --git a/packages/oauth-encryption/package.js b/packages/oauth-encryption/package.js index 1db2c208cc..9b622c4683 100644 --- a/packages/oauth-encryption/package.js +++ b/packages/oauth-encryption/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Encrypt account secrets stored in the database", - version: '1.2.1-rc.2' + version: '1.2.1' }); Package.onUse(function (api) { diff --git a/packages/oauth/package.js b/packages/oauth/package.js index d04c28c24a..ed85871925 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.1.12-rc.2" + version: "1.1.12" }); Package.onUse(function (api) { diff --git a/packages/oauth1/package.js b/packages/oauth1/package.js index 65fab9a84e..f86a19cab9 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.1.11-rc.2" + version: "1.1.11" }); Package.onUse(function (api) { diff --git a/packages/oauth2/package.js b/packages/oauth2/package.js index 28cddf4f5c..c73f05e6de 100644 --- a/packages/oauth2/package.js +++ b/packages/oauth2/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Common code for OAuth2-based login services", - version: "1.1.11-rc.2" + version: "1.1.11" }); Package.onUse(function (api) { diff --git a/packages/observe-sequence/package.js b/packages/observe-sequence/package.js index b33f3aca53..4a18677f95 100644 --- a/packages/observe-sequence/package.js +++ b/packages/observe-sequence/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Observe changes to various sequence types such as arrays, cursors and objects", - version: "1.0.14-rc.2" + version: "1.0.14" }); Package.onUse(function (api) { diff --git a/packages/ordered-dict/package.js b/packages/ordered-dict/package.js index 2e6f8d1b55..3e9af08368 100644 --- a/packages/ordered-dict/package.js +++ b/packages/ordered-dict/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Ordered traversable dictionary with a mutable ordering", - version: '1.0.9-rc.2', + version: '1.0.9', documentation: null }); diff --git a/packages/package-version-parser/package.js b/packages/package-version-parser/package.js index e1cb117693..601910f00f 100644 --- a/packages/package-version-parser/package.js +++ b/packages/package-version-parser/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Parses Meteor Smart Package version strings", - version: "3.0.10-rc.2" + version: "3.0.10" }); Package.onUse(function (api) { diff --git a/packages/preserve-inputs/package.js b/packages/preserve-inputs/package.js index bcac6f058f..aade8591ae 100644 --- a/packages/preserve-inputs/package.js +++ b/packages/preserve-inputs/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Deprecated package (now empty)", - version: "1.0.11-rc.2" + version: "1.0.11" }); Package.onUse(function (api) { diff --git a/packages/promise/package.js b/packages/promise/package.js index cf654a050f..b4049ed53a 100644 --- a/packages/promise/package.js +++ b/packages/promise/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "promise", - version: "0.8.8-rc.2", + version: "0.8.8", summary: "ECMAScript 2015 Promise polyfill with Fiber support", git: "https://github.com/meteor/promise", documentation: "README.md" diff --git a/packages/rate-limit/package.js b/packages/rate-limit/package.js index 48ded85b31..06f92b3e2a 100644 --- a/packages/rate-limit/package.js +++ b/packages/rate-limit/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'rate-limit', - version: '1.0.6-rc.2', + version: '1.0.6', // Brief, one-line summary of the package. summary: 'An algorithm for rate limiting anything', // URL to the Git repository containing the source code for this package. diff --git a/packages/reactive-var/package.js b/packages/reactive-var/package.js index 48cae25d40..029608a876 100644 --- a/packages/reactive-var/package.js +++ b/packages/reactive-var/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Reactive variable", - version: '1.0.11-rc.2' + version: '1.0.11' }); Package.onUse(function (api) { diff --git a/packages/reload-safetybelt/package.js b/packages/reload-safetybelt/package.js index 1e559f3ae3..153ed5268a 100644 --- a/packages/reload-safetybelt/package.js +++ b/packages/reload-safetybelt/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Reload safety belt for multi-server deployments", - version: '1.0.11-rc.2' + version: '1.0.11' }); Package.onUse(function (api) { diff --git a/packages/reload/package.js b/packages/reload/package.js index 6911efb7ca..b1d955764f 100644 --- a/packages/reload/package.js +++ b/packages/reload/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Reload the page while preserving application state.", - version: '1.1.11-rc.2' + version: '1.1.11' }); Package.onUse(function (api) { diff --git a/packages/retry/package.js b/packages/retry/package.js index f0ab768463..dfb443fe47 100644 --- a/packages/retry/package.js +++ b/packages/retry/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Retry logic with exponential backoff", - version: '1.0.9-rc.2' + version: '1.0.9' }); Package.onUse(function (api) { diff --git a/packages/routepolicy/package.js b/packages/routepolicy/package.js index 7f9938554c..b443732575 100644 --- a/packages/routepolicy/package.js +++ b/packages/routepolicy/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "route policy declarations", - version: '1.0.12-rc.2' + version: '1.0.12' }); Package.onUse(function (api) { diff --git a/packages/service-configuration/package.js b/packages/service-configuration/package.js index 4338dbefb2..5dc8795b9a 100644 --- a/packages/service-configuration/package.js +++ b/packages/service-configuration/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Manage the configuration for third-party services", - version: "1.0.11-rc.2" + version: "1.0.11" }); Package.onUse(function(api) { diff --git a/packages/session/package.js b/packages/session/package.js index 85c0671930..aaf70597e5 100644 --- a/packages/session/package.js +++ b/packages/session/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Session variable", - version: '1.1.7-rc.2' + version: '1.1.7' }); Package.onUse(function (api) { diff --git a/packages/sha/package.js b/packages/sha/package.js index 9ea691890a..5d77ef40a4 100644 --- a/packages/sha/package.js +++ b/packages/sha/package.js @@ -1,5 +1,5 @@ Package.describe({ - version: '1.0.9-rc.2', + version: '1.0.9', summary: 'SHA256 implementation', git: 'https://github.com/meteor/meteor' }); diff --git a/packages/srp/package.js b/packages/srp/package.js index 0a3ba3e3c0..b30f47df87 100644 --- a/packages/srp/package.js +++ b/packages/srp/package.js @@ -5,7 +5,7 @@ Package.describe({ summary: "Library for Secure Remote Password (SRP) exchanges", - version: "1.0.10-rc.2" + version: "1.0.10" }); Package.onUse(function (api) { diff --git a/packages/standard-minifier-css/package.js b/packages/standard-minifier-css/package.js index 07fd802d14..08c4d4cd11 100644 --- a/packages/standard-minifier-css/package.js +++ b/packages/standard-minifier-css/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-css', - version: '1.3.1', + version: '1.3.2', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 77f5220a5b..3393ed9d29 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '1.2.1-rc.2', + version: '1.2.1', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md' }); diff --git a/packages/stylus/package.js b/packages/stylus/package.js index 050b6ccb53..4c60e880f3 100644 --- a/packages/stylus/package.js +++ b/packages/stylus/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'Expressive, dynamic, robust CSS', - version: "2.513.6-rc.2" + version: "2.513.6" }); Package.registerBuildPlugin({ diff --git a/packages/test-helpers/package.js b/packages/test-helpers/package.js index fb60bf4e0a..5875b895fb 100644 --- a/packages/test-helpers/package.js +++ b/packages/test-helpers/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Utility functions for tests", - version: '1.0.11-rc.2' + version: '1.0.11' }); Package.onUse(function (api) { diff --git a/packages/test-in-browser/package.js b/packages/test-in-browser/package.js index ca0adc6d01..36cba98c44 100644 --- a/packages/test-in-browser/package.js +++ b/packages/test-in-browser/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Run tests interactively in the browser", - version: '1.0.13-rc.2', + version: '1.0.13', documentation: null }); diff --git a/packages/test-in-console/package.js b/packages/test-in-console/package.js index 6639225f46..50efe81ea0 100644 --- a/packages/test-in-console/package.js +++ b/packages/test-in-console/package.js @@ -1,10 +1,9 @@ Package.describe({ summary: "Run tests noninteractively, with results going to the console.", - version: '1.0.13-rc.2' + version: '1.0.14' }); Package.onUse(function (api) { - api.use(['tinytest', 'underscore', 'random', 'ejson', 'check']); api.use('http', 'server'); diff --git a/packages/test-server-tests-in-console-once/package.js b/packages/test-server-tests-in-console-once/package.js index cde478c00d..a6278134f9 100644 --- a/packages/test-server-tests-in-console-once/package.js +++ b/packages/test-server-tests-in-console-once/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Run server tests noninteractively, with results going to the console.", - version: '1.0.11-rc.2' + version: '1.0.11' }); Package.onUse(function (api) { diff --git a/packages/tinytest/package.js b/packages/tinytest/package.js index b197697346..7f9bd5eddd 100644 --- a/packages/tinytest/package.js +++ b/packages/tinytest/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Tiny testing framework", - version: '1.0.12-rc.2' + version: '1.0.12' }); Package.onUse(function (api) { diff --git a/packages/tracker/package.js b/packages/tracker/package.js index 1252a8c70d..b3b886327f 100644 --- a/packages/tracker/package.js +++ b/packages/tracker/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Dependency tracker to allow reactive callbacks", - version: '1.1.1-rc.2' + version: '1.1.1' }); Package.onUse(function (api) { diff --git a/packages/twitter/package.js b/packages/twitter/package.js index 78ee79aa64..6ecc3df7db 100644 --- a/packages/twitter/package.js +++ b/packages/twitter/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Twitter OAuth flow", - version: '1.1.13-rc.2' + version: '1.1.13' }); Package.onUse(function(api) { diff --git a/packages/underscore/package.js b/packages/underscore/package.js index 5f292ce0ce..483509a727 100644 --- a/packages/underscore/package.js +++ b/packages/underscore/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Collection of small helpers: _.map, _.each, ...", - version: '1.0.10-rc.2' + version: '1.0.10' }); Package.onUse(function (api) { diff --git a/packages/url/package.js b/packages/url/package.js index cb1b32cfa1..7e507f83a0 100644 --- a/packages/url/package.js +++ b/packages/url/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Utility code for constructing URLs", - version: "1.0.11-rc.2" + version: "1.0.11" }); Package.onUse(function(api) { diff --git a/packages/webapp/package.js b/packages/webapp/package.js index 92c4928771..1be1c8129a 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.3.12-rc.2' + version: '1.3.12' }); Npm.depends({connect: "2.30.2", diff --git a/packages/weibo/package.js b/packages/weibo/package.js index f13129c3c4..071153c0b6 100644 --- a/packages/weibo/package.js +++ b/packages/weibo/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Weibo OAuth flow", - version: '1.1.9-rc.2' + version: '1.1.9' }); Package.onUse(function(api) { diff --git a/packages/xmlbuilder/package.js b/packages/xmlbuilder/package.js index 04cc6ce880..305539606e 100644 --- a/packages/xmlbuilder/package.js +++ b/packages/xmlbuilder/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "An XML builder for node.js similar to java-xmlbuilder.", - version: '2.5.15-rc.2' + version: '2.5.15' }); Npm.depends({ diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index c604006a1e..d1f42bbdc7 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "1.4.2-rc.2", + "version": "1.4.2-rc.4", "recommended": false, "official": false, "description": "Meteor" diff --git a/scripts/admin/meteor-release-official.json b/scripts/admin/meteor-release-official.json index f44dc66103..71219f1d08 100644 --- a/scripts/admin/meteor-release-official.json +++ b/scripts/admin/meteor-release-official.json @@ -1,8 +1,7 @@ { "track": "METEOR", - "version": "1.4.1.3", + "version": "1.4.2", "recommended": false, "official": true, - "description": "The Official Meteor Distribution", - "patchFrom": ["1.4.1.2"] + "description": "The Official Meteor Distribution" } diff --git a/tools/fs/files.js b/tools/fs/files.js index 9af4a79c78..82aba433b3 100644 --- a/tools/fs/files.js +++ b/tools/fs/files.js @@ -1451,6 +1451,9 @@ files.readLinkToMeteorScript = function (linkLocation, platform) { // A helpful file to import for this purpose is colon-converter.js, which also // knows how to convert various configuration file formats. +// If this environment variable is set, fs.*Sync methods will always be used +// by wrapFsFunc instead of yielding wrappers for asynchronous fs.* methods. +const YIELD_ALLOWED = ! process.env.METEOR_DISABLE_FS_FIBERS; files.fsFixPath = {}; /** @@ -1485,7 +1488,11 @@ function wrapFsFunc(fsFuncName, pathArgIndices, options) { args[i] = files.convertToOSPath(args[i]); } - const canYield = Fiber.current && Fiber.yield && ! Fiber.yield.disallowed; + const canYield = YIELD_ALLOWED && + Fiber.current && + Fiber.yield && + ! Fiber.yield.disallowed; + const shouldBeSync = alwaysSync || sync; // There's some overhead in awaiting a Promise of an async call, // vs just doing the sync call, which for a call like "stat" diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index 93368cde88..022550d6c9 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -1639,7 +1639,9 @@ class JsImage { var env = _.extend({ Package: ret, Npm: { - require: function (name) { + require: Profile(function (name) { + return "Npm.require(" + JSON.stringify(name) + ")"; + }, function (name) { let fullPath; _.some(item.nodeModulesDirectories, nmd => { @@ -1673,7 +1675,7 @@ class JsImage { item.targetPath + ". Check your Npm.depends()."); return undefined; } - } + }) }, /** @@ -1709,6 +1711,7 @@ class JsImage { if (item.targetPath === "packages/modules-runtime.js") { env.npmRequire = self._makeNpmRequire(nodeModulesDirsByPackageName); + env.Profile = Profile; } try { @@ -1808,18 +1811,17 @@ class JsImage { // Write this image out to disk // - // options: - // - includeNodeModules: falsy or 'symlink', documented on - // exports.bundle. - // // Returns an object with the following keys: // - controlFile: the path (relative to 'builder') of the control file for // the image // - nodePath: an array of paths required to be set in the NODE_PATH // environment variable. - write(builder, options) { + write(builder, { + buildMode, + // falsy or 'symlink', documented on exports.bundle + includeNodeModules, + } = {}) { var self = this; - options = options || {}; builder.reserve("program.json"); @@ -1831,15 +1833,15 @@ class JsImage { // We need to find the actual file system location for the node modules // this JS Image uses, so that we can add it to nodeModulesDirectories var modulesPhysicalLocation; - if (! options.includeNodeModules || - options.includeNodeModules === 'symlink') { + if (! includeNodeModules || + includeNodeModules === 'symlink') { modulesPhysicalLocation = nmd.getPreferredBundlePath("bundle"); } else { // This is some option we didn't expect - someone has added another case // to the includeNodeModules option but didn't update this if block. // Fail hard. throw new Error("Option includeNodeModules wasn't falsy or 'symlink'. " + - "It was: " + options.includeNodeModules); + "It was: " + includeNodeModules); } nmd = nmd.copy(); @@ -1966,10 +1968,17 @@ class JsImage { from: nmd.sourcePath, to: nmd.preferredBundlePath, npmDiscards: nmd.npmDiscards, - symlink: (options.includeNodeModules === 'symlink') + symlink: includeNodeModules === 'symlink' }; const prodPackagePredicate = + // This condition essentially means we don't strip devDependencies + // when running tests, which is important for use cases like the one + // described in #7953. Note that devDependencies can still be used + // when buildMode === "development" because the app has access to + // the original node_modules. + (buildMode === "production" || + buildMode === "development") && nmd.local && // Only filter local node_modules directories. nmd.getProdPackagePredicate(); @@ -2136,17 +2145,19 @@ class ServerTarget extends JsImageTarget { } // Output the finished target to disk - // options: - // - includeNodeModules: falsy or 'symlink', documented in - // exports.bundle. - // - getRelativeTargetPath: a function that takes {forTarget: - // Target, relativeTo: Target} and return the path of one target - // in the bundle relative to another. hack to get the path of the - // client target.. we'll find a better solution here eventually // // Returns the path (relative to 'builder') of the control file for // the plugin and the required NODE_PATH. - write(builder, options) { + write(builder, { + buildMode, + // falsy or 'symlink', documented in exports.bundle + includeNodeModules, + // a function that takes {forTarget: Target, relativeTo: Target} and + // return the path of one target in the bundle relative to another. hack + // to get the path of the client target.. we'll find a better solution + // here eventually + getRelativeTargetPath, + }) { var self = this; var nodePath = []; @@ -2158,8 +2169,10 @@ class ServerTarget extends JsImageTarget { var clientTargetPaths = {}; if (self.clientTargets) { _.each(self.clientTargets, function (target) { - clientTargetPaths[target.arch] = files.pathJoin(options.getRelativeTargetPath({ - forTarget: target, relativeTo: self}), 'program.json'); + clientTargetPaths[target.arch] = files.pathJoin(getRelativeTargetPath({ + forTarget: target, + relativeTo: self, + }), 'program.json'); }); } @@ -2197,11 +2210,11 @@ class ServerTarget extends JsImageTarget { // This is a hack to make 'meteor run' faster (so you don't have to run 'npm // install' using the above package.json and npm-shrinkwrap.json on every // rebuild). - if (options.includeNodeModules === 'symlink') { + if (includeNodeModules === 'symlink') { builder.write('node_modules', { symlink: files.pathJoin(files.getDevBundle(), 'server-lib', 'node_modules') }); - } else if (options.includeNodeModules) { + } else if (includeNodeModules) { // This is some option we didn't expect - someone has added another case // to the includeNodeModules option but didn't update this if block. Fail // hard. @@ -2211,7 +2224,17 @@ class ServerTarget extends JsImageTarget { // Linked JavaScript image (including static assets, assuming that there are // any JS files at all) var jsImage = self.toJsImage(); - jsImage.write(builder, { includeNodeModules: options.includeNodeModules }); + jsImage.write(builder, { + buildMode, + includeNodeModules, + }); + + const toolsDir = files.pathDirname( + files.convertToStandardPath(__dirname)); + + builder.write("profile.js", { + file: files.pathJoin(toolsDir, "tool-env", "profile.js"), + }); // Server bootstrap _.each([ @@ -2225,7 +2248,7 @@ class ServerTarget extends JsImageTarget { ], function (filename) { builder.write(filename, { file: files.pathJoin( - files.pathDirname(files.convertToStandardPath(__dirname)), + toolsDir, 'static-assets', 'server', filename @@ -2288,15 +2311,20 @@ var writeTargetToPath = Profile( includeNodeModules, getRelativeTargetPath, previousBuilder, - minifyMode + buildMode, + minifyMode, }) { var builder = new Builder({ outputPath: files.pathJoin(outputPath, 'programs', name), previousBuilder }); - var targetBuild = target.write( - builder, {includeNodeModules, getRelativeTargetPath, minifyMode}); + var targetBuild = target.write(builder, { + includeNodeModules, + getRelativeTargetPath, + buildMode, + minifyMode, + }); builder.complete(); @@ -2344,6 +2372,7 @@ var writeSiteArchive = Profile("bundler writeSiteArchive", function ( releaseName, getRelativeTargetPath, previousBuilders, + buildMode, minifyMode }) { @@ -2429,6 +2458,7 @@ Find out more about Meteor at meteor.com. releaseName, getRelativeTargetPath, previousBuilder, + buildMode, minifyMode }); @@ -2744,7 +2774,9 @@ function bundle({ const previousBuilder = previousBuilders && previousBuilders[name]; var targetBuild = writeTargetToPath( name, target, outputPath, - _.extend({}, writeOptions, {previousBuilder}) + _.extend({ + buildMode: buildOptions.buildMode, + }, writeOptions, {previousBuilder}) ); nodePath = nodePath.concat(targetBuild.nodePath); clientWatchSet.merge(target.getWatchSet()); @@ -2754,7 +2786,9 @@ function bundle({ starResult = writeSiteArchive( targets, outputPath, - _.extend({}, writeOptions, {previousBuilders}) + _.extend({ + buildMode: buildOptions.buildMode, + }, writeOptions, {previousBuilders}) ); nodePath = nodePath.concat(starResult.nodePath); diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 635db78b76..2fe35344ca 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -62,7 +62,7 @@ import { isTestFilePath } from './test-files.js'; // Cache the (slightly post-processed) results of linker.fullLink. const CACHE_SIZE = process.env.METEOR_LINKER_CACHE_SIZE || 1024*1024*100; const CACHE_DEBUG = !! process.env.METEOR_TEST_PRINT_LINKER_CACHE_DEBUG; -const LINKER_CACHE_SALT = 10; // Increment this number to force relinking. +const LINKER_CACHE_SALT = 11; // Increment this number to force relinking. const LINKER_CACHE = new LRU({ max: CACHE_SIZE, // Cache is measured in bytes. We don't care about servePath. diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index eeb1643166..23afa1417e 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -34,7 +34,7 @@ var compiler = exports; // dependencies. (At least for now, packages only used in target creation (eg // minifiers) don't require you to update BUILT_BY, though you will need to quit // and rerun "meteor run".) -compiler.BUILT_BY = 'meteor/23'; +compiler.BUILT_BY = 'meteor/24'; // This is a list of all possible architectures that a build can target. (Client // is expanded into 'web.browser' and 'web.cordova') diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index 02e64d2a9f..1649e37567 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -581,6 +581,21 @@ export default class ImportScanner { } _readModule(absPath) { + let ext = pathExtname(absPath).toLowerCase(); + + if (ext === ".node") { + const dataString = "throw new Error(" + JSON.stringify( + this.isWeb() + ? "cannot load native .node modules on the client" + : "module.useNode() must succeed for native .node modules" + ) + ");\n"; + + const data = new Buffer(dataString, "utf8"); + const hash = sha1(data); + + return { data, dataString, hash }; + } + try { var info = this._readFile(absPath); } catch (e) { @@ -598,7 +613,6 @@ export default class ImportScanner { info.dataString = info.dataString.slice(1); } - let ext = pathExtname(absPath).toLowerCase(); if (! has(defaultExtensionHandlers, ext)) { if (canBeParsedAsPlainJS(dataString)) { ext = ".js"; diff --git a/tools/static-assets/server/boot.js b/tools/static-assets/server/boot.js index 5dd474e375..8e58b9e3b4 100644 --- a/tools/static-assets/server/boot.js +++ b/tools/static-assets/server/boot.js @@ -8,6 +8,7 @@ var sourcemap_support = require('source-map-support'); var bootUtils = require('./boot-utils.js'); var files = require('./mini-files.js'); var npmRequire = require('./npm-require.js').require; +var Profile = require('./profile.js').Profile; // This code is duplicated in tools/main.js. var MIN_NODE_VERSION = 'v0.10.41'; @@ -123,8 +124,7 @@ var startCheckForLiveParent = function (parentPid) { } }; - -Fiber(function () { +var loadServerBundles = Profile("Load server bundles", function () { _.each(serverJson.load, function (fileInfo) { var code = fs.readFileSync(path.resolve(serverDir, fileInfo.path)); var nonLocalNodeModulesPaths = []; @@ -161,7 +161,9 @@ Fiber(function () { * @locus Server * @memberOf Npm */ - require: function (name) { + require: Profile(function getBucketName(name) { + return "Npm.require(" + JSON.stringify(name) + ")"; + }, function (name) { if (nonLocalNodeModulesPaths.length === 0) { return require(name); } @@ -200,7 +202,7 @@ Fiber(function () { "'. Did you forget to call 'Npm.depends' in package.js " + "within the '" + packageName + "' package?"); } - } + }) }; var getAsset = function (assetPath, encoding, callback) { var fut; @@ -264,7 +266,7 @@ Fiber(function () { var wrapParts = ["(function(Npm,Assets"]; if (isModulesRuntime) { - wrapParts.push(",npmRequire"); + wrapParts.push(",npmRequire,Profile"); } // \n is necessary in case final line is a //-comment wrapParts.push("){", code, "\n})"); @@ -287,20 +289,25 @@ Fiber(function () { var func = require('vm').runInThisContext(wrapped, scriptPath, true); var args = [Npm, Assets]; if (isModulesRuntime) { - args.push(npmRequire); + args.push(npmRequire, Profile); } - func.apply(global, args); - }); + Profile(fileInfo.path, func).apply(global, args); + }); +}); + +var callStartupHooks = Profile("Call Meteor.startup hooks", function () { // run the user startup hooks. other calls to startup() during this can still // add hooks to the end. while (__meteor_bootstrap__.startupHooks.length) { var hook = __meteor_bootstrap__.startupHooks.shift(); - hook(); + Profile.time(hook.stack || "(unknown)", hook); } // Setting this to null tells Meteor.startup to call hooks immediately. __meteor_bootstrap__.startupHooks = null; +}); +var runMain = Profile("Run main()", function () { // find and run main() // XXX hack. we should know the package that contains main. var mains = []; @@ -330,4 +337,12 @@ Fiber(function () { if (process.env.METEOR_PARENT_PID) { startCheckForLiveParent(process.env.METEOR_PARENT_PID); } +}); + +Fiber(function () { + Profile.run("Server startup", function () { + loadServerBundles(); + callStartupHooks(); + runMain(); + }); }).run(); diff --git a/tools/tests/apps/modules/package.json b/tools/tests/apps/modules/package.json index 88fe339525..a12454d9ab 100644 --- a/tools/tests/apps/modules/package.json +++ b/tools/tests/apps/modules/package.json @@ -6,6 +6,7 @@ "dependencies": { "aws-sdk": "^2.2.41", "github": "^0.2.4", + "idle-gc": "^1.0.1", "meteor-node-stubs": "^0.2.0", "moment": "2.11.1", "mssql": "^3.1.1", diff --git a/tools/tests/apps/modules/server/only.js b/tools/tests/apps/modules/server/only.js index cba3ee2a8b..f56c293a19 100644 --- a/tools/tests/apps/modules/server/only.js +++ b/tools/tests/apps/modules/server/only.js @@ -6,6 +6,11 @@ import "stripe"; import "winston"; import "mssql"; +// This package has a native .node module as the "main" property of its +// package.json file. (#7947) +import { start } from "idle-gc"; +assert.strictEqual(typeof start, "function"); + assert.strictEqual(Meteor.isServer, true); assert.strictEqual(Meteor.isClient, false); diff --git a/tools/tool-env/profile.js b/tools/tool-env/profile.js index 6c24782adf..15b5939d0d 100644 --- a/tools/tool-env/profile.js +++ b/tools/tool-env/profile.js @@ -255,14 +255,14 @@ var Profile = function (bucketName, f) { return f; } - return function (...args) { + return Object.assign(function profileWrapper() { if (! running) { - return f.apply(this, args); + return f.apply(this, arguments); } var name; if (_.isFunction(bucketName)) { - name = bucketName.apply(this, args); + name = bucketName.apply(this, arguments); } else { name = bucketName; } @@ -280,7 +280,7 @@ var Profile = function (bucketName, f) { var start = process.hrtime(); var err = null; try { - return f.apply(this, args); + return f.apply(this, arguments); } catch (e) { err = e; @@ -298,7 +298,7 @@ var Profile = function (bucketName, f) { if (err) { throw err; } - }; + }, f); }; var time = function (bucket, f) { @@ -386,7 +386,8 @@ var injectOtherTime = function (entry) { entries.push(other); }; -var reportOn = function (entry, isLastLeafStack = []) { +var reportOn = function (entry, isLastLeafStack) { + isLastLeafStack = isLastLeafStack || []; var stats = entryStats(entry); var isParent = hasSignificantChildren(entry); var name = entryName(entry);