Commit Graph

20841 Commits

Author SHA1 Message Date
Ben Newman
b575a8f753 Bump package versions for 1.6.2-beta.11 release. release/METEOR@1.6.2-beta.11 2018-03-06 21:09:33 -05:00
Ben Newman
f14d50538e Merge branch 'devel' into release-1.6.2 2018-03-01 18:02:08 -05:00
Matt McCutchen
a770e9959f Mongo driver: Fix replaceNames to not replace null with {}. (#9710)
Fixes #9692.
2018-03-01 17:54:47 -05:00
Ben Newman
2e8b3598f5 Merge pull request #9714 from meteor/meteor-config-testModule
Support a meteor.testModule section in application package.json files.
2018-03-01 17:54:00 -05:00
Ben Newman
6009dc0ccf Add PR link to meteor.testModule History.md entry.
[ci skip]
2018-03-01 15:49:11 -05:00
Ben Newman
e7b0a70a98 Use meteor.testModule in package.json of modules test app. 2018-03-01 14:27:31 -05:00
Ben Newman
36c7ee8efa Remove unnecessary 'meteor.' prefix from {main,test}Module self-tests. 2018-03-01 14:27:31 -05:00
Ben Newman
8008d9d4c1 Mention meteor.testModule in History.md. 2018-03-01 14:27:31 -05:00
Ben Newman
601f0d6f9f Update 'meteor test' help text to explain meteor.testModule. 2018-03-01 14:27:31 -05:00
Ben Newman
60731a88bc Test meteor.testModule with just meteor test (not --full-app). 2018-03-01 14:27:31 -05:00
Ben Newman
a212d9f515 Also support meteor.testModule to configure test entry points.
Setting meteor.testModule is a great way to specify test entry points
explicitly, rather than relying on Meteor's isTestFilePath heuristics:
https://github.com/meteor/meteor/blob/devel/tools/isobuild/test-files.js

The syntax is identical to meteor.mainModule, so you can set an explicit
meteor.testModule.{client,server,...} for each platform. If a testModule
is not specified for a platform, then Meteor's existing rules about test
file paths apply for that platform, as before.

If a testModule is specified, that module will always be loaded eagerly
when running `meteor test`, in addition to any other modules that load
eagerly because of meteor.mainModule or other rules regarding module
loading. If you run `meteor test` without the `--full-app` option, then no
application JS modules other than the testModule (and any modules imported
by it) will be loaded eagerly.
2018-03-01 14:27:30 -05:00
Ben Newman
b0e5400ff5 Improve meteor.mainModule arch discovery in tests.
If config.mainModule.client === false, then mainId should === false.
2018-03-01 14:27:30 -05:00
Ben Newman
8dd2402f76 Allow meteor.mainModule.{client,server} === false for no entry point.
If meteor.mainModule.{client,server,...} === false, no modules will be
loaded eagerly for that architecture. This is useful if you have an app
with no special app/{client,server} directory structure and you want to
specify an entry point for just the client (or just the server), without
accidentally loading everything on the other architecture.
2018-03-01 14:27:30 -05:00
Ben Newman
66508c483a Remove test driver packages from tests/apps/app-config/.meteor/versions. 2018-03-01 14:27:30 -05:00
Ben Newman
c2e3c52dd3 Simplify ResourceSlot#_isLazy for package resources. 2018-03-01 14:27:30 -05:00
Ben Newman
95efca2223 Stop using _inferFileOptions for package files.
Determining if Meteor package files should be loaded lazily or eagerly is
a lot easier than doing so for application files, so we should just do
that separately, to avoid any risk of application directory layout logic
interfering with package behavior.
2018-03-01 14:27:30 -05:00
Hugh Willson
6e2b5c4503 Revert "Update Mongo.Collection to strip undefined fields (#9671)" (#9712)
This reverts commit b4690a2541.
2018-03-01 11:53:31 -05:00
Hugh Willson
b4690a2541 Update Mongo.Collection to strip undefined fields (#9671)
`Mongo.Collection` has been updated to strip `undefined`
fields set in documents/selectors passed to `find`, `findOne`,
`insert`, `update`, etc. This lines the codebase up with the
changes made in
ce3885b6df,
and helps prevent "The Mongo server and the Meteor query
disagree on how many documents match your query" errors.

Fixes #9619.
2018-02-28 14:32:31 -05:00
Jesse Rosenberger
018f58bd33 Merge pull request #9682 from pravdomil/typos
fix typos
2018-02-28 12:08:26 +02:00
Jesse Rosenberger
ab4a71b24e Merge pull request #9698 from ko-dever/patch-6
Fix a typo in bundle-visualizer README
2018-02-28 12:07:56 +02:00
Jesse Rosenberger
4a913bbd69 Bump meteor core package version to 1.8.4.
This version of `meteor` has no other changes from 1.8.3, though it has
been intentionally published with version 1.6.0.1 of the Meteor tool,
rather than Meteor 1.6.1.

This is to accommodate for the change made in
https://github.com/meteor/meteor/commit/57533d22 which changed the way
code is packaged by the Isobuild linker.  Since packages which use a compiler
plugin include the linked content of the plugin within their published
package source, the linked source of a compiler plugin's
host package, which was published with Meteor 1.6.1, contains this new usage of
`Package._define`.  Unfortunately, the `meteor` packages pre-1.8.2
doesn't have the runtime definition of `Package._define`, and therefore fails,
as seen in https://github.com/meteor/meteor/issues/9700.

Some older versions of Meteor don't pin core packages quite in the right
way (1.4.2.x was notorious for this, though we believe it to be fixed in
Meteor 1.5.2+ thanks to https://github.com/meteor/meteor/commit/cfdc69bf71),
so this will be a bit problematic until those versions are no longer
actively used.  This is similar to the problem older versions of Meteor
would have consuming code which was packaged with newer versions of
Meteor and might contain newer ECMAScript syntax which doesn't need
transpilation on newer Node.js versions, but did on the Node.js runtime
included in older versions of Meteor.

Fixes: https://github.com/meteor/meteor/issues/9700.
2018-02-27 19:49:18 +02:00
Hugh Willson
6d4412f6a9 Document new bug triage timelines (#9691)
* Document new bug triage timelines

* Unpossessing unnecessarily possesed possessive apostrophes

Say that 5 times fast.

* Lowercase non-primary words.

Not that we're following any sort of style guide or anything, but for consistency, at least.
2018-02-26 15:32:06 +02:00
B.E. Henriksen
1bae0d1369 Fixes link. (#9694) 2018-02-26 14:53:27 +02:00
ko-dever
ea7ef27f65 Fix a typo in bundle-visualizer README
Small typo fixed.
2018-02-26 10:43:19 +00:00
Ben Newman
78178d112e Bump package versions for 1.6.2-beta.10 release. release/METEOR@1.6.2-beta.10 2018-02-23 19:23:53 -05:00
Ben Newman
c28d813745 Merge branch 'devel' into release-1.6.2 2018-02-23 18:39:06 -05:00
Ben Newman
5cc71763ab Merge pull request #9690 from meteor/meteor-config-mainModule
Support a meteor.mainModule section in application package.json files.
2018-02-23 18:32:19 -05:00
Ben Newman
eeec1bc2d3 History.md entry for require("/package.json").meteor.mainModule. 2018-02-23 17:55:11 -05:00
Ben Newman
c47a2bedfb Tests for require("/package.json").meteor.mainModule. 2018-02-23 17:06:56 -05:00
Ben Newman
c07e0d4c73 Fix bug that caused non-main modules to load eagerly during tests. 2018-02-23 17:05:42 -05:00
Ben Newman
31c39f0e6f Resolve mainModule strings using Node module resolution rules. 2018-02-23 12:45:24 -05:00
Ben Newman
ae3ad3b2df Support a meteor.mainModule section in application package.json files.
https://github.com/meteor/meteor-feature-requests/issues/135

This change allows applications to specify specific entry points for each
architecture, without relying on `imports` directories to determine the
eagerness/laziness of modules. In other words, it will finally be possible
to build a Meteor app without a special `imports` directory.

Specifically, if `packageJson.meteor.mainModule[architecture]` is defined,
all modules for that architecture will be lazy except for the specified
module, which will be loaded eagerly.

Possible values for `architecture` include "client", "server", "web",
"web.browser", "web.cordova", "os", and so on, just like the second
argument to `api.mainModule(file, where)` in Meteor packages.

In order to match existing behavior, a Meteor application might include
the following in its `package.json` file:

  "meteor": {
    "mainModule": {
      "client": "client/main.js",
      "server": "server/main.js"
    }
  }

These architectures are handled independently, so omitting the "client" or
"server" property would cause that architecture to revert to standard
Meteor loading semantics. In other words, Meteor developers must opt into
this functionality, which is crucial for backwards compatibility.

Note that this functionality applies only to application modules, since
modules in Meteor packages are already lazy by default, and Meteor
packages can already specify entry points by calling `api.mainModule` in
their `package.js` files.

Also note that the loading behavior of non-JavaScript resources is *not*
affected by `packageJson.meteor.mainModule`. Only resources added by
compiler plugins via `addJavaScript` are subject to the new configuration
option. If a compiler plugin calls `addStylesheet` or `addHtml`, those
resources will still be included unconditionally in the HTML document
rendered by the web server. While you could try to import these resources
from JavaScript, you would only be importing any JavaScript resources the
compiler plugin registered using `addJavaScript`, and not the actual HTML
or CSS resources. I welcome feedback on this decision, but if there's no
meaningful way to import a resource, making it lazy just means it won't be
loaded at all.

An ulterior motive for this feature is to enable Meteor apps to have
directory layouts that developers who are not familiar with Meteor can
immediately understand. The special meaning of the `imports` directory and
the surprising eagerness of modules outside of `imports` have always
required some explanation, so this change should reduce that surprise.

Because Meteor strives to be a zero-configuration tool, this is currently
the only supported option in the "meteor" section of `package.json`,
though the available options may be expanded in the future if that's the
best/only way to solve important problems. This would involve adding
additional methods to the `MeteorConfig` class in `project-context.js`,
and then using those methods elsewhere in the `meteor/tools` codebase.
2018-02-23 12:44:56 -05:00
Ben Newman
bbd614932d Update meteor-babel and reify npm packages to latest versions.
Fixes #9676.
2018-02-22 10:49:09 -05:00
Ben Newman
7df7229732 Bump package versions for 1.6.2-beta.9 release. release/METEOR@1.6.2-beta.9 2018-02-21 20:27:10 -05:00
Ben Newman
4e22b2f90a Mention meteor create --minimal in History.md. 2018-02-21 20:27:08 -05:00
Ben Newman
0520200f90 Fix tools/tests/help.js self-test.
https://circleci.com/gh/meteor/meteor/16787
2018-02-21 20:22:12 -05:00
Ben Newman
590ca4d48b Support meteor create --minimal for creating very small apps.
Like `meteor create --bare`, except with even fewer Meteor core packages,
so that the client-side footprint of the app is as tiny as possible.
2018-02-21 19:39:24 -05:00
Ben Newman
556d4bdb42 Bump package versions for 1.6.2-beta.8 release. release/METEOR@1.6.2-beta.8 2018-02-21 18:39:08 -05:00
Ben Newman
a6191d4bad Merge branch 'devel' into release-1.6.2 2018-02-21 18:34:17 -05:00
Ben Newman
312763ea3e Bump meteor core package version to 1.8.3. 2018-02-21 18:31:41 -05:00
pravdomil
94bbfb220a fix typos 2018-02-21 21:06:20 +01:00
Mitar
c0ab6c8c9c Support for cursor iterator also on the server side. 2018-02-21 14:03:53 -05:00
Steven te Brinke
a11b85b53b Minifier js report used minifier (#9626)
* Remove outdated fallback.

* Report used minifier.

This allows packages such as standard-minifier-js to generate statistics per minifier, which is useful to analyze how often the fallback is needed.

* Use official name babel-minify instead of babeli.

* Bump minifier-js patch version to 2.3.3.

To account for the changes in meteor/meteor#9626.
2018-02-21 19:07:28 +02:00
Hugh Willson
a58dc51f80 Keep bundled /public and /private node_modules symlink content. (#9666)
Many npm based packages provide supporting assets that need
to be made available, when used on the web. For example, to
use the `font-awesome` package properly, the
`node_modules/font-awesome/fonts` files need to be made accessible
to incoming web requests.

With Meteor, an easy way to handle this would be to create a
symlink to `node_modules/font-awesome/fonts` from within an
application's `/public` directory. This would then allow all
of `font-awesome`'s font files to be accessed directly by
incoming clients. Unfortunately, while this approach does work
in development when using the Meteor Tool, it does not work when
production bundles are created.

Meteor's isobuild process uses a helper class called
`SymlinkLoopChecker`, to make sure the build process doesn't get
caught up in an infinite loop trying to follow circular symlinks.
Currently, a shared `SymlinkLoopChecker` instance is used to watch
for symlink loops during both the `_findSoures` and `_findAssets`
parts of the isobuild process. `_findSources` is called first, and
covers source files that an application uses from the `node_modules`
directory. The `SymlinkLoopChecker` tracks all of the `node_modules`
directories covered, so they can be watched for in the future (to
prevent duplicate inclusions). Next, `_findAssets` is called using
the same `SymlinkLoopChecker`. This means that if there are any
`node_modules` symlinks used in the `public` or `private`
directories, they will be marked as being duplicates (and stripped),
since they were already covered in the `_findSources` run.

This commit changes things a bit so that both `_findSources` and
`_findAssets` use their own `SymlinkLoopChecker` instance. This
opens up an applications symlink capabilities a bit, while still
preserving some circular symlink safeguards. By doing this, a
production application bundle can now maintain the contents of
`node_modules` based symlinks, used in `public` and `private`.

So in the case of `font-awesome` for example

```
public/fonts --> ../node_modules/font-awesome/fonts
```

becomes the following in the production application bundle

```
bundle/programs/web.browser/app/fonts/[all fonts files]
```

Fixes #7013.
2018-02-21 11:50:01 -05:00
Ron Currier
282b450008 Support <meteor-bundled-css /> pseudo-tag for controlling position of CSS bundle. (#9657)
Implements https://github.com/meteor/meteor-feature-requests/issues/24.
2018-02-21 11:45:34 -05:00
Timo Horstschäfer
52532e70e5 Fix setting bcryptRounds using Accounts.config() (#9659). 2018-02-21 11:33:09 -05:00
Pravdomil
be257d36b0 Report errors that is thrown in functions wrapped in bindEnvironment (#9654) 2018-02-21 11:31:39 -05:00
Frédéric G. MARAND
fd63390bf7 Refactor facts to uncouple from templating/blaze (feature 262) (#9629) 2018-02-21 11:17:22 -05:00
Ben Newman
7d4044178c Bump package versions for 1.6.2-beta.7 release. release/METEOR@1.6.2-beta.7 2018-02-13 15:11:12 -05:00
Ben Newman
eeb7baca8f Merge branch 'devel' into release-1.6.2 2018-02-13 15:08:58 -05:00