Commit Graph

335 Commits

Author SHA1 Message Date
Hugh Willson
9eb733d6bd Add os.windows.x86_64 to meteor build --architecture help (#9413)
The `meteor build --architecture` help was missing
`os.windows.x86_64`. This commit adds it in and also updates
an out of date comment in the source that referred to there
only being 3 allowed architectures.
2017-12-07 17:42:52 -05:00
James Burgess
8048510a95 Fix meteor test file matching patterns (#9339)
* Adjust test filename RegExps to match Meteor guide. Fixes #9332.
* Adjusted help text for --drive-package on meteor test.
* Add integration tests for `meteor test` eager file loading.
* Fix typo in selftest.forbid comment.
* Improve test file eager load integration test coverage and clarity.
2017-12-07 17:42:51 -05:00
Ben Newman
0fddc26a2e Adjust npm update notifier opt-out environment variable.
https://github.com/zkat/npx/issues/98#issuecomment-316936135
https://www.npmjs.com/package/update-notifier#user-settings
2017-10-23 19:37:44 -04:00
Ben Newman
9bedf027d4 Move VALID_ARCHITECTURES to its natural home, utils/archinfo.js.
Apparently importing cli/commands.js in isobuild/bundler.js led to calling
ensureIsopacketsLoadable more than once, which broke some tests.
2017-10-16 15:47:55 -04:00
Ben Newman
b99f2be040 Reuse VALID_ARCHITECTURES for great DRY-ness. 2017-10-16 10:00:45 -04:00
Ben Newman
bbd3b9ffca Tolerate springboarding to the same meteor-tool build directory.
Though this seems wasteful, it can happen if a SpringboardToLatestRelease
exception is thrown, and it definitely should spawn a new process rather
than returning normally from the springboard function.
2017-10-15 20:10:21 -04:00
Ben Newman
5a9e837937 Upgrade to 64-bit when possible on Windows.
Since we can't change the springboarding logic of existing Meteor
releases, this decision has to be made by the springboarded-to Meteor 1.6
release, and may result in a second springboarding.
2017-10-15 19:36:37 -04:00
Ben Newman
e9db660d03 Allow 64-bit Windows builds of meteor-tool to download 32-bit builds.
Once Windows developers update to a 64-bit version of Meteor 1.6, they may
still wish to run apps using older versions of Meteor where only 32-bit
builds of meteor-tool are available. This commit makes that possible.
2017-10-15 19:32:18 -04:00
Jesse Rosenberger
0dac129770 Introduce os.windows.x86_64 architecture for 64-bit Windows.
This commit reverts much of the work @hwillson had put in place for
meteor/meteor#9173, which made it possible for 32-bit and 64-bit
Mongo versions to exist in harmony within the same dev-bundle.  That
hard work was not in vein though as it offered invaluable research.
Ultimately, this showed that a more aggressive approach would be ideal,
even if the proposed option would have worked great in the short-term.

In the wake of the news that Mongo would no longer be supporting 32-bit
versions, these changes are important so 32-bit users of Meteor can
continue to have a functioning Mongo binary in development, while still
allowing Meteor to ship newer Mongo (e.g. 3.4+) binaries for 64-bit
users.  This is particularly relevant for Windows users, who have
previously only had 32-bit Meteor builds and represented a majority of
"32-bit" development, despite the fact most of their hosts supported
64-bit.  During another time in Meteor's life, this made sense.

This commit takes improved functionality to the next level (and makes
the aforementioned changes obsolete) by introducing support for building
and shipping Meteor for Windows in a 64-bit flavor (in addition to
32-bit), which will hopefully solve a number of performance matters on
Windows by using binaries which are pre-compiled for 64-bit, rather than
forcing the Windows kernel to deal with 32-bit binaries.  While Windows
has shown it's quite capable of dealing with such a situation, it seems
more and more clear (given improvements in underlying dependencies) that
performance gains could be had by freeing Windows of its 32-bit work.

This commit also further perpetuates the "archinfo" plot-line with more
story (about Windows) and various spelling corrections.
2017-10-14 13:36:29 -04:00
Ben Newman
abd91ac7c5 Use files.rm_recursive_async to implement meteor reset.
This should hopefully prevent ENOTEMPTY errors on Windows.
2017-10-12 16:46:10 -04:00
Ben Newman
5154835c73 Allow asynchronous meteor command implementations. 2017-10-12 16:45:04 -04:00
Ben Newman
8b319f11e9 Reinstate meteor debug help text, but recommend --inspect-brk. 2017-10-10 09:52:02 -04:00
Ben Newman
7485d50ff6 Support --inspect and --inspect-brk for all meteor test/run commands. (#9201)
The syntax of these flags is the same as the equivalent Node.js options:
https://nodejs.org/en/docs/inspector/#command-line-options

When no port value is provided, the default is 9229.

Two notable differences:

  * The flags affect the server process spawned by the parent build
    process, rather than affecting the build process itself.

  * The --inspect-brk flag causes the server process to pause just after
    server code has loaded but before it begins to execute. This timing is
    more useful than the Node.js --inspect-brk behavior, which is to pause
    on the first instruction executed by the process, since that is too
    early to set any useful breakpoints.

Implements https://github.com/meteor/meteor-feature-requests/issues/194.
2017-10-10 09:23:46 -04:00
Ben Newman
670fb6d247 Make --driver-package work like --extra-packages.
Now you can run `meteor test --driver-package dispatch:mocha-browser`
without first running `meteor add dispatch:mocha-browser`, yay!
2017-10-09 19:04:24 -04:00
Ben Newman
1a8efdc31f Merge branch 'devel' into release-1.6 2017-10-02 13:44:25 -04:00
Ben Newman
e85c69680d Combine all isopackets to share transitive dependencies. (#9168)
By my calculations, the sum of the sizes of the individual isopackets was
152MB, and the size of the combined isopacket is now just 36MB. That
remarkable difference goes to show how much duplication of transitive
dependencies was happening before this change.

That's a savings of 116MB for the (uncompressed) size of the meteor-tool
package. In Meteor 1.5.x, the meteor-tool package is about 544MB, but in
Meteor 1.6 it's considerably smaller: 373MB. In other words, this change
should reduce those sizes to 428MB (-21%) and 257MB (-31%), respectively.
2017-10-02 13:41:39 -04:00
Ben Newman
dd5d7e2786 Merge branch 'release-1.5.2' into release-1.6 2017-08-22 22:04:03 -04:00
Ben Newman
754b0c5abc Merge branch 'devel' into release-1.5.2 2017-08-22 20:55:33 -04:00
Ben Newman
67b76abc78 Make node-gyp look for headers in dev_bundle/include/node.
Thanks to @abernix for identifying this solution to the duplication
between dev_bundle/include/node and dev_bundle/.node-gyp/*/node.
2017-08-22 16:41:01 -04:00
Jesse Rosenberger
20c5036541 Fix auto-install of cordova-lib during meteor build.
As a follow-up to meteor/meteor#8976, this properly installs
the `cordova-lib` package when during a `meteor build`.

Addresses: https://github.com/meteor/meteor/pull/8728#issuecomment-323493331,
as reported by @markoshust.
2017-08-22 23:06:22 +03:00
Hugh Willson
e027a46d71 Add missing CLI help for test/test-packages --driver-package (#9035) 2017-08-22 15:57:43 -04:00
Ben Newman
6804aedc6c Merge branch 'release-1.5.2' into release-1.6 2017-08-17 10:19:46 -04:00
Ben Newman
d2213f0288 Merge branch 'devel' into release-1.5.2 2017-08-17 10:08:20 -04:00
Jesse Rosenberger
5626ad7dee JUnit support for meteor self-test test runner. (#9014) 2017-08-16 11:21:07 -04:00
Jesse Rosenberger
f68de59464 Stop setting NPM_CONFIG_PREFIX in getEnv.
This was causing problems with `npm@5`, but realistically it may not be
be necessary anymore since `npm@5` has a much smarter global,
self-healing `cacache`.
2017-08-15 14:16:53 -07:00
Ben Newman
0bf08a5f99 Merge branch 'release-1.5.2' into release-1.6 2017-08-08 18:40:46 -04:00
Jesse Rosenberger
f0548ad50d Merge branch 'devel' into release-1.5.2 2017-08-02 22:31:14 +03:00
Ben Newman
ad917dcf0a Merge pull request #8954 from meteor/abernix/auth-deploy-cleanup
`meteor deploy` cleanup and partial modernization
2017-08-02 08:46:44 -07:00
Jesse Rosenberger
26f5ce1833 Introduce Cordova ensureDevBundleDependencies.
This Cordova `ensureDevBundleDependencies` function will utilize a another
method called `ensureDependencies` which checks to see if a module can be
resolved by the tool.  If it cannot be resolved, it will install it using the
`installNpmModule` facilities of `meteor-npm.js` in the same way as other npm
packages within packages, except with the destination as the `dev_bundle`.

This commit also adds a couple of previously not explicitly installed npm
modules which Meteor requires directly: `cordova-registry-mapper` and
`cordova-common`.  Both of these were previously relying on npm package hoisting
which previously occurred during the installation of `cordova-lib` in the dev
bundle which happened under the supervision of a `package.json` file (which is
later purged).

When `cordova-lib` is installed directly, without a package.json, the
aforementioned packages are not hoisted to the top level, but instead reside
inside `cordova-lib`.  This is less than ideal since we're relying on the API
of an indirect dependency of `cordova-lib`.
2017-08-02 17:19:42 +03:00
Jesse Rosenberger
5b051d0eb5 Move remove-platform into separate method as prep for auto dep install. 2017-08-02 17:19:40 +03:00
Jesse Rosenberger
401cb493cb Move add-platform into separate method as prep for auto dep install. 2017-08-02 17:19:40 +03:00
Jesse Rosenberger
134bc0d2c3 Change Cordova imports to nested to avoid being eagerly evaluated.
This will enable the possibility of deferring the installation of the Cordova
modules (e.g. `cordova-lib`, `cordova-common`) until a time deemed appropriate.
2017-08-02 17:19:39 +03:00
Jesse Rosenberger
d822836711 Merge branch 'devel' into release-1.5.2 2017-08-01 22:48:48 +03:00
Stephen Darnell
dca2ced014 Avoid new uses of 'package' as it is apparently a reserved keyword. (#8973) 2017-08-01 08:41:32 -07:00
Ben Newman
868ba7ceff Merge branch 'devel' into release-1.5.2 2017-07-28 18:50:20 -04:00
Stephen Darnell
96db56b0ba Add 'meteor list --tree' to show a tree of package dependencies. (#8936)
There's also a --weak command line option which when specified
also shows weak dependencies.
2017-07-28 17:36:07 -04:00
Jesse Rosenberger
613ce27f69 Remove meteor claim which is no longer a supported command.
This was residue from Meteor Free Hosting, which is no longer available,
and `meteor claim` has not worked in quite some time.
2017-07-27 16:16:07 +03:00
Ben Newman
1b636ebf04 Merge branch 'release-1.5.2' into release-1.6 2017-07-21 19:52:47 -04:00
Hugh Willson
01378df2a0 Adjust test-packages --test-app-path to create the directory if missing (#8923)
* Adjust test-packages --test-app-path to create the directory if missing.

* Slight style tweak.
2017-07-20 10:21:56 -04:00
Ben Newman
8d83d72dc4 Merge branch 'devel' into release-1.6 2017-07-13 11:19:32 -04:00
Mitar
d4c4bf364d filePath is relative to appPath (#8885)
Interpret filePath as relative to appPath.
2017-07-13 08:56:38 -04:00
Ben Newman
e3e259169f Merge branch 'release-1.5.1' into release-1.6 2017-06-27 11:30:41 -04:00
Jesse Rosenberger
e2a6f397e7 Merge pull request #8842 from RickvdP/master
Updated old github wiki references to Meteor Guide/API docs
2017-06-26 14:08:39 +03:00
Ben Newman
943c6a4d83 Merge branch 'release-1.5.1' into release-1.6 2017-06-21 14:40:01 -04:00
Rick
c6f80b9502 Updated doc URLs 2017-06-19 12:00:35 +02:00
Ben Newman
ab4f54c49a Revert unnecessary npm_config_disturl overrides. 2017-06-15 09:40:11 -04:00
Ben Newman
8550412bb0 Reimplement meteor debug using the Node 8 inspector.
This is the feature that excites me most about Meteor 1.6, hands down.

Benefits include:

* Works with `meteor test[-packages] --debug-port 9229` (for tests), as
  well as just `meteor debug` (for apps).

* The application process waits patiently for the debugger to attach, so
  you don't have to race to open the debugger.

* The application process pauses at a location just after all server code
  has been evaluated, but before any code starts executing, giving you a
  chance to set reliable breakpoints anywhere in server code. This is much
  better than using the `node --inspect-brk` flag, since that stops too
  soon to set any useful breakpoints.

* The application server runs at full speed, so you don't have to wait
  forever to hit that all-important breakpoint, and you don't lose nearly
  as much time if you accidentally continue past the line of code where
  the trouble is occurring.

* Even if your application is stuck in an infinite loop, you can still
  attach the debugger, pause execution, and debug the loop.

* No more `node-inspector`! Instead, you can now debug your server code in
  native Chrome DevTools, or several other high-quality inspector clients,
  such as VS Code or WebStorm (seriously, check out the documentation:
  https://nodejs.org/en/docs/inspector/#inspector-tools-clients). The list
  of debuggable processes can be found at the URL chrome://inspect.

* Realistic performance and memory profiling is now possible via the
  familiar DevTools interface.

* I highly recommend this Chrome extension that automatically (re)connects
  to any open inspector sockets, so you don't have to keep manually
  (re)attaching the debugger: http://june07.com/nim

* The implementation of `meteor debug` no longer has to proxy multiple
  private/public debugger ports. Look at all that deleted code!

This new inspector is so much better than the old `node-inspector` that
I've been using the release-1.6 branch to debug problems in Meteor 1.5,
despite the risks of using Node 8, because those risks are so far
outweighed by the quality of the new debugging experience.

That said, the experience isn't perfect (yet). I welcome your feedback on
the Meteor 1.6 PR: https://github.com/meteor/meteor/pull/8728
2017-06-14 19:08:40 -04:00
Ben Newman
92b6d48960 Set disturl safely for meteor npm and Meteor package .npm management. 2017-06-14 12:18:39 -04:00
Michał Powaga
ec78bdb8ce Remove redundant empty line 2017-06-14 15:42:35 +01:00
Michał Powaga
4d106db287 Fix formatting 2017-06-14 15:38:53 +01:00