Commit Graph

5664 Commits

Author SHA1 Message Date
Ben Newman
db8d4f4dab Merge branch 'devel' into release-1.3.3 2016-06-01 14:24:24 -04:00
Ben Newman
dc9941bfa6 Return {path,id,stat} from Resolver.prototype.resolve.
The id property is an absolute module identifer, suitable for passing to a
native Node require function.
2016-06-01 13:39:57 -04:00
Ben Newman
949e418c12 Privatize resolve* helper methods of Resolver class. 2016-06-01 13:37:17 -04:00
Jesse Rosenberger
e24150cab1 Change package creation skeleton to import properly
The package skeleton test example was omitting the first part of the package name and thus failing to find it within the test package.

Fixes meteor/meteor#6653
2016-06-01 20:12:24 +03:00
Ben Newman
bfc59dd3e3 Test that relative module identifiers work for .babelrc plugins. 2016-06-01 01:39:24 -04:00
Ben Newman
8a82a7af90 Use Resolver class to implement inputFile.resolve(id). 2016-06-01 01:39:23 -04:00
Ben Newman
ec679755ce Extract standalone Resolver class from ImportScanner. 2016-06-01 01:39:23 -04:00
Ben Newman
eb18d43024 Test that unprefixed .babelrc package names work too. 2016-06-01 01:39:23 -04:00
Ben Newman
64bbd70c1a Implement InputFile.prototype.readAndWatchFileWithHash.
Note that a module identifier is an acceptable input path, and will be
automatically converted to an OS-specific absolute path if necessary.
2016-06-01 01:39:22 -04:00
Ben Newman
b1df82ac0a Merge branch 'devel' into release-1.3.3 2016-05-31 14:09:46 -04:00
Gadi Cohen
dfee72792f Proper import chain for Meteor packages (closes #6907)
Don't include the ", false" for install() on traditional packages

add tests
2016-05-28 20:30:34 +02:00
Ben Newman
bae5983d59 Merge branch 'devel' into release-1.3.3 2016-05-27 00:02:48 -04:00
Ben Newman
653ce6b9e9 Improve npmRequire function used by compiler plugins.
The most substantive change here is the additional call to
colonConverter.convert, which fixes #7096.

In the future, I would like to unify this implementation with similar
logic in tools/static-assets/server/npm-require.js.
2016-05-26 23:23:28 -04:00
Ben Newman
a62d89519d Merge pull request #7125 from meteor/7087-fix-flaky-tests
Fix flaky tests
2016-05-26 14:59:00 -04:00
Tom Coleman
ab85045f58 Don't allow logs to yield to avoid missing logs when the app quits 2016-05-25 18:23:28 -07:00
Zoltan Olah
6573364513 Merge pull request #7108 from meteor/laosb-fix-1469
Warn users when they meteor reset with MONGO_URL.
2016-05-25 18:03:31 -07:00
Tom Coleman
3b0ae7a903 Rebalanced tests 2016-05-25 17:03:05 -07:00
Tom Coleman
cd0b47e567 Only isopacket.load the logging package once
This was causing yielding problems leading to log ordering issues
2016-05-25 14:15:55 -07:00
Tom Coleman
47308da931 Added a test that reproduces logging out of order 2016-05-25 10:54:43 -07:00
Wexpo Lyu
9e083c232d Refined the tip. 2016-05-25 12:48:02 +08:00
Tom Coleman
4ae58378e9 Upped timeout for connection to fake mongo 2016-05-24 16:50:05 -07:00
Tom Coleman
eadfd1f5b2 Upped timeout for bad PID test 2016-05-24 16:48:43 -07:00
Mitchell Wulfman
eec2667ff6 Open welcome links in new tabs instead of taking the user away from their running app (#6990) 2016-05-24 15:27:56 -07:00
Tom Coleman
bcd875cebd Merge pull request #6763 from laosb/patch-10
Hint adding packages when "Cannot find module 'meteor/xxx'"
2016-05-24 15:09:55 -07:00
Tom Coleman
c4258d68f1 Marked issues with custom-warehouse tag 2016-05-24 15:03:33 -07:00
Tom Coleman
289b330579 Added ability to partition tests by tag 2016-05-24 14:59:12 -07:00
Tom Coleman
a5970be04b Mark wipe-all-packages test as slow 2016-05-24 14:41:23 -07:00
Tom Coleman
724b0a890b Up self-test app create timeout to 120s #7087 2016-05-24 14:39:46 -07:00
Wexpo Lyu
b80b2b0945 Update commands.js 2016-05-24 20:19:01 +08:00
Wexpo Lyu
5a4ed0f0f0 Warn users when they meteor reset with MONGO_URL. 2016-05-24 12:50:47 +08:00
Tom Coleman
16e0cac3e3 Upping the wait in "run and SIGKILL parent process" 2016-05-23 14:18:39 -07:00
Ben Newman
8395c7b832 Fix InputFile.prototype.require on Windows.
Fixes #7098.
2016-05-22 21:30:48 -04:00
Ben Newman
2f3269f59c Use meteorInstall to define the meteor shell module properly. 2016-05-22 13:01:38 -04:00
Ben Newman
13ff76ffd8 Revert "Use an appropriate module object in meteor shell."
This reverts commit 5aee7a9a09.
2016-05-22 13:01:11 -04:00
Ben Newman
398c2717e7 Use .babelrc instead of package.json in modules-test-plugin. 2016-05-20 13:09:41 -04:00
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
David Glasser
0a402c7537 galaxy discovery tweaks
- Use deploy-specific CNAME by default
- Don't print deploy URL twice for authedRpc.
2016-05-19 16:46:38 -07: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