Commit Graph

106 Commits

Author SHA1 Message Date
Ben Newman
d6666c96f5 Update modules test app to Meteor 1.5.2. 2017-09-11 15:27:25 -04:00
Ben Newman
31fa502148 Enable transform-do-expressions in production for modules test app. 2017-09-11 15:24:47 -04:00
Ben Newman
004c8d0fe1 Move .babelrc "env" test to imports directory of modules test app. 2017-08-10 13:44:39 -04:00
Ben Newman
789c0e433e Reinstate .babelrc "env" test, with more reliable NODE_ENV. 2017-08-08 19:33:51 -04:00
Ben Newman
b70449ae4d Remove .babelrc "env" test for now.
This has been failing consistently on Circle CI, so I'm disabling it until
I know how to fix it better: https://circleci.com/gh/meteor/meteor/5068
2017-08-08 19:19:19 -04:00
Ben Newman
6de5c25fed Enable transform-do-expressions in production for modules test app.
The modules test app appears to be running with process.env.NODE_ENV equal
to "production" on Circle CI: https://circleci.com/gh/meteor/meteor/5030.

Enabling this transform in production as well as development is fine
because we primarily want to test that plugins from the "env" section of
.babelrc are respected, regardless of the value of process.env.NODE_ENV.
Using different plugins in production might be worth testing, too, but
that's less critical.

