Michał Powaga
7239bf5ec2
Add --extra-packages option to test and test-packages commands
2017-06-08 23:26:47 +01:00
Michał Powaga
4c236dd69e
--extra-packages now overrides .meteor/packages constraints
2017-06-08 16:21:09 +01:00
Michał Powaga
4c45c28a92
Remove unnecessary file
2017-06-08 11:08:48 +01:00
Michał Powaga
a276af1706
Add selftest
2017-06-08 10:56:56 +01: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
9c5293b6e2
Upgrade the dynamic-import test app to Meteor 1.5.
2017-06-02 14:25:46 -04:00
Ben Newman
a2aec7becf
Add a failing test of dynamic imports from user:name packages.
...
Confirms #8751 .
2017-06-02 10:45:24 -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
cd4fc028f8
Upgrade reify to version 0.11.20 to fix getNamespace bug.
...
Reported here:
https://github.com/meteor/meteor/pull/8327#issuecomment-304582864
Fixed by:
aeb46dcd61
2017-05-29 12:02:56 -04:00
Ben Newman
e2210ef01d
Update Reify API usage for version 0.11.13.
2017-05-26 18:22:02 -04:00
Ben Newman
e3bd1cfb9c
Make dynamic import(...) caching more robust to IndexedDB failures.
...
Fixes #8697 .
2017-05-15 12:11:30 -04:00
Ben Newman
269e10caa6
Remove support for pkg.module in client bundles.
...
This partially reverts commit d7cae3c939 .
This functionality was problematic without providing any clear benefits to
Meteor developers, as reported by @fermuch and @markoshust:
https://github.com/meteor/meteor/pull/8327#issuecomment-298723203
2017-05-04 16:09:45 -04:00
Ben Newman
d7cae3c939
Support pkg.module in client bundles, even for node_modules.
...
As proposed here: https://github.com/rollup/rollup/wiki/pkg.module
By supporting ECMAScript module entry points for npm packages in Meteor
1.5, we will be well-positioned to do more effective import/export-based
tree shaking in future versions of Meteor.
We can't do the same thing on the server because we can't change how
native Node resolves package entry points based on the "main" field of the
package.json module.
On the other hand, all npm packages have to work in Node using the "main"
field, and client bundles stand to benefit the most from tree shaking, so
this client/server difference should not be problematic.
Note that the "jsnext:main" property is also supported as a legacy synonym
for "module".
2017-04-27 17:34:34 -04:00
Ben Newman
d9264e3b4b
Better API for module.prefetch(id).
2017-04-25 10:26:24 -04:00
Ben Newman
5477aeac3f
Support module.prefetch(id) to fetch but not evaluate dynamic modules.
...
Generally, module.prefetch(id) will not throw even if the fetched module
is missing. If you need to know whether module.prefetch(id) succeeded,
simply await the result of the promise, which will be null on success, or
an Error object if the module could not be imported.
2017-04-24 16:40:58 -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
5cf603ce82
Merge branch 'release-1.4.3.x' into release-1.5
2017-03-27 15:37: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
d0f179b2f5
Merge pull request #8502 from hwillson/issue-6945
...
Updated the builder whitelist to allow "@" in filenames.
2017-03-22 12:50:28 -04:00
Ben Newman
953e9a4e2d
Merge branch 'release-1.4.3.x' into release-1.5
2017-03-17 19:13:27 -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
Ben Newman
621d148909
Decompose maybeClearDynamicImportCache to declutter tests.
2017-03-08 14:58:35 -05:00
Ben Newman
ac451ac73f
Respect METEOR_PHANTOMJS_* env vars in dispatch:phantomjs-tests.
...
Same changes as 185d8e9bc5
2017-03-08 14:46:17 -05:00
Ben Newman
f955d7610c
Clone dispatch:phantomjs-tests package locally in dynamic-import app.
...
Revision: 831dfd19bd
2017-03-08 14:46:17 -05:00
Ben Newman
ae59532f12
Delete MeteorDynamicImportCache database before running tests.
...
Also run the tests a third time without deleting the database, to exercise
the caching logic.
2017-03-04 19:56:10 -05:00
Seth Murphy
be88d7772a
Rebased off meteor/devel
2017-02-28 16:12:21 -05:00
Ben Newman
41e9ee857e
Evaluate dynamic module code in package scope.
...
This should elegantly address the issues described in this comment:
https://github.com/meteor/meteor/pull/8327#issuecomment-280881830
I toyed with the possibility of turning package variables (both imports
from other packages and intercepted "global" variable assignments) into
properties on a shared namespace object, but that would have been a major
breaking change for existing package code, because it would have required
automatically rewriting variable references in package modules.
2017-02-21 11:47:31 -05:00
Ben Newman
15135a65df
Test importing lazy packages and dynamic package modules.
2017-02-16 18:20:42 -05:00
Ben Newman
6b89bed42d
Merge branch 'devel' into release-1.5
2017-02-14 12:28:59 -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
cda9ba1d41
Merge branch 'release-1.4.3' into release-1.5
2017-02-10 14:37:43 -05:00
Ben Newman
d0aa53cef9
Basic test harness for dynamic imports.
2017-02-09 13:25:59 -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
Hugh Willson
c55d8cca76
Revert "Revert "Merge pull request #7963 from hwillson/issue-5626" ( #8118 )"
...
This reverts commit 5754f8ef3e .
2016-11-30 20:28:21 -05:00
Ben Newman
5754f8ef3e
Revert "Merge pull request #7963 from hwillson/issue-5626" ( #8118 )
...
This reverts commit 11ce2f7bbc , reversing
changes made to dfde4146f7 .
2016-11-30 19:48:19 -05:00
Ben Newman
11ce2f7bbc
Merge pull request #7963 from hwillson/issue-5626
...
Load `program.json` using the Unicode Normalization Form of the loaded JSON string
2016-11-29 18:22:00 -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
Hugh Willson
c93756a710
Moved common normalize code into mini-files.js; Added/adjusted tests.
2016-11-03 13:57:17 -04:00
Ben Newman
57fe26161d
Use Meteor.setTimeout to re-run tryInsert function.
2016-11-03 12:18:42 -04:00
Ben Newman
f290abc72e
Another attempt to make "run --once" test more reliable.
2016-11-03 11:48:02 -04:00
Hugh Willson
d74c7b68ce
Updated the Assets API to make sure assetPath strings are normalized (to address issue #5626 ).
2016-11-03 07:44:12 -04:00
Ben Newman
cfc167a67b
Make test more reliable by calling insert in Meteor.startup.
2016-11-02 17:25:26 -04:00