Changelog ========= # 4.x ## 4.2.x ### 4.2.8 - Bug: Fixes [#661](https://github.com/marko-js/marko/issues/661) - Component initialization code may end up in the wrong place - Bug: Fixes [#668](https://github.com/marko-js/marko/issues/668) - Declarative event listeners are now allowed on the `` tag ### 4.2.7 - Bug: Fixes [#650](https://github.com/marko-js/marko/issues/650) - The tag "await" does not support attribute "unless" - Improvements to legacy state ### 4.2.6 - Bug: Fixes [#654](https://github.com/marko-js/marko/issues/654) - Bug: components implementing a `key` attribute break in Marko v4 - Improvements to legacy compatibility layer ### 4.2.5 - Improved support for UI components implemented using native JavaScript class in a separate file - Improved how legacy layout tags are handled by Marko v4 ### 4.2.4 - Bug: Fixes [#653](https://github.com/marko-js/marko/issues/653) - Event handlers are no longer bound in edge case ### 4.2.3 - 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 ### 4.2.2 - Bug: Fixes [#648](https://github.com/marko-js/marko/issues/648) - Style attribute object and lengths not handled properly ### 4.2.1 - 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 - [Performance] Escaping is not needed for the `data-marko` attribute ### 4.2.0 - Bug: Fixed [#629](https://github.com/marko-js/marko/issues/629) - VDOM: Rendering unescaped HTML produces non-functioning HTML input controls - Bug: Fixed [#634](https://github.com/marko-js/marko/issues/634) - writeInitComponentsCode is not a function - Enhancement: Added support to allow improved precompiling of templates - Enhancement: Fixed [#636](https://github.com/marko-js/marko/issues/636) - Add error when macro with duplicate name is found - Performance: Optimized diffing/patching to avoid indexing entire tree to find keyed elements - Performance: Optimized how event handlers are attached to VDOM nodes (separated from attributes) ## 4.1.x ### 4.1.3 - 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)) - Bug: Ignore `xmlns` attributes when virtualizing real DOM nodes (needed when inserting an HTML string when rendering to a VDOM) ### 4.1.2 - Bug: Fixed [#623](https://github.com/marko-js/marko/issues/623) - Uncaught TypeError: `toEl.$__hasAttribute` is not a function - Bug: Fixed [#619](https://github.com/marko-js/marko/issues/619) - Deprecated `constructor()` for UI component classes ### 4.1.1 - Added `"use strict";` to restore Node.js compatibility for Node.js v4 and v5 ### 4.1.0 - Bug: Fixes [#611](https://github.com/marko-js/marko/issues/611) - Component IDs are not being assigned correctly when intermediate non-component is rendered - Performance: SVG namespaced elements are now resolved determined at compile-time - Performance: Merged in `morphdom` and optimized for Marko - Performance: Optimized diffing/patching of elements with only simple attributes in the following set: `class`, `id` and `style` ## 4.0.x ### 4.0.1 - Bug: Fixes [#612](https://github.com/marko-js/marko/issues/612) - Compile error when class method has empty `return` - Bug: Fixes [#604](https://github.com/marko-js/marko/issues/604) - `no-update` attributes error when first rendered on the server - Bug: Fixes [#608](https://github.com/marko-js/marko/issues/608) - Component losing `renderBody` input on a particular redraw - Enhancement: Fixes [#606](https://github.com/marko-js/marko/issues/606) - named single-file component doesn't work ### 4.0.0 - Marko v4! [Release Announcement](https://medium.com/@mlrawlings/marko-4-0-is-here-837884c5f60d) # 3.x ## 3.13.x ### 3.13.2 - Fixed [#478](TagLookup fails when merging taglibs) - TagLookup fails when merging taglibs ### 3.13.1 - Fixes [#465](https://github.com/marko-js/marko/issues/465) ### 3.13.0 ## 3.12.x ### 3.12.0 - 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)) ## 3.11.x ### 3.11.8 - Fixes [#382](https://github.com/marko-js/marko/issues/382) - Local variable for tag should have prefix or suffix to avoid conflict ### 3.11.7 - Fixes [#381](https://github.com/marko-js/marko/issues/381) - `$global` broken when using `template.stream()` ### 3.11.6 - Internal change: `AsyncWriter` → `AsyncStream` ### 3.11.5 - (no changes) ### 3.11.4 - Update to `async-writer@2` ### 3.11.3 - Silently ignore errors when parsing tag definition code inlined in JavaScript ### 3.11.2 - Fixed [#318](https://github.com/marko-js/marko/issues/318) - Use compiler options passed to require hook to configure marko globally ```javascript require('marko/node-require').install({ compilerOptions: { writeToDisk: false } }); ``` ### 3.11.1 - Fixed [#370](https://github.com/marko-js/marko/issues/370) - HTML characters in loop separator string should not be escaped ### 3.11.0 - Introduced the `` tag for including static HTML: ```xml ``` ## 3.10.x ### 3.10.1 - 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) ### 3.10.0 - Fixed [#357](https://github.com/marko-js/marko/issues/357) - Deprecate `empty`/`notEmpty` in Marko v3 ## 3.9.x ### 3.9.4 - Fixed [#355](https://github.com/marko-js/marko/issues/355) - `status-var`/`separator` options not handled when looping over properties - Fixed [#354](https://github.com/marko-js/marko/issues/354) - regular expressions used in attribute values are not being handled correctly - Fixed [#353](https://github.com/marko-js/marko/issues/353) - `body-only-if` attribute does not work with custom tags (only HTML tags) ### 3.9.3 - Upgraded to `raptor-util@^2` ### 3.9.2 - 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)) ### 3.9.1 - Fixed [#348](https://github.com/marko-js/marko/issues/348) - exclude all `*.orig` and other files from published npm package ### 3.9.0 - Fixed [#231](https://github.com/marko-js/marko/issues/231) - Allow - Fixed [#345](https://github.com/marko-js/marko/issues/345) - Whitespace preservation now applies to all deeply nested text nodes - Fixed [#344](https://github.com/marko-js/marko/issues/344) - Introduced [defineRenderer](./docs/javascript-api.md#requiremarkodefinerenderer) for Marko - Docs: Added docs for excluding directories from taglib discovery ([@mlrawlings](https://github.com/mlrawlings)) - Docs: Added docs for component autodiscovery ([@mlrawlings](https://github.com/mlrawlings)) - Docs: Added docs for passing a data object to a custom tag ## 3.8.x ### 3.8.1 - 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 ### 3.8.0 - 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)) ## 3.7.x ### 3.7.4 - 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) ### 3.7.3 - 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) - Fixed [#336](https://github.com/marko-js/marko/issues/336) - Upgraded to latest version of `minimatch` ### 3.7.2 - Fixed [#328](https://github.com/marko-js/marko/issues/328) - Improve error reporting when taglib/tag definition fails to load - Additional change to disable escaping for dynamic `Text` nodes added to body of `` tag sequence is escaped using JavaScript string escaping sequences. ### 3.7.0 - 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)) ## 3.6.x ### 3.6.2 - 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)) ### 3.6.1 - Fixed a bug that was causing transforms to be run on detached nodes. This was manifesting itself in the `` to `` transform if an `if()` attribute was present (or other core attributes that end up wrapping the tag it is defined on). ### 3.6.0 - Introduced a new and simpler `` tag that should be used instead of the now deprecated `` tag (see deprecation details below) ([Pull Request #312](https://github.com/marko-js/marko/pull/312) by [@mlrawlings](https://github.com/mlrawlings)) #### Deprecations - Deprecated the `>` tag in favor of the ` from )>` tag: OLD: ```xml Hello ${userInfo.name}! ``` NEW: ```xml Hello ${userInfo.name}! ``` The `` tag supports all of the attributes of the previous `` tag except for `var` and `data-provider`: ```xml Hello ${userInfo.name}! ``` Finally, the nested tags for providing content for the placeholder, error and timeout messages have been renamed accordingly: ```xml This is alternate content while the async fragment is loading. A timeout has occurred! A error has occurred! Hello ${userInfo.name}! ``` ## 3.5.x ### 3.5.1 - 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. - Fixes #314 - Remove hyphens from include props - Deprecated: - Properties passed in using the `` tag should not be access using hyphens. For example, given the following template: ```xml ``` The `first-name` data should be accessed using the `firstName` property: ```javascript var firstName = input.firstName; // NOT: var firstName = input['first-name']; ``` ### 3.5.0 - 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)) ## 3.4.x ### 3.4.9 - 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)) ### 3.4.8 - Added support for an "enum" attribute value ### 3.4.7 - Async fragment improvements ([Pull Request #305](https://github.com/marko-js/marko/pull/305) by [@mlrawlings](https://github.com/mlrawlings)) - Adds additional event info (finished/timedout) to the data emitted from tags. - Ensures that renderBody() is not called again if the fragment has already finished (timed out). - Fixes `npm run test-async` - Removes a redundant `async-fragment` timeout related test ### 3.4.6 - Updated autocomplete information ### 3.4.5 - Fixes #304 - async-fragment-tag-transformer.js being loaded by PhantomJS - Updated taglibs with additional information to support tooling - Added [Michael Rawlings](https://github.com/mlrawlings) as a maintainer ### 3.4.4 - Fixes #303 - `addStaticVar` is not generating unique variable names correctly ### 3.4.3 - Improved validation for macros ([@mlrawlings](https://github.com/mlrawlings), [PR #300](https://github.com/marko-js/marko/pull/300)) - Added code coverage reporting ([@mlrawlings](https://github.com/mlrawlings), [PR #301](https://github.com/marko-js/marko/pull/301)) ### 3.4.2 - Improved error reporting in cases when code generation fails ([@mlrawlings](https://github.com/mlrawlings)) ### 3.4.1 - Additional tweaks for #298 - Always emit correct events for async fragments ### 3.4.0 - Fixes #298 - Always emit correct events for async fragments - Updated docs ## 3.3.x ### 3.3.0 - Include async fragment name in the `asyncFragmentFinish` events ([@kprakasam](https://github.com/kprakasam)) ## 3.2.x ### 3.2.0 - Fixes #286 - Add res.marko(templateData) for use with Express ([@mlrawlings](https://github.com/mlrawlings)) ## 3.1.x ### 3.1.9 - Fixes #288 - Provide API for discovering custom tags and attributes for autocomplete/tooling purposes - Documentation improvements ### 3.1.8 - Fixes #280 - Switch from jsonminify to strip-json-comments - Updated docs for Koa and Hapi - Additional tests for Node.js v6 ### 3.1.7 - Fixes #274 - marko-compiler-options tag is not properly ended when using raw parsing (for prettyprint) ### 3.1.6 - Fixes #268 - this.write is not a function for empty ArrayExpression ### 3.1.5 - Fixes #262 - node-require module removes `.marko` extension from filenames in compiled code ### 3.1.4 - Fixes #267 - Shorthand CSS class name cannot be combined with object/array class names ### 3.1.3 - Fixed #266 - Hot reloading fails if original template is deleted ### 3.1.2 - Fixed error reporting when using `compiler.parseRaw()` - Added test for #262 ### 3.1.1 - Improved whitespace removal for text nodes directly below the root ### 3.1.0 - Fixes #254 - Allow preserve whitespace to be enabled at the global level ## 3.0.x ### 3.0.7 - Fixes #240 - Always trim start and end of template (even if preserveWhitespace is true) - Fixes #260 - Circular custom tags causes infinite recursion when writeToDisk is set to false - Minor internal cleanup ### 3.0.6 - Don't wrap exception in `parseJavaScript` if error object was not created by Esprima ### 3.0.5 - Fixes #257 - Placeholders don't render for out-of-order async fragments ### 3.0.4 - Fixes #256 - Convert attributes to title case if no attributes are declared for a custom tag - Use `