No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

CHANGELOG.md 14KB

hace 12 años
hace 12 años
hace 13 años
hace 13 años
hace 13 años
hace 13 años
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. # Change Log
  2. All notable changes to this project will be documented in this file.
  3. This project adheres to [Semantic Versioning](http://semver.org/).
  4. ## [3.0.0] / x August 2018
  5. We are very happy to announce a new major version of mustache.js. We want to be very careful not to break projects
  6. out in the wild, and adhering to [Semantic Versioning](http://semver.org/) we have therefore cut this new major version.
  7. The changes introduced will likely not require any actions for most using projects, the things to look out for that
  8. might cause unexpected rendering results are described in the migration guide below.
  9. ### Major
  10. * [#618]: Allow rendering properties of primitive types that are not objects, by [@raymond-lam].
  11. * [#643]: `Writer.prototype.parse` to cache by tags in addition to template string, by [@raymond-lam].
  12. * [#664]: Fix `Writer.prototype.parse` cache, by [@seminaoki].
  13. ### Minor
  14. * [#673]: Add `tags` parameter to `Mustache.render()`, by [@raymond-lam].
  15. ### Migrating from mustache.js v2.x to v3.x
  16. #### Rendering properties of primitive types
  17. We now allow properties of primitive types to be rendered, that means `Array.length`, `String.length` and similar. A
  18. corner case where this could cause unexpected output follows:
  19. View:
  20. ```
  21. {
  22. length: 13,
  23. stooges: [
  24. { name: "Moe" },
  25. { name: "Larry" },
  26. { name: "Curly" }
  27. ]
  28. }
  29. ```
  30. Template:
  31. ```
  32. There are {{stooges.length}} Stooges!
  33. ```
  34. Output with v3.0:
  35. ```
  36. There are 3 Stooges!
  37. ```
  38. Output with v2.x:
  39. ```
  40. There are 13 Stooges!
  41. ```
  42. #### Caching for templates with custom tags
  43. ## [2.3.2] / 17 August 2018
  44. This release is made to revert changes introduced in [2.3.1] that caused unexpected behaviour for several users.
  45. ### Minor
  46. * [#670]: Rollback template cache causing unexpected behaviour, by [@raymond-lam].
  47. ## [2.3.1] / 7 August 2018
  48. ### Minor
  49. * [#643]: `Writer.prototype.parse` to cache by tags in addition to template string, by [@raymond-lam].
  50. * [#664]: Fix `Writer.prototype.parse` cache, by [@seminaoki].
  51. ### Dev
  52. * [#666]: Install release tools with npm rather than pre-commit hook & `Rakefile`, by [@phillipj].
  53. * [#667], [#668]: Stabilize browser test suite, by [@phillipj].
  54. ### Docs
  55. * [#644]: Document global Mustache.escape overriding capacity, by [@paultopia].
  56. * [#657]: Correct `Mustache.parse()` return type documentation, by [@bbrooks].
  57. ## [2.3.0] / 8 November 2016
  58. ### Minor
  59. * [#540]: Add optional `output` argument to mustache CLI, by [@wizawu].
  60. * [#597]: Add compatibility with amdclean, by [@mightyplow].
  61. ### Dev
  62. * [#553]: Assert `null` lookup when rendering an unescaped value, by [@dasilvacontin].
  63. * [#580], [#610]: Ignore eslint for greenkeeper updates, by [@phillipj].
  64. * [#560]: Fix CLI tests for Windows, by [@kookookchoozeus].
  65. * Run browser tests w/node v4, by [@phillipj].
  66. ### Docs
  67. * [#542]: Add API documentation to README, by [@tomekwi].
  68. * [#546]: Add missing syntax highlighting to README code blocks, by [@pra85].
  69. * [#569]: Update Ctemplate links in README, by [@mortonfox].
  70. * [#592]: Change "loadUser" to "loadUser()" in README, by [@Flaque].
  71. * [#593]: Adding doctype to HTML code example in README, by [@calvinf].
  72. ### Dependencies
  73. * eslint -> 2.2.0. Breaking changes fix by [@phillipj]. [#548]
  74. * eslint -> 2.5.1.
  75. * mocha -> 3.0.2.
  76. * zuul -> 3.11.0.
  77. ## [2.2.1] / 13 December 2015
  78. ### Fixes
  79. * Improve HTML escaping, by [@phillipj].
  80. * Fix inconsistency in defining global mustache object, by [@simast].
  81. * Fix switch-case indent error, by [@norfish].
  82. * Unpin chai and eslint versions, by [@dasilvacontin].
  83. * Update README.md with proper grammar, by [@EvanLovely].
  84. * Update mjackson username in README, by [@mjackson].
  85. * Remove syntax highlighting in README code sample, by [@imagentleman].
  86. * Fix typo in README, by [@Xcrucifier].
  87. * Fix link typo in README, by [@keirog].
  88. ## [2.2.0] / 15 October 2015
  89. ### Added
  90. * Add Partials support to CLI, by [@palkan].
  91. ### Changed
  92. * Move install instructions to README's top, by [@mateusortiz]
  93. * Improved devhook install output, by [@ShashankaNataraj].
  94. * Clarifies and improves language in documentation, by [@jfmercer].
  95. * Linting CLI tool, by [@phillipj].
  96. * npm 2.x and node v4 on Travis, by [@phillipj].
  97. ### Fixes
  98. * Fix README spelling error to "aforementioned", by [@djchie].
  99. * Equal error message test in .render() for server and browser, by [@phillipj].
  100. ### Dependencies
  101. * chai -> 3.3.0
  102. * eslint -> 1.6.0
  103. ## [2.1.3] / 23 July 2015
  104. ### Added
  105. * Throw error when providing .render() with invalid template type, by [@phillipj].
  106. * Documents use of string literals containing double quotes, by [@jfmercer].
  107. ### Changed
  108. * Move mustache gif to githubusercontent, by [@Andersos].
  109. ### Fixed
  110. * Update UMD Shim to be resilient to HTMLElement global pollution, by [@mikesherov].
  111. ## [2.1.2] / 17 June 2015
  112. ### Added
  113. * Mustache global definition ([#466]) by [@yousefcisco].
  114. ## [2.1.1] / 11 June 2015
  115. ### Added
  116. * State that we use semver on the change log, by [@dasilvacontin].
  117. * Added version links to change log, by [@dasilvacontin].
  118. ### Fixed
  119. * Bugfix for using values from view's context prototype, by [@phillipj].
  120. * Improve test with undefined/null lookup hit using dot notation, by [@dasilvacontin].
  121. * Bugfix for null/undefined lookup hit when using dot notation, by [@phillipj].
  122. * Remove moot `version` property from bower.json, by [@kkirsche].
  123. * bower.json doesn't require a version bump via hook, by [@dasilvacontin].
  124. ## [2.1.0] / 5 June 2015
  125. * Added license attribute to package.json, by [@pgilad].
  126. * Minor changes to make mustache.js compatible with both WSH and ASP, by [@nagaozen].
  127. * Improve CLI view parsing error, by [@phillipj].
  128. * Bugfix for view context cache, by [@phillipj].
  129. ## [2.0.0] / 27 Mar 2015
  130. * Fixed lookup not stopping upon finding `undefined` or `null` values, by [@dasilvacontin].
  131. * Refactored pre-commit hook, by [@dasilvacontin].
  132. ## [1.2.0] / 24 Mar 2015
  133. * Added -v option to CLI, by [@phillipj].
  134. * Bugfix for rendering Number when it serves as the Context, by [@phillipj].
  135. * Specified files in package.json for a cleaner install, by [@phillipj].
  136. ## [1.1.0] / 18 Feb 2015
  137. * Refactor Writer.renderTokens() for better readability, by [@phillipj].
  138. * Cleanup tests section in readme, by [@phillipj].
  139. * Added JSHint to tests/CI, by [@phillipj].
  140. * Added node v0.12 on travis, by [@phillipj].
  141. * Created command line tool, by [@phillipj].
  142. * Added *falsy* to Inverted Sections description in README, by [@kristijanmatic].
  143. ## [1.0.0] / 20 Dec 2014
  144. * Inline tag compilation, by [@mjackson].
  145. * Fixed AMD registration, volo package.json entry, by [@jrburke].
  146. * Added spm support, by [@afc163].
  147. * Only access properties of objects on Context.lookup, by [@cmbuckley].
  148. ## [0.8.2] / 17 Mar 2014
  149. * Supporting Bower through a bower.json file.
  150. ## [0.8.1] / 3 Jan 2014
  151. * Fix usage of partial templates.
  152. ## [0.8.0] / 2 Dec 2013
  153. * Remove compile* writer functions, use mustache.parse instead. Smaller API.
  154. * Throw an error when rendering a template that contains higher-order sections and
  155. the original template is not provided.
  156. * Remove low-level Context.make function.
  157. * Better code readability and inline documentation.
  158. * Stop caching templates by name.
  159. ## [0.7.3] / 5 Nov 2013
  160. * Don't require the original template to be passed to the rendering function
  161. when using compiled templates. This is still required when using higher-order
  162. functions in order to be able to extract the portion of the template
  163. that was contained by that section. Fixes [#262].
  164. * Performance improvements.
  165. ## [0.7.2] / 27 Dec 2012
  166. * Fixed a rendering bug ([#274]) when using nested higher-order sections.
  167. * Better error reporting on failed parse.
  168. * Converted tests to use mocha instead of vows.
  169. ## [0.7.1] / 6 Dec 2012
  170. * Handle empty templates gracefully. Fixes [#265], [#267], and [#270].
  171. * Cache partials by template, not by name. Fixes [#257].
  172. * Added Mustache.compileTokens to compile the output of Mustache.parse. Fixes
  173. [#258].
  174. ## [0.7.0] / 10 Sep 2012
  175. * Rename Renderer => Writer.
  176. * Allow partials to be loaded dynamically using a callback (thanks
  177. [@TiddoLangerak] for the suggestion).
  178. * Fixed a bug with higher-order sections that prevented them from being
  179. passed the raw text of the section from the original template.
  180. * More concise token format. Tokens also include start/end indices in the
  181. original template.
  182. * High-level API is consistent with the Writer API.
  183. * Allow partials to be passed to the pre-compiled function (thanks
  184. [@fallenice]).
  185. * Don't use eval (thanks [@cweider]).
  186. ## [0.6.0] / 31 Aug 2012
  187. * Use JavaScript's definition of falsy when determining whether to render an
  188. inverted section or not. Issue [#186].
  189. * Use Mustache.escape to escape values inside {{}}. This function may be
  190. reassigned to alter the default escaping behavior. Issue [#244].
  191. * Fixed a bug that clashed with QUnit (thanks [@kannix]).
  192. * Added volo support (thanks [@guybedford]).
  193. [3.0.0]: https://github.com/janl/mustache.js/compare/v2.3.2...v3.0.0
  194. [2.3.2]: https://github.com/janl/mustache.js/compare/v2.3.1...v2.3.2
  195. [2.3.1]: https://github.com/janl/mustache.js/compare/v2.3.0...v2.3.1
  196. [2.3.0]: https://github.com/janl/mustache.js/compare/v2.2.1...v2.3.0
  197. [2.2.1]: https://github.com/janl/mustache.js/compare/v2.2.0...v2.2.1
  198. [2.2.0]: https://github.com/janl/mustache.js/compare/v2.1.3...v2.2.0
  199. [2.1.3]: https://github.com/janl/mustache.js/compare/v2.1.2...v2.1.3
  200. [2.1.2]: https://github.com/janl/mustache.js/compare/v2.1.1...v2.1.2
  201. [2.1.1]: https://github.com/janl/mustache.js/compare/v2.1.0...v2.1.1
  202. [2.1.0]: https://github.com/janl/mustache.js/compare/v2.0.0...v2.1.0
  203. [2.0.0]: https://github.com/janl/mustache.js/compare/v1.2.0...v2.0.0
  204. [1.2.0]: https://github.com/janl/mustache.js/compare/v1.1.0...v1.2.0
  205. [1.1.0]: https://github.com/janl/mustache.js/compare/v1.0.0...v1.1.0
  206. [1.0.0]: https://github.com/janl/mustache.js/compare/0.8.2...v1.0.0
  207. [0.8.2]: https://github.com/janl/mustache.js/compare/0.8.1...0.8.2
  208. [0.8.1]: https://github.com/janl/mustache.js/compare/0.8.0...0.8.1
  209. [0.8.0]: https://github.com/janl/mustache.js/compare/0.7.3...0.8.0
  210. [0.7.3]: https://github.com/janl/mustache.js/compare/0.7.2...0.7.3
  211. [0.7.2]: https://github.com/janl/mustache.js/compare/0.7.1...0.7.2
  212. [0.7.1]: https://github.com/janl/mustache.js/compare/0.7.0...0.7.1
  213. [0.7.0]: https://github.com/janl/mustache.js/compare/0.6.0...0.7.0
  214. [0.6.0]: https://github.com/janl/mustache.js/compare/0.5.2...0.6.0
  215. [#186]: https://github.com/janl/mustache.js/issues/186
  216. [#244]: https://github.com/janl/mustache.js/issues/244
  217. [#257]: https://github.com/janl/mustache.js/issues/257
  218. [#258]: https://github.com/janl/mustache.js/issues/258
  219. [#262]: https://github.com/janl/mustache.js/issues/262
  220. [#265]: https://github.com/janl/mustache.js/issues/265
  221. [#267]: https://github.com/janl/mustache.js/issues/267
  222. [#270]: https://github.com/janl/mustache.js/issues/270
  223. [#274]: https://github.com/janl/mustache.js/issues/274
  224. [#466]: https://github.com/janl/mustache.js/issues/466
  225. [#540]: https://github.com/janl/mustache.js/issues/540
  226. [#542]: https://github.com/janl/mustache.js/issues/542
  227. [#546]: https://github.com/janl/mustache.js/issues/546
  228. [#548]: https://github.com/janl/mustache.js/issues/548
  229. [#553]: https://github.com/janl/mustache.js/issues/553
  230. [#560]: https://github.com/janl/mustache.js/issues/560
  231. [#569]: https://github.com/janl/mustache.js/issues/569
  232. [#580]: https://github.com/janl/mustache.js/issues/580
  233. [#592]: https://github.com/janl/mustache.js/issues/592
  234. [#593]: https://github.com/janl/mustache.js/issues/593
  235. [#597]: https://github.com/janl/mustache.js/issues/597
  236. [#610]: https://github.com/janl/mustache.js/issues/610
  237. [#643]: https://github.com/janl/mustache.js/issues/643
  238. [#644]: https://github.com/janl/mustache.js/issues/644
  239. [#657]: https://github.com/janl/mustache.js/issues/657
  240. [#664]: https://github.com/janl/mustache.js/issues/664
  241. [#666]: https://github.com/janl/mustache.js/issues/666
  242. [#667]: https://github.com/janl/mustache.js/issues/667
  243. [#668]: https://github.com/janl/mustache.js/issues/668
  244. [#670]: https://github.com/janl/mustache.js/issues/670
  245. [#618]: https://github.com/janl/mustache.js/issues/618
  246. [#673]: https://github.com/janl/mustache.js/issues/673
  247. [@afc163]: https://github.com/afc163
  248. [@Andersos]: https://github.com/Andersos
  249. [@bbrooks]: https://github.com/bbrooks
  250. [@calvinf]: https://github.com/calvinf
  251. [@cmbuckley]: https://github.com/cmbuckley
  252. [@cweider]: https://github.com/cweider
  253. [@dasilvacontin]: https://github.com/dasilvacontin
  254. [@djchie]: https://github.com/djchie
  255. [@EvanLovely]: https://github.com/EvanLovely
  256. [@fallenice]: https://github.com/fallenice
  257. [@Flaque]: https://github.com/Flaque
  258. [@guybedford]: https://github.com/guybedford
  259. [@imagentleman]: https://github.com/imagentleman
  260. [@jfmercer]: https://github.com/jfmercer
  261. [@jrburke]: https://github.com/jrburke
  262. [@kannix]: https://github.com/kannix
  263. [@keirog]: https://github.com/keirog
  264. [@kkirsche]: https://github.com/kkirsche
  265. [@kookookchoozeus]: https://github.com/kookookchoozeus
  266. [@kristijanmatic]: https://github.com/kristijanmatic
  267. [@mateusortiz]: https://github.com/mateusortiz
  268. [@mightyplow]: https://github.com/mightyplow
  269. [@mikesherov]: https://github.com/mikesherov
  270. [@mjackson]: https://github.com/mjackson
  271. [@mortonfox]: https://github.com/mortonfox
  272. [@nagaozen]: https://github.com/nagaozen
  273. [@norfish]: https://github.com/norfish
  274. [@palkan]: https://github.com/palkan
  275. [@paultopia]: https://github.com/paultopia
  276. [@pgilad]: https://github.com/pgilad
  277. [@phillipj]: https://github.com/phillipj
  278. [@pra85]: https://github.com/pra85
  279. [@raymond-lam]: https://github.com/raymond-lam
  280. [@seminaoki]: https://github.com/seminaoki
  281. [@ShashankaNataraj]: https://github.com/ShashankaNataraj
  282. [@simast]: https://github.com/simast
  283. [@TiddoLangerak]: https://github.com/TiddoLangerak
  284. [@tomekwi]: https://github.com/tomekwi
  285. [@wizawu]: https://github.com/wizawu
  286. [@Xcrucifier]: https://github.com/Xcrucifier
  287. [@yousefcisco]: https://github.com/yousefcisco