Commit Graph

7267 Commits

Author SHA1 Message Date
Ben Newman
b7c48ee8ed Bump 1.3 beta release numbers. 2016-02-04 23:48:45 -05:00
Ben Newman
7fb2ffb945 Stop using reserved word 'package' in logic_tests.js. 2016-02-04 23:13:02 -05:00
Ben Newman
ea5ac99593 Upgrade babel-compiler npm dependency meteor-babel to v0.7.1. 2016-02-04 21:37:34 -05:00
Ben Newman
8497c0a5d2 Wrap async function calls with Promise.asyncApply when available. 2016-02-04 17:17:21 -05:00
Ben Newman
e150f6c919 Bump 1.3 beta release numbers.
The beta released with this commit (modules-beta.6) included everything on
the release-1.3 branch up to bdf64da339
("Avoid circular package.json resolution chains.").

Unfortunately, additional commits were pushed to the branch before this
commit was pushed, so the release tag release/METEOR@1.3-modules-beta.6
does not correspond to any commit in the branch history.

Rather than attempting to rewrite the branch history, I decided to amend
this commit with this explanation before pushing it.

To see exactly what was released with the sixth beta:

  git fetch --tags
  git log release/METEOR@1.3-modules-beta.6
2016-02-04 09:58:05 -05:00
David Greenspan
29c3d5fde8 Bump dev_bundle version 2016-02-03 20:34:59 -08:00
David Greenspan
a05b81af8d Merge remote-tracking branch 'origin/devel' into release-1.3
Conflicts:
	History.md
	packages/babel-compiler/.npm/package/npm-shrinkwrap.json
	packages/ecmascript/package.js
	tools/isobuild/compiler.js
2016-02-03 13:31:29 -08:00
Ben Newman
bdf64da339 Avoid circular package.json resolution chains.
Fixes #6114.
2016-02-03 13:21:58 -05:00
ozsayag
a91a1cc787 Refactor static-html to not use jquery
Simply use setAttribute instead.

Fixes #5320
PR #6105
2016-02-03 00:24:07 -08:00
lassombra
85f2958b0b Make #each use _id in object or as getter in object's prototype
Fixes #6124 #6125
2016-02-03 00:20:18 -08:00
Evan Marsland
06d64bfcd4 PATCH HTTP convenience method 2016-02-03 00:17:53 -08:00
Ben Newman
3b7b30dd28 Upgrade babel-compiler npm dependency meteor-babel to v0.6.6.
This fixes Babel.parse, improves Babel.compile cache performance, and
stops forcing strict mode in module files, which fixes problems with
global variable assignments.
2016-02-01 21:39:22 -05:00
David Greenspan
e01ce18a76 Update version of 'source-map' used by plugins 2016-02-01 17:49:36 -08:00
David Greenspan
d3749485be Profile a few more things 2016-02-01 08:45:36 -08:00
David Greenspan
5719d6b611 Profile CSS minification in more detail
Uses the fact that the `Profile` symbol is now exposed to plugins.
2016-02-01 08:45:35 -08:00
David Greenspan
0dab7bdad3 Fix tool source maps (clobbered by coffee-script)
Switching from "require" to "import" in the coffeescript plugin
broke our hack that keeps coffeescript from clobbering our version
of Error.prepareStackTrace, because imports are automatically
hoisted to the top of the file, and thus so are any side effects of
requiring a module.

The new fix has the tool save a copy of the correct
Error.prepareStackTrace so that any plugin that wants to unclobber
Error.prepareStackTrace can do so.

