Commit Graph

17785 Commits

Author SHA1 Message Date
Ben Newman
ccd960eeb3 Bump package versions for 1.4.2-rc.0 release. release/METEOR@1.4.2-rc.0 2016-10-18 14:32:13 -04:00
Ben Newman
6c501b0148 Respect $METEOR_DISABLE_OPTIMISTIC_CACHING for debugging purposes. 2016-10-18 14:25:07 -04:00
Ben Newman
320874989f Implement and use optimisticReadJsonOrNull for better caching.
The problem with optimisticReadFile is that it doesn't cache anything when
the file is missing, because files.readFile throws an ENOENT exception.
2016-10-18 14:05:52 -04:00
Ben Newman
6999bdd99e Revert "Use files.* methods instead of optimistic functions in meteor-npm.js."
This reverts commit b69716d778.

Now that we have a better system for invalidating optimistic results
derived from node_modules paths, these optimizations are safe (and yes
fourseven:scss rebuilds successfully).
2016-10-18 14:05:51 -04:00
Ben Newman
af626a5ed6 Dirty relevant optimistic functions after npm updates. 2016-10-18 14:05:51 -04:00
Ben Newman
30d9a57f0d Allow dirtying optimistic functions by npm package name or path. 2016-10-18 13:26:06 -04:00
Ben Newman
b69716d778 Use files.* methods instead of optimistic functions in meteor-npm.js.
This fixes a bug that prevents fourseven:scss from properly rebuilding,
because the new .../node_modules/node-sass/vendor/<platform>/binding.node
file is not found by Builder#copyDirectory, because the cached results of
optimisticReaddir are the same as before the rebuild.

Unfortunately, this change introduces a small performance regression
(hundreds of milliseconds at worst), because these files.* methods are
called many times.

I think we can continue using optimistic functions here if we are more
careful about invalidating their results, especially after calling
meteorNpm.rebuildIfNonPortable, but I'll save that for a future commit.
2016-10-18 13:02:20 -04:00
Ben Newman
90ece32013 Fix problems in request callback that broke getUrlWithResuming tests. 2016-10-17 15:19:21 -04:00
Ben Newman
30aec9f345 Report an error when HTTP request body is incomplete.
When a download aborts prematurely, the status code is often 200 OK, even
though we probably should not proceed with any further processing of the
downloaded information.

This silent failure leads to problems like the dreaded "Error: ENOENT: no
such file or directory, open... os.json" (#7806 and others), which were
hard to diagnose properly because the failure occurred only later, when
extracting a buffer that downloaded incompletely.

The getUrlWithResuming helper should be able to retry after this error is
thrown, which will result in a more helpful warning, even if in the most
common case, i.e. MaxCDN failure, it will never actually succeed.

Note that this change will not help until Meteor 1.4.2 is officially
released and becomes the implementation used to download later releases.

Mitigates #7806.
2016-10-17 13:52:53 -04:00
Ben Newman
1ac4bbaa84 Bump package versions for 1.4.2-beta.13 release. release/METEOR@1.4.2-beta.13 2016-10-17 11:51:55 -04:00
Ben Newman
c33c68f817 Avoid scanning app node_modules for global variable assignments.
File#computeAssignedVariables is one of the most expensive methods called
during initial startup. This change significantly reduces the number of
times it needs to call through to findAssignedGlobals, which saves quite a
bit of parsing time. The exact savings are hard to quantify, of course,
because they depend entirely on how many modules you have in your app's
node_modules directory.

Scanning for global variable assignments is only really useful in Meteor
packages, where we sometimes need to intercept assignments for the
purposes of api.export, though this is increasingly unnecessary now that
you can (and should) just import values from node_modules.

