This will make it much easier to upgrade them and test new versions.
(They are still called from the bundler, so changes to how we access them (eg
source map support) will require modifying tools, but just "upgrade to new
version" now is much easier.)
Some package code is loaded in browsers, which may fail to parse code which uses
'return' or 'throw' as a method name. We used to inconsistently use fut.ret for
this purpose; instead, just consistently use fut['return'] and fut['throw']. We
don't bother to do this in tools code which is definitely never run outside of
Node.
Also remove some unused requires.
Fixes#1222.
some compatibility notes about packages:
- packages now have their own namespaces (rather than needing to
use the global namespace). symbols you want to share should
be declared with an @export comment
- this also means that missing dependencies can hurt you. so don't
leave them out.
- your app's packages (in the 'packages' directory in your app) are
not automatically included in your app; you need to explicitly
run "meteor add" for them. this means that, eg, you can have test
helper packages which are not directly used in your app, but just
used by other packages' tests. (before releasing this, we may
make 'meteor update' fix current apps.)
- the bundle ("star") format has changed
- packages are now built into the "unipackage" format. if this format changes
before we release this code (and commit to the definition of the initial
versions of the formats) you may need to run "meteor rebuild-all"
- __meteor_bootstrap__ has been stripped of everything not related to
executing JS code. Some of what used to be there is now on the WebApp
object.
more detailed docs are likely to come before the 0.6.5 release.
We avoid using Error.prepareStackTrace (which the node source map support also
uses) and do some hacky regexp parsing instead. This way, on the server, we get
the filename/line numbers after source map processing.
On the client we continue to get the compiled version... I guess because source
maps are implemented in the developer tools, not directly into the Error object.
(Probably should have gotten parseStack from tools/buildmessage.js instead.)
unbreaks _getCallerDetails tests.
Note that this is only triggered when coffeescript manages to output invalid JS,
which should be unlikely.
This does remove the feature where lines and columns were suppressed for parse
errors in the output of template compilation. but (a) that shouldn't happen,
and (b) we'll fix this by implementing source maps for spacebars.
It's not used, it doesn't fully work yet, it's incompatible with the static
analysis, and it will make implementing CoffeeScript source maps significantly
more difficult.
The header and footer of the linked file now is generated entirely at link
time. There is no more "boundary" __imports__asfdadsads blob.
Also, fix an inexplicable typo in js_analyze.