Commit Graph

86 Commits

Author SHA1 Message Date
Matthew Arbesfeld
fca5c382d5 Merge branch 'release-0.9.1' into cordova-hcp
Conflicts:
	docs/client/api.html
	docs/client/api.js
	meteor
	packages/autoupdate/autoupdate_server.js
	packages/autoupdate/package.js
	packages/constraint-solver/package.js
	packages/less/package.js
	packages/meteor-tool/package.js
	packages/meteor/package.js
	packages/minimongo/package.js
	packages/mongo-livedata/package.js
	packages/oauth1/package.js
	packages/package-version-parser/package.js
	packages/spiderable/package.js
	packages/standard-app-packages/package.js
	packages/templating/package.js
	packages/test-in-console/package.js
	packages/webapp/package.js
	scripts/admin/meteor-release-experimental.json
	scripts/generate-dev-bundle.sh
	tools/uniload.js
2014-08-28 21:13:59 -07:00
Sashko Stubailo
41910019e1 Renamed Deps to Tracker in all packages 2014-08-27 20:05:22 -07:00
Matthew Arbesfeld
c05397be11 Revert "Revert "Bump package versions""
This reverts commit 46ea7dcf30.
2014-08-20 23:08:49 -07:00
Matthew Arbesfeld
46ea7dcf30 Revert "Bump package versions"
This reverts commit 97b389b9d6.
2014-08-20 22:38:09 -07:00
Matthew Arbesfeld
97b389b9d6 Bump package versions 2014-08-20 21:37:56 -07:00
Matthew Arbesfeld
960f8907d3 Merge branch 'packaging' into cordova-hcp
Conflicts:
	packages/constraint-solver/constraint-solver.js
	packages/webapp/webapp_server.js
	tools/tests/package-tests.js
2014-07-25 13:52:34 -07:00
Matthew Arbesfeld
e222e69cca Create a default browser target if one is not specified. 2014-07-22 13:56:47 -07:00
David Glasser
996d347139 Merge branch 'devel' into packaging
Conflicts:
	docs/client/api.html
	docs/client/concepts.html
	docs/client/introduction.html
	meteor
	packages/html-tools/package.js
	packages/spacebars-common/package.js
	packages/webapp/webapp_server.js
	tools/bundler.js
2014-07-21 16:18:25 -07:00
ekatek
b9a714f028 ripping out internal, name and test from package.js files 2014-07-07 20:50:50 -07:00
David Greenspan
3d12c6dbfa Fix a bunch of tests 2014-06-30 20:28:02 -07:00
David Greenspan
e0d6a2ef00 Make events and textareas work! 2014-06-30 17:49:03 -07:00
David Greenspan
ccfbb2910d Make HTML.Visitor stack traces better in Chrome 2014-06-24 00:27:34 -07:00
David Greenspan
14d64c6cfb Minor htmljs README changes 2014-06-23 10:19:18 -07:00
ekatek
fb709c9563 remove versions files from core packages 2014-06-16 22:11:31 -07:00
David Glasser
c5e5305a3b Merge branch 'devel' into packaging
Conflicts:
	tools/bundler.js
	tools/packages.js
2014-06-11 12:02:57 -07:00
David Greenspan
3df4e95845 Merge branch 'devel' into blaze-refactor
Conflicts:
	packages/spacebars-tests/template_tests.js
	packages/ui/domrange.js
2014-05-27 13:38:59 -07:00
David Glasser
2db7490db5 Fix IE8 minification bug
The minifier changed the two uses of HTMLTag into two different symbols:

  var n = function r() {
    var t = this instanceof e.Tag ? this : new r(), n = 0, o = arguments.length && arguments[0];
    return o && "object" == typeof o && o.constructor === Object && (t.attrs = o, n++),
    n < arguments.length && (t.children = Array.prototype.slice.call(arguments, n)),
    t;
  };
  return n.prototype = new e.Tag(), n.prototype.constructor = n, n.prototype.tagName = t,
  n;

Then, IE8 apparently actually creates two separate objects for 'n' and
'r'; see #3 at http://kiro.me/blog/nfe_dilemma.html

So just because n.prototype is an e.Tag doesn't make r.prototype a e.Tag

This means that `new r() instanceof e.Tag` is false, and so the first
line of the function leads to infinite recursion.

I'm not sure if this is an uglify bug as well; dealing well with
multiple declarations of the same function may be out of spec.

