Commit Graph

5625 Commits

Author SHA1 Message Date
Ben Newman
c19f4ead0d Implement inputFile.readAndWatchFile.
This only works for files contained within the source root of the current
app or package.
2016-05-20 12:59:08 -04:00
Ben Newman
49a60f155b Support .babelrc presets and plugins.
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.
2016-05-20 12:59:08 -04:00
Ben Newman
fd0275f540 More tolerant path comparison in inputFile.require. 2016-05-20 12:59:07 -04:00
David Glasser
f1cc6dacc4 galaxy discovery tweaks
- Use deploy-specific CNAME by default
- Don't print deploy URL twice for authedRpc.
2016-05-20 12:59:07 -04:00
Ben Newman
303df5351d Merge branch 'devel' into release-1.3.3 2016-05-19 18:34:20 -04:00
Ben Newman
7c208b355b Continue using Babel's CommonJS modules compiler for packages.
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.
2016-05-19 17:48:39 -04:00
Ben Newman
e6951f18c4 Teach findImportedModuleIdentifiers about module.import(id, setters). 2016-05-19 17:04:09 -04:00
Ben Newman
5aee7a9a09 Use an appropriate module object in meteor shell. 2016-05-19 17:04:08 -04:00
Ben Newman
6aec3603c8 Separate install-runtime.js from install-babel.js. 2016-05-19 17:04:08 -04:00
Ben Newman
1ef013f6ad Use regenerator-runtime in modules test app.
Apparently regenerator/runtime is now deprecated. I say "apparently," but
of course is my own doing.
2016-05-19 17:04:07 -04:00
Tom Coleman
a600fa57bd Merge pull request #7036 from meteor/speed-up-selftest
Speed up selftest
2016-05-19 11:17:00 -07:00
Tom Coleman
4065990130 Fixed issue with not using builder properly 2016-05-19 09:25:54 -07:00
Ben Newman
7c63a8e704 Allow custom Babel presets and plugins via package.json.
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.
2016-05-18 16:37:38 -04:00
Ben Newman
b16e8d5019 Implement inputFile.{getPackageJson,resolve,require} for use by plugins.
These changes allow Package.registerCompiler-style compiler plugins to
extract package.json and npm package information at compile time from the
files that the plugin processes.

This information was accessible before, but it certainly wasn't easy to
obtain it. These convenience methods should satisfy the motivation behind
2016-05-18 16:37:37 -04:00
Ben Newman
3f9b8c2566 Watch package.json files in addition to package.js files. 2016-05-18 16:37:36 -04:00
Ben Newman
650fd81521 Add profiling for meteorNpm.{runNpmCommand,rebuildIfNonPortable}. 2016-05-18 15:17:51 -04:00
Ben Newman
93d8281f48 Implement Console.setHeadless instead of Console.{enable,disable}Spinner. 2016-05-17 19:53:12 -04:00
Zoltan Olah
ccaba1e690 Merge branch 'laosb-warehouse-urlbase-override' into devel 2016-05-17 15:13:52 -07:00
Ben Newman
05dfe24438 Avoid test timeouts by printing keepalive message every 5min.
Even though @abernix set the circle.yml timeout to 1200 seconds, I'm still
seeing tests occasionally time out. This commit should prevent timeouts by
printing a "[ProgressDisplayFull keepalive]" message every five minutes,
if nothing else has been printed in the meantime.

Related: https://github.com/meteor/meteor/pull/7063
2016-05-17 14:41:17 -04:00
Ben Newman
f6b75305b3 Pay attention to unibuild.arch when determining usesModules.
Fixes #6877.
2016-05-17 14:27:56 -04:00
Ben Newman
8253e5862d Fix linter unibuild.arch matching.
Fixes #6843.
2016-05-17 13:05:15 -04:00
Ben Newman
6e1346a74b Remove phantomjs-prebuilt from the dev bundle.
Saves 50MB from the extracted size of the dev_bundle/lib/node_modules
directory, previously 262MB. The entire dev bundle is 332MB extracted, for
perspective.

More importantly, since the `phantomjs` binary is not very compressible,
this change reduces the *compressed* size of the dev bundle from 71MB to
54MB, a 24% savings.

Closes #6905.
2016-05-17 11:50:48 -04:00
Ben Newman
aadb252b93 Clearly mark empty stub CSS modules so that they can be overridden.
Fixes #6881.
2016-05-16 22:13:24 -04:00
Ben Newman
7574f74481 Avoid copying devDependencies from local node_modules directories.
Fixes #6750.
2016-05-16 20:49:02 -04:00
Ben Newman
5e1d6380b5 Remove require("process") call.
This never should have worked in Node v0.10.x, but with the v0.10.45
upgrade I stopped using npm@3 to build the Mac/Linux dev bundles (see
commit 916873ffe8f8ab6e922adfa68b8b8ab9c87db90d), which means we no longer
hoist the "process" npm package to the top level of the dev bundle
(dev_bundle/lib/node_modules/process), so now we're facing the expected
consequences of this mistake.
2016-05-16 18:21:14 -04:00
Ben Newman
2f0aaa947a Make meteor shell help text robust across Node versions. 2016-05-16 18:21:13 -04:00
Ben Newman
52e2c6a36c Use setImmediate instead of process.nextTick in shell-server.js.
Since process.nextTick fires before IO events, it doesn't give the server
much chance to make progress starting up.
2016-05-16 18:21:13 -04:00
Ben Newman
355e850829 Avoid more uses of fs.exists and fs.existsSync.
Part of #6921.
2016-05-16 18:21:13 -04:00
Ben Newman
bab72a03d1 Implement files.exists in terms of file.statOrNull.
The hitherto-underlying fs.exists function has been deprecated in Node v4.

