Commit Graph

64 Commits

Author SHA1 Message Date
Hugh Willson
c55d8cca76 Revert "Revert "Merge pull request #7963 from hwillson/issue-5626" (#8118)"
This reverts commit 5754f8ef3e.
2016-11-30 20:28:21 -05:00
Ben Newman
5754f8ef3e Revert "Merge pull request #7963 from hwillson/issue-5626" (#8118)
This reverts commit 11ce2f7bbc, reversing
changes made to dfde4146f7.
2016-11-30 19:48:19 -05:00
Ben Newman
11ce2f7bbc Merge pull request #7963 from hwillson/issue-5626
Load `program.json` using the Unicode Normalization Form of the loaded JSON string
2016-11-29 18:22:00 -05:00
Hugh Willson
c93756a710 Moved common normalize code into mini-files.js; Added/adjusted tests. 2016-11-03 13:57:17 -04:00
Ben Newman
19fdc5c65f Make npm-rebuild.js more Windows-friendly.
Fixes #8007.
2016-11-03 10:25:55 -04:00
Hugh Willson
d74c7b68ce Updated the Assets API to make sure assetPath strings are normalized (to address issue #5626). 2016-11-03 07:44:12 -04:00
Hugh Willson
68a07c5d3b When the program.json is loaded use the Unicode Normalization Form of the loaded JSON string. 2016-10-25 21:20:23 -04:00
Ben Newman
7bcc50c842 Add profiling for meteorInstall-based require calls.
The options.wrapRequire API is new in install@0.8.2.
2016-10-24 18:48:16 -07:00
Ben Newman
33964e9661 Add profiling for Npm.require calls during server startup. 2016-10-24 18:18:03 -07:00
Ben Newman
8e9896cfcf Include server startup timings in METEOR_PROFILE output.
Meteor 1.4.2 has been mostly focused on improving rebuild times, but what
ultimately matters is the time from changing a file to being able to make
requests against the restarted server, and any code that runs before
server startup should be considered part of that critical path.

If you have a lot of packages, and they do non-trivial work on startup,
this commit should give you much better insight into where time is spent.

Credit to @stubailo for pushing me to provide Meteor developers with
better profiling tools, and thanks to @veered for this specific idea.

Note: because tools/tool-env/profile.js is now loaded as-is by boot.js,
certain ECMAScript features are off-limits, e.g. ...rest params.
2016-10-23 16:36:23 -04:00
Ben Newman
726074689e Don't prepend node_modules/meteor/<package>/ for npm/... directories. 2016-09-22 14:27:31 -04:00
Ben Newman
4618b3d8de Remove --no-bin-links flag from default npm rebuild arguments.
After recent discussion on https://github.com/meteor/meteor/issues/7401,
@glasser and I think the relatively obscure benefit of --no-bin-links is
outweighed by the problems it causes for packages whose rebuild scripts
need executable scripts installed in the node_modules/.bin/ directory.
2016-08-18 16:39:52 -04:00
Ben Newman
3c7f83778f Move server-side component of meteor shell into a package. (#7624)
This will make it much easier to fix bugs and make improvements going
forward, since they won't have to wait for the next release of Meteor.

One functional change: when the parent process exits, it no longer forces
all connected shell clients to disconnect, which is actually a more
convenient behavior, because it gives the clients a chance to reconnect
when/if the server starts up again, and it's easy enough to kill the
clients if that's what you want.
2016-08-11 09:11:40 -04:00
Ben Newman
83b0d90180 Fix multi-line input to meteor shell.
There is unfortunately no way to access the special Recoverable
constructor defined in node/lib/repl.js unless we temporarily use the
defaultEval function, trigger a recoverable error, and capture its
.constructor property. Fortunately we are that clever.

Fixes #7504.
2016-08-03 15:56:34 -04:00
Ben Newman
c94960e7b2 Make $METEOR_NPM_REBUILD_FLAGS override default flags. 2016-07-13 18:12:53 -04:00
Ben Newman
b5005711f4 Support additional meteor rebuild flags via environment variable. 2016-07-13 13:05:30 -04:00
Ben Newman
d2ddd0f98d Pass --no-bin-links to npm rebuild to fix #7401. 2016-07-13 13:05:17 -04:00
Ben Newman
e6acb9f39f Decompose npm-rebuild-args.js.
Helps with #7401.
2016-07-13 13:04:14 -04:00
Ben Newman
084f0cb279 Call npm rebuild --update-binary in npm-rebuild.json. 2016-07-12 19:02:32 -04:00
Ben Newman
61c32e94b4 Make sure meteor shell options JSON is parsed separately.
Also don't ignore the `error` parameter passed to the readJSONFromStream
callback function.

Fixes #7312.
2016-06-28 21:06:52 -04:00
Ben Newman
03516c142a Tolerate non-string results from path.* functions.
In particular, path.isAbsolute returns a boolean value.
2016-06-24 12:16:43 -04:00
Ben Newman
bf2d2dcc9b Use native path.isAbsolute in Node v4.
Part of #6921.
2016-06-24 12:15:08 -04:00
Ben Newman
dce2b20ddb Merge pull request #7033 from meteor/release-1.3.3
Release 1.3.3
2016-06-10 18:18:28 -04:00
Tom Coleman
bb1e1039f8 Added documentation for Assets.absoluteFilePath()
See https://github.com/meteor/meteor/issues/6552
2016-06-08 12:56:32 +10:00
Ben Newman
bae5983d59 Merge branch 'devel' into release-1.3.3 2016-05-27 00:02:48 -04:00
Ben Newman
2f3269f59c Use meteorInstall to define the meteor shell module properly. 2016-05-22 13:01:38 -04:00
Ben Newman
13ff76ffd8 Revert "Use an appropriate module object in meteor shell."
This reverts commit 5aee7a9a09.
2016-05-22 13:01:11 -04:00
Ben Newman
5aee7a9a09 Use an appropriate module object in meteor shell. 2016-05-19 17:04:08 -04:00
Ben Newman
2f0aaa947a Make meteor shell help text robust across Node versions. 2016-05-16 18:21:13 -04:00
Ben Newman
52e2c6a36c Use setImmediate instead of process.nextTick in shell-server.js.
Since process.nextTick fires before IO events, it doesn't give the server
much chance to make progress starting up.
2016-05-16 18:21:13 -04:00
Ben Newman
355e850829 Avoid more uses of fs.exists and fs.existsSync.
Part of #6921.
2016-05-16 18:21:13 -04:00
Ben Newman
d94e7d812d Upgrade dev bundle meteor-promise to 0.7.1. 2016-05-16 18:21:11 -04:00
Wexpo Lyu
ed0e5a4f0c Merge branch 'devel' into patch-10 2016-05-11 11:58:28 +08:00
Wexpo Lyu
368de1ce64 Format fix. 2016-05-03 14:39:33 +08:00
Wexpo Lyu
f3b9567d9d Give a hint when "Cannot find module 'meteor/xxx'" 2016-04-09 09:07:40 +08:00
Ben Newman
2b62539d9f Allow Galaxy users to disable npm rebuild if they really want to.
Part of #6537..
2016-04-08 15:20:09 -04:00
Ben Newman
65c8e65e77 Exit early from npm-rebuild.js when npm-rebuilds.json does not exist. 2016-04-07 13:05:50 -04:00
Ben Newman
c18c1f5278 Replace setup.sh with npm-rebuild.js, and run it on npm install.
Implements https://github.com/meteor/meteor/issues/6537#issuecomment-205954797

The setup.sh script was only sometimes written previously, so no existing
deployment logic should rely on it existing.

On the other hand, all apps built by `meteor build` require running
`npm install` in the programs/server/ directory, so the install hook I
added to programs/server/package.json will ensure npm-rebuild.js is
invoked reliably.

Using a pure Node script means this code will work just as well on Windows
as on Linux or Darwin, though Linux is by far the most common deployment
platform for Meteor apps.

TODO Remember to rebuild the dev bundle before the next release!
2016-04-07 13:05:50 -04:00
Ben Newman
d3e7aa9141 Revert enabling partial paths for files.pathRelative.
This reverts a change I made in 75f9214959.
I thought allowing partial paths would make files.pathRelative more
robust, but it had the unintended consequence of causing #6586.
2016-03-24 13:35:31 -04:00
Ben Newman
75f9214959 Use OS-specific absolute paths with require.resolve. 2016-03-24 00:48:40 -04:00
Ben Newman
420d001b75 Make sure findAppDir uses correct OS paths.
Fixes #6568.
2016-03-23 13:47:49 -04:00
Ben Newman
b8a0340dc9 Fix findAppDir when running from a temp test directory. 2016-03-22 18:13:25 -04:00
Ben Newman
67491a66dd Fix .npm/{package,plugin}/... parsing.
For package dependencies, the node_modules directory immediately follows
the /package/ part of the path, but for plugins the name of the plugin
comes before the node_modules directory.
2016-03-21 19:54:05 -04:00
Ben Newman
299db526f1 Revert "Bump $MIN_NODE_VERSION to v0.10.43."
This reverts commit 6985c47ea7.

Fixes #6533.
2016-03-19 13:13:22 -04:00
Ben Newman
ff023e9c37 Make npmRequire check node_modules paths from control files, too.
Because symlinking is impossible on Windows, and copying node_modules
files is too slow, we can't just symlink/copy all node_modules files into
.meteor/local/build/programs/server/npm like we do for other platforms, so
we have to search for them where they are.

Part of #6500.
2016-03-17 20:59:48 -04:00
Ben Newman
6985c47ea7 Bump $MIN_NODE_VERSION to v0.10.43. 2016-03-17 19:55:29 -04:00
Ben Newman
c79da1be8a Convert module identifiers to OS paths in Npm.require.
Part of #6500.
2016-03-17 02:22:53 -04:00
Ben Newman
f595034e1a Allow npmRequire to load dev bundle and built-in modules. 2016-03-13 23:39:38 -04:00
Eric Dobbertin
134707be68 Add Assets.absoluteFilePath 2016-03-11 15:09:55 +11:00
Ben Newman
40857bdaff Propagate meteorEnv subset of process.env from server to client.
Fixes #6399.
2016-03-08 19:37:57 -05:00