Commit Graph

15691 Commits

Author SHA1 Message Date
Ben Newman
01689badcf Decompose helper methods for building meteorInstall-able module trees. 2015-12-09 14:37:22 -05:00
Ben Newman
699f4e8c83 Implement api.mainModule for defining package entry points.
The main module serves the crucial purpose of combining all the exports of
other modules in the package, which eliminates the need for api.export in
principle, though the module.exports of the main module (also defined as
Package[packageName]) will still be populated with any api.export-ed
properties.
2015-12-09 14:37:22 -05:00
Ben Newman
370bc571e2 Enable the Babel ES2015 modules-to-CommonJS transform. 2015-12-09 14:37:22 -05:00
Ben Newman
1f5ea2c4e9 Allow importing package NPM dependencies on the client. 2015-12-09 14:29:55 -05:00
Ben Newman
465dd20877 Scan module dependencies in linker.fullLink. 2015-12-09 14:29:55 -05:00
Ben Newman
eda80acb86 Make sure PackageSourceBatch objects know their .sourceRoot. 2015-12-09 14:29:55 -05:00
Ben Newman
eac6fa9c09 Make sure JS resources have a .sourcePath. 2015-12-09 14:29:54 -05:00
Ben Newman
44b1ae91f3 Implement findImportedModuleIdentifiers. 2015-12-09 14:29:54 -05:00
Ben Newman
9243259dbb Disable linker caching (TODO revert). 2015-12-09 14:29:54 -05:00
Ben Newman
5c13e2cb06 Silence lint warnings in js-analyze.js (TODO revert). 2015-12-09 14:29:54 -05:00
Ben Newman
560d0ff22f Make the ecmascript package imply the modules package.
It's possible to use the modules package without using the ecmascript
package (if all you want is a CommonJS require/exports module system), but
I can't imagine anyone wanting ES2015 without a module system.

