Commit Graph

262 Commits

Author SHA1 Message Date
Ben Newman
83b05896c3 Merge pull request #8142 from abernix/feature/fix-7849-stale-cordova-build
Cordova project preparation must occur before copying to the build
2016-12-13 19:01:49 -05:00
Jesse Rosenberger
4a16e649cc Fix console glitch when using some admin package functions
Tiny fix for an old issue where the console output would get corrupted when running `meteor admin set-unmigrated` or `meteor admin change-homepage` due to missing newline on `rawInfo` command.

Fixes meteor/meteor#4054
2016-12-13 15:54:10 +02:00
Jesse Rosenberger
1fda39b3a0 Cordova project preparation must occur before copying to the build
This fixes a regression caused by 88d43a0f16 which is demonstrated in meteor/meteor#7849.

Essentially, with the current implementation some Cordova build elements are "stale" when the build is copied.  For example, if you execute a `meteor run ios` and then `meteor build . --server=http://example.com/` (note: `example.com`) the `config.xml` (`<access origin />`), the boilerplate HTML (`__meteor_runtime_config__`) and other elements of the bundle (`Info.plist` on iOS) will still contain the previously used `http://<local_ip>:3000` address instead of `http://example.com` as they should.

Additionally, it would appear that it's impossible to actually checkout a project and immediately run `meteor build` without running `meteor run (android|ios)` first.

Various work-arounds for this seem to exist, such as running `meteor build` twice, or running `meteor run --server=http://production.com` first.

Ultimately, this is occurring because the bundle is being copied before the Cordova `prepareForPlatform` occurs which I believe was not intended.

There is already a test in place which fails without this fix, but marked as `slow` and therefore not executed on CircleCI.  Specifically, `cordova builds with server options` would have caught this.  Forcibly running this test locally now passes with this change.

Fixes meteor/meteor#7849
Fixes meteor/meteor#7291
Fixes meteor/meteor#6756
2016-12-12 17:11:55 +02:00
Ben Newman
ac86594346 Install npm dependencies automatically when creating apps.
Although I have said I do not think Meteor should run `npm install`
automatically to update application node_modules, my real concern is that
Meteor should not interfere with your preferred node_modules-related
workflow, be it npm, npm-shinkwrap.json, yarn, yarn.lock, checking your
node_modules into git/mercurial/cvs, or whatever other scheme you have.

Automatically installing node_modules from the default package.json file
when a new app is created will eliminate real confusion, and should not
interfere with any workflows, because there is no opportunity to establish
another workflow before Meteor runs `npm install` the very first time.
2016-11-28 12:11:59 -05:00
Ben Newman
41713dacf7 Include meteor npm install in new app instructions.
Thanks to @ptica for this suggestion:
https://github.com/meteor/meteor/issues/8042#issuecomment-260277876
2016-11-14 12:51:00 -05:00
Mehdi AHRAOUI
0466fdd37f Scaffold an official project structure
Scaffold an official project structure
Add --bare option to meteor create

Notice scaffold options on meteor create

add full skeleton

add spaces

remove shell-server package from skew-full + add description of new packages

Add --bare option to meteor create

Notice scaffold options on meteor create

add full skeleton

add spaces

remove shell-server package from skew-full + add description of new packages

improve PR

resolve conflict

Fix rebase

fix static-assets readme

Fix tipo

Remove insecure and auto publish packages

Remove useraccounts-configuration.js

add tests

fix PR
2016-11-11 11:00:33 -05:00
Ben Newman
acc98c7c15 Set NPM_CONFIG_PREFIX to dev_bundle by default. 2016-11-02 19:23:09 -04:00
Ben Newman
31e7b8bb48 Clean up temporary package.json files. 2016-11-02 15:45:04 -04:00
Ben Newman
643a9f12da Move default npm deps install function into own module.
This extraction was necessary because importing tools/cli/commands.js is
not entirely side-effect-free, and was interfering with older tests.
2016-11-02 15:38:39 -04:00
Ben Newman
fd57b86125 Run npm install in test apps even if package.json exists. 2016-11-02 14:18:43 -04:00
Ben Newman
6dcd8b78f2 Run installDefaultNpmDeps whenever creating self-test apps.
Some tests disable the --prepare-app step, but still need babel-runtime
to be installed.
2016-11-02 12:05:33 -04:00
Ben Newman
10f997ae0e Make --prepare-app install default npm deps to fix self-tests.
Tests were broken by the new dependency on the babel-runtime npm
package, but fortunately all those tests run `meteor --prepare-app`
whenever an app is created by a self-test, so this change should fix
most of the breakages.
2016-11-02 12:05:33 -04:00
Ben Newman
b3746d8879 Install basic npm dependencies when running test-packages.
At this point, the only dependencies installed in this way are
babel-runtime and meteor-node-stubs, but that set of packages will
expand in the future as we move more dependencies to npm.
2016-11-02 12:05:33 -04:00
Ben Newman
8fe91e22e7 Set METEOR_ALLOW_SUPERUSER if necessary when springboarding.
Part of #7959.
2016-10-31 13:57:27 -04:00
Jesse Rosenberger
74afdd5daf Don't pass --allow-superuser flags to a springboarded version of Meteor
By removing the `--allow-superuser` and `--unsafe-perm` arguments before springboarding, it prevents older versions of Meteor from objecting to its use.  Catching it at the highest level should be sufficient to discourage root usage as intended in meteor/meteor#7821

