Commit Graph

20856 Commits

Author SHA1 Message Date
Ben Newman
3ee4b61b1d Bump package versions for 1.6.2-beta.12 release. release/METEOR@1.6.2-beta.12 2018-03-07 14:39:22 -05:00
Ben Newman
cc77e963c5 Merge branch 'devel' into release-1.6.2 2018-03-07 12:31:43 -05:00
David Glasser
e5a4306b63 webapp: allow overriding httpServer.listen (#9720) 2018-03-07 12:04:54 -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
Timo Horstschäfer
aee0c15b06 Preserve error.stack in method callback (#9707) 2018-03-07 11:53:52 -05:00
Hugh Willson
4b7aabe321 Update stylus deprecation notice to use proper last version (#9702) 2018-03-07 11:48:51 -05:00
Seba Kerckhof
ccc6294018 Modernize route-policy (#9667) 2018-03-07 11:46:56 -05:00
James Burgess
273f21a0b2 Automate rebalancing of CircleCI test groups (#9656) 2018-03-07 11:38:19 -05:00
James Burgess
20e89b9009 Modernize check package (#9638)
I've reverted match properties that return class instances back to normal functions, so that they can be called as constructors.

Also, I added tests to make sure we catch this issue if someone else gets the same idea that I had!
2018-03-07 11:36:48 -05:00
Seba Kerckhof
06863d0203 Modernize logging (#9636) 2018-03-07 11:33:29 -05:00
Seba Kerckhof
a4ffe2c627 Modernize mongo-id package (#9599) 2018-03-07 11:24:42 -05:00
James Burgess
4ebf089d88 Remove underscore from meteor-base (#9596)
This should shave down bundle sizes by 14.4 kb for many non-blaze projects.

The other core meteor packages have not depended on `underscore` since #9362. However, we are only able to remove this last dependency now due to the previous commit, which eliminated usages of `underscore` from apps that did not have the package listed in their `packages` files. This was causing CI test failures that now should be corrected.

Any meteor apps currently using `_` without `underscore` listed in their `packages` file will need to add the package explicitly.

Version number of `meteor-base` bumped from 1.3.0 to 1.4.0.

There are only a few uses of `underscore` in these apps, and two of them actually used `underscore` without having it explicitly listed in their `packages` file.

This is a problem, because the apps were relying on the dependency from `meteor-base`, which we want to remove to cut down bundle sizes.

For the `modules` test app, I've added `underscore` to the `packages` file, because it is using `_` in an assertion about the module system. For the other app and all other uses of `_`, rather than add `underscore` to the `packages` files, I took the modernization route and replaced the functions with their ES6 equivalents, and then removed `underscore` from all `packages` files.
2018-03-07 11:23:52 -05:00
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
88ac202349 Simplify test/main.js for newly meteor created apps. 2018-03-03 12:56:45 -05:00
Ben Newman
2f1956c497 Use meteortesting:mocha for testing newly meteor created apps. 2018-03-03 12:56:25 -05:00
Ben Newman
d55707894b Use meteor.{mainModule,testModule} for meteor create starter apps.
In order for Meteor to maintain its commitment to being a
zero-configuration tool, any configuration options that we add must come
pre-configured in the best way possible for newly created apps.

In particular, the default new Meteor app must contain a reasonable
testing story, or else we are signalling to the community that testing is
an afterthought.

With that said, this PR is still a work in progress. I welcome your
feedback on how best to configure the default `meteor create` starter app.

Builds on #9690 and #9714.
2018-03-01 18:12:22 -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