In the app, the only possible value of intercepting global variable
assignments was to prevent polluting the global scope, but we don't even
create a private scope for the app when useGlobalNamespace is true, so
there really was no point to scanning app node_modules.
2016-10-17 11:51:52 -04:00
Ben Newman
592e2d68d4 Merge branch 'devel' into release-1.4.2 2016-10-17 10:40:26 -04:00
Ben Newman
580e84d64a Merge pull request #7817 from alphanso/iss7794
Separate timeouts for expiration of password reset and enrollment.
2016-10-17 10:02:36 -04:00
Ben Newman
f4db858aa7 Merge pull request #7823 from lucfranken/readme-use-git-checkout-on-app
Readme: Make clear how to run your app with a local checkout of Meteor.
2016-10-17 09:53:44 -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
492021b8df Provide babel-runtime/helpers/defineProperty at runtime. 2016-10-16 16:41:14 -04:00
Ben Newman
7a18012975 Consult babel-runtime package when discarding helper modules.
The most fool-proof way to tell if a module is provided by babel-runtime
is to load babel-runtime as an isopacket and ask it.

This should fix any remaining issues like this one:
https://github.com/meteor/meteor/pull/7668#pullrequestreview-4379559
2016-10-16 16:40:11 -04:00
Ben Newman
dfa8c343ce Export checkHelper function from babel-runtime package. 2016-10-16 16:29:29 -04:00
Ben Newman
8d4ef3f1f7 Only filter out node_modules/babel-runtime/{helpers,regenerator} modules.
This is a refinement of my previous commit 56c041c858.

