Commit Graph

6922 Commits

Author SHA1 Message Date
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
Aaron Curtis
90d5c1efc4 Correctly append branch locations (#9760)
Before this change,

  meteor create --list

would produce output containing the following line:

  todos-react: https://github.com/meteor/todos#react

but "meteor create --example todos-react" would create the blaze version of the todos example.

This was because for some reason the code is using a # to append the name of the branch, instead of /tree/.
2018-04-04 11:42:02 -04:00
Ben Newman
5938e88a83 Scan packages/non-core in self-test, e.g. to find jquery. 2018-04-03 12:50:42 -04:00
Lucas Hansen
8d320497d6 Cache linker cache files in memory (#9794) 2018-04-02 19:37:08 -04:00
Ben Newman
52a2354955 Merge branch 'devel' into release-1.6.2 2018-04-02 14:02:07 -04:00
Ben Newman
e6a0e9089d Merge branch 'master' into devel 2018-04-02 13:08:43 -04:00
Ben Newman
6b3cc2e94f Avoid displaying package stats errors in headless mode.
Console.isInteractive() will be false during our Circle CI test runs,
since we set the METEOR_HEADLESS environment variable, so this change
should help prevent spurious test failures like these:
https://circleci.com/gh/meteor/meteor/15305.
2018-04-02 12:32:50 -04:00
Ben Newman
4c0e583249 Update meteor-babel to version 7.0.0-beta.42.
https://github.com/babel/babel/releases/tag/v7.0.0-beta.41
https://github.com/babel/babel/releases/tag/v7.0.0-beta.42

Also updated various @babel/... plugin versions in package.json files.
2018-03-31 13:10:12 -04:00
Ben Newman
efdc66d614 Merge branch 'devel' into release-1.6.2 2018-03-27 12:15:11 -04:00
Ben Newman
9401f0d572 Add tests of selective node_modules compilation using symlinks. 2018-03-26 14:51:51 -04:00
Ben Newman
d35987d929 Enable selective compilation of node_modules via symlinking.
If a package in node_modules needs to be compiled for older browsers,
simply symlink the package directory into your application somewhere, and
then import the package as you normally would.

Because of the symlink, code within the package will be compiled as if it
was part of your application, and any imports that refer to modules in the
package will automatically use the compiled code rather than the raw code
from node_modules.

Note that you can also symlink individual files to make them be compiled
like application modules, rather than linking an entire package directory.

Creating symlinks could be considered a form of configuration, but
otherwise this is a zero-configuration solution to selectively compiling
packages within node_modules, which has been something of a holy grail in
the JavaScript community lately.

https://github.com/meteor/meteor-feature-requests/issues/6
2018-03-26 14:47:38 -04:00
Ben Newman
970d58409f Move realpathOrNull into tools/fs/files.js. 2018-03-26 12:04:13 -04:00
Ben Newman
ebd84317d8 Decompose _readDepFile helper from ImportScanner#_scanFile. 2018-03-26 12:04:13 -04:00
Ben Newman
0fca4c56aa Fix handling of old files in ImportScanner#_addFile. 2018-03-26 12:04:13 -04:00
Ben Newman
1757a69d8b Generate stubs that call module.useNode() for server node_modules.
Once this logic is established, the install.js library will no longer need
to know anything about module.useNode():
6412f4aabb/install.js (L322-L325)
2018-03-26 12:04:12 -04:00
Ben Newman
c6c92255e5 Relax options.from precondition in Builder#copyNodeModulesDirectory. 2018-03-26 12:04:12 -04:00
Ben Newman
e7ad5d2a42 Call files.cp_r with { preserveSymlinks: true } in more places.
Now that symlinks can be used to enable selective compilation of
node_modules, it's important to preserve them.
2018-03-26 12:04:12 -04:00
Ben Newman
e50da2f367 Merge branch 'devel' into release-1.6.2 2018-03-23 21:17:53 -04:00
Ben Newman
22e3f99565 Fix copying/symlinking of node_modules directories during build.
The bulk of this commit implements `builder.copyNodeModulesDirectory` to
allow more than one `node_modules` directory to be copied to the same
destination with as much safe symlinking as possible.

However, the crux of the fix for #9738 is the removal of the call to
`builder.generateFilename`, which deserves additional explanation.

If multiple directories are copied to the same output path by the builder,
in some cases it makes sense to ensure distinct directory names by adding
numeric suffixes to some of the directories.

In general, `builder.generateFilename` can get away with this renaming
only if the exact names of the directories are an implementation detail.

However, the code changed by this commit was altering the names of
`node_modules` directories whenever a package had both an `Npm.depends`
and a local `node_modules` directory.

Not only is it totally invalid to change the name of a `node_modules`
directory, but there is also no harm in copying the contents of multiple
`node_modules` directories into one final directory called `node_modules`.

Should fix #9738.
2018-03-23 18:59:32 -04:00
Ben Newman
339f128bd4 Merge branch 'devel' into release-1.6.2 2018-03-21 15:23:01 -04:00
Jesse Rosenberger
39030204a9 Merge branch 'hwillson-mongo-3.6-upgrade-with-test-fix' into devel 2018-03-21 20:24:37 +02:00
Hugh Willson
542ad06b75 Revert the revert of "Upgrade to Mongo 3.6 (#9533)"
This reverts commit 85d74f8d2b.
2018-03-21 19:27:03 +02:00
Ben Newman
41b0b309c6 Bump @babel/runtime to latest version in various package[-lock].json files. 2018-03-20 21:13:52 -04:00
Ben Newman
4b2d6c22bc Update meteor-babel to version 7.0.0-beta.42.
https://github.com/babel/babel/releases/tag/v7.0.0-beta.41
https://github.com/babel/babel/releases/tag/v7.0.0-beta.42
2018-03-20 19:57:00 -04:00
Cyrille Colin
db31fbc606 Open Xcode project folder instead of project file (#9724) 2018-03-15 19:49:22 -04:00
Ben Newman
cc77e963c5 Merge branch 'devel' into release-1.6.2 2018-03-07 12:31:43 -05:00
Ben Newman
74b8c595b7 Merge pull request #9715 from meteor/revamp-starter-app
Use meteor.{mainModule,testModule} for `meteor create` starter apps.
2018-03-07 11:58:00 -05:00