UNPKG

79.1 kBMarkdownView Raw
1# Changelog
2
3All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
5### [4.19.12](https://github.com/marko-js/marko/compare/v4.19.11...v4.19.12) (2020-04-07)
6
7
8### Bug Fixes
9
10* implement missing methods for void-writer ([#1540](https://github.com/marko-js/marko/issues/1540)) ([2806066](https://github.com/marko-js/marko/commit/28060669a421837cec19f35f307f35c0ef636b0e))
11
12### [4.19.11](https://github.com/marko-js/marko/compare/v4.19.10...v4.19.11) (2020-04-06)
13
14### [4.19.10](https://github.com/marko-js/marko/compare/v4.19.9...v4.19.10) (2020-04-03)
15
16
17### Bug Fixes
18
19* regression with nullish values in partial string attribute values ([#1537](https://github.com/marko-js/marko/issues/1537)) ([a469e02](https://github.com/marko-js/marko/commit/a469e020cc60089bae73bf1a311a8e6919bc0ce0))
20
21### [4.19.9](https://github.com/marko-js/marko/compare/v4.19.8...v4.19.9) (2020-03-30)
22
23### [4.19.8](https://github.com/marko-js/marko/compare/v4.19.7...v4.19.8) (2020-03-16)
24
25
26### Bug Fixes
27
28* improve legacy compatibility with getWidgetForEl api ([#1533](https://github.com/marko-js/marko/issues/1533)) ([d5e3a27](https://github.com/marko-js/marko/commit/d5e3a272ae3c02ad48860d5ccddd8a6e2bcba3c9))
29
30### [4.19.7](https://github.com/marko-js/marko/compare/v4.19.6...v4.19.7) (2020-03-13)
31
32
33### Bug Fixes
34
35* prevent issue with range loop iterating in reverse ([#1531](https://github.com/marko-js/marko/issues/1531)) ([cd6459d](https://github.com/marko-js/marko/commit/cd6459dc8d057de0eb88040c81dcf034ae7ca5ad))
36
37### [4.19.6](https://github.com/marko-js/marko/compare/v4.19.5...v4.19.6) (2020-03-13)
38
39
40### Bug Fixes
41
42* spread attrs for native tag preserves case ([#1530](https://github.com/marko-js/marko/issues/1530)) ([f972707](https://github.com/marko-js/marko/commit/f97270746e7580d0d38e3a2a43e585721a256baf))
43
44### [4.19.5](https://github.com/marko-js/marko/compare/v4.19.4...v4.19.5) (2020-03-10)
45
46
47### Bug Fixes
48
49* issue with keys under ssr no-update root ([#1527](https://github.com/marko-js/marko/issues/1527)) ([fd03031](https://github.com/marko-js/marko/commit/fd03031c47881bf5dd7b311dd1fec843c98a1c06))
50* return raw state for legacy widgets ([#1526](https://github.com/marko-js/marko/issues/1526)) ([6905521](https://github.com/marko-js/marko/commit/6905521c875a1ecc18d7afbdfd0ef53df31831c5))
51
52### [4.19.4](https://github.com/marko-js/marko/compare/v4.19.3...v4.19.4) (2020-03-09)
53
54
55### Bug Fixes
56
57* don't serialize component boundary keys if the owner isn't hydrated ([#1525](https://github.com/marko-js/marko/issues/1525)) ([9bf16b8](https://github.com/marko-js/marko/commit/9bf16b81f46abda06e42cbbd9341dd023fdcadc0))
58
59### [4.19.3](https://github.com/marko-js/marko/compare/v4.19.2...v4.19.3) (2020-03-05)
60
61
62### Bug Fixes
63
64* add 'get' API for marko-widgets compat ([#1524](https://github.com/marko-js/marko/issues/1524)) ([095459f](https://github.com/marko-js/marko/commit/095459f43947b8f4be380286bd1f720109a3d86a))
65* improve support for legacy widget for range ([#1523](https://github.com/marko-js/marko/issues/1523)) ([ca4afb9](https://github.com/marko-js/marko/commit/ca4afb98165a063b0b5f85255235b87f332ddf92))
66
67### [4.19.2](https://github.com/marko-js/marko/compare/v4.19.1...v4.19.2) (2020-03-04)
68
69
70### Bug Fixes
71
72* don't serialize input for stateful widgets ([#1522](https://github.com/marko-js/marko/issues/1522)) ([3a14f62](https://github.com/marko-js/marko/commit/3a14f629688645d11b11678bd149a77cadfe745e))
73
74### [4.19.1](https://github.com/marko-js/marko/compare/v4.19.0...v4.19.1) (2020-02-28)
75
76
77### Bug Fixes
78
79* support monkey patching lifecycle methods for legacy widgets ([#1521](https://github.com/marko-js/marko/issues/1521)) ([3056bd1](https://github.com/marko-js/marko/commit/3056bd11a63e2bf36d44657dc8d2ccf2381cfc92))
80
81## [4.19.0](https://github.com/marko-js/marko/compare/v4.18.51...v4.19.0) (2020-02-27)
82
83
84### Features
85
86* all vnodes have owner components ([#1517](https://github.com/marko-js/marko/issues/1517)) ([cb42609](https://github.com/marko-js/marko/commit/cb426099ea83638f5feba85562ba7b56083dac4c))
87
88### [4.18.51](https://github.com/marko-js/marko/compare/v4.18.50...v4.18.51) (2020-02-26)
89
90
91### Bug Fixes
92
93* always include nested contexts when serializing ([#1515](https://github.com/marko-js/marko/issues/1515)) ([c4f28e4](https://github.com/marko-js/marko/commit/c4f28e433cee13f206736c85431975e62b8ceed2))
94
95### [4.18.50](https://github.com/marko-js/marko/compare/v4.18.48...v4.18.50) (2020-02-26)
96
97### Bug Fixes
98
99- non standard template literals filter out null & undefined ([#1514](https://github.com/marko-js/marko/issues/1514)) ([d5fa202](https://github.com/marko-js/marko/commit/d5fa20267b0b0bfc5c835ebdda1c6cb61955c9c7))
100
101### [4.18.49](https://github.com/marko-js/marko/compare/v4.18.48...v4.18.49) (2020-02-26)
102
103### 4.18.48
104
105- Fixes a regression from [#1499](https://github.com/marko-js/marko/pull/1499) which caused `<${dynamic}>` tags with body content to not have their events registered. [#1507](https://github.com/marko-js/marko/pull/1507)
106- Fixes issue with `getEl` being used on a keyed `<${dynamic}>` tag. [#1507](https://github.com/marko-js/marko/pull/1507)
107- Fixes registering event handlers added to a `<${dynamic}>` tag that renders a native element under a split component. [#1507](https://github.com/marko-js/marko/pull/1507)
108
109### 4.18.47
110
111- Deprecate implicit JSON.stringify for attributes, attr toString fix. [#1505](https://github.com/marko-js/marko/pull/1505)
112- Remove data-widget, add warning for non-split, non-stateful widgets. [#1503](https://github.com/marko-js/marko/pull/1503)
113- Flushing improvements. [#1502](https://github.com/marko-js/marko/pull/1502)
114
115### 4.18.46
116
117- Fixed issue with `<init-components>` being rendered under nested async outs. [#1500](https://github.com/marko-js/marko/pull/1500)
118
119### 4.18.45
120
121- Fixed dynamic tags to add data-marko-key for split components [#1499](https://github.com/marko-js/marko/pull/1499)
122- Fixed dynamic tags properly render self-closing tags on the server [#1499](https://github.com/marko-js/marko/pull/1499)
123
124### 4.18.44
125
126- Fix issue with diffing SSR'd `no-update` section. [#1498](https://github.com/marko-js/marko/pull/1498)
127
128### 4.18.43
129
130- No longer serialize input for split legacy widgets. [#1497](https://github.com/marko-js/marko/pull/1497)
131
132### 4.18.42
133
134- Fix regression for unkeyed elements with toggled spread attributes [#1496](https://github.com/marko-js/marko/pull/1496)
135- Fix regression with body-only-if migration for legacy renderers [#1495](https://github.com/marko-js/marko/pull/1495)
136
137### 4.18.41
138
139- Improve support for conditional `w-bind`. [#1494](https://github.com/marko-js/marko/pull/1494)
140- No longer delete `onBeforeDestroy` and `onBeforeUpdate` from legacy widget prototypes. [#1494](https://github.com/marko-js/marko/pull/1494)
141- Fix regression with registering event handlers for SSR content under a `no-update`. [#1493](https://github.com/marko-js/marko/pull/1493)
142
143### 4.18.40
144
145- Fix issue with the `ignoreUnrecognizedTags` compiler option with `<@attribute>` tags inside of a `<${dynamic}>` tag. [#1491](https://github.com/marko-js/marko/pull/1491)
146- Improve support for legacy widgets by allowing for custom `init` method on prototype. [#1490](https://github.com/marko-js/marko/pull/1490)
147- Removes some unused properties that were serialized with legacy widgets [#1489](https://github.com/marko-js/marko/pull/1489)
148- Improves consistency with `...spread` attributes onto native tags. [#1488](https://github.com/marko-js/marko/pull/1488)
149 - Now turns `camelCase` properties into `dash-cash`
150 - Now omits `renderBody` properties.
151- Improves `this.el` warning for legacy widgets. [#1487](https://github.com/marko-js/marko/pull/1487)
152- Fixes an issue with nested `no-update`'s around components not initializing properly. [#1486](https://github.com/marko-js/marko/pull/1486)
153
154### 4.18.39
155
156- Support overriding the 'ready' method in legacy widgets. [#1484](https://github.com/marko-js/marko/pull/1484)
157
158### 4.18.38
159
160- Fix regression with ssr'd components under 'no-update' not initializing. [#1483](https://github.com/marko-js/marko/pull/1483)
161
162### 4.18.37
163
164- Fix regression with no-update-body on textarea tags. [#1482](https://github.com/marko-js/marko/pull/1482)
165
166### 4.18.36
167
168- Fix issue for legacy widget rerenders not preserving props. [#1481](https://github.com/marko-js/marko/pull/1481)
169- `no-update` will now preserve elements rendered from the server side. [#1480](https://github.com/marko-js/marko/pull/1480)
170
171### 4.18.35
172
173- Improve support for legacy split widgets. [#1477](https://github.com/marko-js/marko/pull/1477)
174
175### 4.18.34
176
177- Improve legacy widgets assigning into state causing a replace instead of merge. [#1476](https://github.com/marko-js/marko/pull/1476)
178
179### 4.18.33
180
181- Fix event name case normalization for legacy components with `w-on`. [#1475](https://github.com/marko-js/marko/pull/1475)
182
183### 4.18.32
184
185- Return the component id if no key is passed to getElId/elId. [#1474](https://github.com/marko-js/marko/pull/1474)
186- Support having nullish keys in the legacy (v3) renderer. [#1473](https://github.com/marko-js/marko/pull/1473)
187
188### 4.18.31
189
190- Fix legacy render lifecycle order to match marko-widgets@6. [#1472](https://github.com/marko-js/marko/pull/1472)
191
192### 4.18.30
193
194- Fix regression with browser remap for legacy widgets. [#1471](https://github.com/marko-js/marko/pull/1471)
195
196### 4.18.29
197
198- Fixed regression which was causing getTemplateData to be serialized.
199- Refactor helpers, fix circular deps, improve code splitting [#1468](https://github.com/marko-js/marko/pull/1468)
200- Remove unused deps, update package-lock [#1469](https://github.com/marko-js/marko/pull/1469)
201- Fixed typo in example output [#1463](https://github.com/marko-js/marko/pull/1463)
202
203### 4.18.28
204
205- Allow support for `<state>` tag and calling `setState` on null state [#1460](https://github.com/marko-js/marko/pull/1460)
206
207### 4.18.27
208
209- Allow empty `<@catch>` in `<await>` [#1456](https://github.com/marko-js/marko/pull/1456)
210
211### 4.18.26
212
213- Improve errors emitted from AsyncWriter
214
215### 4.18.25
216
217- Better async stack traces in dev [#1453](https://github.com/marko-js/marko/pull/1453)
218
219### 4.18.24
220
221- Remove circular dep for dom weakmaps. [#1449](https://github.com/marko-js/marko/pull/1449)
222- Fix invalid deprecation message for core-tags on windows. [#1448](https://github.com/marko-js/marko/pull/1448)
223
224### 4.18.23
225
226- Allow `<macro>` nested under `<if>`. [#1445](https://github.com/marko-js/marko/pull/1445)
227
228### 4.18.22
229
230- Improve legacy compatibilty layer by exposing `widgetProps` on the `data` object. [#1443](https://github.com/marko-js/marko/pull/1443)
231- Improve getComponentByEl lookup to prefer owner components. [#1444](https://github.com/marko-js/marko/pull/1444)
232
233### 4.18.21
234
235- Fix issue where duplicated attributes were not being included properly in compiled templates. [#1442](https://github.com/marko-js/marko/pull/1442)
236
237### 4.18.20
238
239- Fix initialization edge-case for top-level async components. [#1441](https://github.com/marko-js/marko/pull/1441)
240
241### 4.18.19
242
243- Deprecate `$global.widgetIdPrefix` (should use `$global.componentIdPrefix` instead). [#1439](https://github.com/marko-js/marko/pull/1439)
244- Improve support for rollup by removing usage of `require.resolve`. [#1440](https://github.com/marko-js/marko/pull/1440)
245- Update minimum version of htmljs-parser to bring in patch release for parsing css calc values.
246
247### 4.18.18
248
249- Adds a missing method used by part of the legacy compatibility layer.
250
251### 4.18.17
252
253- Fix issue with async out of order components initializing in the wrong order [#1436](https://github.com/marko-js/marko/pull/1436)
254- Improvements to the legacy compatibility layer [#1437](https://github.com/marko-js/marko/pull/1437)
255
256### 4.18.16
257
258- Fix top-level components throwing error on hydrate [#1428](https://github.com/marko-js/marko/pull/1428)
259- Ensure scripts only have one text node as a child [#1429](https://github.com/marko-js/marko/pull/1429)
260
261### 4.18.15
262
263- Improve support for conditional comments spanning multiple comments. [#1427](https://github.com/marko-js/marko/pull/1427)
264- Add a check for loading precompiled templates. [#1426](https://github.com/marko-js/marko/pull/1426)
265
266### 4.18.14
267
268- Improve support for running multiple versions of Marko on the page. [#1418](https://github.com/marko-js/marko/pull/1418)
269- Add migration for `component.elId` when used in a place where `:scoped` is recommended. [#1413](https://github.com/marko-js/marko/pull/1413)
270- Fix issue where static regexps in the template would output differently than dynamic ones. [#1412](https://github.com/marko-js/marko/pull/1412)
271- Improve `marko.json` definitions for core/html tags [#1411](https://github.com/marko-js/marko/pull/1411)
272
273### 4.18.13
274
275- Improve support for consuming v3 components via webpack. [#1410](https://github.com/marko-js/marko/pull/1410)
276
277### 4.18.12
278
279- Improve autocompletion for core tags. [#1405](https://github.com/marko-js/marko/pull/1405)
280- Fix issue when using `getComponentForEl` with split components. [#1400](https://github.com/marko-js/marko/pull/1400)
281
282### 4.18.11
283
284- Fix server-rendered conditional widgets in the compatibility layer. [#1395](https://github.com/marko-js/marko/pull/1395)
285- Deprecate the partial dynamic tag. [#1397](https://github.com/marko-js/marko/pull/1397)
286
287### 4.18.10
288
289- Improve migration for `getInitialState` with legacy widgets. [#1385](https://github.com/marko-js/marko/pull/1385)
290
291### 4.18.9
292
293- Legacy compat fixes [#1383](https://github.com/marko-js/marko/pull/1383)
294 - Temporary fix to ensure `getComponents` doesn't return `null` entries - these should really be removed from the `lookup` instead
295 - Use a `for...in` loop to extend the `BaseComponent` (doesn't support getters properly) to maintain the same behavior as `marko-widgets`
296 - Ensure that the original `input` for a widget is what gets serialized, not the result of `getTemplateData` (which is called again when hydrating)
297
298### 4.18.8
299
300- Fixes an issue where `require("marko/components").getComponentForEl` could return undefined when a component exists, or the wrong component, when nested fragments are present. [#1382](https://github.com/marko-js/marko/pull/1382)
301
302### 4.18.7
303
304- Fixes a regression from 4.18.6 that could cause some body content to be omitted from the output [#1380](https://github.com/marko-js/marko/pull/1380)
305- Adds deprecated string dynamic attributes to the vdom runtime for improved legacy compatibility [#1378](https://github.com/marko-js/marko/pull/1378)
306
307### 4.18.6
308
309- Migration does not add `id:scoped` when migrating a repeated `w-id` [#1377](https://github.com/marko-js/marko/pull/1377)
310- Fixes an issue diffing the selected option within an optgroup [#1376](https://github.com/marko-js/marko/pull/1376)
311- Fixes component tracking for client-reorder [#1375](https://github.com/marko-js/marko/pull/1375)
312- Improve the migration for legacy `<for>` syntax [#1374](https://github.com/marko-js/marko/pull/1374)
313- Add migration for named classes in the template [#1372](https://github.com/marko-js/marko/pull/1372)
314
315### 4.18.5
316
317- Fix issue with invoke tag migration when a inline control flow is used [#1366](https://github.com/marko-js/marko/pull/1366)
318
319### 4.18.4
320
321- Lazily evaluate attributes for dynamic tags [#1365](https://github.com/marko-js/marko/pull/1365)
322
323### 4.18.3
324
325- Fix `registerTaglib`: use correct function call [#1363](https://github.com/marko-js/marko/pull/1363)
326- Fix tryonline: correct paths and no `taglibImports` [#1360](https://github.com/marko-js/marko/pull/1360)
327- Migration fix: [#1364](https://github.com/marko-js/marko/pull/1364)
328- Migration improvement: deprecation warnings that are automatically migratable now have a `MIGRATION` heading [#1364](https://github.com/marko-js/marko/pull/1364) (also included test improvements)
329- Migration improvement: remove empty `<layout-put>` tags [#1355](https://github.com/marko-js/marko/pull/1355)
330
331### 4.18.2
332
333- Fixes an issue where fragments could remove nodes from their siblings [#1359](https://github.com/marko-js/marko/pull/1359)
334
335### 4.18.1
336
337- Fixes a regression with `body-only-if` and a legacy control flow attribute [#1356](https://github.com/marko-js/marko/pull/1356)
338
339### 4.18.0
340
341- Added dynamic tags to act like body-only-if. If dynamic tags are null then the outer tag will not be rendered. However, the body will be rendered. Deprecated body-only-if [#1332](https://github.com/marko-js/marko/pull/1332)
342
343## 4.17.x
344
345### 4.17.5
346
347- Fix issue where setting the `value` attribute of a textarea to `false` caused the string `"false"` to be used in the vdom. [#1348](https://github.com/marko-js/marko/issues/1348)
348
349### 4.17.4
350
351- Updates htmljs-parser to fix an issue with comments inside inline scriptlets.
352- Fix some issues with for loop auto keying. [#1346](https://github.com/marko-js/marko/issues/1346)
353- Fix error when using a non string as a key (now logs a deprecation). [#1344](https://github.com/marko-js/marko/issues/1344)
354
355### 4.17.3
356
357- Fix issue were `getEls` would not work with repeated keys for split components. [#1343](https://github.com/marko-js/marko/issues/1343)
358
359### 4.17.2
360
361- Fix regression with namespaces in nested fragments. [#1340](https://github.com/marko-js/marko/issues/1340)
362
363### 4.17.1
364
365- Allow emitting events while the parent is mounting. [#1336](https://github.com/marko-js/marko/issues/1336)
366- Fix issue where `component.el` and `component.getEl` could return a marker node. [#1339](https://github.com/marko-js/marko/issues/1339)
367
368### 4.17.0
369
370- Element namespaces are now calculated at runtime, fixes some edge cases with the dynamic tag. [#1333](https://github.com/marko-js/marko/issues/1333)
371
372## 4.16.x
373
374### 4.16.15
375
376- Fix an issue where nodes may be preserved if another node with the same key was rendered as preserved. [#1334](https://github.com/marko-js/marko/issues/1334)
377- Improve the `ignoreUnrecognizedTags` compiler option to ignored nested `@tags` on unrecognized tags (removes the need for the `escapeAtTags` option). [#1335](https://github.com/marko-js/marko/issues/1335)
378
379### 4.16.14
380
381- Prevent treating macro usage with parameters as a component. [#1326](https://github.com/marko-js/marko/issues/1326)
382
383### 4.16.13
384
385- Fixes a regression with printing nested unary expressions (eg typeof). [#1323](https://github.com/marko-js/marko/issues/1323)
386
387### 4.16.12
388
389- fix destorying a component that has already removed some top-level nodes [#1321](https://github.com/marko-js/marko/issues/1321)
390- fix components runtime path after refactor released in 4.16.11 [#1322](https://github.com/marko-js/marko/issues/1322)
391
392### 4.16.11
393
394- Fixes a regression (syntax) in IE 11 introduced in 4.16.10
395
396### 4.16.10
397
398- Hydrating components now consistently render from the top down. [#1317](https://github.com/marko-js/marko/issues/1317)
399
400### 4.16.9
401
402- Fixes an issue where legacy widgets could loose a reference to their parent components. [#1311](https://github.com/marko-js/marko/issues/1311)
403
404### 4.16.8
405
406- Fixes an issue with hot-reload. [#1282](https://github.com/marko-js/marko/issues/1282)
407- If the require hook is enabled, all templates loaded by marko will now use the require hook, including hot-reloaded templates and tags loaded from compiled templates. [#1310](https://github.com/marko-js/marko/pull/1310)
408
409### 4.16.7
410
411- Improve parsing of tag arguments (allows for `<${input.renderBody}(...spread)/>`). [#1308](https://github.com/marko-js/marko/pull/1308)
412
413### 4.16.6
414
415- Fix issue with hydrating legacy Marko 3 widgets from the server. [#1306](https://github.com/marko-js/marko/pull/1306)
416
417### 4.16.5
418
419- Fix regression with legacy dynamic attributes when a string without whitespace is used. [#1304](https://github.com/marko-js/marko/pull/1304)
420- The `disabled` property on buttons is now properly synced with the template. [#1303](https://github.com/marko-js/marko/pull/1303)
421
422### 4.16.4
423
424- Fix regression with migrating legacy `<macro>` syntax with a magic `renderBody` variable. [#1300](https://github.com/marko-js/marko/pull/1300)
425
426### 4.16.3
427
428- Fix issue with migrating `<var>` and `<assign>` with `widget` properties. [#1298](https://github.com/marko-js/marko/pull/1298)
429
430### 4.16.2
431
432- Fix issue with nested fragments (often as dynamic tags) that were adjacent in the DOM not hydrating properly. [#1294](https://github.com/marko-js/marko/pull/1294)
433- Remove redundant portion of keys for `<macro>` tags within `<for>` loops. [#1295](https://github.com/marko-js/marko/pull/1295)
434
435### 4.16.1
436
437- Fix regression for `:no-update` on dynamic tag html attributes. [#1292](https://github.com/marko-js/marko/pull/1292)
438
439### 4.16.0
440
441- Add `<marko deprecated-no-create-or-input-for-top-level-hydrate />` option to revert to pre `4.9.0` hydrate behavior. [#1289](https://github.com/marko-js/marko/pull/1289)
442
443## 4.15.x
444
445### 4.15.6
446
447- Fix regression in older browsers caused by using `string.startsWith` in the runtime code.
448
449### 4.15.5
450
451- Allow syntax that Marko does not understand (but esprima does) to pass through in the arguments syntax. [#1286](https://github.com/marko-js/marko/pull/1286)
452- Fix issue with `<title>` inside of an `<svg>` using the wrong namespace. [#1284](https://github.com/marko-js/marko/pull/1284)
453
454### 4.15.4
455
456- Forward errors from `<await client-reorder>` to the parent out to prevent potential unhandled rejections. [#1275](https://github.com/marko-js/marko/pull/1275)
457
458### 4.15.3
459
460- Fix false positive deprecation message for legacy nested tag syntax. [#1271](https://github.com/marko-js/marko/pull/1271)
461
462### 4.15.2
463
464- Improve the webpack server-bundling experience by guarding a legacy (lasso-specific) api that uses a dynamic require and causes a warning to be emitted. [#1267](https://github.com/marko-js/marko/pull/1267)
465
466### 4.15.1
467
468- Improve support for using raw functions as event handlers by not outputing `data-marko` content for components that will rerender in the browser. [#1262](https://github.com/marko-js/marko/pull/1262)
469
470### 4.15.0
471
472The most notable change here is to the `<for>`, `<macro>` and `<await>` core tags. These tags previously each relied on custom syntax to implement an API that was not possible to do in userland when they were introduced. Generic solutions for these problems has arrived in the form of [attribute tags](https://markojs.com/docs/syntax#attribute-tag) and [tag parameters](https://markojs.com/docs/syntax#parameters).
473
474With these new features in place and currently available in userland we set out to normalize these existing tags, hopefully making the learning process for Marko a little easier, and also promoting the use of these new features. We've also spent time formalizing some best practices, and highlighting this new syntax in the documentation on the [markojs.com](https://markojs.com) website.
475
476The existing syntax will continue to be supported until Marko 5 and will currently log a deprecation warning. For these deprecations and most others you can automatically migrate existing code using the [marko migrate](https://github.com/marko-js/cli/blob/master/packages/migrate/README.md) cli tool.
477
478- Updated documentation with guides and changes to syntax/core tags. [#1260](https://github.com/marko-js/marko/pull/1260)
479- Modernize the [`<for>` tag](https://markojs.com/docs/core-tags#for). [#1238](https://github.com/marko-js/marko/pull/1238)
480- Modernize the [`<await>` tag](https://markojs.com/docs/core-tags#await). [#1244](https://github.com/marko-js/marko/pull/1244)
481- Modernize the [`<macro>` tag](https://markojs.com/docs/core-tags#macro). [#1227](https://github.com/marko-js/marko/pull/1227)
482- Deprecated legacy top level imports (jquery/ready) and compiler option tags (recommended to use marko.json instead). [#1258](https://github.com/marko-js/marko/pull/1258)
483- Modern arguments support for the dynamic tag. [#1259](https://github.com/marko-js/marko/pull/1259)
484- Improves parsing inside of the `<html-comment>` tag to support the same style of content as actual html comments. [#1261](https://github.com/marko-js/marko/pull/1261)
485- Ignore only whitespace content inside of concise mode tags (including `class` and `style`) which would previously error. [#1256](https://github.com/marko-js/marko/pull/1256)
486- Fixes a regression with passing a string literal as a `${dynamic}` attribute and add a deprecation warning. [#1257](https://github.com/marko-js/marko/pull/1257)
487
488## 4.14.x
489
490### 4.14.25
491
492- Fix regression with non standard template literals (`"stuff ${placeholder}"`) that have escaped content such as newlines [#1254](https://github.com/marko-js/marko/pull/1254)
493
494### 4.14.24
495
496- Fix regression in `<await>` that caused flushing to not occur in all cases [#1252](https://github.com/marko-js/marko/pull/1252)
497
498### 4.14.23
499
500- Fix warning that `"marko"` was using deprecated features. [#1250](https://github.com/marko-js/marko/pull/1250)
501- Improve code optimization for conditional `@nested` tags. [#1249](https://github.com/marko-js/marko/pull/1249)
502
503### 4.14.22
504
505- Fix issue with `no-update` not moving preserved items [#1247](https://github.com/marko-js/marko/pull/1247).
506- Fix regression with include tag migration where `<include(data())>` has side effects. [#1246](https://github.com/marko-js/marko/pull/1246)
507- Treat importing tags the same as using them in the template (uses `load` api instead of `require` when configured). [#1245](https://github.com/marko-js/marko/pull/1245)
508- Gracefully handle async client-reorder when nodes are missing during hydrate. [#1243](https://github.com/marko-js/marko/pull/1243)
509
510### 4.14.21
511
512- Update `htmljs-parser` to improve parsing regexes [htmljs-parser #61](https://github.com/marko-js/htmljs-parser/pull/61)
513
514### 4.14.20
515
516- Add new `<tag|params|>` support and migrator for old syntax/flag [#1236](https://github.com/marko-js/marko/pull/1236)
517- Remove unneeded deprecation warning when using `component` within a template [#1235](https://github.com/marko-js/marko/pull/1235)
518
519### 4.14.19
520
521- Fixes walking into some AST nodes which was causing some migrations to not be as effective [#1233](https://github.com/marko-js/marko/pull/1233)
522
523### 4.14.18
524
525- Fixes [#1230](https://github.com/marko-js/marko/issues/1230) - regression with include tag migration outputing invalid identifiers [#1231](https://github.com/marko-js/marko/pull/1231)
526- Add migration for legacy nested tag syntax [#1129](https://github.com/marko-js/marko/pull/1129)
527
528### 4.14.17
529
530- Fixes [#1219](https://github.com/marko-js/marko/issues/1219) - transitive widget getEl and events [#1225](https://github.com/marko-js/marko/pull/1225)
531- Importing a marko template adds it to tags meta (fixes regression with `<include>` tag) [#1226](https://github.com/marko-js/marko/pull/1226)
532
533### 4.14.16
534
535- Add migration for non-standard template literals. [#1224](https://github.com/marko-js/marko/pull/1224)
536- Fix regression with dynamic attribute migration. [#1223](https://github.com/marko-js/marko/pull/1223)
537
538### 4.14.15
539
540- Improve migrating `widget` references to `component` in attributes. [#1220](https://github.com/marko-js/marko/pull/1220)
541
542### 4.14.14
543
544- Fix regression with `eval`ing class names in debug mode. [#1218](https://github.com/marko-js/marko/pull/1218)
545
546### 4.14.13
547
548- Support file name migrations with Marko migrate. [#1216](https://github.com/marko-js/marko/pull/1216)
549- Skip `id:scoped` when migrating w-id for custom tags. [#1217](https://github.com/marko-js/marko/pull/1217)
550
551### 4.14.12
552
553- Add migrator for `w-config` attribute. [#1214](https://github.com/marko-js/marko/pull/1214)
554- Add migrator for and deprecate `unless` tag/directive. [#1210](https://github.com/marko-js/marko/pull/1210)
555
556### 4.14.11
557
558- Fix regression with `w-body` tag. [#1213](https://github.com/marko-js/marko/pull/1213)
559
560### 4.14.10
561
562- Add migrator for `ref` attribute. [#1207](https://github.com/marko-js/marko/pull/1207)
563- Fix regression with `var` tag and `w-body/include` tags. [#1212](https://github.com/marko-js/marko/pull/1212)
564
565### 4.14.9
566
567- Add migrator for layout tags and include tag/directive. [#1206](https://github.com/marko-js/marko/pull/1206) & [#1204](https://github.com/marko-js/marko/pull/1204)
568- Add migrator for `<script template-helpers>` and `<script marko-init>`. [#1209](https://github.com/marko-js/marko/pull/1209)
569
570### 4.14.8
571
572- Add migrator from w-body to dynamic tag. [#1199](https://github.com/marko-js/marko/pull/1199)
573- Add migrator from dynamic attributes to spread attributes. [#1202](https://github.com/marko-js/marko/pull/1202)
574
575### 4.14.7
576
577- Fix regression for `widget.elId` migration. [#1198](https://github.com/marko-js/marko/pull/1198)
578
579### 4.14.6
580
581- Add a whitelist of files to publish to NPM. [#1197](https://github.com/marko-js/marko/pull/1197)
582
583### 4.14.5
584
585- Add `getTemplateData` migrator. [#1195](https://github.com/marko-js/marko/pull/1195)
586- Add migrators for most of the `w-*` attributes. [#1190](https://github.com/marko-js/marko/pull/1190)
587- Add basic legacy widget migration. [#1192](https://github.com/marko-js/marko/pull/1192)
588
589### 4.14.4
590
591- Fix regression with `setProps` on legacy compatibility layer. [#1193](https://github.com/marko-js/marko/pull/1193)
592
593### 4.14.3
594
595- Move `w-on` compatibility to the migrate stage. [#1186](https://github.com/marko-js/marko/pull/1186)
596- Legacy compatibility (v3) improvements. [#1189](https://github.com/marko-js/marko/pull/1189)
597- Specially handle template literals in templates. [#1188](https://github.com/marko-js/marko/pull/1188)
598
599### 4.14.2
600
601- Convert the `<async-fragment>` transformer into a migrator. [#1185](https://github.com/marko-js/marko/pull/1185)
602
603### 4.14.1
604
605- Fix regression causing some parsed javascript nodes to be omitted from output. [#1184](https://github.com/marko-js/marko/pull/1184)
606
607### 4.14.0
608
609- Add migration stage, deprecate rendering with `out`, deprecate control-flow directive as attributes. [#1180](https://github.com/marko-js/marko/pull/1180)
610- parse = parseRaw + normalize [#1179](https://github.com/marko-js/marko/pull/1179)
611- parse nonstandard string with placeholder to TemplateLiteral node, transpile template literals. [#1179](https://github.com/marko-js/marko/pull/1179)
612- add new parse api
613
614## 4.13.x
615
616### 4.13.13
617
618- Fix regression: parsing of `if` statements without braces (in scriptlets & otherwise). [#1175](https://github.com/marko-js/marko/pull/1175)
619- Fix regression: `<var>` and `<assign>` tags with non-standard placeholders in normal string attributes. [#1176](https://github.com/marko-js/marko/pull/1176)
620
621### 4.13.12
622
623- `<invoke>` tag translates to modern Marko scriptlet (or dynamic tag). [#1165](https://github.com/marko-js/marko/pull/1165)
624- `<assign>` tag translates to modern Marko scriptlet. [#1158](https://github.com/marko-js/marko/pull/1158)
625- Imperative rendering in scriptlets translates to modern Marko dynamic tag. [#1174](https://github.com/marko-js/marko/pull/1174)
626
627### 4.13.11
628
629- Add spread attribute optimization, fix issue with spreading non objects. [#1171](https://github.com/marko-js/marko/pull/1171)
630- Move `#` to the start of `:scoped` attributes (allows for `href:scoped="#name"`). [#1172](https://github.com/marko-js/marko/pull/1172)
631
632### 4.13.10
633
634- Adds a hidden api used to make [@marko-tags/context](https://github.com/marko-js/tags/tree/master/tags/context) possible. [#1168](https://github.com/marko-js/marko/pull/1168)
635
636### 4.13.9
637
638- Improve support for [arc]() by normalizing file system names with square brackets. [#1166](https://github.com/marko-js/marko/pull/1166)
639
640### 4.13.8
641
642- Quick patch for `4.13.7` that removes a `let` assignment. [#1153](https://github.com/marko-js/marko/pull/1153)
643
644### 4.13.7
645
646- Prevent treating components with tag params being treated as implicit components. [#1149](https://github.com/marko-js/marko/pull/1149)
647
648### 4.13.6
649
650- Prevent mutating component input when using a single spread attribute with repeated @tags. [#1142](https://github.com/marko-js/marko/pull/1142)
651- Fix for include tag hydration when transcluded. [#1143](https://github.com/marko-js/marko/pull/1143)
652
653### 4.13.5
654
655- Add additional reference to fragment nodes which resolves an issue with IE. [#1130](https://github.com/marko-js/marko/pull/1130)
656
657### 4.13.4
658
659- Remove Object.assign calls in the browser. [#1120](https://github.com/marko-js/marko/pull/1120)
660
661### 4.13.3
662
663- Propagate errors to express automatically with the `res.marko` api. [#1119](https://github.com/marko-js/marko/pull/1119)
664- Support multi line import statments. [#1118](https://github.com/marko-js/marko/pull/1118)
665
666### 4.13.2
667
668- Allow discovering tags where the template name matches the directory name [#1117](https://github.com/marko-js/marko/pull/1117):
669
670```
671components/
672 tag-name/
673 tag-name.marko
674 tag-name.style.css
675```
676
677### 4.13.1
678
679- Remove es2015 features from runtime. [#1115](https://github.com/marko-js/marko/pull/1115)
680
681### 4.13.0
682
683#### PR #1094
684
685**Introducing HTMLFragment**
686
687- 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.
688- 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.
689
690**Changes to keys**
691
692- 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.
693- 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 to differentiate them from autokeys. This also has the benefit that assigning numeric keys can no longer conflict with the autokeys.
694- Static node trees are now only auto assigned a key for the top-level node (instead of all nodes). This is because:
695 - When updating, only the top-level node is considered.
696 - When static nodes are hoisted out of the render method, they are not associated with the owner component
697
698**Changes to Hydration**
699
700- Server comment starting markers now have the component's key serialized so the component can be attached to its owner
701- Server comment markers no longer have the id on the closing marker, it is stack based.
702- 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.
703
704## 4.12.x
705
706### 4.12.4
707
708- Don't render invalid attribute names on the server [#1103](https://github.com/marko-js/marko/pull/1103)
709
710### 4.12.3
711
712- Removes extra parentheses in output javascript for expressions that Marko does not understand.
713
714### 4.12.2
715
716- Fixes automatic keying of elements/components in `for()` attribute loops
717
718### 4.12.1
719
720- Fix #1022 - transcluded keys don't match, stateful component not preserved [#1086](https://github.com/marko-js/marko/pull/1086)
721
722### 4.12.0
723
724- Tag params [#1076](https://github.com/marko-js/marko/pull/1076)
725- Style arrays [#1082](https://github.com/marko-js/marko/pull/1082)
726- Fix #1075 - cannot compile dynamic tag at root with user key [#1081](https://github.com/marko-js/marko/pull/1081)
727- Fix #1078 - mutating spread attributes [#1080](https://github.com/marko-js/marko/pull/1080)
728
729## 4.11.x
730
731### 4.11.5
732
733- Add fallback location for compile-time deprecation warnings
734
735### 4.11.4
736
737- Fixes an issue with scoped attributes automatically setting keys in a problematic way [#1069](https://github.com/marko-js/marko/pull/1069)
738- Fixes #1059 and #1052 - `Cannot read property 'nextSibling' of null`
739
740### 4.11.3
741
742- Fixes #952
743- Fixes automatic keying of elements/components in `<for>` loops
744
745### 4.11.2
746
747- Fixes another regression in the `<${dynamic}>` tag where `dashed-case` attributes were being converted to `camelCase` when rendering html elements.
748
749### 4.11.1
750
751- Fixes a regression in `<${dynamic}>` tags for object/array class/style attributes:
752 ```marko
753 $ const style = { color:'blue' };
754 <${tagName} style=style/>
755 ```
756- Allows dynamic attributes defined using `...spread` to include object/array class/style [#933](https://github.com/marko-js/marko/pull/933):
757 ```marko
758 $ const attrs = { style:{ color:'blue' } };
759 <tag ...attrs/>
760 ```
761- Fixes issue where object/array class/style attributes could not be used with `...spread` [#1007](https://github.com/marko-js/marko/pull/1007):
762 ```marko
763 $ const attrs = {};
764 <tag class=["oops"] ...attrs/>
765 ```
766
767### 4.11.0
768
769- Implement #880: `<${dynamic}>` tag
770- `<include>` should be considered deprecated. Formal deprecation warning to come.
771
772## 4.10.x
773
774### 4.10.1
775
776- Fix issue with calling `require('marko/components').init(components)` multiple times.
777
778### 4.10.0
779
780- Fix #1049 Fix documentation urls on the website.
781
782## 4.9.x
783
784### 4.9.7
785
786- Fix #1038 Legacy compatibility dirty check returning false positives.
787
788### 4.9.6
789
790- Fix #1008 Spread attribute now supports functions (`..attrs()`) [#1029](https://github.com/marko-js/marko/pull/1029)
791
792### 4.9.5
793
794- Fix `onBeforeUpdate` timing for legacy component layer [#1027](https://github.com/marko-js/marko/pull/1027)
795
796### 4.9.4
797
798- Fix breaking older browsers with es6 object shorthand notation [bc0e91d5](https://github.com/marko-js/marko/commit/bc0e91d517d7b8de484c745a5734f15347ed0d26)
799
800### 4.9.3
801
802- Fix import-var compilation when there are no explicit attributes [#1002](https://github.com/marko-js/marko/pull/1002)
803
804### 4.9.2
805
806- Fixes collisions with multiple Marko runtimes on the same page. [#1019](https://github.com/marko-js/marko/pull/1019)
807- Switch to using prettier and eslint. [#1016](https://github.com/marko-js/marko/pull/1016)
808
809### 4.9.1
810
811- Fixes an issue with keyed elements not getting properly removed. [#1013](https://github.com/marko-js/marko/pull/1013)
812
813### 4.9.0
814
815- Fixes related to hydration, split components, and the legacy compatibility layer [#1010](https://github.com/marko-js/marko/pull/1010)
816
817- Fix paths for vdom dependencies [#1011](https://github.com/marko-js/marko/pull/1011)
818
819## 4.8.x
820
821### 4.8.0
822
823- Add `once-[event]` directive [#990](https://github.com/marko-js/marko/pull/990)
824
825- Improve testing setup [#989](https://github.com/marko-js/marko/pull/989)
826
827## 4.7.x
828
829### 4.7.5
830
831- Update docs for advanced attribute definition [#968](https://github.com/marko-js/marko/pull/968)
832
833- Improve error message for async rendering [#958](https://github.com/marko-js/marko/pull/958)
834
835### 4.7.4
836
837- Make jQuery optional for legacy components [#951](https://github.com/marko-js/marko/pull/951)
838
839### 4.7.3
840
841- Prevent onRender running on the server for legacy widgets
842
843### 4.7.2
844
845- Fixes [#946](https://github.com/marko-js/marko/issues/946) - don't put legacy init code in a separate lasso bundle
846
847- Fixes allowing conditionally binding to different roots in a legacy widget [#944](https://github.com/marko-js/marko/pull/944)
848
849### 4.7.1
850
851- Fix issue with multiple top level elements being removed twice. [#940](https://github.com/marko-js/marko/pull/940)
852
853### 4.7.0
854
855- Add jQuery legacy compatibility layer support [#937](https://github.com/marko-js/marko/pull/937)
856
857- Reorganize Marko tests [#934](https://github.com/marko-js/marko/pull/934)
858
859- Switch to using jsdom in test suite [#935](https://github.com/marko-js/marko/pull/935)
860
861- Decouple component hydration from Lasso [#929](https://github.com/marko-js/marko/pull/929)
862
863## 4.6.x
864
865### 4.6.0
866
867- Fixes [#914](https://github.com/marko-js/marko/issues/914) and [#920](https://github.com/marko-js/marko/issues/920) -
868 Resolves top-level component bugs
869
870- Setup `marko.load()` to prefer precompiled templates from [marko-cli](https://github.com/marko-js/marko-cli)
871
872- Various compiler changes to improve [marko-migrate](https://github.com/marko-js/marko-migrate)
873
874- Fixes [#916](https://github.com/marko-js/marko/pull/916) - Add Marko debug mode.
875 Adds babel plugin to remove and statically evaluate 'MARKO_DEBUG' literals for
876 adding deprecation warnings and hints for the runtime without a performance
877 penalty for production builds.
878
879## 4.5.x
880
881### 4.5.6
882
883- Fixes [#909](https://github.com/marko-js/marko/issues/909) - Fix condition preventing bubbling DOM events from properly being attached to a component.
884
885### 4.5.5
886
887- Add 10 Awesome Marko Features article to documentation
888
889### 4.5.4
890
891- Fixes [#904](https://github.com/marko-js/marko/issues/904) - The loop status variable is not compiling when the equal sign is padded in spacing
892
893### 4.5.3
894
895- Fixes [#903](https://github.com/marko-js/marko/issues/903) - Special unicode chars (\u2028 and \u2029) need to be escaped if within script tag
896
897### 4.5.2
898
899- Fixes [#899](https://github.com/marko-js/marko/issues/899) - Keyed element could be incorrectly removed after DOM diffing/patching in case of HTML element mismatch for elements with the same key. [PR #900](https://github.com/marko-js/marko/pull/900)
900
901### 4.5.1
902
903- Fixes [#893](https://github.com/marko-js/marko/issues/893) - Keyed element could be incorrectly removed after DOM diffing/patching in case of HTML element mismatch for elements with the same key. [PR #894](https://github.com/marko-js/marko/pull/894) by [@westtrade](https://github.com/westtrade)
904
905### 4.5.0
906
907Summary of changes across all beta releases for the `4.5.0` release:
908
909- Fixes [#886](https://github.com/marko-js/marko/issues/886) - Write component initialization code when async out and all of its nested async outs finish
910- Fixes [#854](https://github.com/marko-js/marko/issues/854) - Make every .marko file a UI component ([PR #855](https://github.com/marko-js/marko/pull/855))
911- Added support for the `:scoped` modifier on attributes and deprecated `:key`:
912
913```marko
914<label for:scoped="name">Name</label>
915<input id:scoped="name" value="Frank"/>
916```
917
918- Fixes [#817](https://github.com/marko-js/marko/issues/817) - Support dynamic root elements
919- Marko no longer attaches `id` attributes to elements for purposes of keyed matching
920 - Keyed elements are maintained in an internal, per-component lookup
921- Keys are now assigned to all custom tags and HTML elements at compile-time to improve reliability and performance of DOM diffing
922- Optimized internal bookkeeping required during rendering a UI component tree (no more UI component stack)
923- DOM diffing/patching changes:
924 - Significant performance improvements
925 - morphdom is now UI component-aware
926
927### 4.5.0-beta.3
928
929- Fixes [#854](https://github.com/marko-js/marko/issues/854) - Make every .marko file a UI component ([PR #855](https://github.com/marko-js/marko/pull/855))
930
931### 4.5.0-beta.2
932
933- Add ids for any key when component.elId/getElId is used as an attribute value
934- Use indexOf instead of includes to support Node 4
935- [docs] Fixes [#841](https://github.com/marko-js/marko/issues/841) - `docs/components.md` refers to deprecated "data" variable [#842](https://github.com/marko-js/marko/pull/842)
936
937### 4.5.0-beta.1
938
939- Add back (legacy) support for component.elId + key in template
940- Fixes [#837](https://github.com/marko-js/marko/issues/837) - Update esprima to the latest to support async/await and ES2017 inside of components. ([PR #839](https://github.com/marko-js/marko/pull/839))
941- Fixes key/scope for attributes that have dashes in the name
942
943### 4.5.0-beta.0
944
945- Fixes [#817](https://github.com/marko-js/marko/issues/817) - Support dynamic root elements
946- Marko no longer attaches `id` attributes to elements for purposes of keyed matching
947 - Keyed elements are maintained in an internal, per-component lookup
948- Keys are now assigned to all custom tags and HTML elements at compile-time to improve reliability and performance of DOM diffing
949- Optimized internal bookkeeping required during rendering a UI component tree (no more UI component stack)
950- DOM diffing/patching changes:
951 - Significant performance improvements
952 - morphdom is now UI component-aware
953
954## 4.4.x
955
956### 4.4.28
957
958- fix undefined reference error in Component.js
959- Increase mocha timeout to avoid CI build's failing [#821](https://github.com/marko-js/marko/pull/821)
960
961### 4.4.27
962
963- Add ability to update globals by setting new input.
964- [docs] Remove unneeded command from installation docs
965- [docs] Update installing.md
966
967### 4.4.26
968
969- Add better interop for importing modules with default exports [#803](https://github.com/marko-js/marko/pull/803)
970
971### 4.4.25
972
973- Fixes #778 - Fix Marko compiler generating incorrect path for requires on Windows.
974
975### 4.4.24
976
977- [docs] Update installing.md
978
979### 4.4.23
980
981- Fixes #796 - Fix events for event targets that are SVGElementInstance types in IE11.
982- Used shortcut for escapeAtTags;
983- Added `escapeAtTags` options in order to render `<@tags>` as they are;
984- simplify a condition judgement in components-jquery
985- Fixes #790 - Class tag should not allow nested body content.
986- Update `compile/index.js` test description
987- Update handleRootNodes.js [#747](https://github.com/marko-js/marko/pull/747)
988- [docs] Fix reference to lifecycle section in docs.
989
990### 4.4.22
991
992- Fixes #784 - Fix compiled preserve-attrs path.
993- [testing] Fix express tests [#779](https://github.com/marko-js/marko/pull/779)
994- [docs] Update webpack.md
995
996### 4.4.21
997
998- Updated description in `package.json`
999
1000### 4.4.20
1001
1002- update bindComponentVar to use dynamic location
1003- updating location of bindComponent helper
1004
1005### 4.4.19
1006
1007- [testing] Fix key suffix test assertions.
1008- Address key suffix feedback. Additional tests.
1009- [morphdom] Removed bad and unhelpful optimization to avoid infinite loops
1010- [morphdom] Ensure `onBeforeNodeDiscarded` is only called once by looking to see if the node is still attached.
1011- [morphdom] Infinite loop fix in morphdom
1012- Fixes #761 - component.elId() does not work on the server
1013- Fixes #755 - Allow diffing of HTML, head, and body. [#756](https://github.com/marko-js/marko/pull/756)
1014- [docs] Updated component docs
1015- [docs] Use relative link for image
1016- [testing] User default npm version for each Node.js version
1017
1018### 4.4.18
1019
1020- Fixes #749 #690 - Do not rely on root node having an ID on rerender and properly handle style root nodes.
1021
1022### 4.4.17
1023
1024- Put package (`browser.json`) deps before others and parent deps before child deps [#750](https://github.com/marko-js/marko/pull/750)
1025- [docs] Fix typo in redux.md
1026- [docs] Add redux document to structure.json
1027- [docs] Add doc describing how to use Redux with Marko.
1028
1029### 4.4.16
1030
1031- Fix duplicate body variable
1032
1033### 4.4.15
1034
1035- Fixes #739 - Should not attempt to check instanceof of type Map if it does not exist in the browser.
1036- Added build scripts
1037
1038### 4.4.14
1039
1040- Fixes issue with renderToString not rendering text nodes
1041
1042### 4.4.13
1043
1044- Fixes #721 - Add a Code of Conduct
1045- Fixes #655 - Implement renderToString in the browser.
1046
1047### 4.4.12
1048
1049- Fixes #695 - Always ignore unrecognized tags for XML files when using the compiler.
1050- Fixes #705 - Throw error when the root HTML element is a component and has a dynamic id attribute.
1051- [testing] Additional test for root node with dynamic id of a component with a component.js file.
1052
1053### 4.4.11
1054
1055- Fixes #728 - Do not use module keyword because webpack compiles it to a custom object.
1056- Fixes #719 - Support Express 4 and Express 5.
1057- fixes #658 by removing empty style blocks [#715](https://github.com/marko-js/marko/pull/715)
1058- fixes #688 - add reference to browser.json in meta dependencies
1059- [docs] Fix broken link
1060- [docs] Fix Marko syntax in docs causing compilation errors on the website.
1061- [docs] Change pixels to percent in doc images.
1062- [testing] Purge express cache so that express tests both use correct module versions.
1063
1064### 4.4.9
1065
1066- Revert "Fixes #705 - Throw error when the root HTML element has a dynamic id …"
1067- [testing] Only run Node 4, 6, & 8 in travis
1068
1069### 4.4.8
1070
1071- [docs] Clean up why-is-marko-fast.md
1072- [docs] Clean up marko-vs-react.md
1073
1074### 4.4.7
1075
1076- Add silent option to browser-refresh and hot-reload
1077- Check id attribute for Literal. Update error message to include error page.
1078- Fixes #705 - Throw error when the root HTML element has a dynamic id attribute.
1079- [docs] Clean up components.md
1080- [docs] Fix typo in webpack.md
1081- [testing] give extra time for test timing out in travis
1082- [testing] run tests on node 8
1083- [testing] ignore test-dist from coverage
1084
1085### 4.4.6
1086
1087- Fixes #693 - [SSR] Improved handling of top-level UI components with renderBody func
1088- Switching to using `prepublish` with npm@5
1089
1090### 4.4.3
1091
1092- Use parent module to require express patch [#701](https://github.com/marko-js/marko/pull/701)
1093- [docs] Reference app should point to "marko-lasso" because "ui-components-playground" does not contain lasso
1094- [docs] Add articles section to docs.
1095
1096### 4.4.2
1097
1098- Build fixes related to compiler
1099
1100### 4.4.0
1101
1102- Improve no-update-if condition check
1103- Compatibility improvements for Try Online
1104- Code size reduction
1105- Introduced src/ and dist/ folders for optimized production builds
1106- Fixes #695 - Default to ignoring unrecognized tags for XML files.
1107
1108## 4.3.x
1109
1110### 4.3.1
1111
1112- Add basic test for ensuring that res.marko returns a promise.
1113- enable res.marko can catch a error safe
1114
1115### 4.3.0
1116
1117- [compiler] Added more control over how attributes are targeted to props
1118- Don't add root markers to tags that don't produce output
1119- [docs] Added docs for Marko + Huncwot integration
1120- [AST] Added `node.removeChildren()`
1121- Extend marko globals with defaults
1122
1123### 4.3.0-beta.4
1124
1125- Fixes #673 - Circular dependency is causing problems with Webpack
1126
1127### 4.3.0-beta.3
1128
1129- Changes related to #670 - Globals must be serialized earlier to allow early mount of UI components in
1130- [docs] Improved docs for SSR
1131
1132### 4.3.0-beta.2
1133
1134- Fixes for #670 - Add support for serialized globals and retain globals on re-render
1135
1136## 4.2.x
1137
1138### 4.2.8
1139
1140- Bug: Fixes [#661](https://github.com/marko-js/marko/issues/661) - Component initialization code may end up in the wrong place
1141- Bug: Fixes [#668](https://github.com/marko-js/marko/issues/668) - Declarative event listeners are now allowed on the `<include>` tag
1142
1143### 4.2.7
1144
1145- Bug: Fixes [#650](https://github.com/marko-js/marko/issues/650) - The tag "await" does not support attribute "unless"
1146- Improvements to legacy state
1147
1148### 4.2.6
1149
1150- Bug: Fixes [#654](https://github.com/marko-js/marko/issues/654) - Bug: components implementing a `key` attribute break in Marko v4
1151- Improvements to legacy compatibility layer
1152
1153### 4.2.5
1154
1155- Improved support for UI components implemented using native JavaScript class in a separate file
1156- Improved how legacy layout tags are handled by Marko v4
1157
1158### 4.2.4
1159
1160- Bug: Fixes [#653](https://github.com/marko-js/marko/issues/653) - Event handlers are no longer bound in edge case
1161
1162### 4.2.3
1163
1164- Bug: Fixes [#649](https://github.com/marko-js/marko/issues/649) - New line always added to `textarea` and other elements for single line/delimited HTML blocks
1165
1166### 4.2.2
1167
1168- Bug: Fixes [#648](https://github.com/marko-js/marko/issues/648) - Style attribute object and lengths not handled properly
1169
1170### 4.2.1
1171
1172- Bug: Fixed [#644](https://github.com/marko-js/marko/issues/644) - Attribute not rendered by Marko is not preserved if component first rendered on the server
1173- [Performance] Escaping is not needed for the `data-marko` attribute
1174
1175### 4.2.0
1176
1177- Bug: Fixed [#629](https://github.com/marko-js/marko/issues/629) - VDOM: Rendering unescaped HTML produces non-functioning HTML input controls
1178- Bug: Fixed [#634](https://github.com/marko-js/marko/issues/634) - writeInitComponentsCode is not a function
1179- Enhancement: Added support to allow improved precompiling of templates
1180- Enhancement: Fixed [#636](https://github.com/marko-js/marko/issues/636) - Add error when macro with duplicate name is found
1181- Performance: Optimized diffing/patching to avoid indexing entire tree to find keyed elements
1182- Performance: Optimized how event handlers are attached to VDOM nodes (separated from attributes)
1183
1184## 4.1.x
1185
1186### 4.1.3
1187
1188- Bug: Fixed losing cursor position in Edge (see [morphdom PR #100](https://github.com/patrick-steele-idem/morphdom/pull/100) by [@zastavnitskiy](https://github.com/zastavnitskiy))
1189- Bug: Ignore `xmlns` attributes when virtualizing real DOM nodes (needed when inserting an HTML string when rendering to a VDOM)
1190
1191### 4.1.2
1192
1193- Bug: Fixed [#623](https://github.com/marko-js/marko/issues/623) - Uncaught TypeError: `toEl.$__hasAttribute` is not a function
1194- Bug: Fixed [#619](https://github.com/marko-js/marko/issues/619) - Deprecated `constructor()` for UI component classes
1195
1196### 4.1.1
1197
1198- Added `"use strict";` to restore Node.js compatibility for Node.js v4 and v5
1199
1200### 4.1.0
1201
1202- Bug: Fixes [#611](https://github.com/marko-js/marko/issues/611) - Component IDs are not being assigned correctly when intermediate non-component is rendered
1203- Performance: SVG namespaced elements are now resolved determined at compile-time
1204- Performance: Merged in `morphdom` and optimized for Marko
1205- Performance: Optimized diffing/patching of elements with only simple attributes in the following set: `class`, `id` and `style`
1206
1207## 4.0.x
1208
1209### 4.0.1
1210
1211- Bug: Fixes [#612](https://github.com/marko-js/marko/issues/612) - Compile error when class method has empty `return`
1212- Bug: Fixes [#604](https://github.com/marko-js/marko/issues/604) - `no-update` attributes error when first rendered on the server
1213- Bug: Fixes [#608](https://github.com/marko-js/marko/issues/608) - Component losing `renderBody` input on a particular redraw
1214- Enhancement: Fixes [#606](https://github.com/marko-js/marko/issues/606) - named single-file component doesn't work
1215
1216### 4.0.0
1217
1218- Marko v4! [Release Announcement](https://medium.com/@mlrawlings/marko-4-0-is-here-837884c5f60d)
1219
1220# 3.x
1221
1222## 3.13.x
1223
1224### 3.13.2
1225
1226- Fixed [#478](TagLookup fails when merging taglibs) - TagLookup fails when merging taglibs
1227
1228### 3.13.1
1229
1230- Fixes [#465](https://github.com/marko-js/marko/issues/465)
1231
1232### 3.13.0
1233
1234## 3.12.x
1235
1236### 3.12.0
1237
1238- Added warnings for using render methods when you want string output ([Pull Request #450](https://github.com/marko-js/marko/pull/450) by [@mlrawlings](https://github.com/mlrawlings))
1239
1240## 3.11.x
1241
1242### 3.11.8
1243
1244- Fixes [#382](https://github.com/marko-js/marko/issues/382) - Local variable for tag should have prefix or suffix to avoid conflict
1245
1246### 3.11.7
1247
1248- Fixes [#381](https://github.com/marko-js/marko/issues/381) - `$global` broken when using `template.stream()`
1249
1250### 3.11.6
1251
1252- Internal change: `AsyncWriter``AsyncStream`
1253
1254### 3.11.5
1255
1256- (no changes)
1257
1258### 3.11.4
1259
1260- Update to `async-writer@2`
1261
1262### 3.11.3
1263
1264- Silently ignore errors when parsing tag definition code inlined in JavaScript
1265
1266### 3.11.2
1267
1268- Fixed [#318](https://github.com/marko-js/marko/issues/318) - Use compiler options passed to require hook to configure marko globally
1269
1270```javascript
1271require("marko/node-require").install({
1272 compilerOptions: {
1273 writeToDisk: false
1274 }
1275});
1276```
1277
1278### 3.11.1
1279
1280- Fixed [#370](https://github.com/marko-js/marko/issues/370) - HTML characters in loop separator string should not be escaped
1281
1282### 3.11.0
1283
1284- Introduced the `<include-html(path)>` tag for including static HTML:
1285
1286```xml
1287<include-html('./foo.html')>
1288```
1289
1290## 3.10.x
1291
1292### 3.10.1
1293
1294- Fixed [#44](https://github.com/marko-js/marko/issues/44) - Webpack compatibility fixes. Also see [marko-loader](https://github.com/marko-js/marko-loader) (A marko loader for webpack)
1295
1296### 3.10.0
1297
1298- Fixed [#357](https://github.com/marko-js/marko/issues/357) - Deprecate `empty`/`notEmpty` in Marko v3
1299
1300## 3.9.x
1301
1302### 3.9.4
1303
1304- Fixed [#355](https://github.com/marko-js/marko/issues/355) - `status-var`/`separator` options not handled when looping over properties
1305- Fixed [#354](https://github.com/marko-js/marko/issues/354) - regular expressions used in attribute values are not being handled correctly
1306- Fixed [#353](https://github.com/marko-js/marko/issues/353) - `body-only-if` attribute does not work with custom tags (only HTML tags)
1307
1308### 3.9.3
1309
1310- Upgraded to `raptor-util@^2`
1311
1312### 3.9.2
1313
1314- Fixed [#327](https://github.com/marko-js/marko/issues/327) - alt attribute with empty string should be allowed ([Pull Request #350](https://github.com/marko-js/marko/pull/350) by [@mlrawlings](https://github.com/mlrawlings))
1315
1316### 3.9.1
1317
1318- Fixed [#348](https://github.com/marko-js/marko/issues/348) - exclude all `*.orig` and other files from published npm package
1319
1320### 3.9.0
1321
1322- Fixed [#231](https://github.com/marko-js/marko/issues/231) - Allow <assign count++>
1323- Fixed [#345](https://github.com/marko-js/marko/issues/345) - Whitespace preservation now applies to all deeply nested text nodes
1324- Fixed [#344](https://github.com/marko-js/marko/issues/344) - Introduced [defineRenderer](./docs/javascript-api.md#requiremarkodefinerenderer) for Marko
1325- Docs: Added docs for excluding directories from taglib discovery ([@mlrawlings](https://github.com/mlrawlings))
1326- Docs: Added docs for component autodiscovery ([@mlrawlings](https://github.com/mlrawlings))
1327- Docs: Added docs for passing a data object to a custom tag
1328
1329## 3.8.x
1330
1331### 3.8.1
1332
1333- Fixed [#342](https://github.com/marko-js/marko/issues/342) - `await:finish` event not emitted for async fragments with client reorder and that complete synchronously
1334
1335### 3.8.0
1336
1337- Fixed [#329](https://github.com/marko-js/marko/issues/329) - Add autodiscover of components/ directory ([Pull Request #338](https://github.com/marko-js/marko/pull/338) by [@mlrawlings](https://github.com/mlrawlings))
1338
1339## 3.7.x
1340
1341### 3.7.4
1342
1343- Fixed [#339](https://github.com/marko-js/marko/issues/339) - Tag transformers are not being applied to tags with a dynamic tag name (fixes [#146](https://github.com/marko-js/marko-components/issues/146) for Marko Components)
1344
1345### 3.7.3
1346
1347- Fixed [#332](https://github.com/marko-js/marko/issues/332) and [#333](https://github.com/marko-js/marko/issues/333) - Correct values for `literalUndefined` and `literalFalse` in the Builder API [@bkuri](https://github.com/bkuri)
1348- Fixed [#336](https://github.com/marko-js/marko/issues/336) - Upgraded to latest version of `minimatch`
1349
1350### 3.7.2
1351
1352- Fixed [#328](https://github.com/marko-js/marko/issues/328) - Improve error reporting when taglib/tag definition fails to load
1353- Additional change to disable escaping for dynamic `Text` nodes added to body of `<script>` tag to fix [issue #326](https://github.com/marko-js/marko/issues/326)
1354
1355### 3.7.1
1356
1357- Improved escaping within the `<script>` tag to fix [issue #322](https://github.com/marko-js/marko/issues/322). Special HTML characters will no longer be escaped within the context of the `<script>` tag since browsers do not decode HTML entities within the `<script>` tag. Instead, only the ending `</script>` tag sequence is escaped using JavaScript string escaping sequences.
1358
1359### 3.7.0
1360
1361- Made change to make configuration a true singleton shared across all instances of `marko` loaded at runtime ([commit](https://github.com/marko-js/marko/commit/cd797322adf80f2890015de7b8f62301c2921a0a))
1362
1363## 3.6.x
1364
1365### 3.6.2
1366
1367- Improved support for hot reloading by automatically disabling `assumeUpToDate` if hot reload is enabled. ([Pull Request #320](https://github.com/marko-js/marko/pull/320) by [@ianvonholt](https://github.com/ianvonholt))
1368
1369### 3.6.1
1370
1371- Fixed a bug that was causing transforms to be run on detached nodes. This was manifesting itself in the `<async-fragment>` to `<await>` transform if an `if()` attribute was present (or other core attributes that end up wrapping the tag it is defined on).
1372
1373### 3.6.0
1374
1375- Introduced a new and simpler `<await>` tag that should be used instead of the now deprecated `<async-fragment>` tag (see deprecation details below) ([Pull Request #312](https://github.com/marko-js/marko/pull/312) by [@mlrawlings](https://github.com/mlrawlings))
1376
1377#### Deprecations
1378
1379- Deprecated the `<async-fragment var="<var>" data-provider=<data-provider>>` tag in favor of the `<await(<var> from <data-provider>)>` tag:
1380
1381OLD:
1382
1383```xml
1384<async-fragment var="userInfo" data-provider=data.userInfoPromise>
1385 Hello ${userInfo.name}!
1386</async-fragment>
1387```
1388
1389NEW:
1390
1391```xml
1392<await(userInfo from data.userInfoPromise)>
1393 Hello ${userInfo.name}!
1394</await>
1395```
1396
1397The `<await>` tag supports all of the attributes of the previous `<async-fragment>` tag except for `var` and `data-provider`:
1398
1399```xml
1400<await(userInfo from data.userInfoPromise) name="userInfo" timeout=10000 client-reorder>
1401 Hello ${userInfo.name}!
1402</await>
1403```
1404
1405Finally, the nested tags for providing content for the placeholder, error and timeout messages have been renamed accordingly:
1406
1407```xml
1408<await(userInfo from data.userInfoPromise) client-reorder>
1409 <await-placeholder>
1410 This is alternate content while the async fragment is loading.
1411 </await-placeholder>
1412 <await-timeout>
1413 A timeout has occurred!
1414 </await-timeout>
1415 <await-error>
1416 A error has occurred!
1417 </await-error>
1418
1419 Hello ${userInfo.name}!
1420</await>
1421```
1422
1423## 3.5.x
1424
1425### 3.5.1
1426
1427- Fixes #316 - Autocomplete for tags is not updated when tag files updated despite clearing cache. This improves the [autocomplete-marko](https://github.com/marko-js/atom-autocomplete-marko) plugin for Atom.
1428- Fixes #314 - Remove hyphens from include props
1429- Deprecated:
1430 - Properties passed in using the `<include>` tag should not be access using hyphens.
1431
1432For example, given the following template:
1433
1434```xml
1435<include("./include-target.marko") first-name='Jane'/>
1436```
1437
1438The `first-name` data should be accessed using the `firstName` property:
1439
1440```javascript
1441var firstName = input.firstName;
1442// NOT: var firstName = input['first-name'];
1443```
1444
1445### 3.5.0
1446
1447- Added functionality to exclude specific directory or package from taglib finder ([Pull Request #309](https://github.com/marko-js/marko/pull/309) by [@oxala](https://github.com/oxala))
1448
1449## 3.4.x
1450
1451### 3.4.9
1452
1453- Fixed [https://github.com/marko-js/marko/issues/307] - Marko concise syntax, with multiple class names ([Pull Request #308](https://github.com/marko-js/marko/pull/308) by [@mlrawlings](https://github.com/mlrawlings))
1454
1455### 3.4.8
1456
1457- Added support for an "enum" attribute value
1458
1459### 3.4.7
1460
1461- Async fragment improvements ([Pull Request #305](https://github.com/marko-js/marko/pull/305) by [@mlrawlings](https://github.com/mlrawlings))
1462 - Adds additional event info (finished/timedout) to the data emitted from <async-fragment> tags.
1463 - Ensures that renderBody() is not called again if the fragment has already finished (timed out).
1464 - Fixes `npm run test-async`
1465 - Removes a redundant `async-fragment` timeout related test
1466
1467### 3.4.6
1468
1469- Updated autocomplete information
1470
1471### 3.4.5
1472
1473- Fixes #304 - async-fragment-tag-transformer.js being loaded by PhantomJS
1474- Updated taglibs with additional information to support tooling
1475- Added [Michael Rawlings](https://github.com/mlrawlings) as a maintainer
1476
1477### 3.4.4
1478
1479- Fixes #303 - `addStaticVar` is not generating unique variable names correctly
1480
1481### 3.4.3
1482
1483- Improved validation for macros ([@mlrawlings](https://github.com/mlrawlings), [PR #300](https://github.com/marko-js/marko/pull/300))
1484- Added code coverage reporting ([@mlrawlings](https://github.com/mlrawlings), [PR #301](https://github.com/marko-js/marko/pull/301))
1485
1486### 3.4.2
1487
1488- Improved error reporting in cases when code generation fails ([@mlrawlings](https://github.com/mlrawlings))
1489
1490### 3.4.1
1491
1492- Additional tweaks for #298 - Always emit correct events for async fragments
1493
1494### 3.4.0
1495
1496- Fixes #298 - Always emit correct events for async fragments
1497- Updated docs
1498
1499## 3.3.x
1500
1501### 3.3.0
1502
1503- Include async fragment name in the `asyncFragmentFinish` events ([@kprakasam](https://github.com/kprakasam))
1504
1505## 3.2.x
1506
1507### 3.2.0
1508
1509- Fixes #286 - Add res.marko(templateData) for use with Express ([@mlrawlings](https://github.com/mlrawlings))
1510
1511## 3.1.x
1512
1513### 3.1.9
1514
1515- Fixes #288 - Provide API for discovering custom tags and attributes for autocomplete/tooling purposes
1516- Documentation improvements
1517
1518### 3.1.8
1519
1520- Fixes #280 - Switch from jsonminify to strip-json-comments
1521- Updated docs for Koa and Hapi
1522- Additional tests for Node.js v6
1523
1524### 3.1.7
1525
1526- Fixes #274 - marko-compiler-options tag is not properly ended when using raw parsing (for prettyprint)
1527
1528### 3.1.6
1529
1530- Fixes #268 - this.write is not a function for empty ArrayExpression
1531
1532### 3.1.5
1533
1534- Fixes #262 - node-require module removes `.marko` extension from filenames in compiled code
1535
1536### 3.1.4
1537
1538- Fixes #267 - Shorthand CSS class name cannot be combined with object/array class names
1539
1540### 3.1.3
1541
1542- Fixed #266 - Hot reloading fails if original template is deleted
1543
1544### 3.1.2
1545
1546- Fixed error reporting when using `compiler.parseRaw()`
1547- Added test for #262
1548
1549### 3.1.1
1550
1551- Improved whitespace removal for text nodes directly below the root
1552
1553### 3.1.0
1554
1555- Fixes #254 - Allow preserve whitespace to be enabled at the global level
1556
1557## 3.0.x
1558
1559### 3.0.7
1560
1561- Fixes #240 - Always trim start and end of template (even if preserveWhitespace is true)
1562- Fixes #260 - Circular custom tags causes infinite recursion when writeToDisk is set to false
1563- Minor internal cleanup
1564
1565### 3.0.6
1566
1567- Don't wrap exception in `parseJavaScript` if error object was not created by Esprima
1568
1569### 3.0.5
1570
1571- Fixes #257 - Placeholders don't render for out-of-order async fragments
1572
1573### 3.0.4
1574
1575- Fixes #256 - Convert attributes to title case if no attributes are declared for a custom tag
1576- Use `<noscript>` for out-of-order async fragment placeholders
1577
1578### 3.0.3
1579
1580- Make renderSync behave if no context was supplied ([PR #250](https://github.com/marko-js/marko/pull/250) by [@jsumners](https://github.com/jsumners))
1581
1582### 3.0.2
1583
1584- Store `tagDef` with `HtmlElement` node (needed for pretty printing)
1585
1586### 3.0.1
1587
1588- Docs: Fixed minor issues in docs
1589- Reintroduced support for the `MARKO_CLEAN` environment variable: `MARK_CLEAN=true node server.js`
1590
1591### 3.0.0
1592
1593- See: [What's New in Marko v3](http://markojs.com/docs/marko/what-is-new-marko-v3/)
1594
1595# 2.x
1596
1597## 2.8.x
1598
1599### 2.8.4
1600
1601- Fixes circular dependency issue between runtime/index.js and hot-reload/index.js
1602
1603### 2.8.3
1604
1605- Fixes circular dependency issue between runtime/index.js and hot-reload/index.js
1606
1607### 2.8.2
1608
1609- Fixes #203 - Incorrect behavior when attrs is used on a standard HTML tag with a tag def
1610
1611### 2.8.1
1612
1613- Fixes #202 - Pass along options to compiler when loading a template
1614
1615### 2.8.0
1616
1617- Added support for automatically discovering taglibs from installed packages that are scoped. ([PR #183](https://github.com/marko-js/marko/pull/183) by [@tropperstyle](https://github.com/tropperstyle))
1618
1619### 2.8.3
1620
1621- Fixes circular dependency issue between `hot-reload/index.js` and `runtime/index.js`
1622
1623## 2.7.x
1624
1625### 2.7.31
1626
1627- Fixes #167 - Nested tags only work one level deep
1628
1629### 2.7.30
1630
1631- docs: don't exclude docs in .npmignore
1632
1633### 2.7.29
1634
1635- Fixes #161 - Nested tags with no body content are not handled correctly
1636
1637### 2.7.28
1638
1639- Fixes #140 - Also de-dupe cached taglibs in finder
1640
1641### 2.7.27
1642
1643- Make loading template from String template source easier:
1644
1645```javascript
1646var template = marko.load(templatePath, "Hello $!{data.name}!");
1647```
1648
1649_NOTE: Loading directly from source only works on the server_
1650
1651See [Pull Request #153](https://github.com/marko-js/marko/pull/153)
1652
1653### 2.7.26
1654
1655- Use shorter relative paths in error messages
1656
1657### 2.7.25
1658
1659- Fixes #150 - Provide option to prevent writing compiled templates to disk. Example usage:
1660
1661```javascript
1662require("marko/compiler").defaultOptions.writeToDisk = false;
1663```
1664
1665NOTE: If you disable writing compiled templates to disk then it will be a little harder to debug errors in templates on the server since the stack trace will refer to a file that has not been written to disk.
1666
1667For a more complete list of compiler options please see: http://markojs.com/docs/marko/javascript-api/#defaultoptions
1668
1669### 2.7.24
1670
1671- Fixes #140 - De-dupe taglibs by module name
1672- Documentation: Miscellaneous changes
1673
1674### 2.7.23
1675
1676- Fixed a typo for `rendererFunc` `in helpers.js` (commit: 0205a47f04911f34ca4d458970d710f81a143987)
1677
1678### 2.7.22
1679
1680- New language feature: [`unless` support added](http://markojs.com/docs/marko/language-guide/#unlesselse-ifelse)
1681
1682### 2.7.21
1683
1684- Automatically enable hot-reload and browser-refresh if launched using [browser-refresh](https://github.com/patrick-steele-idem/browser-refresh)
1685
1686### 2.7.20
1687
1688- Documentation: Miscellaneous changes
1689
1690### 2.7.19
1691
1692- Fixes #137 - adds support for dynamic HTML tag names
1693
1694### 2.7.18
1695
1696- Improvement: Better resolving of tag renderer
1697- Compiler: Fix to make compiler work in the browser
1698
1699### 2.7.17
1700
1701- Fixes #135 Allow "attrs" attribute on custom tags
1702
1703### 2.7.16
1704
1705- Improved handling of imports
1706- Better handling of loading taglibs with circular dependencies
1707
1708### 2.7.15
1709
1710- Handle circular taglib imports
1711
1712### 2.7.14
1713
1714- Fixes #131 - Recursively handle taglib imports
1715
1716### 2.7.13
1717
1718- Added a `.npmignore` file
1719- Fixed licensing header in source
1720- Documentation: improved docs for input.renderBody()
1721- Documentation: Miscellaneous changes
1722
1723### 2.7.12
1724
1725- Fixes #122 Don't allow invalid attributes when using shorthand
1726- Fixes #122 Typo in hasAttributes
1727- Fixes #127 - Make sure all possible input files are accounted for when checking if a compiled template is up-to-date
1728- Use `browser.json` files instead of `optimizer.json` files
1729- Documentation: Improved docs for async taglib
1730- Documentation: Added empty() and notEmpty() helpers to the readme
1731- Added Martin Aberer as a maintainer
1732- Documentation: Miscellaneous changes
1733
1734### 2.7.11
1735
1736- New logo!
1737
1738### 2.7.10
1739
1740- Fixes #118 Better error when parsing JSON file for tag
1741- Testing: More test cases related to empty attributes
1742- Documentation: Clarification for the Node.js require extension
1743- Documentation: doc reference for `getLength()` of loop `status-var`
1744- Documentation: Added reference to [sublime-marko](https://github.com/merwan7/sublime-marko) under the tools section.
1745
1746### 2.7.9
1747
1748- Fixes #109 - Allow `compiler.createNode('div')`
1749- Fixes #108 - Improve how the `MARKO_CLEAN` env variable is handled
1750
1751### 2.7.8
1752
1753- Minor documentation changes
1754
1755### 2.7.7
1756
1757- Allow `.html` extension for layouts (Fix for https://github.com/raptorjs/marko-layout/issues/2)
1758
1759### 2.7.6
1760
1761- Make require('marko/node-require').install() a noop in the browser
1762
1763### 2.7.5
1764
1765- Improvement: Allow `template-data` to be combined with other attributes on the `<include>` tag
1766- Documentation: Fixes #98 - docs for `<include template-data="...">`
1767
1768### 2.7.4
1769
1770- Fixes #96 - Allow relative, dynamic include paths
1771
1772### 2.7.3
1773
1774- Internal change: Additional test cases added for using promises with async fragments
1775
1776### 2.7.2
1777
1778- Fixes #73 - Prevent same taglib from being loaded multiple times
1779
1780### 2.7.1
1781
1782- Fixes #88 - Assign global data to the correct out
1783
1784### 2.7.0
1785
1786- Fixes [#27](https://github.com/raptorjs/marko/issues/27) - IE conditional comments (e.g., `<!--[if lt IE 9]><div><![endif]-->`) are automatically preserved. Previously, all HTML comments were stripped out when loading a template. For example:
1787- Added support for `<compiler-options comments="preserve"/>` to enable comments to preserved in a template. For example:
1788
1789```xml
1790<compiler-options comments="preserve"/>
1791Hello
1792<!--This comment should be preserved-->
1793World
1794```
1795
1796Output:
1797
1798```xml
1799Hello
1800<!--This comment should be preserved-->
1801World
1802```
1803
1804## 2.6.x
1805
1806### 2.6.0
1807
1808- Performance improvements
1809 - `'use strict';`
1810 - Optimized render code paths
1811- Code cleanup
1812- Compatibility fixes for Node.js 0.12
1813 - Bad: `fs.readFile(path, 'utf8')`
1814 - Good: `fs.readFile(path, {encoding: 'utf8'})`
1815
1816## 2.5.x
1817
1818### 2.5.0
1819
1820- Fixes #78 - Custom Node.js require extension for Marko template files. Example usage:
1821
1822```javascript
1823// Install the Node.js require extension in your application's main script (server-side only)
1824require("marko/node-require").install();
1825
1826// Now you can require `*.marko` files just like any other JavaScript module
1827var template = require("./hello.marko");
1828var html = template.renderSync({ name: "Frank" });
1829```
1830
1831- Compiled templates now export a loaded Template instance. In the previous version of marko, compiled templates exported a function that could be used to create a loaded Template instance.
1832
1833## 2.4.x
1834
1835### 2.4.3
1836
1837- Fixes edge case: More precise regular expression for decoding HTML entities
1838
1839### 2.4.2
1840
1841- Internal: Fixes #75 Always assign the tag property to custom tag nodes
1842
1843### 2.4.1
1844
1845- Improvement to allow taglibs to be imported from other taglibs ([commit](https://github.com/raptorjs/marko/commit/73e9a3420a1bac3e2c201d4dcadf21c0701b5222))
1846
1847### 2.4.0
1848
1849- Added support for short-hand tags and attributes
1850
1851Old `marko-taglib.json`:
1852
1853```json
1854{
1855 "tags": {
1856 "my-hello": {
1857 "renderer": "./hello-renderer",
1858 "attributes": {
1859 "name": "string"
1860 }
1861 }
1862 }
1863}
1864```
1865
1866Short-hand `marko-taglib.json`:
1867
1868```json
1869{
1870 "<my-hello>": {
1871 "renderer": "./hello-renderer",
1872 "@name": "string"
1873 }
1874}
1875```
1876
1877- Fixes #61 Simplify parent/child relationships
1878
1879Marko now supports custom tags in the following format: `<parent_tag.nested_tag>`
1880
1881Example usage:
1882
1883```html
1884<ui-tabs orientation="horizontal">
1885 <ui-tabs.tab title="Home"> Content for Home </ui-tabs.tab>
1886 <ui-tabs.tab title="Profile"> Content for Profile </ui-tabs.tab>
1887 <ui-tabs.tab title="Messages"> Content for Messages </ui-tabs.tab>
1888</ui-tabs>
1889```
1890
1891**_ui-tabs/marko-tag.json_**
1892
1893```json
1894{
1895 "@orientation": "string",
1896 "@tabs <tab>[]": {
1897 "@title": "string"
1898 }
1899}
1900```
1901
1902**_ui-tabs/renderer.js_**
1903
1904```javascript
1905var template = require("marko").load(require.resolve("./template.marko"));
1906
1907exports.renderer = function(input, out) {
1908 var tabs = input.tabs;
1909
1910 // Tabs will be in the following form:
1911 // [
1912 // {
1913 // title: 'Home',
1914 // renderBody: function(out) { ... }
1915 // },
1916 // {
1917 // title: 'Profile',
1918 // renderBody: function(out) { ... }
1919 // },
1920 // {
1921 // title: 'Messages',
1922 // renderBody: function(out) { ... }
1923 // }
1924 // ]
1925 console.log(tabs.length); // Output: 3
1926
1927 template.render(
1928 {
1929 tabs: tabs
1930 },
1931 out
1932 );
1933};
1934```
1935
1936**_ui-tabs/template.marko_**
1937
1938```html
1939<div class="tabs">
1940 <ul class="nav nav-tabs">
1941 <li class="tab" for="tab in data.tabs">
1942 <a href="#${tab.title}"> ${tab.title} </a>
1943 </li>
1944 </ul>
1945 <div class="tab-content">
1946 <div class="tab-pane" for="tab in data.tabs">
1947 <invoke function="tab.renderBody(out)" />
1948 </div>
1949 </div>
1950</div>
1951```
1952
1953## 2.3.x
1954
1955### 2.3.2
1956
1957Fixes #66 - Allow circular dependencies when loading templates
1958
1959### 2.3.1
1960
1961- Testing framework changes
1962- Fixes #65 - Generated variable name is an empty string in some cases
1963
1964### 2.3.0
1965
1966- Fixes #53 Merge c-input with attr props
1967
1968## 2.2.x
1969
1970### 2.2.2
1971
1972Fixes #60 Don't replace special operators for body functions
1973
1974### 2.2.1
1975
1976- Fixes #58 Added support for MARKO_CLEAN env variable (force recompile of all loaded templates). Example usage:
1977
1978```bash
1979MARKO_CLEAN=true node run.js
1980```
1981
1982- Code formatting: add spaces in var code
1983
1984### 2.2.0
1985
1986- Fixes #51 Allow body content to be mapped to a String input property
1987- Fixes #52 Remove JavaScript comments from JSON taglib files before parsing
1988
1989## 2.1.x
1990
1991### 2.1.6
1992
1993- Fixes #50 Initialize the loader after the runtime is fully initialized
1994
1995### 2.1.5
1996
1997- Fixes #50 Ensure that all instances of marko have hot-reload and browser-refresh enabled
1998
1999### 2.1.4
2000
2001- Allowing complex var names (i.e. LHS) for the `<assign>` tag.
2002
2003### 2.1.3
2004
2005- Minor change: Slight improvement to code to resolve tag handler
2006
2007### 2.1.2
2008
2009- Minor change: Improve how renderer is resolved
2010
2011### 2.1.1
2012
2013- Fixes #48 name in marko-tag.json should override default name given during discovery
2014
2015### 2.1.0
2016
2017- Fixes #47 - Added support for "taglib-imports"
2018
2019## 2.0.x
2020
2021### 2.0.12
2022
2023- Fixes #31 - Add support for providing prefix when scanning for tags
2024- Allow "code" to be a function that lazily evaluates to a code string during code generation
2025
2026### 2.0.11
2027
2028- Added method for custom node compilers to get access to the `escapeXml` function at runtime
2029
2030### 2.0.10
2031
2032- Fixes #39 - Added missing return when using hot-reload
2033
2034### 2.0.9
2035
2036- Fixed bad publish
2037
2038### 2.0.8
2039
2040- Better merging of tags when loading and merging taglibs
2041
2042### 2.0.7
2043
2044- Changes to avoid problems associated with the same taglib being found multiple times in the search path
2045
2046### 2.0.6
2047
2048- `renderBody` function is only added if tag has children
2049
2050### 2.0.5
2051
2052- Fixed #36 - Don't use `invokeBody()` in the cache taglib
2053
2054### 2.0.4
2055
2056- :exclamation: Fixed #36 - Deprecated - When using `<include>` with body content, nested body content is now passed in as `String` property named `body`. Old behavior: nested content would be passed in as a `Function` property named `invokeBody` that would return the `String` value of the nested content. `invokeBody()` has been deprecated.
2057
2058### 2.0.3
2059
2060- Fixed #36 - Don't use `invokeBody()` in test code and the HTML comments tag
2061
2062### 2.0.2
2063
2064- :exclamation: Fixed #36 - Deprecated `input.invokeBody()` in favor of `input.renderBody(out)`
2065- Fixed #37 - Duplicate input property for custom tag renderers
2066
2067### 2.0.1
2068
2069- Fixed #35 - Added support for `<compiler-options>`. Example:
2070
2071```html
2072<compiler-options whitespace="preserve" /> A B C
2073```
2074
2075### 2.0.0
2076
2077- Dynamic attributes for scanned tags without a tag will have dashes removed by default.
2078 - :exclamation: When using `tags-dir` to discover tags that do not have a `marko-tag.json`, the previous behavior was to allow all attributes and to use the actual attribute name as the input property name. For example, when using `<hello first-name="John">`, first name would need to be read in as `input['first-name']`. This was changed such that the first name property should now be read in as `input.firstName` (dashes removed and converted to camel case)
2079- Changes to allow UI component to be put into a single JS file:
2080 - Updated taglib directory scanner to use `index.js` if found. New search order:
2081 1. `renderer.js` (use `renderer.js` if it exists)
2082 2. `index.js` (use `index.js` if it exists and assume it exports a `renderer` or `render` property)
2083 3. `template.marko` (use the template as the renderer if no `renderer.js` or `index.js`)
2084 - :exclamation: Changes to the taglib directory scanner could break existing code. Specifically, if a UI component directory had an `index.js` file and a `template.marko` file then in in `marko@<2` the `template.marko` file would have been selected as the renderer. In `marko@2.x`, the `index.js` will be selected as the tag renderer.
2085- :exclamation: Removed support for mapping a tag renderer to a module with a `process` method
2086- Removed sub-module `marko/renderer` that exports [raptor-renderer](https://github.com/raptorjs/raptor-renderer)
2087
2088# 1.x
2089
2090## 1.6.x
2091
2092### 1.6.1
2093
2094- Added back code to allow the new marko runtime to load templates compiled by an earlier compiler that used `module.exports`
2095
2096### 1.6.0
2097
2098- Fixed #32. Switched from `module.exports = function create(__helpers) { ... }` to `exports.create = function(__helpers) { ... }` to avoid circular dependency problems
2099
2100## 1.5.x
2101
2102### 1.5.8
2103
2104- Added support for adding "static" code to the top of a compiled template (helpful for initializing variables or running code once).
2105
2106### 1.5.7
2107
2108- Added sub-module `marko/renderer` that exports [raptor-renderer](https://github.com/raptorjs/raptor-renderer)
2109
2110### 1.5.6
2111
2112- Changes to avoid unoptimized code in V8
2113
2114### 1.5.5
2115
2116- Handle case where template was loaded before hot-reload was enabled
2117
2118## 1.5.4
2119
2120- Added support for `$global` in `renderSync`