Fixes #2037.
2014-05-21 16:19:43 -07:00
ekatek
beb0e59b9d new version files from teh new solver? Also, package.js correct with tests 2014-05-09 17:36:25 -07:00
David Greenspan
eb34ed8a25 Throw error on invalid attribute objects 2014-05-06 13:49:43 -07:00
ekatek
031890d2c5 don't store buildtime deps in the catalog 2014-05-04 16:56:58 -07:00
David Greenspan
e9c388933f Document Blaze.Var, check in doctool.js 2014-04-29 11:05:03 -07:00
David Greenspan
310dcc5528 Finish documenting htmljs (except visitors) 2014-04-28 17:56:42 -07:00
David Greenspan
620adfb141 More docs 2014-04-28 10:36:15 -07:00
David Greenspan
55814cab4c htmljs work 2014-04-28 09:29:31 -07:00
David Greenspan
db6202c69c More HTMLjs docs 2014-04-27 19:16:47 -07:00
David Greenspan
30db75351f Start of new html.js readme (via doctool script) 2014-04-26 11:30:37 -07:00
ekatek
23ad149a78 better versions files 2014-04-25 15:06:45 -07:00
ekatek
10d2047d12 clean up 2014-04-25 15:01:20 -07:00
ekatek
c84c8d6097 alphabetize package version lock files 2014-04-24 18:18:21 -07:00
David Glasser
3d3bdd4f50 versions.json update (these should be sorted!) 2014-04-24 17:02:46 -07:00
David Glasser
fbde0a00a7 Merge branch 'publish-packages' into library-refactor
Conflicts:
	packages/domutils/package.js
	packages/handlebars/package.js
	packages/htmljs/package.js
	packages/liverange/package.js
	packages/spark/package.js
	packages/universal-events/package.js
	tools/bundler.js
	tools/help.txt
	tools/packages.js
	tools/run-app.js
	tools/run-mongo.js
	tools/skel/.meteor/packages
2014-04-24 17:01:36 -07:00
David Glasser
3b21c2d9a7 Merge branch 'devel' into publish-packages
Conflicts:
	packages/domutils/package.js
	packages/handlebars/package.js
	packages/htmljs/package.js
	packages/liverange/package.js
	packages/madewith/package.js
	packages/meteor-developer/meteor_developer_server.js
	packages/preserve-inputs/package.js
	packages/spark/package.js
	packages/universal-events/package.js
	tools/commands.js
	tools/files.js
	tools/help.txt
	tools/packages.js
2014-04-24 16:27:21 -07:00
David Greenspan
5daecb549e Comments 2014-04-24 12:33:19 -07:00
David Greenspan
d96ee0eab2 Rewrite Spacebars optimizer to use Visitors 2014-04-24 12:24:03 -07:00
David Greenspan
8edb5c2da0 Fix rest of tests (for new version of html.js)
Only tested on Chrome.

The "blaze" package is still separate but it shares even more code with "ui" now.
2014-04-23 00:47:57 -07:00
David Greenspan
1e7b91feaa Fix some tests 2014-04-22 15:55:56 -07:00
David Greenspan
43d672bd6a Use refactored html.js in "old" ui-package Blaze
Some failing tests, which are hopefully mostly just tests of the modified code that need to be ported.

The main work was replacing the use of pseudo-attributes $special and $dynamic with the new HTML.Attrs(...) / array representation.  Some functions were also rewritten to use Visitors (`toJS`, old `toHTML`/`toText`/`evaluateAttributes`, `replaceSpecials` in the compiler, but not `optimize` yet or `materialize`).

