Commit Graph

15710 Commits

Author SHA1 Message Date
Martijn Walraven
fdebebb7ed Replace deprecated connect.utils.parseUrl() with parseurl module
As recommended in the deprecation warning, we replace
connect.utils.parseUrl() usage with using the parseurl module directly.
2016-01-08 13:24:04 +01:00
Martijn Walraven
21ee605541 Support query parameter to avoid downloading index page when a file does not exist
When downloading files during a Cordova hot code push, we need to
detect if a file is not available instead of inadvertently downloading
the default index page.
2016-01-08 13:23:50 +01:00
Martijn Walraven
0a31dabcd6 Don't set Last-Modified based on the file date
If we serve files with a Last-Modified based on the file date, this
interferes with content-based cache validation using ETag because
clients are required to take both into account.
2016-01-08 13:21:30 +01:00
Martijn Walraven
b8a17dd97f Serve non-cacheable files with a max-age of 0 instead of a day
We previously served non-cacheable files with a max-age of a day. This was done
to avoid image flickering on page reload (see #773).
As far as I can tell, image flickering still occurs because `location.reload`
always forces validation. But switching to `location.replace` means that max-age
will actually be respected, and we don't want to cache these assets for a day
because then changes would not be visible on reloads.
2016-01-08 13:21:29 +01:00
Martijn Walraven
5d501d1793 Update send and connect dependencies for webapp package
Updating send was necessary to allow disabling setting Last-Modified,
and version dependencies required updating connect as well.
2016-01-08 13:21:29 +01:00
Martijn Walraven
5e9090c3ee Use location.replace() instead of location.reload() to avoid unnecessary asset validation
If a cached version of an asset is still fresh (depending on the `max-age`), there
is no need to send even a conditional request. Because `location.reload()` for
some reason does force validation, it makes sense to use `location.replace` instead
and improve reloading performance by avoiding unnecessary requests.
2016-01-08 13:21:29 +01:00
Martijn Walraven
dac580e212 Set ETag header to asset hash if available
Previously, the ETag header was set (by `send`) to a default value based on the
inode of the file. Using the asset hash instead allows for proper conditional
requests even after redeployments.

To take advantage of content-based caching, we also have to disable the
Last-Modified header because having this set to the file date would still make
requests conditional on the most recent deployment. This requires updating the
send dependency and is done in a separate commit.

Fixes #626.
2016-01-08 13:21:29 +01:00
Sheel Patel
a28aa7f95c Fixed incorrect property name in documentation 2016-01-07 22:43:52 -08:00
Doug Horner
3141308108 Override should come after Platform Synchronize
While processing a clean build (ie: meteor reset) this error occurs, because the platform directory exists but it empty.

Processing mobile-config.js
Writing new config.xml
Creating Cordova project
% Creating a new cordova project.
Preparing Cordova project from app bundle
Processing mobile-config.js
Copying resources for mobile apps
Writing new config.xml
Copying over the cordova-build-override directory
Adding platform iOS to Cordova project
% Adding ios project...
Adding plugin cordova-plugin-camera@1.2.0 to Cordova project
% Fetching plugin "cordova-plugin-camera@1.2.0" via npm
% Installing "cordova-plugin-camera" for android
% Failed to install 'cordova-plugin-camera':CordovaError: The provided path "/Users/horner/prj/wodrival/.meteor/local/cordova-build/platforms/android" is not an Android project.
    at new android_parser (/Users/horner/.meteor/packages/meteor-tool/.1.1.10.1g3vmog++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/metadata/android_parser.js:35:15)
    at new PlatformProjectAdapter (/Users/horner/.meteor/packages/meteor-tool/.1.1.10.1g3vmog++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/platforms/platforms.js:61:19)
    at Object.getPlatformProject (/Users/horner/.meteor/packages/meteor-tool/.1.1.10.1g3vmog++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/platforms/platforms.js:97:23)
    at handleInstall (/Users/horner/.meteor/packages/meteor-tool/.1.1.10.1g3vmog++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/plugman/install.js:563:36)
    at /Users/horner/.meteor/packages/meteor-tool/.1.1.10.1g3vmog++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/plugman/install.js:363:28
    at _fulfilled (/Users/horner/.meteor/packages/meteor-tool/.1.1.10.1g3vmog++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/Users/horner/.meteor/packages/meteor-tool/.1.1.10.1g3vmog++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/Users/horner/.meteor/packages/meteor-tool/.1.1.10.1g3vmog++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:749:13)
    at /Users/horner/.meteor/packages/meteor-tool/.1.1.10.1g3vmog++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:509:49
    at flush (/Users/horner/.meteor/packages/meteor-tool/.1.1.10.1g3vmog++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:448:13)
=> Errors executing Cordova commands:
2016-01-07 12:11:52 +01:00
Sashko Stubailo
fdc4b3c6ce Make some more improvements 2016-01-06 18:51:55 -08:00
Sashko Stubailo
35df54c108 Remove parts of docs that are in the Meteor Guide now 2016-01-06 18:51:55 -08:00
Sashko Stubailo
52c67dd020 Update browser policy README 2016-01-05 15:25:17 -08:00
Sashko Stubailo
2efbe2df98 Merge pull request #5937 from mjmasn/5820-allow-middleware-to-set-http-status-code
Allow middleware to set http status code (fixes #5820)
2016-01-05 09:54:17 -08:00
Michael Mason
f263ca4fea Allow middleware to set http status code
This commit allows middleware to set the status code of the http response. This will allow a server-side router to return, for example, a '404 Not Found' response. This has SEO benefits because currently search engines may index example.org/page-that-doesn't-exist because Meteor returns a 200 OK code and the normal boilerplate response body. With a proper 404 status we can still return the boilerplate to render a client side 404 template but search engines won't index the page. Instead of a hardcoded 200 response, we call res.writeHead with res.statusCode, and fallback to the default 200 code if it has not been set.
2016-01-05 11:05:53 +00:00
Sashko Stubailo
4f8d7dce24 Merge pull request #5921 from IeuanG/patch-1
Updated year in licence
2016-01-04 14:50:28 -08:00
Mitar
5b4e1c6d39 Expose SessionDocumentView. 2016-01-04 11:00:19 -08:00
Ieuan Griffiths
57e257c686 Updated year in licence 2016-01-02 12:37:17 +00:00
Sashko Stubailo
353e8e3a4a Merge pull request #5845 from mitar/patch-20
Allow to find the corresponding collection from the store
2015-12-29 11:01:24 -08:00
Sashko Stubailo
0f0c5d3bb3 Merge pull request #5859 from Slava/devel
Add profiling information to clearly outline slow legacy-style compilers
2015-12-29 10:31:28 -08:00
Sashko Stubailo
64be7cf92e Merge pull request #5898 from mitar/patch-21
Correct argument
2015-12-29 10:28:43 -08:00
Sashko Stubailo
9eb952685f Merge pull request #5902 from Primigenus/patch-10
Tiny typo
2015-12-29 10:28:05 -08:00
Rahul
d83235a7d1 Tiny typo 2015-12-29 13:25:22 +01:00
Mitar
a21be1b261 Correct argument. 2015-12-28 15:40:43 +01:00
Martijn Walraven
b11649f7d4 Change bundle version in note to 0.5.20 as 0.5.19 is already in use 2015-12-23 15:46:08 +01:00
Martijn Walraven
aebeebedfd Add note about bundle version 0.5.19 being in use 2015-12-23 15:29:00 +01:00
Ben Newman
ca7c0b9a58 Make ecmascript package enable JSX syntax in .jsx files.
Bumping the version to 0.3.0 because 0.2.x is already used on the
release-1.3 branch.
2015-12-22 11:18:28 -05:00
Slava Kim
d28d3902c1 Add profiling information to clearly outline slow legacy-style compilers 2015-12-21 15:44:16 -05:00
Mitar
aee6d2ef63 Allow to find the corresponding collection from the store. 2015-12-20 12:33:54 +01:00
Sashko Stubailo
482111f731 Merge pull request #5816 from reel/felix/fix-runnerw
fixes the runnerw output problem in non-tty windows console #5798
2015-12-17 10:44:25 -08:00
Sashko Stubailo
7f220c5e8c Merge pull request #5790 from oricordeau/issue-5416
Fix #5416 Include `meteor shell` reference in docs
2015-12-17 00:27:43 -08:00
Avital Oliver
2d83db940b Update History.md after merging #5747 2015-12-16 21:28:28 -08:00
Avital Oliver
a576bda03a Merge branch 'pr/5747' into devel
This makes the Meteor command line tool no longer load parts of the
package catalog from SQLite on app reloads, unless the actual app
dependencies have changed.
2015-12-16 21:18:31 -08:00
Avital Oliver
0376b477a5 Add clarifying comment on improved constraint solver method
Explain a recent change to CS.Input.isEqual that eliminated a very
costly set of SQLite queries against the local package catalog cache
on every app rebuild.
2015-12-16 21:18:07 -08:00
Chris Watts
312a344b8d Skips loading of the dependency cache if nothing has changed.
Excludes the cache from equality check as it shouldn't have changed.
2015-12-16 21:18:07 -08:00
Félix-Antoine Paradis
b0e3a7b7a8 fixes the runnerw output problem in non-tty windows console 2015-12-15 19:48:52 -05:00
Olivier Ricordeau
3dd1d0b632 Fix #5416 Include meteor shell reference in docs 2015-12-13 04:00:24 +01:00
Ben Newman
77b628d723 Upgrade es5-shim to fix #5759. 2015-12-09 14:10:01 -05:00
Ben Newman
f7b2735d23 Reimplement fiberHelpers.parallelEach without explicit Fibers. 2015-12-09 12:06:52 -05:00
Ben Newman
6aec5ef841 Eliminate Fiber from tools/console.js. 2015-12-09 12:06:52 -05:00
Ben Newman
79f82911d0 Avoid having to use Fibers explicitly in buildmessage.forkJoin. 2015-12-09 12:06:52 -05:00
Ben Newman
3cafbc72ac Use async functions to eliminate the need for fiberHelpers.inBareFiber.
The comments for inBareFiber claim that it's for times when you don't want
to inherit the dynamic environment variables of the current Fiber, but
none of the call sites actually relied on this behavior. Still, it may be
worth noting that async functions automatically (and cheaply) inherit the
calling Fiber's dynamics, which is virtually always what you want.
2015-12-09 12:06:51 -05:00
Ben Newman
58fcc8d49e Use an async method to start Mongo in a Fiber. 2015-12-09 12:06:51 -05:00
Ben Newman
2d8fbb6c79 Eliminate Future-related utilities from tools/fiber-helpers.js. 2015-12-09 12:06:51 -05:00
Ben Newman
46e631e099 Eliminate Future from tools/files.js. 2015-12-09 12:06:51 -05:00
Ben Newman
9a466d2efa Eliminate Future from tools/run-mongo.js. 2015-12-09 12:06:50 -05:00
Ben Newman
8f85b1a2b5 Eliminate Future from tools/selftest.js. 2015-12-09 12:06:50 -05:00
Ben Newman
8b71f9986c Eliminate Future from tools/package-client.js. 2015-12-09 12:06:50 -05:00
Ben Newman
b36f8178de Eliminate Future from tools/meteor-npm.js. 2015-12-09 12:06:49 -05:00
Ben Newman
8dffdaeb38 Eliminate Future from tools/main.js. 2015-12-09 12:06:49 -05:00
Ben Newman
d1b9fb1674 Eliminate Future from tools/bundler.js. 2015-12-09 12:06:49 -05:00