The Meteor babel-runtime package does not provide substitutes for
babel-runtime/core-js/* modules, so we should not be discarding them from
the client bundle.

Fixes #7930.
2016-10-15 12:01:02 -04:00
Jesse Rosenberger
8de559a967 Change Facebook oAuth param from authType to auth_type
According to the Facebook docs:

https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow

The parameter should be `auth_type`, not `authType`.  A cursory look through their API history didn't show anything about it being changed, but I can confirm that using this feature does not work with `authType` in the current implementation.

Related meteor/docs#94
Related meteor/meteor#7584
Closes meteor/meteor#7078
2016-10-14 20:39:48 -04:00
Ben Newman
693fce59be Merge branch 'release-1.4.2' into devel 2016-10-14 19:10:15 -04:00
Ben Newman
e94d2ad4fc Remove references to node_modules "reference-directly" mode. 2016-10-14 17:01:47 -04:00
Ben Newman
168351c472 Bump package versions for 1.4.2-beta.12 release. release/METEOR@1.4.2-beta.12 2016-10-14 16:47:59 -04:00
Ben Newman
91058b53a7 Allow (junction) symlinking node_modules on Windows.
Hopefully fixes #7830 by ensuring that server node_modules are physically
present in the programs/server/npm directory.
2016-10-14 16:29:35 -04:00
Ben Newman
c572b12f26 Allow Builder#copyDirectory to make junction links on Windows. 2016-10-14 16:25:07 -04:00
Ben Newman
9039f98b30 Make findMongoPort return null if net.connect throws. 2016-10-14 16:24:27 -04:00
Ben Newman
53304c487b Set extraFeatures.jscript on the server too for better caching.
The jscript transform is perfectly safe for server code, and relatively
cheap compared to the cost of having to compile every file for both the
client and the server, just because the set of plugins is different.
2016-10-14 14:49:26 -04:00
Ben Newman
f42ca04fdb Bump package versions for 1.4.2-beta.11 release. release/METEOR@1.4.2-beta.11 2016-10-13 21:46:35 -04:00
Ben Newman
56c041c858 Filter out node_modules/babel-runtime/* when Meteor provides babel-runtime.
Should fix #7872 and others (e.g. #7833).
2016-10-13 19:24:34 -04:00
Ben Newman
5de9070c9c Implement ImportScanner#isWeb convenience method. 2016-10-13 19:24:33 -04:00
Ben Newman
7ea95063b0 Ignore non-top-level identifiers early in Resolver#_resolveNodeModule. 2016-10-13 19:24:33 -04:00
Jesse Rosenberger
ff0d822369 Move History entry about #7821 higher explain further
meteor/meteor#7821 is a breaking change for anyone running the `meteor` tool as `root` right now.  This moves it higher and explain that it's not just a warning.
2016-10-13 14:59:28 -04:00
Ben Newman
ec34a4ecc6 Fix tests by making sure to close optimistic file watchers.
If a test process does not explicitly call process.exit, pathwatcher
watchers may keep it alive indefinitely (either that, or there's a bug
with the persistent:false option to fs.watchFile).

This accidental immortality can be prevented by explicitly closing all
watchers when we no longer have any interest in file change notifications.
2016-10-13 14:09:16 -04:00
Jesse Rosenberger
246563e46c Remove explanation that you need git to compile dependencies
Obvious cat is obvious.  You couldn't have got to this step without `git`.
2016-10-13 14:35:11 +03:00
Jesse Rosenberger
815e32e68b Add METEOR_PACKAGE_DIRS support and deprecate PACKAGE_DIRS
This is a refactor/finishing-move of @c9s's original PR meteor/meteor#7586.

This maintains backward compatibility with PACKAGE_DIRS using the original separator that it expected (':').  Users of the new METEOR_PACKAGE_DIRS variable should use the correct path separator for their platform (`:` on BSD/Linux and `;` on Windows).

Fixes meteor/meteor#7585
Fixes meteor/meteor#4204
2016-10-13 14:26:23 +03:00
Jesse Rosenberger
6da919f434 Don't use $PS1 prompt to indicate cwd. Be more explicit. 2016-10-13 11:55:40 +03:00
Ben Newman
fb2f863a37 Bump $BUNDLE_VERSION to 4.3.6 before rebuilding dev bundle. 2016-10-12 18:12:17 -04:00
Ben Newman
56de90e440 Switch back some optimistic functions in tools/fs/watch.js.
In particular, optimisticReaddir was getting called before relevant dirty
callbacks were firing, and thus failing to notice actual changes on the
file system.

In general, the tools/fs/watch.js code is the one place where we really
need an up-to-date view of the file system. Put another way, if optimistic
functions worked perfectly, we wouldn't need to rely so much on WatchSet
logic, but for now it's a balance of equally important strategies, and we
shouldn't be compromising one by intermingling it with the other.
2016-10-12 18:12:16 -04:00
Ben Newman
ca51aa327b Update the optimism npm package to version 0.3.3. 2016-10-12 13:22:26 -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
ebecfeeb3e Prevent exceptional optimisticReadFile from invalidating Resolver caching. 2016-10-12 11:41:34 -04:00
Jesse Rosenberger
8576e6dcd6 Formatting and Finalization of "Slow Start for Developers"
This is a wrapup/cleanup on @lucfranken's PR to clarify and clean up the "Slow Start (for developers)" section of the README.

The next step will be to move this to a separate file where much more information can be added, but this incorporates most of the original suggestions and adds some additional formatting.
2016-10-12 18:26:15 +03:00
lucfranken
d059f95406 Fix typo in Your local Meteor checkout 2016-10-12 18:26:15 +03:00
lucfranken
fd9594d3a0 Remove reference to local docs which are not available anymore
As discussed in:
https://github.com/meteor/meteor/issues/7824#issuecomment-250106125

The docs are in a separate repository now:
https://github.com/meteor/docs/ and are not included anymore in a
standard checkout from meteor/meteor.
2016-10-12 18:26:15 +03:00
lucfranken
01b902bfb3 Fix missing /meteor part in command 2016-10-12 18:26:15 +03:00
lucfranken
8cd6db7191 Make clear how to run your app with a local checkout of Meteor
The README explained how to run Meteor from a checkout.

The example used is the Meteor docs app which is available in the
Meteor repository itself. However it did not mention how you can run
the local Meteor checkout from a local app.

That is the most basic use case, for example to reproduce a bug. That’s
why an example of that is added based on meteor create so we focus on
creating a clean reproduction. That way we can point to it when people
want to debug their own issue.
2016-10-12 18:26:06 +03:00
Rishabh Singhal
5f0303699a Separate timeouts for expiration of password reset and enrollment 2016-10-12 16:40:44 +05:30
Ben Newman
6bb4bd739b Update the meteor-babel npm package to version 0.13.0. 2016-10-11 22:35:10 -04:00
Ben Newman
3dd94b120a Merge branch 'devel' into release-1.4.2 2016-10-11 21:23:07 -04:00