Create the "blaze-tools" package to hold toJS and other functions that are useful for template parsers/compilers that need to read or generate JS.
2014-04-22 13:47:57 -07:00
ekatek
1f3daac20c remaining versions.json 2014-04-21 19:03:09 -07:00
Avital Oliver
ca46407e5d Properly clean up autoruns on UI.toHTML.
The prior commit didn't stop components of type
`Spacebars.With` correctly.
2014-04-17 03:00:05 -07:00
Avital Oliver
797a080e7f Fix UI.toHTML on templates containing {{#with}}
Originally reported at
https://github.com/meteor/meteor/issues/2007#issuecomment-40530195
2014-04-17 03:00:05 -07:00
ekatek
833d8b3620 adding names and test packages where applicable; wip 2014-04-10 15:04:38 -07:00
David Greenspan
6454067e66 Make Blaze packages internal 2014-04-02 09:56:33 -07:00
David Greenspan
09b9b4adba Tower of hacks to get shark deps right
The implementation is getting really, really ugly.  Just want to get to correctness.

We now stop autoruns not just when started from `materialize` but also `toHTML`, `toText`, and `evaluate`, which is important for HTML attributes.  Reactive regions inside attributes aren't individually autorun; the design is that their dependencies will cause the entire attribute updater to be invalidated and re-run.  In other words, HTML.toText doesn't have internal re-runs but it does register dependencies on the current computation.  In fact, however, the presence of emboxedValues means that there *are* autoruns that need to be stopped, even in toText and evaluate.

The hack where we define a `.materialized()` callback for the benefit of UI.With falls short, because toText et al. don't call it.  The current workaround is yet worse hacks in htmljs (stopWithLater).

Finally, the fact that UI.If, UI.Unless, and Spacebars.include return reactive closures that close over emboxedValues is a problem when those same closures are reused in recalculating attributes.  The intent was that recalculating attributes should tear down any boxes internal to the attribute calculation and start fresh, but when we reuse closures that close over boxes, we are reusing boxes, and if those boxes have been stopped we lose correctness.  The ugly hack to get this to work for now is to have the boxes in If, Unless and include not be per reactive closure but per currentComputation, i.e. per autorun.  Since toText et al. don't normally autorun reactive closures, we add an autorun so that they get their own Computation objects.  This hack is supported by UI.namedEmboxValue and callReactiveFunction.

The good news is that the right answer is buried in here somewhere.
2014-03-21 03:54:28 -07:00
Geoff Schmidt
4d114ef617 Set some (not all, yet) packages to version 1.0.0 2014-03-07 01:33:37 -08:00
David Greenspan
5e85c32ea6 Move asciiLowerCase to html-tools 2014-03-03 15:51:35 -08:00
David Greenspan
f6c766ae06 Start html.js refactor; case-fold at compile time
- Start shrinking html.js down to the 150-line file it can be
- Move "proper case" logic to the template compiler; the tagName of an HTMLjs tag is now in proper case.  This is both for better performance and reduced size and complexity of runtime code (i.e. blaze.js).
- Start moving html-tools to the HTMLTools namespace
2014-03-03 15:51:35 -08:00
David Greenspan
b26f0271a0 Rename HTML.evaluate{Dynamic,}Attributes 2014-01-27 14:44:19 -08:00
David Greenspan
599ac16632 Treat null/undefined/false attributes as absent
So, in HTML, the following are equivalent, and both mean that a checkbox is checked, because the `checked` attribute is present:

- `<input type="checkbox" checked>`
- `<input type="checkbox" checked="">`

We can't mess with that.  On the other hand, in Spacebars before this commit, the following would *also* result in the checkbox being checked, regardless of whether `foo` evaluates to null, undefined, false, or the empty string:

- `<input type="checkbox" checked={{foo}}>`
- `<input type="checkbox" checked="{{foo}}">`

With this commit, the checkbox will NOT be checked if `foo` evaluates to null, undefined, or false.

To achieve this:

- In HTMLjs, an attribute is considered absent if its value is "nully" after being fully evaluated (i.e. after expanding functions and components via HTML.evaluateDynamicAttributes / HTML.evaluate).  A nully value is one consisting of null, undefined, an empty array, or an array of those things.  `false` is not nully and renders as "false".  An empty string is not nully, and will "prop open" an attribute that would otherwise collapse into absence.

- Spacebars.mustache converts null, undefined, and false to null.  So if you use {{foo}} anywhere in a template and foo evaluates to "false", that gets to converted to a null in HTMLjs (which is ignored).  (true is rendered as "true".)

- When parsing HTML, an attribute that consists of *no tokens* becomes an empty string in the HTMLjs, which props open the attribute (unlike null or an empty array).  (Since comment tokens are stripped during tokenization, if there are only comments in an attribute value that counts as no tokens.)
2014-01-27 14:44:19 -08:00
David Greenspan
0a6e9c984f Make tag.toText slightly more correct 2014-01-20 14:17:29 -08:00
David Greenspan
6a4fb19a80 Use correct node.toHTML arguments
for clarity
2014-01-20 14:07:45 -08:00