Follow-up to #8963.
2017-08-07 16:19:09 -04:00
Jordan Brant Baker
77ecbabf60 Support "env" in .babelrc files. (#8963) 2017-08-07 13:23:56 -04:00
Ben Newman
3090ac7282 Update the modules test app to Meteor 1.5.1. 2017-07-20 10:21:54 -04:00
Ben Newman
40f1d99e2c Stop polyfilling global.Buffer in modules test app. 2017-06-02 16:37:19 -04:00
Ben Newman
929fa0e90e Test that require("module") returns Module constructor on the client.
On the server, require("module") returns Node's native Module constructor,
which is not the same as module.constructor in our server JS bundle.
2017-06-02 16:26:54 -04:00
Ben Newman
a7feffd5a6 Upgrade the modules test app to Meteor 1.5. 2017-06-02 14:31:37 -04:00
Ben Newman
1df6668cc9 Test that importing the winston npm package works now.
This is a test that should have accompanied my previous commit
81a07ed84f.
2017-05-29 19:37:33 -04:00
Ben Newman
6f75eae135 Remove automatic Buffer polyfill.
This polyfill is unnecessary in Node, and added a whopping 22KB to the
minified client bundle. If you really need the Buffer API on the client,
you can get it from require("buffer").Buffer.
2017-04-19 17:41:11 -04:00
Ben Newman
10127cea1f Fix modules test app now that exports.__esModule is non-enumerable.
3973bbad7f
2017-03-25 12:00:18 -04:00
Ben Newman
da57ab69a8 Remove version constraints from modules test app.
This would have prevented this Circle CI self-test failure:
https://circleci.com/gh/meteor/meteor/3595#tests/containers/3
2017-03-16 13:08:06 -04:00
Seth Murphy
be88d7772a Rebased off meteor/devel 2017-02-28 16:12:21 -05:00
Ben Newman
e43a5d07f0 Update the modules test app to Meteor 1.4.3.1. 2017-02-14 09:55:38 -05:00
Ben Newman
672c4f338a Add the modules test app to the self-test suite.
I've been running these tests manually ever since Meteor 1.3, but they
really should run every time.
2017-02-09 12:09:48 -05:00
Ben Newman
a3e8cf6763 Update modules test app to Meteor 1.4.2.4. 2017-02-02 15:46:59 -05:00
Ben Newman
3120b9324d Update modules test app to Meteor 1.4.2.3. 2016-11-18 11:01:47 -05:00
Ben Newman
f4abbccf45 Merge branch 'master' into devel 2016-11-17 16:23:04 -05:00
Ben Newman
e3387599a2 Test lazy main modules and stray imports in modules test app. 2016-11-14 13:35:50 -05:00
Ben Newman
7abd832f75 Upgrade modules test app to Meteor 1.4.2.1. 2016-11-10 17:50:59 -05:00
Ben Newman
274a1f6566 Upgrade modules test app to Meteor 1.4.2.1. 2016-11-09 01:52:15 -05:00
Ben Newman
8f07a87bd5 Give package test modules access to Npm.depends dependencies.
Similar in spirit to bbac272530.

Fixes #7999.
2016-11-08 15:36:36 -05:00
Ben Newman
5f0ffc5217 Remove coffeescript version constraint in modules test app. 2016-11-02 14:18:42 -04:00
Ben Newman
5dc2eaa0f7 Add babel-runtime to test app package.json files. 2016-11-02 13:32:01 -04:00
Ben Newman
5bc9bb4982 Update modules test app to Meteor 1.4.2. 2016-10-28 16:11:29 -04:00
Ben Newman
bdee913b1b Support npm packages with native .node "main" modules.
Note that the value of the "main" property must include the ".node"
extension explicitly, because I have yet to encounter an npm package with
a native "main" module that omits the ".node" extension, and I am loathe
to start calling files.stat(id + ".node") uselessly for every single
missing module.

Fixes #7947.
2016-10-23 17:43:06 -04:00
Ben Newman
9810562403 Test that one package can have both node_modules and Npm.depends. 2016-09-22 14:34:32 -04:00
Ben Newman
88db65c837 Update modules test app to Meteor 1.4.1. 2016-08-18 17:31:21 -04:00
Ben Newman
59942fd275 Update modules test app to Meteor 1.4. 2016-07-25 14:47:53 -04:00
Ben Newman
dc28c29985 Update modules test app to Meteor 1.3.5.1. 2016-07-18 20:11:52 -04:00
Ben Newman
74aea0ca3c Update modules test app to Meteor 1.3.4.4. 2016-07-10 15:26:06 -04:00
Ben Newman
126b9172c7 Update modules test app to Meteor 1.3.4.3. 2016-07-08 22:07:05 -04:00
Ben Newman
b907fea4c4 Update modules test app to use the official Meteor 1.3.3 release. 2016-06-10 17:21:30 -04:00
Ben Newman
eea8612834 Update modules test app to 1.3.3-rc.5. 2016-06-09 13:20:20 -04:00
Ben Newman
5ae53de46b Warn but do not crash when .babelrc dependencies unmet. 2016-06-06 19:55:22 -04:00
Ben Newman
bfc59dd3e3 Test that relative module identifiers work for .babelrc plugins. 2016-06-01 01:39:24 -04:00
Ben Newman
eb18d43024 Test that unprefixed .babelrc package names work too. 2016-06-01 01:39:23 -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
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
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
f6b75305b3 Pay attention to unibuild.arch when determining usesModules.
Fixes #6877.
2016-05-17 14:27:56 -04:00
Ben Newman
f616b6bc81 Let multiple files have the same .sourcePath in the ImportScanner.
Importantly, the files can now differ with respect to their .lazy
properties, which fixes #6806 and related issues. Note that the files must
have different .targetPath values if they have the same .sourcePath.

This is a minor breaking change for code that relied on module.id being
based on the .sourcePath instead of the .targetPath.
2016-04-13 19:49:29 -04:00
Ben Newman
b4fe0d5c85 Allow importing .css files from node_modules directories.
Fixes #6037.
2016-04-07 13:05:49 -04:00
Ben Newman
94d03ee6bb Update the modules test app to Meteor 1.3.1. 2016-04-07 13:05:49 -04:00
Ben Newman
5f6f585276 Test fallback to index.js when package.json has no "main" field.
Related to #6589.
2016-03-24 20:07:14 -04:00
Ben Newman
be871bf2ed Upgrade modules-runtime install package to v0.6.1.
Fixes #6543.
2016-03-20 13:44:10 -04:00