Commit Graph

6221 Commits

Author SHA1 Message Date
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
89e1814f2e Merge branch 'devel' into use-babili-instead-of-uglify 2017-03-15 11:52:50 -04:00
Jesse Rosenberger
2f4e0124b0 Merge branch '20170303-dev-bundle-upgrades' into release-1.4.3.x 2017-03-09 17:33:28 +02:00
Jesse Rosenberger
511d43fe52 Upgrade versions of node-pre-gyp and node-gyp in the built bundle.
As a finishing move for ba06bf6eed, this
updates the versions of `node-pre-gyp` and `node-gyp` included in the
`meteor-dev-bundle`.
2017-03-09 17:19:04 +02:00
Jesse Rosenberger
c2c92b9b01 Allow malformed package.json when determining binary dependencies. (#8468)
We now check `package.json` in order to help make an educated decision
as to whether or not a package has binary dependencies which need to be
rebuilt.  In some cases, such as the `npmconf` npm which is included
as a dependency of `flow-router, the `package.json` is invalid (i.e.
empty), and we should silently permit this.

Fixes meteor/meteor#8427
2017-03-08 15:12:58 -05:00
Jesse Rosenberger
2d0fa6483e [dx] Provide warning when METEOR_SETTINGS are used in development. (#8458)
This is a developer experience (DX) change.

In production, the `METEOR_SETTINGS` environment variable is used to
pass parameters which will be available in the `Meteor.settings` within
the app.  However, `METEOR_SETTINGS` is ignored when using the
`meteor-tool` itself as in development, environment variables are
often less desirable.  Additionally, there would be no reactivity when
changing settings was necessary, instead requiring that the `meteor`
tool be restarted entirely.

On more than one occasion, developers have been confused as to why the
`METEOR_SETTINGS` are not respected in development.  To make it more
clear when this is attempted (and clarify that they will _not_ be used),
provide the a clear warning before ignoring the `METEOR_SETTINGS`
variable.

Aims to avoid meteor/meteor#8455.
2017-03-08 11:57:01 -05:00
Ben Newman
05f6705d15 Merge pull request #8431 from hwillson/issue-8154
Added CLI help text for meteor update --all-packages.
2017-03-08 11:40:17 -05:00
Ben Newman
b18b1e2755 Force garbage collection more aggressively during package DB sync.
This is an effort to keep the `meteor --get-ready` command from running
out of memory during Circle CI tests, as mentioned in this comment:
https://github.com/meteor/meteor/pull/8327#issuecomment-284431618
2017-03-06 20:34:56 -05:00
Ben Newman
ab0f9ba290 Force garbage collection more aggressively during meteor --get-ready.
This is an effort to keep the `meteor --get-ready` command from running
out of memory during Circle CI tests, as mentioned in this comment:
https://github.com/meteor/meteor/pull/8327#issuecomment-284431618
2017-03-06 20:34:56 -05:00
Jesse Rosenberger
513c270013 Add quotes around "meteor update" command. 2017-03-03 16:46:13 +02:00
Jesse Rosenberger
ad11a741bd Add brackets around package name.
To indicate that it's a variable, in the same way that `<target-version>` is notated (as well as other places in the `help.txt`).
2017-03-01 19:40:00 +02:00
Hugh Willson
8b431c6f80 Removed additional "newer versions" message reference; not needed. 2017-03-01 12:03:59 -05:00
Hugh Willson
148aeef2c9 Added paragraph explaining how to get extra information about packages that can't be updated. 2017-03-01 10:59:46 -05:00
Seth Murphy
be88d7772a Rebased off meteor/devel 2017-02-28 16:12:21 -05:00
David Glasser
adc468f670 Remove meteor npm install instruction (#8433)
As of #8108, `meteor create` runs `meteor npm install`, so it doesn't need to tell you do to do so.
2017-02-28 09:14:53 +02:00
Hugh Willson
3802addaae Added CLI help text for meteor update --all-packages. 2017-02-27 10:30:28 -05:00
Maciej Trębacz
e9c65b5608 Remove jQuery from default dependencies.
This commit removes jQuery package from default project skeletons.
2017-02-23 12:55:07 +02:00
dr.dimitru
dd548d998d Use process.version for generated README (#8379)
* Update generated README

 - Update node version in generated README file by bundler, according
to version from `.node_version.txt` file

* Use `process.version`

 - Minor file linting, one missed semicolon, one unnecessary semicolon
2017-02-23 12:08:09 +02:00
tcastelli
907e1d9183 Update help text to clarify the use of external npm commands (#8355)
* Update help text to clarify the use of external npm commands

First attempt to improve the help text regarding the external npm commands that can be run directly with 'meteor'.
#8277
Further enhancements could include listing also the "current" available external commands by parsing a ls/dir command or 'meteor npm list -g -depth 0'. If they command is uninstalled between the call of 'meteor help' and 'meteor <external command>' we are not the ones to be blamed but the user instead :)

* Update 'external command' to 'npm command'

* Joining new suggestions and cleaning some redundancy

Included @abernix suggestions (with some variations) to include references to npm and node. Also clarified how to install a npm package and run it afterwards

* Typo

Changed to global context

* Reword description of "other" npm commands

These commands are similar to `node` and `npm`, but we didn't want
them to be confused with `npm command` commands.

* Avoid repetition of `meteor npm install --global`
2017-02-15 15:46:53 -05:00
Ben Newman
c2e4b77636 Protect against edge case when resolved is a string.
In particular, if the "main" field of the package.json file cannot be
resolved, then the `resolved` variable will be "missing", which is a
truthy value that silently rejects property assignments. Ugh!
2017-02-15 14:09:36 -05:00
Eric Dobbertin
005c521f54 Fix comment about unordered imports (#8362) 2017-02-14 09:03:25 -08: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
434116aa84 Fix installing from shrinkwrap.
Although we thought the upgrade from `npm` 3.10.9 to 4.1.2 was worthwhile
and safe, this breaking change proved problematic:
https://github.com/npm/npm/blob/latest/CHANGELOG.md#no-more-partial-shrinkwraps-breaking

Specifically, if a Meteor package calls `Npm.depends` in a way that
disagrees with the contents of `.npm/package/npm-shrinkwrap.json` file,
Meteor will create a partial shrinkwrap file in order to install the
correct top-level npm dependencies, but transitive dependencies of the
package will no longer be installed.

This was fixed in Meteor 1.4.2.7 by reverting the upgrade of npm, but
Meteor 1.4.3.1 will keep npm@4.1.2 and fix the consequences.
2017-02-13 18:11:11 -05:00
Jesse Rosenberger
f4d677fbc8 Add an upgrader which modifies accounts-* packages automatically.
The transformations to be made here are:
   * Existence of `accounts-<service>` **adds** `<service>-config-ui`
   * Existence of `<service>` **changes to** `<service>-oauth`
 https://github.com/meteor/meteor/issues/7715#issuecomment-276529351

 Relates to:

  * facebook: https://github.com/meteor/meteor/pull/7728
  * github: https://github.com/meteor/meteor/pull/8303
  * google: https://github.com/meteor/meteor/pull/8275
  * meetup: https://github.com/meteor/meteor/pull/8231
  * meteor-developer: https://github.com/meteor/meteor/pull/8305
  * twitter: https://github.com/meteor/meteor/pull/8283
  * weibo: https://github.com/meteor/meteor/pull/8302
2017-02-10 17:34:28 +02:00
Ben Newman
bcffe53d14 Consider npm packages with {,pre,post}install scripts non-portable.
Inspired by analysis from @danstiner:
https://github.com/meteor/meteor/issues/8225#issuecomment-275044900

Fixes #8225, as well as the tests I added in 672c4f338a.

I changed the name of the .meteor-portable file to .meteor-portable-1.json
in order to invalidate previous .meteor-portable files. This naming scheme
will be more sustainable, because we can keep incrementing the version
number whenever we change this logic.
2017-02-09 16:04:23 -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
fabad4cc8d Overwrite implicit modules only if they are package.json files.
Implicit empty stub CSS modules added in addStylesheet in
compiler-plugin.js were being overwritten with actual CSS module code,
thanks to logic intended to support replacing package.json stubs with
their actual contents.

The meaning of "implicit" is somewhat overloaded: for package.json
modules, it means the module is a minimal stub (just the "name",
"version", and "main"/"browser" fields) that should be replaced if ever
explicitly imported. For empty stub CSS modules, it means the module
should yield to any actual modules added via addJavaScript.
2017-02-09 12:09:34 -05:00
Ben Newman
365ceb6386 Tolerate ENOENT exceptions from files.realpath in isWithinProdPackage. 2017-02-08 17:18:30 -05:00
Ben Newman
2010e9d11a Merge branch 'devel' into release-1.4.3 2017-02-08 14:47:03 -05:00
Ben Newman
858dc64db4 Merge branch 'master' into devel 2017-02-08 14:43:26 -05:00
Ben Newman
cafe4cc084 Fix bad npm package stripping logic introduced to fix #8136.
When `start + maxPartCount > parts.length`, this code was comparing
array holes to strings, leading to unpredictable results.

Blame: 2613582311
2017-02-08 11:04:20 -05:00
Ben Newman
868a52829f Register package@version constraints for current release.
Package version unpinning (#7084) removed all exact package@=version
constraints derived from the current release.

As we discovered with Meteor 1.4.2.4 (#8306), this meant releases no
longer had any power to enforce package upgrades, which is why the
follow-up Meteor 1.4.2.5 release (#8311) was necessary.

This commit has the same effect as putting package@version in your
.meteor/packages file for every local/core package that your app uses.
2017-02-07 14:52:49 -05:00
Ben Newman
59124681bc Preserve true "main" and "browser" fields of package.json modules.
This reverts commit 32140c8707, restoring
commit 6c643a4763.
2017-02-07 10:43:20 -05:00
Ben Newman
29b88d29d4 Merge branch 'devel' into release-1.4.3 2017-02-07 10:37:54 -05:00
Ben Newman
3801349437 Merge branch 'master' into devel 2017-02-07 10:36:49 -05:00
Jesse Rosenberger
32140c8707 Revert "Preserve true "main" and "browser" fields of package.json modules."
This reverts commit 6c643a4763.
2017-02-02 20:26:54 -08:00
Ben Newman
a00b19d1fb Merge branch 'devel' into release-1.4.3 2017-02-02 16:07:50 -05:00
Hugh Willson
f57d4d157d Added extra colon-converter calls to the bundler and linker. (#8293)
* Added extra colon-converter calls to the bundler and linker.
* Rewording of convert to convertColons for clarity.
2017-02-02 15:54:59 -05:00
Ben Newman
a3e8cf6763 Update modules test app to Meteor 1.4.2.4. 2017-02-02 15:46:59 -05:00
Ben Newman
cc8734ddca Merge branch 'master' into devel 2017-02-02 15:18:48 -05:00
Ben Newman
1f60258821 Merge pull request #8142 from abernix/feature/fix-7849-stale-cordova-build
Cordova project preparation must occur before copying to the build
2017-02-01 12:40:06 -05:00
Ben Newman
bf9338b367 Support ./meteor publish-release --skip-tree-hashing ... flag. 2017-02-01 12:24:06 -05:00
Ben Newman
c683a79595 Unify file.emptyStub and file.imported === "implicit" as file.implicit.
Note that there was a typo in ResourceSlot#addStylesheet, so
file.emptyStub was never === true before.
2017-02-01 10:35:31 -05:00
Ben Newman
6c643a4763 Preserve true "main" and "browser" fields of package.json modules.
Previously, when building a JavaScript bundle for the client, if a
package.json file had a string-valued "browser" field, we would replace
the value of the "main" field of the bundled package.json module with the
value of the "browser" field. This trick was important because it allowed
an npm package to have a different entry point on the client than it had
on the server.

However, that approach became inconsistent if the package.json file was
also explicitly imported as a module, because the package.json stub used
for module resolution prevented the real contents of package.json from
getting bundled, and disagreed with the original package.json module about
the value of the "main" field.

To resolve that inconsistency, it seems better to avoid modifying the
"main" field of package.json modules, and instead rely on the runtime
module system to make sense of the "browser" field, regardless of whether
the package.json module is a stub used only for module resolution or
contains the full contents of the original package.json file.

The ability to understand "browser" fields of package.json modules was
introduced in install@0.8.3:
377d1a3b51

This is potentially a backwards-incompatible change for developers using
this version of `ImportScanner` and `Resolver` who have not yet upgraded
their `modules-runtime` package to at least version 0.7.8. The solution is
to upgrade `modules-runtime`, though it would be nice to enforce that
better somehow.
2017-02-01 10:34:52 -05:00
Ben Newman
2613582311 Always copy node_modules/.bin into bundle/programs/server/npm.
Fixes #8136.
2017-02-01 09:58:10 -05:00
Jesse Rosenberger
3b8c886f6f Merge branch 'devel' into release-1.4.3 2017-01-26 15:39:21 -08:00
Ben Newman
355cde306a Merge pull request #8239 from wojtkowiak/cordova-6.4.0
Update to Cordova 6.4.0
2017-01-25 16:39:13 -05:00
Ben Newman
0734a70299 Merge branch 'devel' into release-1.4.3 2017-01-19 11:55:29 -05:00
Hugh Willson
524e34bce2 Slight wording changes. 2017-01-15 10:37:52 -05:00
Hugh Willson
7064a029ef Updated to include note about matching architecture versions for packages. 2017-01-13 10:48:04 -05:00