Commit Graph

12349 Commits

Author SHA1 Message Date
Emily Stark
028360d2ad Disallow mixed modifier/non-modifier fields in updates
We expect modifiers to be either modifiers or replacements, not a
mix. MongoDB does this check also, but do it in meteor too as a safety
belt.
2014-12-16 14:22:23 -08:00
Emily Stark
a16d0cb71a Disallow EJSON custom types as replacement documents in updates 2014-12-16 14:22:23 -08:00
Emily Stark
7461cab726 Clear password reset tokens on password change 2014-12-16 13:55:28 -08:00
Sashko Stubailo
9b697d0c7b Merge pull request #3225 from dandv/patch-5
Typo fix in Spacebars README
2014-12-16 10:26:46 -08:00
Sashko Stubailo
2fc9abd826 Merge pull request #3253 from ogourment/patch-1
Make deny, allow example clear as to client/server
2014-12-16 10:25:56 -08:00
Sashko Stubailo
49f2818ae2 Merge pull request #3283 from knownasilya/patch-1
Normalize quotes for js skeleton
2014-12-16 10:23:48 -08:00
Sashko Stubailo
7a1f0ae377 Merge pull request #3288 from Primigenus/patch-3
Don't force external links to open in a new tab
2014-12-16 10:20:26 -08:00
Ben Newman
fc52c5fbf5 Small fixes to tools/safe-pathwatcher.js. 2014-12-16 12:34:43 -05:00
Ben Newman
2a7cd3268d Rewrite wrapFsFunc to decide whether to yield automatically. 2014-12-16 12:34:43 -05:00
Ben Newman
02e93d00d7 Allow checking Fiber.yield.disallowed. 2014-12-16 12:32:37 -05:00
Ben Newman
6b8a8ad9d8 Convert path argument to files.pathwatcherWatch. 2014-12-16 12:32:37 -05:00
Slava Kim
d37a2ab5c3 Make pathwatcher calls go through files.js
Conflicts:
	tools/files.js
	tools/safe-pathwatcher.js
2014-12-15 23:55:34 -08:00
Ben Newman
87f4189e11 Avoid pathwatcher.watch failures in testDirectory. 2014-12-16 02:07:40 -05:00
Ben Newman
cf9ad04e17 Console.debug instead of .warn about falling back to fs.watchFile. 2014-12-16 01:51:48 -05:00
David Glasser
c853146b21 "Fix" bizarre memory corruption (?) bug
See #3285.  For some reason, in some mostly-replicatable circumstances,
this is necessary.  Clearly some sort of V8/Node/Fibers bug.
2014-12-15 17:29:49 -08:00
David Glasser
c373120de7 Fix app build for Cordova
Caught by a zillion tests, oops.  But not by --prepare-app!
2014-12-15 17:29:49 -08:00
Slava Kim
eb0f8802ad Fix missing brackets around an if statement 2014-12-15 17:21:25 -08:00
Sashko Stubailo
68808ac288 Merge pull request #3295 from meteor/fs-refactor
Factor out almost all fs. and path. calls in the tool
2014-12-15 16:44:49 -08:00
Sashko Stubailo
e3636087bd Always convert arguments to an array 2014-12-15 16:28:17 -08:00
Slava Kim
d0aaa93519 Fix broken code for dos2unix absolute path conversion 2014-12-15 15:57:05 -08:00
Sashko Stubailo
a2e62e23b5 Add comment explaining existsSync 2014-12-15 15:32:06 -08:00
Sashko Stubailo
e7167e5257 Factor out almost all fs. and path. calls in the tool
This will be useful when we want to be smart with windows file paths later
Also, all of the file calls are asynchronous with fibers now, which comes with
many benefits.

This is a combination of 23 commits. Original messages:
Wrap a large number of fs calls inside files.*

Convert a few more fs calls to files.*

More moving fs.* to files

Implement read/write streams and open/read/close

Get rid of fs from auth.js

Remove fs and unused imports from catalog-local and catalog-remote

