58 Commits

Author SHA1 Message Date
Dylan Piercey
ff3b58d714 Deprecate the partial dynamic tag (#1397) 2019-08-08 16:58:48 -07:00
Taylor Hunt
0f0fd7b1f7 Clean up test noise (#1394)
* Fix warning about differing Node binaries

* Fix npm WARNings on test

* Fix chai deprecation notice

* Fix jsdom <script> parse errors

* Fix jsdom Not Implemented errors
2019-08-07 12:34:00 -07:00
Michael Rawlings
75db499e68
Await tests refactor (#1387)
* update await tests to use promises, move old tests to fixtures-await-callback

* combine render test fixtures and fixtures-async

* remove unused vdom expecatations for deprecated async tests
2019-07-26 19:45:39 -04:00
Michael Rawlings
81f341fe6d
Improve deprecation locations (#1386)
* improve deprecation locations for marko/jquery and marko/ready

* improve location of non-promise await deprecation

* improve taglib deprecation location and add var/vars deprecation
2019-07-19 15:06:46 -05:00
Dylan Piercey
d92c43bebf
Improve errors for root only tags (#1379) 2019-07-08 09:39:29 -07:00
Dylan Piercey
ffe585359b
Add support for dynamic string attributes in vdom and add deprecation warning (#1378) 2019-07-08 09:39:19 -07:00
Dylan Piercey
881f1b8da7
Lazy attributes for dynamic tags (#1365) 2019-06-25 15:01:52 -07:00
Michael Rawlings
ad6ebaabe6 improve vdom render tests and migratable deprecation messages (#1364) 2019-06-24 14:28:58 -07:00
Andrew Gliga
af95c09e94
Merge branch 'master' of github.com:marko-js/marko into body-only-if-tag 2019-06-06 12:20:36 -07:00
Dylan Piercey
6f473701c1
Update htmljs-parser 2019-06-05 11:36:33 -07:00
Dylan Piercey
eaa7024720
Improve for loop auto keying (#1346) 2019-06-05 11:29:29 -07:00
Michael Rawlings
4a73060bc6 Cleanup tests (#1341)
Cleanup tests and add assertions that all deprecated tests log warnings, and all non deprecated tests don't.
2019-05-28 10:54:31 -07:00
Dylan Piercey
263a3783be
Ignore unrecognized tags compiler option now includes @tags (#1335)
* Ignore unrecognized tags compiler option now includes nested @tags
2019-05-17 10:13:49 -07:00
Andrew Gliga
2de447933a Moved all body-only-if tags to deprecated 2019-05-13 09:23:43 -07:00
Andrew Gliga
458ae1b85a
Added null tag to render body 2019-05-10 13:34:39 -07:00
Dylan Piercey
a714074dd1
Fix regression with unary expression printing (#1323)
* Fix regression with unary expression printing
2019-04-30 11:48:23 -07:00
Michael Rawlings
c5a5eab156 Hydrate update (#1317)
* when hydrating, render top down, mount bottom up
2019-04-16 10:37:51 -07:00
Dylan Piercey
6fbf83155e Ensure space when dynamic attributes as string is provided (#1304) 2019-03-28 13:25:23 -07:00
Michael Rawlings
d2a0de5a2e fix <html-comment> tag (#1261) 2019-02-14 16:26:31 -08:00
Dylan Piercey
bfe194d8c9 Implement modern arguments support for dynamic tags (#1259) 2019-02-14 15:12:09 -08:00
Dylan Piercey
cdb60996d5 Fix regression with dynamic attributes as a string on server side (#1257) 2019-02-14 15:11:01 -08:00
Dylan Piercey
9e1577fff4
Migrate legacy macro syntax to tag params 2019-02-07 11:54:00 -08:00
Dylan Piercey
59ce9e8f07
Update <for> to use tag params and add migration (#1238) 2019-02-07 11:53:59 -08:00
Dylan Piercey
24753a7674
Upgrade <await> tag to use tag parameters and attribute tags. Add migration from old syntax. (#1244) 2019-02-07 11:50:49 -08:00
Michael Rawlings
67d10cb596 update test snapshots to reflect new await flushes 2019-02-02 12:13:08 -08:00
Michael Rawlings
91f54c5b9b update render-async tests to show flush points, skip vdom client-reorder tests 2019-02-02 12:13:08 -08:00
Michael Rawlings
086d55af58 Client-reorder handle removed placeholder gracefully. (#1243) 2019-01-29 13:56:35 -08:00
Michael Rawlings
89368b0dab
fix dynamic attribute priority (#1223) 2019-01-07 12:22:34 -08:00
Bhavin Patel
714682edac Migrate unless tag (#1210)
* migrator for unless tag
2018-12-28 13:54:27 -07:00
Dylan Piercey
db5559cde1
Add migrator for include, layout-use and layout-placeholder tags (#1204)
Add migrator for include tag/directive
Add migrator for layout-placeholder tag
Add migrator for layout-use tag
2018-12-27 13:37:08 -07:00
Bhavin Patel
1f5f138504 Migrate legacy dynamic attr (#1202)
Add migrator from dynamic attributes to spread attributes.
2018-12-26 08:08:44 -07:00
Dylan Piercey
b8c662599e
Fix regression with undefined spread attributes (#1201) 2018-12-20 17:00:52 -08:00
Michael Rawlings
1eb2842d23 use TemplateLiteral node 2018-12-03 12:28:56 -08:00
Dylan Piercey
c791afcf12 Fix regression with function in var/assign tags (#1176) 2018-11-27 12:07:29 -08:00
timlauter
f2d8c970da [MARKO-3] - <assign> and <var> tag migration (#1158)
Convert `<assign>` and `<var>` tags to translate to modern Marko features.
2018-11-26 09:22:14 -08:00
Dylan Piercey
e651e689b8
Re-add spread attribute optimization and bail out when repeated @tags present. Prevent dynamic tag from cloning non object attributes. (#1171) 2018-11-21 12:42:52 -08:00
Michael Rawlings
a8ebc62f93
runtimeId (#1123)
* allow custom runtimeId to be passed which allows multiple versions of Marko to run without stepping on eachother
2018-09-10 16:27:36 -07:00
Dylan Piercey
b2cc5cd27c
Remove object.assign from browser code. (#1120) 2018-08-30 15:31:01 -07:00
Michael Rawlings
4937dcd3fc
closes #847 - allow discovering tags where the template name matches the directory (#1117)
* closes #847 - allow discovering tags in the directory structure components/tag-name/tag-name.marko

* add docs for discovering tags with template name matching parent directory
2018-08-28 16:35:22 -07:00
Michael Rawlings
df79fcc5f0
Diffing/Keying fixes (#1094)
* Updates the diffing algorithm to use an HTMLFragment node as an abstraction rather than keeping track of startNode and endNode all throughout the diffing algorithm.

* Uses the HTMLFragment for the <${dynamic}> tag and <include> tags to preserve server-rendered content for which the renderBody is not available in the browser.

* Component ids are based on the resulting parent tree (not the owner tree). This means we cannot rely on the ids in the global lookup, so component key/refs are now also stored on the component instance.

* Static node trees are now only auto assigned a key for the top-level node (instead of all nodes).

* Server comment starting markers now have the component's key serialized so the component can be attached to its owner

* Server comment markers no longer have the id on the closing marker, it is stack based.

* Normalize differences between hydration and client-rendering, so post mount the DOM looks the same regardless of whether a component was server or client rendered.

* fix matching up fragments when hydrating by taking components and normalized text nodes into account

* remove wrapping divs in test, should no longer be needed.  address hydration issue with alternate fragment matching approach.

* add fragment to dom if there's a parentNode even if no startNode

* add test for mismatched hydration

* don't detach components before moving

* use fragments to preserve renderBody content

* use ___finishFragment as the incomplete fragment marker

* ensure fragments get destroyed properly and dom node key sequences don't continue from previous renders

* use parent/owner terminology in more places, component ids are now parent scoped, key/ref components are attached to their owner for both client + server render, server comment boundaries include the owner and the key in addition to the fully scoped component id, autokeyed dom nodes are attached to their parent, hydration now uses a stack: ids in ending comment nodes not needed, hydration checks to see if a component has been initialized and will attach keys directly to the owner if so

* add mutation guards for text/comment nodes, add mutation guard for input value

* make component-pages test better represent streaming hydration, fix html/head/body hydration in a better/more generic way

* add test for async rendered keyrefs

* add test for repeated mult-level transclusion

* Autokeyed elements are now stored on the parent rather than the owner. User assigned key/refs are still stored on the owner component. Because of this, user assigned keys are now prefixed (with @) to differentiate them from autokeys. This also has the benefit that assigning numeric keys can no longer conflict with the autokeys.

* add re-rendering the intermediate container to one of the new tests
2018-08-27 11:46:47 -07:00
Michael Rawlings
671ef757e3
don't render invalid attribute names on the server (#1103) 2018-08-02 11:40:53 -07:00
Dylan Piercey
e4a01a9558 Remove extra parenthesis from compiled javascript. (#1099) 2018-07-26 10:38:21 -07:00
Michael Rawlings
8bcb848297
enable style arrays (#1082) 2018-07-10 13:06:14 -07:00
Michael Rawlings
f48e22c414
Fixes #1078 - don't mutate spread attributes (#1080) 2018-07-10 13:05:14 -07:00
Dylan Piercey
66f7de0530
Fix regression with dynamic tag converting attributes to camelCase. 2018-06-21 13:02:52 -07:00
Michael Rawlings
ec9b644a92
Dynamic class style (#1058)
* fix dynamic tag class/style attributes
* allow object/arrays as class/style attributes in spread attributes
2018-06-20 17:13:27 -07:00
Michael Rawlings
e2fd5b63da
dynamic tag (#1057) 2018-06-19 17:11:54 -07:00
Austin Kelleher
89dfb4ba5c
Fixes #877 - Allow array of transformers in marko.json. (#1034) 2018-04-26 08:48:34 -04:00
Michael Rawlings
6a6d13d50c Fix spread fns #1008 (#1029)
* fix #1008 - parsing of spread attributes that end in function calls
2018-04-03 13:10:07 -07:00
Jason MacDonald
4a7be17af8 Added failing test for #1008 (#1017)
* Added failing test for issue #1008
2018-03-23 12:14:45 -07:00