Commit Graph

17776 Commits

Author SHA1 Message Date
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
Ben Newman
9a85f0cbb3 Add package version constraints to observe-sequence package.js. 2016-10-11 21:21:43 -04:00
Ben Newman
c7c42b843e Update the optimism npm package to version 0.3.1. 2016-10-11 19:48:29 -04:00
Ben Newman
fe143dd847 Merge pull request #7851 from rodrigopalhares/7850-observer-sequence_null_values
observe-sequence: Bug, array with null values. fixes #7850
2016-10-11 18:59:26 -04:00
Ben Newman
1d375ffb70 Hold off on using optimistic functions in watch.readAndWatchFileWithHash.
This partially reverts commit 96c95629eb.

When running `meteor update`, we call writeReleaseFileAndDevBundleLink
immediately before reading .meteor/release, so there's no time for a file
change notification to invalidate the cached contents of that file.

In the future, we could perhaps call optimisticReadFile.dirty(path) as a
consequence of files.writeFile(path, ...), but that may be tricky.
2016-10-11 11:25:36 -04:00
Ben Newman
c8c4686588 Bump $BUNDLE_VERSION to 4.3.5 before rebuilding dev bundle. 2016-10-11 10:06:35 -04:00
Ben Newman
b594b460a4 Go back to using pathwatcher.watch, with new rewatching logic.
Judging from the variety and extent of test failures, switching to
chokidar.watch was too drastic a change for this late-beta stage of the
release cycle.

The problem with pathwatcher.watch was that watches don't survive the
deletion of the watched file, because (like fs.watch) it watches files
based on inodes, not paths. This problem can be solved in a relatively
narrow way, by attempting to rewatch the file after any "delete" or
"rename" events.
2016-10-11 10:02:06 -04:00
Ben Newman
b814311266 Catch async chokidar.watch errors and suggest raising watch limit. 2016-10-10 17:39:17 -04:00
Ben Newman
0311e76673 Bring back fs.watchFile fallback when chokidar.watch fails.
Especially on Linux, chokidar.watch tends to throw ENOSPC errors when too
many files are being watched.

I removed this logic earlier because I thought chokidar could handle such
failures by itself, but that was wishful thinking.
2016-10-10 17:12:53 -04:00
Ben Newman
96c95629eb Use optimistic functions throughout tools/fs/watch.js. 2016-10-10 15:22:53 -04:00