Intended to fix...  meteor/meteor#7959
2016-10-31 13:26:04 -04:00
Jesse Rosenberger
3ee8c252bb Fully implement --no-release-check for meteor test
I accidentally a line when I committed/submitted meteor/meteor#7799, as reported in this comment:

https://github.com/meteor/meteor/issues/7026#issuecomment-256728729

The `METEOR_NO_RELEASE_CHECK` environment variable did/does work properly, but both were meant to work.
2016-10-28 16:11:30 -04:00
Ben Newman
50528819cf Change terminology from METEOR_UNSAFE_PERM to METEOR_ALLOW_SUPERUSER.
The --unsafe-perm option is still supported but no longer advertised.
2016-10-28 16:11:29 -04:00
Ben Newman
e4acc36f63 Respect METEOR_UNSAFE_PERM in addition to --unsafe-perm.
This is important for `meteor npm`, since we don't parse or pass through
Meteor-specific command-line arguments when running `meteor npm`.

When METEOR_UNSAFE_PERM is set, its value is now propagated to any npm
commands via the NPM_CONFIG_UNSAFE_PERM variable.

Helps with #7959.
Follow-up to #7821.
2016-10-28 16:11:29 -04:00
Ben Newman
2a14061c6e Merge pull request #7919 from abernix/feature/c9s-package-dir-rename
Add METEOR_PACKAGE_DIRS support and deprecate PACKAGE_DIRS.
2016-10-17 09:50:12 -04:00
Ben Newman
4300d261f3 Support meteor <command> for any dev_bundle/bin/<command> executable.
This will make it easier to use tools like https://yarnpkg.com/ with the
right version of Node, etc.

With this commit, here's all you have to do:

  meteor npm install -g yarnpkg

Then test that it works:

  meteor yarn info

