Commit Graph

5132 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
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
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
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
76609a615c Upgrade to Node v0.10.41. 2015-12-08 18:43:15 -05:00
Mitar
47cfd25bd8 Unnecessary variable. 2015-12-02 22:43:24 -08:00
Rahul
86722645be Typo 2015-11-25 14:37:47 +01:00
Tom Coleman
60e378f8f6 It turns out file:// paths *do not* currently work with NPM 2015-11-25 17:39:52 +11:00
Tom Coleman
0a9866ed76 Added some documentation and history about git change. 2015-11-25 17:21:44 +11:00
Tom Coleman
7a928db4b8 Switch over test expectations 2015-11-25 16:27:36 +11:00
Tom Coleman
705a7eda1a Switch the semantics - forNpm -> forCordova
Cordova uses npm but is *more* specific so this is less potentially confusing.
2015-11-25 16:27:36 +11:00
Tom Coleman
54396f78b7 Switch semantics to isValidVersion 2015-11-25 16:27:36 +11:00
Tom Coleman
81fff25ecb Don't require npm URLs to have a #commit-ish
Npm says it will default to `master`. That's OK by us.
2015-11-25 16:27:35 +11:00
Tom Coleman
222115665b Refactored isExactVersionto handle npm/cordova
See https://github.com/meteor/meteor/pull/5562/files for a discussion. Basically Cordova doesn't really support

a) Urls with @'s in them
b) Urls that don't point to fixed commits.

As this branch allows both of the above (and our NPM support does reasonably handle a+b), we split the way we handle cordova + npm URLs a little.
2015-11-25 16:27:35 +11:00
Tom Coleman
58cbe65060 Allow the other types of URLs that npm supports.
See for instance #844 for people running into the
fact that our lack of support for git protocols means
dealing with private npm packages is a pain.
2015-11-25 16:27:11 +11:00