Part of #6921.
2016-05-16 18:21:12 -04:00
Ben Newman
861880b882 Rebuild binary npm packages whenever process.versions differs.
Recording process.versions allows us to be much more aggressive about
rebuilding binary dependencies whenever the version of Node/V8 might have
changed, even if the package was not just downloaded.
2016-05-16 18:21:12 -04:00
Ben Newman
727624a2f7 Bump dev bundle package versions to work with newer Node versions. 2016-05-16 18:21:11 -04:00
Ben Newman
d94e7d812d Upgrade dev bundle meteor-promise to 0.7.1. 2016-05-16 18:21:11 -04:00
Ben Newman
80b66b13ba Make sure prelinkFile.sourceMap is a string. 2016-05-16 18:21:10 -04:00
Ben Newman
fdce895bba Make sure env.Path === env.PATH on Windows. 2016-05-16 18:21:09 -04:00
Ben Newman
d060ae9a2d Decompose a helper for cloning process.env for npm-related commands. 2016-05-16 18:21:09 -04:00
Ben Newman
2d2f21f7d5 Use env vars instead of $PATH to select python.exe and MSVS version. 2016-05-16 18:21:08 -04:00
Ben Newman
81756d9833 Make sure python.exe is in $PATH when running npm on Windows. 2016-05-16 18:21:08 -04:00
Ben Newman
de5411e8fd Allow importing from app node_modules when running test-packages.
Fixes #6827.
2016-05-16 18:21:08 -04:00
Ben Newman
ff621a88fe Rebuild non-portable Meteor packages when downloaded.
Together with c18c1f5278, this commit is a
big step towards liberating Meteor from Node 0.10.

Part of #5124.
2016-05-16 18:21:07 -04:00
David Glasser
26584165e5 discover deploy server and change default
Update the default deploy server from deploy.meteor.com (which no longer
exists) to galaxy.meteor.com.  However, if your app's DNS is already
pointed at Galaxy, automatically discover the deploy server's URL.

See meteor/amsterdam#305
2016-05-16 13:03:27 -07:00
David Glasser
6619d9bead remove unnecessary log 2016-05-13 18:06:26 -07:00
Wexpo Lyu
e4355b3d09 Ability to override the default warehouse url base
Use `METEOR_WAREHOUSE_URLBASE` to do so.
2016-05-14 08:19:51 +08:00
David Glasser
2b6b02439d destroy universe
"universe" was an old attempt to allow you to run various MDG
servers (Meteor Developer Accounts, the package server, an old version
of the Galaxy deploy server, etc) on localhost and configure the tool to
talk to it not via a bunch of environment variables but via a file
called "universe" at the root of your checkout. Nobody uses this (and
most of the URLs have environment variables for them anyway).  Simplify
the code by removing this entirely.

Also remove some more dead code, and a test that claims it only runs if
you have universe set up.
2016-05-13 15:09:03 -07:00
David Glasser
731716efe1 delete dead code
This code makes it look like there are more codepaths that care about
$DEPLOY_HOSTNAME than there actually are.
2016-05-13 14:33:30 -07:00
Tom Coleman
6ae4434e2f Symlink rather than copy the warehouse into the sandbox
Mainly because the dev bundle is so big, it took upwards on 5 mins (on my MBP w/ SSD) to copy the warehouse packages into the sandbox. AFAICT there is no reason not to symlink it if we can.
2016-05-11 16:20:50 -07:00
Tom Coleman
01a745a99d Ensure that test files for both kinds of tests.
Fixes #6901 by ensuring that we short circuit laziness detection for test files in both modes.
2016-05-10 16:58:59 -07:00
Ben Newman
b3bcdbafda Disable progress spinner when running headless CI tests. 2016-05-09 18:00:32 -04:00
Tom Coleman
2961030112 Merge pull request #6981 from meteor/fix-selftest-errors
Use longjohn to repair stacktraces on self-test
2016-05-06 16:50:19 -07:00
Tom Coleman
1344228a51 Mark the bottom of the stack everytime we start a new self test.
Because longjohn was collecting frames across runs of self test in the loop, we were actually seeing frame lists that applied to more than one test. 

This wasn't actually causing problems except in our frame parsing tests, but you can imagine that it would be quite unhelpful.
2016-05-06 15:11:32 -07:00
Tom Coleman
b5acef6def Stack parsing test was failing due to longjohn 2016-05-06 10:00:57 -07:00