Note that any commands registered by Meteor itself will not be honored.
2016-10-12 13:22:26 -04:00
c9s
3c5059b72a Add METEOR_PACKAGE_DIRS support
- Use path.delimiter to support windows platform
- Add console.warn message when PACAKGE_DIRS is defined
2016-10-12 18:52:58 +03:00
Ben Newman
c969cde1af Merge pull request #7814 from engelgabriel/patch-1
Add --headless option to the build command.
2016-10-07 10:03:38 -04:00
Ben Newman
697e7ae0f7 Protect against null return values from getDevBundleForRelease. (#7841)
Fixes #7838.
2016-09-28 19:54:10 -04:00
Mehdi Ahraoui
2bc5b4b3b6 Meteor should check if is running as root and prevent it on Unix (#7821)
* Prevent running sudo meteor run it on Unix

Prevent running sudo meteor run it on Unix

Fix for all commands

remove empty line

Revert "Prevent running sudo meteor run it on Unix"

This reverts commit d2867561bb6fb1b259a59556628b56a64c677a0b.

improve PR

improve PR

improve PR

fix PR

* improve PR

* fix PR

* fix PR

* fix PR
2016-09-28 09:34:53 -04:00
Jesse Rosenberger
d787654e60 Update help.txt with -s shorthand for --settings flags.
The -s flag is now shorthand for --settings

Related to meteor/meteor#7478
2016-09-28 02:52:11 +03:00
Rishabh Singhal
ec644b729a Use -s as short form of --settings flag 2016-09-25 13:56:58 +05:30
Gabriel Engel
c5b2d6fef4 Add --headless option to the build command
There's no point in spinning the spinner when we're running automated builds, it actually makes the Travis-CI log files get over 4mb.
2016-09-23 16:50:59 -03:00
Ben Newman
da5f6956aa Merge branch 'devel' into release-1.4.2 2016-09-22 14:32:07 -04:00
Ben Newman
3313180a6f Always use dev_bundle/.npm as the cache for meteor npm ... commands.
I believe a strange interaction with the global cache (~/.npm on Unix
systems) may have been the root cause of the problem fixed by this commit:
https://github.com/meteor/meteor/pull/7668/commits/ad61a935146c34e7
2016-09-21 18:53:33 -04:00
Jesse Rosenberger
7097f78926 Add support for --no-release-check to meteor test command
This functionality for the `test` command was overlooked when meteor/meteor#7445 was implemented.

Closes meteor/meteor#7026
2016-09-21 15:59:47 +03:00
Ben Newman
a6b42cc418 Make includeNonCore true by default in getAllNonTestPackageNames. 2016-09-13 13:58:43 -04:00
Ben Newman
b552011180 Revert "Fix #7491 by wrapping child process in script on OSX"
This reverts commit 98aaaed084.

This change is no longer necessary with Node 4.5.0, which was included
with Meteor 1.4.1.
2016-08-18 17:13:48 -04:00
Ben Newman
d6ffff50b5 Recommend meteor update --all-packages after partial update. 2016-08-17 14:53:28 -04:00
Ben Newman
9249985875 Filter --all-packages package names through isIsobuildFeaturePackage. 2016-08-17 14:53:28 -04:00
Yo-An Lin
e326fddafb Add option to skip release check (#7445)
* Add --no-release-check option to skip release check

* Add METEOR_NO_RELEASE_CHECK environment variable
2016-08-17 14:53:27 -04:00
Tom Coleman
2290911723 Added meteor update --all-packages to update indirect dependencies
See #7495. Still some decisions to be made:

 - Should we make --all-packages the default?
 - How should we deal with *new* indirect dependencies?
 - Should we do anything about underpinning indirect dependencies when updating?
2016-08-17 14:53:27 -04:00
Ben Newman
0a58a93490 Allow tests to share .meteor/local/shell with apps.
This change means `meteor shell` will now work when running tests with
`meteor test`.
2016-08-11 19:05:50 -04:00
Ben Newman
4bdc65919d Set $USERPROFILE to the dev bundle directory for meteor {node,npm}.
The node-gyp tool uses `process.env.HOME || process.env.USERPROFILE` to
determine where it should install the .node-gyp directory containing Node
headers and libraries, and we now preinstall that directory at
dev_bundle/.node-gyp/, so (with this change) no download should be
necessary.
2016-08-06 13:46:16 -04:00
Ben Newman
cfa38d1de6 Fix call to nonexistent method buildmessage.hasMessages(). 2016-08-06 13:45:20 -04:00
Ben Newman
c475ffc161 Create .meteor/local directory if necessary for meteor {node,npm}.
Fixes #7546.
2016-08-01 20:37:42 -04:00
Wexpo Lyu
57a28eafff Have meteor update explain how to update cordova packages (#7233) 2016-07-29 23:43:53 +03:00
Tom Coleman
c315861c6c Merge branch 'master' into devel 2016-07-29 23:37:11 +10:00
Tom Coleman
98aaaed084 Fix #7491 by wrapping child process in script on OSX
See https://github.com/meteor/meteor/issues/7491#issuecomment-235887764

NOTE: this issue should be fixed in the next release of node v4
(4.4.8 or 4.5). When we include that in the dev bundle we should
revert this change
2016-07-29 12:23:04 +10:00
Ben Newman
23a3ba0e72 Use getUrlWithResuming for publish-for-arch, and log extraction. 2016-07-28 14:42:45 -04:00
Wexpo Lyu
9581a6920c Update commands.js 2016-07-22 16:10:14 -04:00
Wexpo Lyu
317edd88ab Add a warning when use --production. 2016-07-22 16:10:13 -04:00
Dotan Simha
9003eb47b1 Updated the name of the example for angular 2 2016-07-22 16:10:13 -04:00
Dotan Simha
1c64d3a6da Added Angular2 to the example repositories 2016-07-22 16:10:12 -04:00
Ben Newman
00c05facde Merge branch 'devel' into release-1.4 2016-07-18 14:52:14 -04:00
Ben Newman
39851fc6b0 Use known dev_bundle path for internal npm commands. 2016-07-17 21:26:53 -04:00