Remove unused imports from catalog.js

Replace a whole lot of fs calls

Fix error

Migrate a lot more fs. calls to files.

Add a temporary symlink method

Convert old test to files.*

Use files.pathX instead of path.x everywhere

Replace path.x to files.pathX in tests

Small fixes to files.js and one rename

Make cleanup run in a fiber

Make wrapping functions take function name in case we need it

Add some timeouts and stuff to HCP tests

wrapFsFunc also makes a sync version of the function

Sometimes you just don't want to yield!

Make sure JsImage readFromDisk doesn't yield

Remove unused imports from npm test

Change order of test now that some things don't yield

Fix missing files import, and add a debug error printout
2014-12-15 15:32:06 -08:00
Ben Newman
d3a06930a7 Allow forcing fs.watchFile with an environment variable. 2014-12-15 11:54:59 -05:00
Ben Newman
ddae20cb4b Fall back to fs.watchFile if pathwatcher.watch does not work.
Fixes #3284.
2014-12-15 11:17:50 -05:00
Rahul
29a33fc27f Don't force external links to open in a new tab
Overriding user preference is a bad idea from a usability point of view. Just allow people to decide for themselves whether they want to navigate away to another page or open the link in a new tab using the controls provided them by the browser (eg. cmd-click, or the options in the right click menu).

This also fixes the situation where someone might want to open an external link in the same tab, which is currently made impossible.
2014-12-14 01:04:47 -08:00
Ben Newman
43037f7c37 Add the promise NPM package to the dev bundle. 2014-12-12 17:40:11 -05:00
Ilya Radchenko
a46737b375 Normalize quotes for js skeleton 2014-12-12 09:03:10 -05:00
David Glasser
89a441eede publish in app: don't write, display versions
Typically, there is a delta due to adding the test slice of the
published package, but there's no reason to tell the user about this or
save it in .meteor/versions.
2014-12-11 22:36:45 -08:00
David Glasser
809b2b69f5 Don't compile web.cordova unibuilds unless needed
Specifically, we only compile them if there's a cordova platform in the
current project, or if we are publishing the package.

(Ideally, we wouldn't require every published package to have
web.browser and web.cordova unibuilds --- we'd just publish a 'web'
unibuild unless there's actually a difference between the two. But we
are not there yet.)

This adds an extra flag to isopack-buildinfo.json, so that we know to
rebuild all the isopacks when we add the first cordova platform (or
remove the last cordova platform).

The implementation around publish is a little clunky; if you're in a
non-Cordova app and run meteor publish, it will rebuild all the packages
with web.cordova, and the next time you prepare the app it will rebuild
them again without it. It does work though.

Fixes #3274.
2014-12-11 22:26:29 -08:00
David Glasser
79527ccd9c Don't crash on circular dependency
Previously, we would register the circular dependency error properly
with buildmessage, but then try to build the package with a circular
dependency anyway, leading to a crash.

Fixes #3280.
2014-12-11 21:31:41 -08:00
David Glasser
bc53d5f1e4 Use case in buildmessage titles consistently
Job names should not be capitalized (so they look OK in "While xxx"
messages), and are capitalized by the progress bar.

Fixes #3003.
2014-12-11 14:40:16 -08:00
Utkarsh Upadhyay
51b2c7b997 Do not crash when source plugins conflict
Fixes #3015 and #3180.
2014-12-11 14:20:13 -08:00
David Glasser
92dd5e1e71 Don't make unnecessary cordova unibuild for app
Start on #3274.  Since we don't cache app isopacks to disk, we don't
have to worry about invalidating this.
2014-12-11 14:12:51 -08:00
David Glasser
38c28c14bc Upgrade esprima and escope 2014-12-11 13:44:03 -08:00
David Glasser
576ad32eb2 Nudge console for every compiled source file
This will refresh the status bar more often and make the build tool more
responsive to signals.

