Commit Graph

6948 Commits

Author SHA1 Message Date
Ben Newman
6407e4dafb Update meteor-babel to version 7.0.0-beta.49-1.
Also switching from babelOptions.sourceMap to babelOptions.sourceMaps,
finally: https://babeljs.io/docs/usage/api/#options
2018-05-25 18:43:13 -04:00
Ben Newman
5ac27341f7 Update @babel/runtime for new app skeletons to 7.0.0-beta.48. 2018-05-24 23:04:42 -04:00
Ben Newman
e3bac92c82 Strip //# sourceMappingURL comments for files without source maps.
https://github.com/meteor/meteor/issues/9894#issuecomment-391101074

Fixes #9894.
2018-05-23 19:19:05 -04:00
Ben Newman
d64e87b852 Bump LINKER_CACHE_SALT and compiler.BUILT_BY for good measure. 2018-05-16 20:43:26 -04:00
Ben Newman
a76e6da686 Update help text about minimal starter app to deemphasize emptiness. 2018-05-16 17:47:19 -04:00
Ben Newman
af9a0e183f Include "Learn Meteor!" links in minimial starter app HTML. 2018-05-16 17:31:59 -04:00
Ben Newman
10e69ee84d Include actual CSS in default starter app. 2018-05-16 17:31:37 -04:00
Ben Newman
c88b888275 Demonstrate basic server-side rendering in minimal starter app.
Now that the meteor/server-render package is lazy on the client, it adds
no weight to the client JavaScript bundle unless imported.
2018-05-16 17:22:12 -04:00
Ben Newman
c29b191a42 Make the minimal starter application follow best practices. 2018-05-16 15:20:38 -04:00
Ben Newman
b830665a1f Expose App.settings in mobile-config.js rather than Settings.
Follow-up to #9873.
2018-05-16 12:45:07 -04:00
Jan Owsiany
b35aab6c55 Expose Meteor settings inside mobile-config.js (#9873) 2018-05-16 12:22:38 -04:00
Ben Newman
124e334a95 Update meteor-babel and @babel/runtime to version 7.0.0-beta.47. 2018-05-16 12:16:28 -04:00
Ben Newman
8273eb84e3 Avoid calling files.readlink if target not a symbolic link. 2018-05-14 14:17:46 -04:00
zodern
903cd3c8b9 Fix creating symlinks on Windows April 2018 Update (#9887) 2018-05-14 11:20:56 -04:00
Ben Newman
5aab6d2a12 Avoid caching Resolver on PackageSourceBatch, but cache node_modules paths.
Now that getResolver takes options, it seems inappropriate to cache only
the first resolver created, since multiple resolvers might be created with
different options.

Fortunately, caching Resolver objects is not strictly necessary (even for
performance), since Resolver.getOrCreate already caches based on the
options it receives.

The only other meaningful work PackageSourceBatch#getResolver was doing
was computing the nodeModulesPaths option, so I've cached that.
2018-05-12 13:29:09 -04:00
Ben Newman
dbdadc1b11 Avoid using "browser" field of package.json for inputFile.resolve.
Fixes #9870.
2018-05-12 12:43:54 -04:00
Ben Newman
1b17025cd4 Tolerate missing files in Builder#_ensureDirectory.
Fixes #9882.
2018-05-12 11:40:01 -04:00
Ben Newman
1892633dba Avoid unnecessary files.{rm_recursive,symlink} in symlinkWithOverwrite.
When we copy node_modules directories during rebuilds, we try to create
symlinks instead of doing a full recursive copy. Very often, however, the
symlinks already exist, and they point to the right location already, so
we can avoid recreating them for even better performance.

Another optimization identified by using the qualia:profile package
created by @veered: https://atmospherejs.com/qualia/profile
2018-05-10 14:27:44 -04:00
Ben Newman
b7579ad100 Update modules test app to Meteor 1.7-rc.5. 2018-05-09 19:12:13 -04:00
Ben Newman
a8b6accb11 Set .babel-cache directory correctly for command-line tool.
This depends on new functionality in meteor-babel@7.0.0-beta.46-3:
d5d2bbf81e
dea6465daf
2018-05-09 16:16:05 -04:00
Ben Newman
81248867aa Update meteor-node-stubs to version 0.4.1.
This only affects newly created applications for now, but developers can
update to the latest meteor-node-stubs by running

  meteor npm install meteor-node-stubs@latest

https://github.com/meteor/node-stubs/issues/15
2018-05-08 12:56:03 -04:00
Ben Newman
7baaf19020 Report an error when meteor.mainModule cannot be resolved.
https://github.com/meteor/meteor/pull/9826#issuecomment-387172568
2018-05-07 18:48:38 -04:00
Ben Newman
a0842f70f6 Expose Cordova assets with and without /__cordova URL prefix.
Related to #9776.
Fixes #9782.
2018-05-03 19:12:01 -04:00
Ben Newman
0d6fbba203 Make sure minimal apps depend directly on meteor package.
All Meteor packages implicitly depend on the meteor package, and the
meteor-base package implies the meteor package for most Meteor apps, but
the new minimal skeleton does not use meteor-base, so minimal Meteor apps
were not directly depending on the meteor package.

The only reason this mattered was that the meteor package registers a
default compiler plugin for CSS files, and compiler plugins only apply if
an app or package directly depends on them (or depends on a package that
implies them, such as meteor-base).

In other words, this change reenables support for raw CSS files for
minimal apps.
2018-05-01 15:15:00 -04:00
Ben Newman
d6c8a96bda Refine URL prefix logic to exclude just web.browser[.legacy].
This still leaves web.cordova as the only architecture whose URLs get
prefixed (with /__cordova/), but the implementation better reflects the
special status of web.browser and web.browser.legacy as architectures that
the webapp and dynamic-import packages understand how to disambiguate
using the isModern test from the modern-browsers package.
2018-04-29 10:06:08 -04:00
Ben Newman
7e5e5b9fa1 Restrict URL prefixing to web.cordova URLs.
Now that webapp can differentiate between modern and legacy browsers when
serving static files, without relying on URL prefixes, in principle we
shouldn't have to use prefixes for any URLs except Cordova ones.
2018-04-29 09:58:08 -04:00
Ben Newman
229fc24aad Go back to prefixing asset URLs with /__{browser.legacy,cordova,...}.
https://github.com/meteor/meteor/pull/9776#issuecomment-385180806
2018-04-28 11:20:25 -04:00
Ben Newman
74a55ff107 Fix addAsset tests now that /__browser.legacy/ prefix no longer used. 2018-04-27 12:47:35 -04:00
Kevin Newman
06f9f78277 Avoid the need to rewrite URLs in appcache, by avoiding adding the prefix at build time for assets 2018-04-27 09:47:21 -04:00
Jesse Rosenberger
2248019824 Merge branch 'devel' into release-1.7 2018-04-26 11:45:58 +03:00
Cyrille Colin
498f5d32dd [cordova] add resource-file to mobile-config (#9748)
* add resource-file to mobile-config

* Fix typo in addResourceFile documentation header

* get filename with path.parse instead of split

* Code formatting adjustments
2018-04-26 11:26:18 +03:00
Ben Newman
dcd01aceba Merge branch 'devel' into release-1.7 2018-04-25 18:22:00 -04:00
Ben Newman
986b47d1c4 Update meteor-babel to version 7.0.0-beta.46. (#9840) 2018-04-25 18:15:29 -04:00
Ben Newman
6be0514eaf Add modern-browsers to self-test sandbox root packages list. 2018-04-25 11:39:30 -04:00
Ben Newman
76e03f51f3 Update remaining mentions of Meteor 1.6.2 to 1.7. 2018-04-25 10:09:51 -04:00
Ben Newman
e2f7754b9b Disable SQLite journal_mode=TRUNCATE to fix #9703.
https://github.com/meteor/meteor/issues/9703#issuecomment-383620007

We will reconsider this change in Meteor 1.7.1, but in the meantime the
METEOR_SQLITE_JOURNAL_MODE environment variable can be used to override
the default journal mode (WAL).

cc @brucejo75
2018-04-24 12:35:26 -04:00
Ben Newman
e1e2c2b490 Terminate SQLite database connection before springboarding.
https://github.com/meteor/meteor/issues/9703#issuecomment-383620007
2018-04-24 11:37:33 -04:00
Ben Newman
6bcf2fbee9 Default buildMode to development for meteor run command.
Another attempt to fix {debug,prod}Only package self-test failures:
https://circleci.com/gh/meteor/meteor/19960
2018-04-24 11:11:37 -04:00
Ben Newman
8b8f93fe03 Make {debug,prod}Only packages self-test more verbose. 2018-04-24 11:11:36 -04:00
Ben Newman
c032b9c271 Disable longjohn, since Node 8 now supports async stack traces. 2018-04-18 18:36:44 -04:00
Ben Newman
c8fc62f37e Add a package.json file to tools/tests/apps/package-tests. 2018-04-18 18:36:42 -04:00
Ben Newman
0d5de21001 Increase timeouts to fix {debug,prod}Only package self-tests. 2018-04-18 16:59:05 -04:00
Ben Newman
105bdd8fd7 Start marking some optimistic functions as disposable. 2018-04-18 16:32:01 -04:00
Ben Newman
c5302bb2ba Stop scanning node_modules directories in PackageSource#_findSources. (#9825)
This functionality was originally intended to allow importing
compiled-to-JS modules from `node_modules`, by precompiling any modules
found in top-level npm packages, as long as a Meteor compiler plugin was
registered for the module's file extension.

As discussed in #9800, this extra compilation burden can be non-trivial,
especially if you happen to install an npm package such as `less`, which
contains hundreds of `.less` files in the `node_modules/less/test/`
directory.

More generally, this functionality was an early attempt to enable
selective compilation of `node_modules` directories, but it was not a good
solution to that problem, because in almost all cases the extra
compilation was unwanted.

Meteor 1.7 (formerly known as 1.6.2) will give full control over selective
compilation of `node_modules` back to the application developer (#9771),
which should afford a much better solution to this problem. If you've
installed some `.less` or `.scss` or `.ts` files from npm into your
`node_modules` directory, just create a symlink to the package directory
within your application, and those modules will be compiled and become
importable by other JS modules, as if they were part of the application.
2018-04-18 16:19:55 -04:00
Ben Newman
483661a9f4 Merge branch 'devel' into release-1.6.2 2018-04-06 11:09:04 -04:00
Ben Newman
bd26ce3d1e Make sure ImportScanner#_realPath always returns a string. 2018-04-06 10:59:18 -04:00
Ben Newman
3d025520c1 Provide more detailed profiling of _buildLocalPackages. (#9802)
https://github.com/meteor/meteor-feature-requests/issues/283

The ProjectContext#_buildLocalPackages method calls
IsopackCache#buildLocalPackages which calls _ensurePackageLoaded for each
local package, so this commit exposes how long each of those
_ensurePackageLoaded calls takes (when METEOR_PROFILE is enabled).
2018-04-06 10:51:58 -04:00
Christian Klaussner
c0bce716fc Update MongoDB driver to 3.0.5 (#9790)
* Update MongoDB driver to 3.0.5

* Use `MongoClient` instead of `Db` in Meteor Tool

* Update `mongo-livedata` test for new MongoDB driver version

* Consider `BulkWriteError` when checking MongoDB errors
2018-04-06 10:28:25 -04:00
Ben Newman
5fbb99ce5b Merge branch 'devel' into release-1.6.2 2018-04-05 20:29:02 -04:00
Ben Newman
5241d67ded Apply .meteorignore files to node_modules in PackageSource#_findSources. (#9800)
Although there was a comment in this code about not applying .meteorignore
files to the contents of node_modules directories, I'm pretty sure that
was the wrong decision, because .meteorignore merely limits what Meteor
tries to compile as application code, and does not actually modify or hide
node_modules files from other parts of Meteor (or Node).

In other words, there's no harm in letting .meteorignore apply to
node_modules, and there may be a LOT of benefit, because it allows the
developer to fight back when compilation descends unexpectedly into an npm
package that contains non-.js[on] files for which a compiler plugin has
been registered, an obscure but not uncommon behavior originally intended
to allow importing CSS assets from npm packages:

* https://github.com/meteor/meteor/issues/6037
* 43659ff561
* a073280e3f
* https://github.com/meteor/meteor/issues/5242
* https://github.com/meteor/meteor/issues/6846
* https://github.com/meteor/meteor/issues/7406

However, we now have a much more powerful tool for selectively compiling
specific npm packages: #9771. In light of this new approach, we should
probably remove the promiscuous node_modules compilation behavior
altogether, as it might speed up rebuild times for many applications whose
developers don't know or care that this behavior exists. For example,
abandoning this behavior would prevent the problem reported here:
https://github.com/meteor/meteor/issues/6950

In the meantime, this commit makes .meteorignore work for node_modules.
2018-04-05 19:55:43 -04:00