In case you need persuading, I recently gave a talk about why
import/export are so important: benjamn.github.io/empirenode-2015
2015-12-09 14:29:54 -05:00
Ben Newman
f727bb3c56 New package implementing the runtime API for a CommonJS module system.
When used, the 'modules' package provides a CommonJS require/exports
module system via the exported meteorInstall function. Once that
underlying system is available, ECMAScript 2015 import/export syntax can
be easily compiled into require/exports.
2015-12-09 14:29:53 -05:00
Ben Newman
fff2e46661 Process all package source files with compiler plugins.
Files not explicitly added with api.addFiles are currently ignored by the
Linker, but that will change once we have a module system.
2015-12-09 14:29:53 -05:00
Ben Newman
5883c3feb7 Decompose PackageSource#_find{Sources,Assets} methods. 2015-12-09 14:29:53 -05:00
Ben Newman
7c15fb5c8a Decompose a reusable SymlinkLoopChecker class. 2015-12-09 14:29:53 -05:00
Ben Newman
1e4e67df5a Turn readAndWatchDirectory into a helper method. 2015-12-09 14:29:53 -05:00
Ben Newman
6733e21975 Convert SourceArch to an ES2015 class and move it to its own module. 2015-12-09 14:29:52 -05:00
Ben Newman
77b628d723 Upgrade es5-shim to fix #5759. 2015-12-09 14:10:01 -05:00
Ben Newman
f7b2735d23 Reimplement fiberHelpers.parallelEach without explicit Fibers. 2015-12-09 12:06:52 -05:00
Ben Newman
6aec5ef841 Eliminate Fiber from tools/console.js. 2015-12-09 12:06:52 -05:00
Ben Newman
79f82911d0 Avoid having to use Fibers explicitly in buildmessage.forkJoin. 2015-12-09 12:06:52 -05:00
Ben Newman
3cafbc72ac Use async functions to eliminate the need for fiberHelpers.inBareFiber.
The comments for inBareFiber claim that it's for times when you don't want
to inherit the dynamic environment variables of the current Fiber, but
none of the call sites actually relied on this behavior. Still, it may be
worth noting that async functions automatically (and cheaply) inherit the
calling Fiber's dynamics, which is virtually always what you want.
2015-12-09 12:06:51 -05:00
Ben Newman
58fcc8d49e Use an async method to start Mongo in a Fiber. 2015-12-09 12:06:51 -05:00
Ben Newman
2d8fbb6c79 Eliminate Future-related utilities from tools/fiber-helpers.js. 2015-12-09 12:06:51 -05:00
Ben Newman
46e631e099 Eliminate Future from tools/files.js. 2015-12-09 12:06:51 -05:00
Ben Newman
9a466d2efa Eliminate Future from tools/run-mongo.js. 2015-12-09 12:06:50 -05:00
Ben Newman
8f85b1a2b5 Eliminate Future from tools/selftest.js. 2015-12-09 12:06:50 -05:00
Ben Newman
8b71f9986c Eliminate Future from tools/package-client.js. 2015-12-09 12:06:50 -05:00
Ben Newman
b36f8178de Eliminate Future from tools/meteor-npm.js. 2015-12-09 12:06:49 -05:00
Ben Newman
8dffdaeb38 Eliminate Future from tools/main.js. 2015-12-09 12:06:49 -05:00
Ben Newman
d1b9fb1674 Eliminate Future from tools/bundler.js. 2015-12-09 12:06:49 -05:00
Ben Newman
d54410db8e Eliminate Future from tools/service-connection.js. 2015-12-09 12:06:48 -05:00
Ben Newman
d1d0734682 Eliminate Future from tools/run-selenium.js. 2015-12-09 12:06:48 -05:00
Ben Newman
2b6647fc2a Eliminate Future from tools/run-proxy.js. 2015-12-09 12:06:48 -05:00
Ben Newman
7f0156f273 Eliminate Future from tools/http-helpers.js. 2015-12-09 12:06:47 -05:00
Ben Newman
8ad55e3f7b Eliminate Future from tools/console.js. 2015-12-09 12:06:47 -05:00
Ben Newman
3869b7ed04 Eliminate Future from tools/commands.js. 2015-12-09 12:06:47 -05:00
Ben Newman
15ef3884cc Eliminate Future from tools/utils.js. 2015-12-09 12:06:46 -05:00
Ben Newman
7ac15ca0b5 Eliminate Future from tools/catalog-remote.js. 2015-12-09 12:06:46 -05:00
Ben Newman
c815a5b534 Eliminate Future from tools/buildmessage.js. 2015-12-09 12:06:46 -05:00
Ben Newman
f57a2756a6 Eliminate Future from tools/auth.js. 2015-12-09 12:06:45 -05:00
Ben Newman
d245199737 Eliminate Future from run-{all,app}.js, in favor of Promise.
Any code that has access to a Future object also has the capability of
calling its .return method. Promise objects, by contrast, can only be
resolved or rejected by the creator of the Promise (or any code granted
access to the special resolve and/or reject functions, which are not
simply methods of the Promise object). The run-app.js file contains a lot
of code that used to assume a Future could be resolved by anyone, which is
why the _{make,resolve}Promise methods were necessary.

For this reason, replacing Future with Promise in these two files seemed
tricky and worth attempting first, before spending time converting easier
files.
2015-12-09 12:06:45 -05:00
Ben Newman
cba119ea5d Eliminate spurious require('fibers/future') calls in various files. 2015-12-09 12:06:45 -05:00
Ben Newman
61f819b89a Forbid user-provided npm configuration files in meteor-npm.js.
Follow up to #5710.
2015-12-08 20:08:13 -05:00
Ben Newman
093e73da28 Merge pull request #5710 from mitar/patch-16
Make sure no user configuration is used.
2015-12-08 19:23:16 -05:00
Ben Newman
659ba3c094 Bump BUNDLE_VERSION to 0.5.18. 2015-12-08 19:00:15 -05:00
Ben Newman
8a7102d9dd Use the new Node v0.10.41 build when building the dev bundle. 2015-12-08 18:59:40 -05:00
Ben Newman
52eac1d60d Use Node v0.10.41 when building the Windows dev bundle, too. 2015-12-08 18:49:35 -05:00
Ben Newman
76609a615c Upgrade to Node v0.10.41. 2015-12-08 18:43:15 -05:00
Sashko Stubailo
244044f780 Merge pull request #5743 from mitar/patch-18
Unnecessary variable
2015-12-08 15:33:58 -08:00