Now that yield uses setImmediate, this has minimal effect on
performance.
2014-12-11 12:48:57 -08:00
David Glasser
141acd4200 Tweaks to StatusPoller
- Lower STATUS_INTERVAL_MS from 500 to 50. Note that we were effectively
  doing 150 or 100 anyway: the _pollFiber was polling every 100, and the
  nudged _throttledStatusPoll was actually throttling at the default of
  150, not 500, because the Throttled constructor was being invoked
  incorrectly (without the named 'interval' option).

- Use the same throttler for _pollFiber and nudge.
2014-12-11 12:41:25 -08:00
David Glasser
16af5c4756 Use setImmediate instead of setTimeout for yields
It's faster and still lets IO and signals through.
2014-12-11 12:40:03 -08:00
David Glasser
1e5b7437a5 Refresh catalog only on relevant errors
Fixes #2846.  Fixes #2847. Fixes #2979.

Errors in the build process that could be fixed by refreshing the
catalog now cause the catalog to refresh, assuming we have not already
refreshed it recently and that we are not offline.

These commands now don't need to refresh at startup: remove, run, debug,
create, build, bundle, deploy, test-packages, rebuild, and self-test

It should be OK for create to throw SpringboardToLatestRelease even
without refreshing, since release.latestKnown is still something we know
about.
2014-12-10 19:03:05 -08:00
David Glasser
ace8430567 improve downloader UX
When only downloading 1 package, say which one in the progress bar. When
downloading several, say how many.
2014-12-10 15:26:41 -08:00
David Glasser
0ed8a9b32d bump package versions for a test release release/METEOR@1.0.2-test-spring 2014-12-10 14:50:11 -08:00
David Glasser
d7d51f9dac All downloads use downloadPackagesMissingFromMap
We now can make PackageMaps without a localCatalog, for cases like this
where we really want everything in the map to be downloaded.
2014-12-10 14:42:18 -08:00
David Glasser
44563f13b4 Allow prerelease parts with digits and nondigits
Previously the constraint solver crashed on such things.

Fixes #3147.
2014-12-09 20:33:06 -08:00
David Glasser
6ea8443f30 Update calls to addFiles, onUse, and onTest 2014-12-09 20:18:31 -08:00
David Glasser
e7bfa5202e Update packages to use Package.registerBuildPlugin 2014-12-09 20:09:34 -08:00
David Glasser
21a34a98b3 Show mongod exit message if it started up OK
Fixes "run with mongo crash" test
2014-12-09 19:52:03 -08:00
David Glasser
118e330cba fix deadlock in mongod startup failure
AppRunner.stop needs to be able to cause any Future which the AppRunner
is waiting on to return, so that it can get back to the top level of its
loop and return. (This is because for some reason it is important that
AppRunner.stop does not return until the app is guaranteed to be
stopped.)  This had not been the place for the injected "wait for mongo
to start up before running the AppProcess" future.

This also means we can't use f.future() any more, because that code
assumes that it is the only code allowed to resolve its future (it
unconditionally resolves the future when the wrapped function returns,
which is an error if it is already resolved).

This is tested by 'run errors' which was failing.  Also, the test should
only expect 2 unexpected exit code messages, not 3, since we don't print
the message the first time which didn't have a kill before it.
2014-12-09 19:38:09 -08:00
David Glasser
d3ff3954bf PackageMap only has a local (not layered) catalog
No need to introduce the LayeredCatalog anywhere it's not needed.

Simplify some more things about LayeredCatalog:

- remove unused containingCatalog link from localCatalog to
  layeredCatalog

- because of that, simplify LayeredCatalog initialization to occur after
  localCatalog (no more circular references required)

- drop some other dead LayeredCatalog methods
2014-12-09 18:43:25 -08:00
David Glasser
31a43fc019 prune dead code 2014-12-09 18:30:22 -08:00
David Glasser
c9345ed4ea Delete straggling submodule objects 2014-12-09 14:04:42 -08:00
David Greenspan
f9339a8f26 Merge branch 'blaze-render-with-data-gc' into devel 2014-12-09 13:18:26 -08:00