diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..984e2d8c2 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,17 @@ +# minified +*.min.js + +# test +*actual* +*expected* +input.js + +# generated +*dist* +*generated* +*.marko.js +*.marko.*.js +*.html.js +~vdom.skip + +node_modules \ No newline at end of file diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 000000000..c3c29e51a --- /dev/null +++ b/.eslintrc @@ -0,0 +1,14 @@ +{ + "extends": [ + "eslint:recommended", + "prettier" + ], + "env": { + "node": true, + "es6": true + }, + "globals": { + "document": true, + "ShadowRoot": true + } +} \ No newline at end of file diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 24408f9b2..43a80c9b1 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -3,20 +3,20 @@ This project adheres to the [eBay Code of Conduct](http://ebay.github.io/codeofconduct). By participating in this project you agree to abide by its terms. -- Be friendly and patient. +* Be friendly and patient. -- Be welcoming: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability. +* Be welcoming: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability. -- Be considerate: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language. +* Be considerate: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language. -- Be respectful: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. +* Be respectful: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. -- Be careful in the words that we choose: we are a community of professionals, and we conduct ourselves professionally. +* Be careful in the words that we choose: we are a community of professionals, and we conduct ourselves professionally. -- Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren’t acceptable. +* Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren’t acceptable. -- Try to understand why we disagree: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively. +* Try to understand why we disagree: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively. -- Remember that we’re different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes. +* Remember that we’re different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes. Please visit http://ebay.github.io/codeofconduct for the full code of conduct. diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ef3f4a9e5..15a11baf3 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -10,9 +10,10 @@ ## I just have a question -Before you ask, check our [existing questions](https://github.com/marko-js/marko/issues?page=2&q=is%3Aissue+label%3Atype%3Aquestion&utf8=%E2%9C%93) to see if your question has already been answered. If not, go ahead an open an issue or join us in [gitter](https://gitter.im/marko-js/marko) to ask a question. +Before you ask, check our [existing questions](https://github.com/marko-js/marko/issues?page=2&q=is%3Aissue+label%3Atype%3Aquestion&utf8=%E2%9C%93) to see if your question has already been answered. If not, go ahead an open an issue or join us in [gitter](https://gitter.im/marko-js/marko) to ask a question. Please be sure to use [markdown code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) when posting code on GitHub or Gitter: + ```` ```marko
some marko ${code}
@@ -29,25 +30,27 @@ Not sure if that typo is worth a pull request? Found a bug and know how to fix i We are always thrilled to receive pull requests. We do our best to process them quickly. If your pull request is not accepted on the first try, don't get discouraged! We'll work with you to come to an acceptable solution. -Prior to merging your PR, you will need to sign the [JS Foundation CLA](https://cla.js.foundation/marko-js/marko). It's pretty straight-forward and only takes a minute. You can even sign it now if you're thinking about contributing. +Prior to merging your PR, you will need to sign the [JS Foundation CLA](https://cla.js.foundation/marko-js/marko). It's pretty straight-forward and only takes a minute. You can even sign it now if you're thinking about contributing. > **TIP:** If you're new to GitHub or open source you can check out this [free course](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github) on how to contribute to an open source project. ### Running tests Before submitting your PR, make sure that all new and previous tests pass and that [coverage](https://coveralls.io/github/marko-js/marko?branch=master) has not decreased: + ``` npm run test-coverage ``` While developing you can run a single test group and use [grep](https://mochajs.org/#-g---grep-pattern) to filter the tests: + ``` npm run mocha -- --grep=lifecycle ``` ### Adding tests -Marko makes use of directory based test suites. Take a look at the `render` test suite: +Marko makes use of directory based test suites. Take a look at the `render` test suite:
 test/
@@ -66,15 +69,16 @@ Marko makes use of directory based test suites.  Take a look at the `render` tes
 The `html.test.js` file will run and read all the directories under `render/fixtures` and for each directory (`attrs`, `for-tag`, etc.) it will run `test.js`, render `template.marko` and assert that it is equivalent to the content of `expected.html`.
 
 To add a new test, you'll find the appropriate test suite, copy a fixture, and modify it to add the new test.
+
 #### Skipping a test
 
-A few of the tests suites use the same fixtures for multiple test scenarios.  For example, the `component-browser` tests run once rendering the component in a browser environment and a second time rendering in a server environment, then hydrating in the browser.
+A few of the tests suites use the same fixtures for multiple test scenarios. For example, the `component-browser` tests run once rendering the component in a browser environment and a second time rendering in a server environment, then hydrating in the browser.
 
-For some tests, it might be necessary to skip the test in one of these scenarios.  This is done by exporting a `skipHydrate`  (or similiarly named) property from the fixture.  The value of the property should be a string explaining why the test is skipped.
+For some tests, it might be necessary to skip the test in one of these scenarios. This is done by exporting a `skipHydrate` (or similiarly named) property from the fixture. The value of the property should be a string explaining why the test is skipped.
 
 #### Adding a failing test case
 
-If you've discovered an issue and are able to reproduce it, but don't have a fix, consider submitting a PR with a failing test case.  You can mark a fixture as expected to fail by appending `.fails` to the directory name:
+If you've discovered an issue and are able to reproduce it, but don't have a fix, consider submitting a PR with a failing test case. You can mark a fixture as expected to fail by appending `.fails` to the directory name:
 
 ```
 ⤷ fixtures/
@@ -87,7 +91,8 @@ Expected failures won't cause [Travis CI](https://travis-ci.org/marko-js/marko)
 
 ### Debugging tests
 
-If you need to dig a bit deeper into a failing test, use the `--inspect-brk` flag, open Chrome DevTools, and click on the green nodejs icon () to start debugging.  Learn more about [debugging node](https://www.youtube.com/watch?v=Xb_0awoShR8&t=103s) from this video.
+If you need to dig a bit deeper into a failing test, use the `--inspect-brk` flag, open Chrome DevTools, and click on the green nodejs icon () to start debugging. Learn more about [debugging node](https://www.youtube.com/watch?v=Xb_0awoShR8&t=103s) from this video.
+
 ```
 npm run mocha -- --grep=test-name --inspect-brk
 ```
@@ -101,9 +106,9 @@ $ debugger;
 
 ### Updating snapshots
 
-A number of the test suites make use snapshot comparisons.  For example, the `render` tests compare the rendered html against a stored snapshot.  Similarly, the `compiler` tests compare the generated JavaScript module againt a stored snapshot.  Any changes compared to the snapshot should be looked at closely, but there are some cases where it is fine that the output has changed and the snapshot needs to be updated.
+A number of the test suites make use snapshot comparisons. For example, the `render` tests compare the rendered html against a stored snapshot. Similarly, the `compiler` tests compare the generated JavaScript module againt a stored snapshot. Any changes compared to the snapshot should be looked at closely, but there are some cases where it is fine that the output has changed and the snapshot needs to be updated.
 
-To update a snapshot, you can copy the contents from the `actual` file to the `expected` file in the fixture directory.  You can also use the `UPDATE_EXPECTATIONS` env variable to cause the test runner to update the `expected` file for all currently failing tests in a suite:
+To update a snapshot, you can copy the contents from the `actual` file to the `expected` file in the fixture directory. You can also use the `UPDATE_EXPECTATIONS` env variable to cause the test runner to update the `expected` file for all currently failing tests in a suite:
 
 ```
 UPDATE_EXPECTATIONS=1 npm run mocha
@@ -115,17 +120,17 @@ Comment on the issue and let us know you'd like to tackle it. If for some reason
 
 Here's some to get started with:
 
-- [good first issue](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22): great for new contributors
-- [help wanted](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) issues: won't be tackled in the near future by the maintainers... we need your help!
-- [unassigned](https://github.com/marko-js/marko/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20no%3Aassignee%20) issues: open issues that no one has claimed... yet
+* [good first issue](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22): great for new contributors
+* [help wanted](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) issues: won't be tackled in the near future by the maintainers... we need your help!
+* [unassigned](https://github.com/marko-js/marko/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20no%3Aassignee%20) issues: open issues that no one has claimed... yet
 
 ## Reporting bugs and other issues
 
-A great way to contribute to the project is to send a detailed report when you encounter an issue.  Even better: submit a PR with a failing test case ([see how](#adding-a-failing-test-case)).
+A great way to contribute to the project is to send a detailed report when you encounter an issue. Even better: submit a PR with a failing test case ([see how](#adding-a-failing-test-case)).
 
-Check that [our issue database](https://github.com/marko-js/marko/issues) doesn't already include that problem or suggestion before submitting an issue. If you find a match, you can use the "subscribe" button to get notified on updates. Rather than leaving a "+1" or "I have this too" comment, you can add a  [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments)  to let us know that this is also affecting you without cluttering the conversation. However, if you have ways to reproduce the issue or have additional information that may help resolving the issue, please leave a comment.
+Check that [our issue database](https://github.com/marko-js/marko/issues) doesn't already include that problem or suggestion before submitting an issue. If you find a match, you can use the "subscribe" button to get notified on updates. Rather than leaving a "+1" or "I have this too" comment, you can add a [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) to let us know that this is also affecting you without cluttering the conversation. However, if you have ways to reproduce the issue or have additional information that may help resolving the issue, please leave a comment.
 
-We have an [ISSUE_TEMPLATE](ISSUE_TEMPLATE.md) that will populate your textarea  when you go to open an issue.  Use the relevant section and remove the rest.
+We have an [ISSUE_TEMPLATE](ISSUE_TEMPLATE.md) that will populate your textarea when you go to open an issue. Use the relevant section and remove the rest.
 
 Please provide as much detail as possible.
 
@@ -140,6 +145,7 @@ Security reports are greatly appreciated and we will publicly thank you for it.
 Once you post an issue, a maintainer will add one or more labels to it. Below is a guideline for the maintainers and anyone else who is interested in what the various labels mean.
 
 ### Type
+
 ![](https://img.shields.io/badge/type-bug-dd0000.svg)
 ![](https://img.shields.io/badge/type-unverified%20bug-aa3300.svg)
 ![](https://img.shields.io/badge/type-feature-0099dd.svg)
@@ -150,15 +156,16 @@ Once you post an issue, a maintainer will add one or more labels to it. Below is
 
 Every issue should be assigned one of these.
 
-- **bug**: A bug report
-- **unverified-bug**: A bug report that has not been verified
-- **feature**: A feature request
-- **question**: A question about how to do something in Marko
-- **community**: Related to community building, improving the contribution process, etc.
-- **tech debt**: Related to refactoring code, test structure, etc.
-- **docs**: Related to documentation/website
+* **bug**: A bug report
+* **unverified-bug**: A bug report that has not been verified
+* **feature**: A feature request
+* **question**: A question about how to do something in Marko
+* **community**: Related to community building, improving the contribution process, etc.
+* **tech debt**: Related to refactoring code, test structure, etc.
+* **docs**: Related to documentation/website
 
 ### Scope
+
 ![](https://img.shields.io/badge/scope-parser-5500cc.svg)
 ![](https://img.shields.io/badge/scope-compiler-cc0077.svg)
 ![](https://img.shields.io/badge/scope-runtime-eebb00.svg)
@@ -168,47 +175,51 @@ Every issue should be assigned one of these.
 
 What part of the Marko stack does this issue apply to? In most cases there should only be one of these.
 
-- **parser**: Relates to [`htmljs-parser`](https://github.com/marko-js/htmljs-parser)
-- **compiler**: Relates to the [compiler](../src/compiler) (server only)
-- **runtime**: Relates to the [runtime](../src/runtime) (isomorphic/universal)
-- **core-taglib**: Relates to [custom tags](../src/taglib) that ship with Marko
-- **components**: Relates to [components](../src/components)
-- **tools**: Relates to editor plugins, commandline tools, etc.
+* **parser**: Relates to [`htmljs-parser`](https://github.com/marko-js/htmljs-parser)
+* **compiler**: Relates to the [compiler](../src/compiler) (server only)
+* **runtime**: Relates to the [runtime](../src/runtime) (isomorphic/universal)
+* **core-taglib**: Relates to [custom tags](../src/taglib) that ship with Marko
+* **components**: Relates to [components](../src/components)
+* **tools**: Relates to editor plugins, commandline tools, etc.
 
 ### Status
+
 ![](https://img.shields.io/badge/status-backlog-223344.svg)
 ![](https://img.shields.io/badge/status-in%20progress-006b75.svg)
 ![](https://img.shields.io/badge/status-needs%20review-0e8a16.svg)
 
-In many cases, additional *actions* should be taken when applying one of these.
+In many cases, additional _actions_ should be taken when applying one of these.
 
-- **backlog**: Tasks planned to be worked on
-- **in progress**: This is currently being worked on.
-- **needs review**: This issue needs to be followed up on.
+* **backlog**: Tasks planned to be worked on
+* **in progress**: This is currently being worked on.
+* **needs review**: This issue needs to be followed up on.
 
 ### Reason closed
+
 ![](https://img.shields.io/badge/reason%20closed-resolved-99cc99.svg)
 ![](https://img.shields.io/badge/reason%20closed-duplicate-cc99cc.svg)
 ![](https://img.shields.io/badge/reason%20closed-declined-bb6666.svg)
 ![](https://img.shields.io/badge/reason%20closed-not%20a%20bug-997744.svg)
 ![](https://img.shields.io/badge/reason%20closed-inactivity-bfd4f2.svg)
 ![](https://img.shields.io/badge/reason%20closed-no%20issue-c5def5.svg)
-- **resolved**: The question was answered, the bug was fixed, or the feature was implemented. 
-- **duplicate**: Someone has already posted the same or a very similar issue.  A comment should be added that references the original issue.
-- **declined**: This feature will not be implemented.  
-- **not a bug**: This is not a bug, but either user error or intended behavior.
-- **inactivity**: There was not enough info to reproduce the bug or not enough interest in the feature to hash out an implementation plan and the conversation has stalled.
-- **no issue**: This wasn't so much an issue as a comment
+
+* **resolved**: The question was answered, the bug was fixed, or the feature was implemented.
+* **duplicate**: Someone has already posted the same or a very similar issue. A comment should be added that references the original issue.
+* **declined**: This feature will not be implemented.
+* **not a bug**: This is not a bug, but either user error or intended behavior.
+* **inactivity**: There was not enough info to reproduce the bug or not enough interest in the feature to hash out an implementation plan and the conversation has stalled.
+* **no issue**: This wasn't so much an issue as a comment
 
 ### Other
+
 ![](https://img.shields.io/badge/-good%20first%20issue-00cccc.svg)
 ![](https://img.shields.io/badge/-help%20wanted-33cc88.svg)
 ![](https://img.shields.io/badge/-blocked-6b0c0c.svg)
 ![](https://img.shields.io/badge/-needs%20more%20info-dd9944.svg)
 ![](https://img.shields.io/badge/-user%20land-e8c9c9.svg)
 
-- **good first issue**: Small tasks that would be good for first time contributors.
-- **help wanted**: Not on the roadmap, but we'd love for someone in the community to tackle it.
-- **blocked**: Cannot be completed until something else happens first.  This should be described in a comment with a link to the blocking issue.
-- **needs more info**: The original poster needs to provide more information before action can be taken.
-- **user land**: Something that probably won't be added to core, but could be implemented/proved out as a separate module.
+* **good first issue**: Small tasks that would be good for first time contributors.
+* **help wanted**: Not on the roadmap, but we'd love for someone in the community to tackle it.
+* **blocked**: Cannot be completed until something else happens first. This should be described in a comment with a link to the blocking issue.
+* **needs more info**: The original poster needs to provide more information before action can be taken.
+* **user land**: Something that probably won't be added to core, but could be implemented/proved out as a separate module.
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 435d3a815..3c355c6a4 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,40 +1,52 @@
 
+
 ## Bug Report
 
 ### Marko Version: x.x.x
+
 
 
 ### Details
+
 
 
 ### Expected Behavior
+
 
 
 ### Actual Behavior
+
 
 
 ### Possible Fix
+
 
 
 
Additional Info ### Your Environment + + * Environment name and version (e.g. Chrome 39, node.js 5.4): * Operating System and version (desktop or mobile): * Link to your project: ### Steps to Reproduce + + -1. -2. -3. -4. + +1. first... +2. +3. +4. ### Stack Trace +
@@ -42,18 +54,25 @@ + ## New Feature ### Description + ### Why + + ### Possible Implementation & Open Questions + + ### Is this something you're interested in working on? + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9cf1e68f6..7ce32087b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,21 +1,27 @@ ## Description + ## Motivation and Context + + ## Screenshots (if appropriate): ## Checklist: + + -- [ ] My code follows the code style of this project. -- [ ] I have updated/added documentation affected by my changes. -- [ ] I have read the **CONTRIBUTING** document. -- [ ] I have added tests to cover my changes. -- [ ] All new and existing tests passed. + +* [ ] My code follows the code style of this project. +* [ ] I have updated/added documentation affected by my changes. +* [ ] I have read the **CONTRIBUTING** document. +* [ ] I have added tests to cover my changes. +* [ ] All new and existing tests passed. _Disclaimer: Contributions via GitHub pull requests are gladly accepted from their original author. Along with any pull requests, please state that the contribution is your original work and that you license the work to the project under the project's open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project's open source license and warrant that you have the legal authority to do so._ diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index 0c81e9505..000000000 --- a/.jshintignore +++ /dev/null @@ -1,2 +0,0 @@ -/src/taglibs/async/client-reorder-runtime.js -/src/taglibs/async/client-reorder-runtime.min.js diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index f7e99cfc4..000000000 --- a/.jshintrc +++ /dev/null @@ -1,33 +0,0 @@ -{ - "predef": [ - "document", - "ShadowRoot" - ], - "node" : true, - "esnext": true, - "boss" : false, - "curly": false, - "debug": false, - "devel": false, - "eqeqeq": true, - "evil": true, - "forin": false, - "immed": true, - "laxbreak": false, - "newcap": true, - "noarg": true, - "noempty": false, - "nonew": true, - "nomen": false, - "onevar": false, - "plusplus": false, - "regexp": false, - "undef": true, - "sub": false, - "white": false, - "eqeqeq": false, - "latedef": "func", - "unused": "vars", - "strict": false, - "eqnull": true -} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..5a531e2ac --- /dev/null +++ b/.prettierignore @@ -0,0 +1,22 @@ +# minfied +*.min.js + +# tests +*actual* +*expected* +input.* + +# generated +/dist/ +/test-dist/ +/test-generated/ +*.marko.js +*.html.js +*.xml.js +*.generated.js +.nyc_output +coverage + +# controlled by npm's formatter +package-lock.json +package.json \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b4019920c..fa303dc34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,4 @@ -Changelog -========= +# Changelog # 4.x @@ -7,411 +6,410 @@ Changelog ### 4.9.0 -- Fixes related to hydration, split components, and the legacy compatibility layer [#1010](https://github.com/marko-js/marko/pull/1010) +* Fixes related to hydration, split components, and the legacy compatibility layer [#1010](https://github.com/marko-js/marko/pull/1010) -- Fix paths for vdom dependencies [#1011](https://github.com/marko-js/marko/pull/1011) +* Fix paths for vdom dependencies [#1011](https://github.com/marko-js/marko/pull/1011) ## 4.8.x ### 4.8.0 -- Add `once-[event]` directive [#990](https://github.com/marko-js/marko/pull/990) +* Add `once-[event]` directive [#990](https://github.com/marko-js/marko/pull/990) -- Improve testing setup [#989](https://github.com/marko-js/marko/pull/989) +* Improve testing setup [#989](https://github.com/marko-js/marko/pull/989) ## 4.7.x ### 4.7.5 -- Update docs for advanced attribute definition [#968](https://github.com/marko-js/marko/pull/968) +* Update docs for advanced attribute definition [#968](https://github.com/marko-js/marko/pull/968) -- Improve error message for async rendering [#958](https://github.com/marko-js/marko/pull/958) +* Improve error message for async rendering [#958](https://github.com/marko-js/marko/pull/958) ### 4.7.4 -- Make jQuery optional for legacy components [#951](https://github.com/marko-js/marko/pull/951) +* Make jQuery optional for legacy components [#951](https://github.com/marko-js/marko/pull/951) ### 4.7.3 -- Prevent onRender running on the server for legacy widgets +* Prevent onRender running on the server for legacy widgets ### 4.7.2 -- Fixes [#946](https://github.com/marko-js/marko/issues/946) - don't put legacy init code in a separate lasso bundle +* Fixes [#946](https://github.com/marko-js/marko/issues/946) - don't put legacy init code in a separate lasso bundle -- Fixes allowing conditionally binding to different roots in a legacy widget [#944](https://github.com/marko-js/marko/pull/944) +* Fixes allowing conditionally binding to different roots in a legacy widget [#944](https://github.com/marko-js/marko/pull/944) ### 4.7.1 -- Fix issue with multiple top level elements being removed twice. [#940](https://github.com/marko-js/marko/pull/940) +* Fix issue with multiple top level elements being removed twice. [#940](https://github.com/marko-js/marko/pull/940) ### 4.7.0 -- Add jQuery legacy compatibility layer support [#937](https://github.com/marko-js/marko/pull/937) +* Add jQuery legacy compatibility layer support [#937](https://github.com/marko-js/marko/pull/937) -- Reorganize Marko tests [#934](https://github.com/marko-js/marko/pull/934) +* Reorganize Marko tests [#934](https://github.com/marko-js/marko/pull/934) -- Switch to using jsdom in test suite [#935](https://github.com/marko-js/marko/pull/935) +* Switch to using jsdom in test suite [#935](https://github.com/marko-js/marko/pull/935) -- Decouple component hydration from Lasso [#929](https://github.com/marko-js/marko/pull/929) +* Decouple component hydration from Lasso [#929](https://github.com/marko-js/marko/pull/929) ## 4.6.x ### 4.6.0 -- Fixes [#914](https://github.com/marko-js/marko/issues/914) and [#920](https://github.com/marko-js/marko/issues/920) - -Resolves top-level component bugs +* Fixes [#914](https://github.com/marko-js/marko/issues/914) and [#920](https://github.com/marko-js/marko/issues/920) - + Resolves top-level component bugs -- Setup `marko.load()` to prefer precompiled templates from [marko-cli](https://github.com/marko-js/marko-cli) +* Setup `marko.load()` to prefer precompiled templates from [marko-cli](https://github.com/marko-js/marko-cli) -- Various compiler changes to improve [marko-migrate](https://github.com/marko-js/marko-migrate) +* Various compiler changes to improve [marko-migrate](https://github.com/marko-js/marko-migrate) -- Fixes [#916](https://github.com/marko-js/marko/pull/916) - Add Marko debug mode. -Adds babel plugin to remove and statically evaluate 'MARKO_DEBUG' literals for -adding deprecation warnings and hints for the runtime without a performance -penalty for production builds. +* Fixes [#916](https://github.com/marko-js/marko/pull/916) - Add Marko debug mode. + Adds babel plugin to remove and statically evaluate 'MARKO_DEBUG' literals for + adding deprecation warnings and hints for the runtime without a performance + penalty for production builds. ## 4.5.x ### 4.5.6 -- Fixes [#909](https://github.com/marko-js/marko/issues/909) - Fix condition preventing bubbling DOM events from properly being attached to a component. +* Fixes [#909](https://github.com/marko-js/marko/issues/909) - Fix condition preventing bubbling DOM events from properly being attached to a component. ### 4.5.5 -- Add 10 Awesome Marko Features article to documentation +* Add 10 Awesome Marko Features article to documentation ### 4.5.4 -- 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 +* 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 ### 4.5.3 -- Fixes [#903](https://github.com/marko-js/marko/issues/903) - Special unicode chars (\u2028 and \u2029) need to be escaped if within script tag +* Fixes [#903](https://github.com/marko-js/marko/issues/903) - Special unicode chars (\u2028 and \u2029) need to be escaped if within script tag ### 4.5.2 -- 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) +* 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) ### 4.5.1 -- 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) +* 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) ### 4.5.0 Summary of changes across all beta releases for the `4.5.0` release: -- 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 -- 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)) -- Added support for the `:scoped` modifier on attributes and deprecated `:key`: +* 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 +* 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)) +* Added support for the `:scoped` modifier on attributes and deprecated `:key`: ```marko ``` -- Fixes [#817](https://github.com/marko-js/marko/issues/817) - Support dynamic root elements -- Marko no longer attaches `id` attributes to elements for purposes of keyed matching - - Keyed elements are maintained in an internal, per-component lookup -- Keys are now assigned to all custom tags and HTML elements at compile-time to improve reliability and performance of DOM diffing -- Optimized internal bookkeeping required during rendering a UI component tree (no more UI component stack) -- DOM diffing/patching changes: - - Significant performance improvements - - morphdom is now UI component-aware +* Fixes [#817](https://github.com/marko-js/marko/issues/817) - Support dynamic root elements +* Marko no longer attaches `id` attributes to elements for purposes of keyed matching + * Keyed elements are maintained in an internal, per-component lookup +* Keys are now assigned to all custom tags and HTML elements at compile-time to improve reliability and performance of DOM diffing +* Optimized internal bookkeeping required during rendering a UI component tree (no more UI component stack) +* DOM diffing/patching changes: + * Significant performance improvements + * morphdom is now UI component-aware ### 4.5.0-beta.3 -- 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)) +* 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)) ### 4.5.0-beta.2 -- Add ids for any key when component.elId/getElId is used as an attribute value -- Use indexOf instead of includes to support Node 4 -- [docs] Fixes [#841](https://github.com/marko-js/marko/issues/841) - `docs/components.md` refers to deprecated "data" variable (#842) +* Add ids for any key when component.elId/getElId is used as an attribute value +* Use indexOf instead of includes to support Node 4 +* [docs] Fixes [#841](https://github.com/marko-js/marko/issues/841) - `docs/components.md` refers to deprecated "data" variable (#842) ### 4.5.0-beta.1 -- Add back (legacy) support for component.elId + key in template -- 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)) -- Fixes key/scope for attributes that have dashes in the name +* Add back (legacy) support for component.elId + key in template +* 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)) +* Fixes key/scope for attributes that have dashes in the name ### 4.5.0-beta.0 -- Fixes [#817](https://github.com/marko-js/marko/issues/817) - Support dynamic root elements -- Marko no longer attaches `id` attributes to elements for purposes of keyed matching - - Keyed elements are maintained in an internal, per-component lookup -- Keys are now assigned to all custom tags and HTML elements at compile-time to improve reliability and performance of DOM diffing -- Optimized internal bookkeeping required during rendering a UI component tree (no more UI component stack) -- DOM diffing/patching changes: - - Significant performance improvements - - morphdom is now UI component-aware +* Fixes [#817](https://github.com/marko-js/marko/issues/817) - Support dynamic root elements +* Marko no longer attaches `id` attributes to elements for purposes of keyed matching + * Keyed elements are maintained in an internal, per-component lookup +* Keys are now assigned to all custom tags and HTML elements at compile-time to improve reliability and performance of DOM diffing +* Optimized internal bookkeeping required during rendering a UI component tree (no more UI component stack) +* DOM diffing/patching changes: + * Significant performance improvements + * morphdom is now UI component-aware ## 4.4.x ### 4.4.28 -- fix undefined reference error in Component.js -- Increase mocha timeout to avoid CI build's failing (#821) +* fix undefined reference error in Component.js +* Increase mocha timeout to avoid CI build's failing (#821) ### 4.4.27 -- Add ability to update globals by setting new input. -- [docs] Remove uneeded command from installation docs -- [docs] Update installing.md +* Add ability to update globals by setting new input. +* [docs] Remove uneeded command from installation docs +* [docs] Update installing.md ### 4.4.26 -- Add better interop for importing modules with default exports (#803) +* Add better interop for importing modules with default exports (#803) ### 4.4.25 -- Fixes #778 - Fix Marko compiler generating incorrect path for requires on Windows. +* Fixes #778 - Fix Marko compiler generating incorrect path for requires on Windows. ### 4.4.24 -- [docs] Update installing.md +* [docs] Update installing.md ### 4.4.23 -- Fixes #796 - Fix events for event targets that are SVGElementInstance types in IE11. -- Used shortcut for escapeAtTags; -- Added `escapeAtTags` options in order to render `<@tags>` as they are; -- simplify a condition judgement in components-jquery -- Fixes #790 - Class tag should not allow nested body content. -- Update `compile/index.js` test description -- Update handleRootNodes.js (#747) -- [docs] Fix reference to lifecycle section in docs. +* Fixes #796 - Fix events for event targets that are SVGElementInstance types in IE11. +* Used shortcut for escapeAtTags; +* Added `escapeAtTags` options in order to render `<@tags>` as they are; +* simplify a condition judgement in components-jquery +* Fixes #790 - Class tag should not allow nested body content. +* Update `compile/index.js` test description +* Update handleRootNodes.js (#747) +* [docs] Fix reference to lifecycle section in docs. ### 4.4.22 -- Fixes #784 - Fix compiled preserve-attrs path. -- [testing] Fix express tests (#779) -- [docs] Update webpack.md +* Fixes #784 - Fix compiled preserve-attrs path. +* [testing] Fix express tests (#779) +* [docs] Update webpack.md ### 4.4.21 -- Updated description in `package.json` +* Updated description in `package.json` ### 4.4.20 -- update bindComponentVar to use dynamic location -- updating location of bindComponent helper +* update bindComponentVar to use dynamic location +* updating location of bindComponent helper ### 4.4.19 -- [testing] Fix key suffix test assertions. -- Address key suffix feedback. Additional tests. -- [morphdom] Removed bad and unhelpful optimization to avoid infinite loops -- [morphdom] Ensure `onBeforeNodeDiscarded` is only called once by looking to see if the node is still attached. -- [morphdom] Infinite loop fix in morphdom -- Fixes #761 - component.elId() does not work on the server -- Fixes #755 - Allow diffing of HTML, head, and body. (#756) -- [docs] Updated component docs -- [docs] Use relative link for image -- [testing] User default npm version for each Node.js version +* [testing] Fix key suffix test assertions. +* Address key suffix feedback. Additional tests. +* [morphdom] Removed bad and unhelpful optimization to avoid infinite loops +* [morphdom] Ensure `onBeforeNodeDiscarded` is only called once by looking to see if the node is still attached. +* [morphdom] Infinite loop fix in morphdom +* Fixes #761 - component.elId() does not work on the server +* Fixes #755 - Allow diffing of HTML, head, and body. (#756) +* [docs] Updated component docs +* [docs] Use relative link for image +* [testing] User default npm version for each Node.js version ### 4.4.18 -- Fixes #749 #690 - Do not rely on root node having an ID on rerender and properly handle style root nodes. +* Fixes #749 #690 - Do not rely on root node having an ID on rerender and properly handle style root nodes. ### 4.4.17 -- Put package (`browser.json`) deps before others and parent deps before child deps (#750) -- [docs] Fix typo in redux.md -- [docs] Add redux document to structure.json -- [docs] Add doc describing how to use Redux with Marko. +* Put package (`browser.json`) deps before others and parent deps before child deps (#750) +* [docs] Fix typo in redux.md +* [docs] Add redux document to structure.json +* [docs] Add doc describing how to use Redux with Marko. ### 4.4.16 -- Fix duplicate body variable +* Fix duplicate body variable ### 4.4.15 -- Fixes #739 - Should not attempt to check instanceof of type Map if it does not exist in the browser. -- Added build scripts +* Fixes #739 - Should not attempt to check instanceof of type Map if it does not exist in the browser. +* Added build scripts ### 4.4.14 -- Fixes issue with renderToString not rendering text nodes +* Fixes issue with renderToString not rendering text nodes ### 4.4.13 -- Fixes #721 - Add a Code of Conduct -- Fixes #655 - Implement renderToString in the browser. +* Fixes #721 - Add a Code of Conduct +* Fixes #655 - Implement renderToString in the browser. ### 4.4.12 -- Fixes #695 - Always ignore unrecognized tags for XML files when using the compiler. -- Fixes #705 - Throw error when the root HTML element is a component and has a dynamic id attribute. -- [testing] Additional test for root node with dynamic id of a component with a component.js file. +* Fixes #695 - Always ignore unrecognized tags for XML files when using the compiler. +* Fixes #705 - Throw error when the root HTML element is a component and has a dynamic id attribute. +* [testing] Additional test for root node with dynamic id of a component with a component.js file. ### 4.4.11 -- Fixes #728 - Do not use module keyword because webpack compiles it to a custom object. -- Fixes #719 - Support Express 4 and Express 5. -- fixes #658 by removing empty style blocks (#715) -- fixes #688 - add reference to browser.json in meta dependencies -- [docs] Fix broken link -- [docs] Fix Marko syntax in docs causing compilation errors on the website. -- [docs] Change pixels to percent in doc images. -- [testing] Purge express cache so that express tests both use correct module versions. +* Fixes #728 - Do not use module keyword because webpack compiles it to a custom object. +* Fixes #719 - Support Express 4 and Express 5. +* fixes #658 by removing empty style blocks (#715) +* fixes #688 - add reference to browser.json in meta dependencies +* [docs] Fix broken link +* [docs] Fix Marko syntax in docs causing compilation errors on the website. +* [docs] Change pixels to percent in doc images. +* [testing] Purge express cache so that express tests both use correct module versions. ### 4.4.9 -- Revert "Fixes #705 - Throw error when the root HTML element has a dynamic id …" -- [testing] Only run Node 4, 6, & 8 in travis +* Revert "Fixes #705 - Throw error when the root HTML element has a dynamic id …" +* [testing] Only run Node 4, 6, & 8 in travis ### 4.4.8 -- [docs] Clean up why-is-marko-fast.md -- [docs] Clean up marko-vs-react.md +* [docs] Clean up why-is-marko-fast.md +* [docs] Clean up marko-vs-react.md ### 4.4.7 -- Add silent option to browser-refresh and hot-reload -- Check id attribute for Literal. Update error message to include error page. -- Fixes #705 - Throw error when the root HTML element has a dynamic id attribute. -- [docs] Clean up components.md -- [docs] Fix typo in webpack.md -- [testing] give extra time for test timing out in travis -- [testing] run tests on node 8 -- [testing] ignore test-dist from coverage +* Add silent option to browser-refresh and hot-reload +* Check id attribute for Literal. Update error message to include error page. +* Fixes #705 - Throw error when the root HTML element has a dynamic id attribute. +* [docs] Clean up components.md +* [docs] Fix typo in webpack.md +* [testing] give extra time for test timing out in travis +* [testing] run tests on node 8 +* [testing] ignore test-dist from coverage ### 4.4.6 -- Fixes #693 - [SSR] Improved handling of top-level UI components with renderBody func -- Switching to using `prepublish` with npm@5 +* Fixes #693 - [SSR] Improved handling of top-level UI components with renderBody func +* Switching to using `prepublish` with npm@5 ### 4.4.3 -- Use parent module to require express patch (#701) -- [docs] Reference app should point to "marko-lasso" because "ui-components-playground" does not contain lasso -- [docs] Add articles section to docs. +* Use parent module to require express patch (#701) +* [docs] Reference app should point to "marko-lasso" because "ui-components-playground" does not contain lasso +* [docs] Add articles section to docs. ### 4.4.2 -- Build fixes related to compiler +* Build fixes related to compiler ### 4.4.0 -- Improve no-update-if condition check -- Compatibility improvements for Try Online -- Code size reduction -- Introduced src/ and dist/ folders for optimized production builds -- Fixes #695 - Default to ignoring unrecognized tags for XML files. +* Improve no-update-if condition check +* Compatibility improvements for Try Online +* Code size reduction +* Introduced src/ and dist/ folders for optimized production builds +* Fixes #695 - Default to ignoring unrecognized tags for XML files. ## 4.3.x ### 4.3.1 -- Add basic test for ensuring that res.marko returns a promise. -- enable res.marko can catch a error safe +* Add basic test for ensuring that res.marko returns a promise. +* enable res.marko can catch a error safe ### 4.3.0 -- [compiler] Added more control over how attributes are targeted to props -- Don't add root markers to tags that don't produce output -- [docs] Added docs for Marko + Huncwot integration -- [AST] Added `node.removeChildren()` -- Extend marko globals with defaults +* [compiler] Added more control over how attributes are targeted to props +* Don't add root markers to tags that don't produce output +* [docs] Added docs for Marko + Huncwot integration +* [AST] Added `node.removeChildren()` +* Extend marko globals with defaults ### 4.3.0-beta.4 -- Fixes #673 - Circular dependency is causing problems with Webpack +* Fixes #673 - Circular dependency is causing problems with Webpack ### 4.3.0-beta.3 -- Changes related to #670 - Globals must be serialized earlier to allow early mount of UI components in -- [docs] Improved docs for SSR +* Changes related to #670 - Globals must be serialized earlier to allow early mount of UI components in +* [docs] Improved docs for SSR ### 4.3.0-beta.2 -- Fixes for #670 - Add support for serialized globals and retain globals on re-render +* Fixes for #670 - Add support for serialized globals and retain globals on re-render ## 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 +* 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 +* 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 +* 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 +* 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 +* 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 +* 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 +* 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 +* 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) +* 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) +* 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 +* 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 +* 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` +* 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 +* 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) +* Marko v4! [Release Announcement](https://medium.com/@mlrawlings/marko-4-0-is-here-837884c5f60d) # 3.x @@ -419,11 +417,11 @@ Summary of changes across all beta releases for the `4.5.0` release: ### 3.13.2 -- Fixed [#478](TagLookup fails when merging taglibs) - TagLookup fails when merging taglibs +* 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) +* Fixes [#465](https://github.com/marko-js/marko/issues/465) ### 3.13.0 @@ -431,53 +429,53 @@ Summary of changes across all beta releases for the `4.5.0` release: ### 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)) +* 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 +* 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()` +* Fixes [#381](https://github.com/marko-js/marko/issues/381) - `$global` broken when using `template.stream()` ### 3.11.6 -- Internal change: `AsyncWriter` → `AsyncStream` +* Internal change: `AsyncWriter` → `AsyncStream` ### 3.11.5 -- (no changes) +* (no changes) ### 3.11.4 -- Update to `async-writer@2` +* Update to `async-writer@2` ### 3.11.3 -- Silently ignore errors when parsing tag definition code inlined in JavaScript +* 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 +* 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 - } +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 +* 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: +* Introduced the `` tag for including static HTML: ```xml @@ -487,92 +485,92 @@ require('marko/node-require').install({ ### 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) +* 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 +* 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) +* 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` +* 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)) +* 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 +* 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 +* 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 +* 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)) +* 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) +* 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` +* 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. +* Improved escaping within the `` 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)) +* 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)) +* 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). +* 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)) +* 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: +* Deprecated the `>` tag in favor of the ` from )>` tag: OLD: @@ -620,10 +618,10 @@ Finally, the nested tags for providing content for the placeholder, error and ti ### 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. +* 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: @@ -640,153 +638,153 @@ var firstName = input.firstName; ### 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)) +* 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)) +* 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 +* 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 +* 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 +* 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 +* 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 +* 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)) +* 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)) +* 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 +* 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 +* 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)) +* 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)) +* 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 +* 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 +* 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) +* 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 +* 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 +* 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 +* 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 +* Fixed #266 - Hot reloading fails if original template is deleted ### 3.1.2 -- Fixed error reporting when using `compiler.parseRaw()` -- Added test for #262 +* Fixed error reporting when using `compiler.parseRaw()` +* Added test for #262 ### 3.1.1 -- Improved whitespace removal for text nodes directly below the root +* 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 +* 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 +* 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 +* 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 +* 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 `