Other, fancier fixes are possible; there's a package called
stack-chain that installs a getter/setter on
Error.prepareStackTrace:
e51a7b2e0f/stack-chain.js (L136)
2016-02-01 08:32:12 -08:00
Ben Newman
3f3aac4fd1 Implement babel-runtime/helpers/slicedToArray, with tests.
Fixes #6076.
2016-01-25 15:17:54 -05:00
Ben Newman
b10e4b84b1 Bump 1.3 beta release numbers. 2016-01-23 13:20:44 -05:00
Ben Newman
4ca721c051 Add tests of Map and Set ...spread elements.
Closes #5980.
2016-01-21 17:33:28 -05:00
Ben Newman
a34ab3b939 Fix tests of bare files. 2016-01-21 17:33:28 -05:00
Ben Newman
a0c2ef5b49 Fix ecmascript tests after Babel 6 upgrade. 2016-01-21 17:33:28 -05:00
Ben Newman
be2905e80f Avoid shadowing the require function in babel-runtime.js. 2016-01-21 15:30:39 -05:00
Ben Newman
3eec30d469 Trust Babel 6 to require("babel-runtime/regenerator") when needed. 2016-01-21 00:21:50 -05:00
Ben Newman
b1aad31fc1 Support require("babel-runtime/...") for compatibility with Babel 6. 2016-01-20 23:32:28 -05:00
Ben Newman
12c946ee65 Allow lazy CSS resources to be imported by JS. 2016-01-19 21:00:48 -05:00
Ben Newman
f0a84785db Better polyfill for Error.captureStackTrace in Meteor.makeErrorType.
The trick of returning an object other than `this` from the constructor
function makes the classes created by Meteor.makeErrorType impossible to
subclass, unless the subclass is very careful to return the same object
from its own constructor.

Fortunately, the only reason we needed an actual Error instance in this
code was to get access to its .stack property, which we can just as easily
borrow from an auxiliary Error object.
2016-01-19 20:52:02 -05:00
Ben Newman
f73a2a968a Move implementation of meteorInstall into modules-runtime.
This allows the modules package to use meteorInstall to define itself.
2016-01-18 18:54:56 -05:00
Ben Newman
3a9907aa3a Provide runtime support for wildcard imports and exports.
Fixes #5872.
Fixes #5897.
2016-01-11 15:18:01 -05:00
Martijn Walraven
bdbdad91d3 Set hash to version when serving manifest.json 2016-01-11 12:50:54 +01:00
Martijn Walraven
ce628dfb81 ETags should be enclosed in double quotes 2016-01-11 11:14:36 +01:00
Ben Newman
211fda2b30 Bump 1.3 beta release numbers. 2016-01-10 16:10:53 -05:00
Ben Newman
6710a8177a Update packages/modules/README.md regarding Meteor package imports. 2016-01-10 15:48:48 -05:00
Ben Newman
0b690a6a25 Bump 1.3 beta release numbers. 2016-01-08 19:49:22 -05:00
Ben Newman
d885a9a796 Stop generating stub modules for imported Meteor packages.
Instead, we rely on the fallback function defined in
meteor/packages/modules/modules.js to resolve meteor/package identifiers
at runtime. The ImportScanner also now warns if no such Meteor package
seems to be available.

Package stubs were a clever hack, but eliminating them means every module
installed by meteorInstall now corresponds to some actual module file.
2016-01-08 19:10:32 -05:00
Ben Newman
0a6324013a Install Meteor packages into virtual node_modules/meteor/ directory.
Previously Meteor packages were installed at /node_modules/<package-name>.
This commit wraps them in an additional directory called "meteor", which
prevents their names from colliding with other installed npm package
names, and also means Meteor package identifiers must now include the
"meteor/" prefix:

  import Blaze from "meteor/blaze"

This change will eventually enable Meteor packages to import npm packages
installed in top-level node_modules directories of apps. That won't work
just yet, though, because the app bundler doesn't yet know anything about
external dependencies imported by packages.
2016-01-08 19:10:31 -05:00
Avital Oliver
fb89e46c8c Small code review changes 2016-01-08 10:52:25 -08:00
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
Avital Oliver
d542ffb1a9 Restore linker variable scanning; Export globals to app.
Prior to this change, linker’s package global variable scanning mechanism was
broken. All package global variables were exposed as full global variables.
This was due to calling `escope`’s `analyzeScope` function with `{sourceType:
"modules"}`.

While at it, fixed incorrect code that exposes `process` on the client. The
previous code seemed to work to work because we were exposing all package globals as
real globals.

Should fix #5870 and #5819
2016-01-08 00:26:24 -08:00
Ben Newman
b7907a2d17 Export global variable from meteor package.
This helps with Node modules that expect `global` to be defined, such as
react-bootstrap (see #5904).
2016-01-07 16:45:55 -05:00
Ben Newman
a1e1d1882d Don't override process.env.NODE_ENV if already defined. 2016-01-07 14:31:20 -05:00
Sashko Stubailo
52c67dd020 Update browser policy README 2016-01-05 15:25: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
Mitar
5b4e1c6d39 Expose SessionDocumentView. 2016-01-04 11:00:19 -08: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