Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: handlebars-lang/handlebars.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 16bd606fec0ada4c811eb7afe6bfd619d88f3d37
Choose a base ref
...
head repository: handlebars-lang/handlebars.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a9a8e403213583ca90cb7c872d3a22796c37d961
Choose a head ref

Commits on May 1, 2015

  1. Fix tokenizer test for double quoted strings

    There is two consecutive tests with the same input data: "{{ foo bar \'baz\' }}"
    
    I suppose the first test should be about testing double quoted string.
    aymerick committed May 1, 2015
    Copy the full SHA
    afd595b View commit details

Commits on May 5, 2015

  1. Fix VERSION update script

    This broke after updating to es6 formatted code.
    
    Fixes #1016
    kpdecker committed May 5, 2015
    Copy the full SHA
    00bfdd7 View commit details
  2. Merge pull request #1015 from aymerick/fix-test

    Fix tokenizer test for double quoted strings
    kpdecker committed May 5, 2015
    Copy the full SHA
    8cba84d View commit details

Commits on May 6, 2015

  1. Fixes typo in tests

    mutache => mustache
    aymerick committed May 6, 2015
    Copy the full SHA
    d0d2168 View commit details
  2. Add tests for string contexts

    Fixes #1013
    kpdecker committed May 6, 2015
    Copy the full SHA
    569f288 View commit details
  3. Merge pull request #1019 from aymerick/aymerick-patch-typo-test

    Fixes typo in tests
    kpdecker committed May 6, 2015
    Copy the full SHA
    2c1d509 View commit details

Commits on Jun 8, 2015

  1. Fix minor typos in README

    Tom X. Tobin committed Jun 8, 2015
    Copy the full SHA
    d0805e9 View commit details

Commits on Jun 9, 2015

  1. Merge pull request #1037 from tomxtobin/minor-readme-typo-fixes

    Fix minor typos in README
    kpdecker committed Jun 9, 2015
    Copy the full SHA
    d2fb3a4 View commit details

Commits on Jun 26, 2015

  1. Fix location information for programs

    There appears to be a bug in our use of jison causing the parent location information to be reported to programs. I wasn’t able to work through what might be causing this so instead using the location information of the statements collection to generate the proper location information.
    
    This is a bit of a hack but we are very far behind on the Jison release train and upgrading will likely be a less than pleasant task that doesn’t provide us much benefit.
    
    Fixes #1024
    kpdecker committed Jun 26, 2015
    Copy the full SHA
    93faffa View commit details

Commits on Jul 2, 2015

  1. Updated year in License

    maqnouch committed Jul 2, 2015
    Copy the full SHA
    9bbc177 View commit details
  2. Merge pull request #1052 from maqnouch/patch-1

    Updated year in License
    kpdecker committed Jul 2, 2015
    Copy the full SHA
    8c09b3c View commit details

Commits on Jul 15, 2015

  1. Copy the full SHA
    868ef4b View commit details
  2. Copy the full SHA
    b9fe7ce View commit details

Commits on Jul 16, 2015

  1. Added spec message

    ericbn committed Jul 16, 2015
    Copy the full SHA
    2f9495c View commit details

Commits on Jul 19, 2015

  1. Copy the full SHA
    a458fe2 View commit details
  2. Copy the full SHA
    aa7a45b View commit details

Commits on Jul 20, 2015

  1. Merge pull request #1060 from ericbn/issue-1056

    #1056 Fixed grammar for nested raw blocks
    kpdecker committed Jul 20, 2015
    Copy the full SHA
    c83c363 View commit details

Commits on Jul 30, 2015

  1. Fix typo

    0xack13 committed Jul 30, 2015
    Copy the full SHA
    fe05716 View commit details
  2. Copy the full SHA
    5acf77a View commit details
  3. Merge pull request #1068 from 0xack13/master

    Fix typo
    kpdecker committed Jul 30, 2015
    Copy the full SHA
    060c087 View commit details

Commits on Aug 1, 2015

  1. Fix escaping of non-javascript identifiers

    The ‘ character would cause invalid javascript to be generated as it was not properly escaped. Switching to JSON.stringify safely handles all potential unescaped cases.
    kpdecker committed Aug 1, 2015
    Copy the full SHA
    410141c View commit details
  2. Add with block parameter support

    Fixes #1042
    kpdecker committed Aug 1, 2015
    Copy the full SHA
    2a85106 View commit details
  3. Allow empty key name in each iteration

    Fixes #1021
    kpdecker committed Aug 1, 2015
    Copy the full SHA
    1bb640b View commit details
  4. Pull sauce tests out of CI

    Disabling these until #1069 can resolve whatever the root issue is.
    kpdecker committed Aug 1, 2015
    Copy the full SHA
    e2ba22e View commit details
  5. Copy the full SHA
    231a8d7 View commit details
  6. Copy the full SHA
    15b55a3 View commit details

Commits on Aug 2, 2015

  1. Copy the full SHA
    f3e8b18 View commit details
  2. Increase code coverage

    kpdecker committed Aug 2, 2015
    Copy the full SHA
    efddc3c View commit details
  3. Copy the full SHA
    ac82842 View commit details
  4. Copy the full SHA
    b664997 View commit details

Commits on Aug 3, 2015

  1. Improve logging API

    Adds multiple variable support and the ability to set statement level logging semantics.
    
    This breaks that logger API, cleaning up the manner in which enums are set, but the other behaviors are backwards compatible.
    
    Fixes #956
    kpdecker committed Aug 3, 2015
    Copy the full SHA
    9a49d35 View commit details
  2. Remove out of date TODO

    kpdecker committed Aug 3, 2015
    Copy the full SHA
    1f11cc0 View commit details
  3. Avoid log output in test

    kpdecker committed Aug 3, 2015
    Copy the full SHA
    0aa54f4 View commit details
  4. Copy the full SHA
    9f265b9 View commit details
  5. Fix track id handling in partials

    Fixes #914
    kpdecker committed Aug 3, 2015
    Copy the full SHA
    1c08771 View commit details
  6. Avoid depth creation when context remains the same

    Creating a new depth value seems to confuse users as they don’t expect things like `if` to require multiple `..` to break out of. With the change, we avoid pushing a context to the depth list if it’s already on the top of the stack, effectively removing cases where `.` and `..` are the same object and multiple `..` references are required.
    
    This is a breaking change and all templates that utilize `..` will have to check their usage and confirm that this does not break desired behavior. Helper authors now need to take care to return the same context value whenever it is conceptually the same and to avoid behaviors that may execute children under the current context in some situations and under different contexts under other situations.
    
    Fixes #1028
    kpdecker committed Aug 3, 2015
    Copy the full SHA
    279e038 View commit details
  7. Pass undefined fields to helpers in strict mode

    This allows for `{{helper foo}}` to still operate under strict mode when `foo` is not defined on the context. This allows helpers to perform whatever existence checks they please so patterns like `{{#if foo}}{{foo}}{{/if}}` can be used to protect against missing values.
    
    Fixes #1063
    kpdecker committed Aug 3, 2015
    Copy the full SHA
    5d4b8da View commit details
  8. Always return string responses

    Certain optimizations for simple templates could result in objects returned by helpers returned rather than their string representation, resulting in some odd edge cases. This ensures that strings are always returned from the API for consistency.
    
    Fixes #1054.
    kpdecker committed Aug 3, 2015
    Copy the full SHA
    8e868ab View commit details
  9. Style updates

    kpdecker committed Aug 3, 2015
    Copy the full SHA
    9b1f9c7 View commit details
  10. Copy the full SHA
    c3cbaa2 View commit details
  11. Enforce 100% code coverage

    kpdecker committed Aug 3, 2015
    Copy the full SHA
    324d615 View commit details
  12. Copy the full SHA
    fac71ce View commit details
  13. Use += in printer

    kpdecker committed Aug 3, 2015
    Copy the full SHA
    85750f8 View commit details

Commits on Aug 4, 2015

  1. Bulletproof AST.helpers.helperExpression

    Avoid undefined values and potential false positives from other type values such as partials.
    
    Fixes #1055
    kpdecker committed Aug 4, 2015
    Copy the full SHA
    93b0760 View commit details
  2. Copy the full SHA
    bd643ce View commit details
  3. Revert "Pull sauce tests out of CI"

    This reverts commit e2ba22e.
    kpdecker committed Aug 4, 2015
    Copy the full SHA
    72eb10c View commit details
  4. Copy the full SHA
    c532b89 View commit details
  5. Specify platform for firefox in sauce tests

    Works around what appears to be an init issue within Sauce.
    kpdecker committed Aug 4, 2015
    Copy the full SHA
    bb9831b View commit details
  6. Copy the full SHA
    a44fe47 View commit details
  7. Copy the full SHA
    ba31ef8 View commit details
Showing with 23,606 additions and 4,572 deletions.
  1. +25 −0 .eslintignore
  2. +0 −199 .eslintrc
  3. +66 −0 .eslintrc.js
  4. +6 −0 .gitattributes
  5. +13 −5 .gitignore
  6. +0 −2 .istanbul.yml
  7. +0 −25 .npmignore
  8. +22 −0 .prettierignore
  9. +35 −19 .travis.yml
  10. +71 −13 CONTRIBUTING.md
  11. +140 −76 Gruntfile.js
  12. +1 −1 LICENSE
  13. +20 −290 README.markdown
  14. +36 −0 appveyor.yml
  15. +15 −0 bench/.eslintrc
  16. +12 −8 bench/dist-size.js
  17. +9 −4 bench/precompile-size.js
  18. +3 −2 bench/templates/arguments.js
  19. +12 −5 bench/templates/array-each.js
  20. +10 −3 bench/templates/array-mustache.js
  21. +5 −5 bench/templates/complex.js
  22. +10 −3 bench/templates/data.js
  23. +12 −4 bench/templates/depth-1.js
  24. +14 −4 bench/templates/depth-2.js
  25. +2 −2 bench/templates/object-mustache.js
  26. +5 −5 bench/templates/object.js
  27. +9 −6 bench/templates/partial-recursion.js
  28. +14 −6 bench/templates/partial.js
  29. +7 −5 bench/templates/paths.js
  30. +4 −4 bench/templates/string.js
  31. +3 −3 bench/templates/subexpression.js
  32. +5 −6 bench/templates/variables.js
  33. +62 −39 bench/throughput.js
  34. +79 −55 bench/util/benchwarmer.js
  35. +6 −4 bench/util/template-runner.js
  36. +6 −0 bin/.eslintrc.js
  37. +170 −105 bin/handlebars
  38. +2 −1 components/bower.json
  39. +1 −1 components/handlebars.js.nuspec
  40. +20 −0 components/package.json
  41. +99 −9 docs/compiler-api.md
  42. +19 −0 docs/decorators-api.md
  43. +12 −0 integration-testing/README.md
  44. +13 −0 integration-testing/multi-nodejs-test/.eslintrc.js
  45. +2 −0 integration-testing/multi-nodejs-test/.gitignore
  46. +16 −0 integration-testing/multi-nodejs-test/package.json
  47. +1 −0 integration-testing/multi-nodejs-test/precompile-test-template.txt.hbs
  48. +11 −0 integration-testing/multi-nodejs-test/run-handlebars.js
  49. +31 −0 integration-testing/multi-nodejs-test/test.sh
  50. +15 −0 integration-testing/run-integration-tests.sh
  51. +11 −0 integration-testing/webpack-babel-test/.babelrc
  52. +3 −0 integration-testing/webpack-babel-test/.gitignore
  53. +24 −0 integration-testing/webpack-babel-test/package.json
  54. +12 −0 integration-testing/webpack-babel-test/src/handlebars-inline-precompile-test.js
  55. +5 −0 integration-testing/webpack-babel-test/src/lib/assert.js
  56. +16 −0 integration-testing/webpack-babel-test/test.sh
  57. +32 −0 integration-testing/webpack-babel-test/webpack.config.js
  58. +3 −0 integration-testing/webpack-test/.gitignore
  59. +21 −0 integration-testing/webpack-test/package.json
  60. +6 −0 integration-testing/webpack-test/src/handlebars-default-import-pre-4.2-test.js
  61. +5 −0 integration-testing/webpack-test/src/handlebars-default-import-test.js
  62. +10 −0 integration-testing/webpack-test/src/handlebars-loader-test.js
  63. +10 −0 integration-testing/webpack-test/src/handlebars-require-vs-import-test.js
  64. +6 −0 integration-testing/webpack-test/src/handlebars-wildcard-import-pre-4.2-test.js
  65. +5 −0 integration-testing/webpack-test/src/handlebars-wildcard-import-test.js
  66. +5 −0 integration-testing/webpack-test/src/lib/assert.js
  67. +2 −0 integration-testing/webpack-test/src/test-template.handlebars
  68. +16 −0 integration-testing/webpack-test/test.sh
  69. +20 −0 integration-testing/webpack-test/webpack.config.js
  70. +6 −1 lib/handlebars.js
  71. +42 −192 lib/handlebars/base.js
  72. +10 −130 lib/handlebars/compiler/ast.js
  73. +15 −6 lib/handlebars/compiler/base.js
  74. +36 −29 lib/handlebars/compiler/code-gen.js
  75. +144 −63 lib/handlebars/compiler/compiler.js
  76. +137 −41 lib/handlebars/compiler/helpers.js
  77. +337 −115 lib/handlebars/compiler/javascript-compiler.js
  78. +48 −21 lib/handlebars/compiler/printer.js
  79. +42 −25 lib/handlebars/compiler/visitor.js
  80. +56 −30 lib/handlebars/compiler/whitespace-control.js
  81. +5 −0 lib/handlebars/decorators.js
  82. +22 −0 lib/handlebars/decorators/inline.js
  83. +41 −7 lib/handlebars/exception.js
  84. +26 −0 lib/handlebars/helpers.js
  85. +35 −0 lib/handlebars/helpers/block-helper-missing.js
  86. +101 −0 lib/handlebars/helpers/each.js
  87. +15 −0 lib/handlebars/helpers/helper-missing.js
  88. +33 −0 lib/handlebars/helpers/if.js
  89. +19 −0 lib/handlebars/helpers/log.js
  90. +9 −0 lib/handlebars/helpers/lookup.js
  91. +39 −0 lib/handlebars/helpers/with.js
  92. +11 −0 lib/handlebars/internal/create-new-lookup-object.js
  93. +70 −0 lib/handlebars/internal/proto-access.js
  94. +13 −0 lib/handlebars/internal/wrapHelper.js
  95. +39 −0 lib/handlebars/logger.js
  96. +2 −2 lib/handlebars/no-conflict.js
  97. +284 −48 lib/handlebars/runtime.js
  98. +28 −13 lib/handlebars/utils.js
  99. +253 −91 lib/precompiler.js
  100. +9 −0 nyc.config.js
  101. +10,869 −0 package-lock.json
  102. +82 −24 package.json
  103. +5 −0 prettier.config.js
  104. +95 −0 print-script
  105. +829 −116 release-notes.md
  106. +5 −0 runtime.d.ts
  107. +17 −6 spec/.eslintrc
  108. +6 −3 spec/amd-runtime.html
  109. +7 −3 spec/amd.html
  110. +6 −0 spec/artifacts/known.helpers.handlebars
  111. +1 −0 spec/artifacts/non.default.extension.hbs
  112. +1 −0 spec/artifacts/partial.template.handlebars
  113. +276 −134 spec/ast.js
  114. +472 −173 spec/basic.js
  115. +386 −82 spec/blocks.js
  116. +592 −179 spec/builtins.js
  117. +141 −21 spec/compiler.js
  118. +179 −172 spec/data.js
  119. +21 −4 spec/env/browser.js
  120. +201 −18 spec/env/common.js
  121. +10 −2 spec/env/node.js
  122. +34 −16 spec/env/runner.js
  123. +25 −5 spec/env/runtime.js
  124. +6 −0 spec/expected/bom.amd.js
  125. +3 −0 spec/expected/compiled.string.txt
  126. +1 −1 spec/expected/empty.amd.js
  127. +1 −0 spec/expected/empty.amd.min.js
  128. +6 −0 spec/expected/empty.amd.namespace.js
  129. +3 −0 spec/expected/empty.amd.simple.js
  130. +6 −0 spec/expected/empty.common.js
  131. +10 −0 spec/expected/empty.name.amd.js
  132. +6 −0 spec/expected/empty.root.amd.js
  133. +6 −0 spec/expected/handlebar.path.amd.js
  134. +25 −0 spec/expected/help.menu.txt
  135. +10 −0 spec/expected/namespace.amd.js
  136. +6 −0 spec/expected/non.default.extension.amd.js
  137. +24 −0 spec/expected/non.empty.amd.known.helper.js
  138. +6 −0 spec/expected/partial.template.js
  139. +2 −0 spec/expected/source.map.amd.js
  140. +754 −424 spec/helpers.js
  141. +6 −2 spec/index.html
  142. +52 −11 spec/javascript-compiler.js
  143. +1 −1 spec/mustache
  144. +290 −69 spec/parser.js
  145. +560 −127 spec/partials.js
  146. +312 −76 spec/precompiler.js
  147. +432 −104 spec/regressions.js
  148. +2 −2 spec/require.js
  149. +75 −43 spec/runtime.js
  150. +432 −0 spec/security.js
  151. +15 −9 spec/source-map.js
  152. +21 −19 spec/spec.js
  153. +117 −76 spec/strict.js
  154. +162 −131 spec/string-params.js
  155. +215 −175 spec/subexpressions.js
  156. +1 −0 spec/tmp/.gitkeep
  157. +418 −48 spec/tokenizer.js
  158. +301 −131 spec/track-ids.js
  159. +6 −3 spec/umd-runtime.html
  160. +7 −3 spec/umd.html
  161. +15 −5 spec/utils.js
  162. 0 spec/{env → vendor}/json2.js
  163. 0 spec/{env → vendor}/require.js
  164. +53 −30 spec/visitor.js
  165. +123 −43 spec/whitespace-control.js
  166. +17 −7 src/handlebars.l
  167. +54 −18 src/handlebars.yy
  168. +1 −1 src/parser-prefix.js
  169. +14 −0 tasks/.eslintrc.js
  170. +17 −51 tasks/metrics.js
  171. +26 −22 tasks/parser.js
  172. +102 −0 tasks/publish-to-aws.js
  173. +0 −83 tasks/publish.js
  174. +9 −0 tasks/task-tests/.eslintrc.js
  175. +1 −0 tasks/task-tests/README.md
  176. +121 −0 tasks/task-tests/git.test.js
  177. 0 tasks/task-tests/mocha.opts
  178. +232 −0 tasks/test-bin.js
  179. +22 −0 tasks/test-mocha.js
  180. +0 −44 tasks/test.js
  181. +13 −0 tasks/util/async-grunt-task.js
  182. +51 −0 tasks/util/exec-file.js
  183. +61 −95 tasks/util/git.js
  184. +48 −27 tasks/version.js
  185. +422 −0 types/index.d.ts
  186. +258 −0 types/test.ts
  187. +17 −0 types/tsconfig.json
  188. +79 −0 types/tslint.json
25 changes: 25 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.rvmrc
.DS_Store
/tmp/
*.sublime-project
*.sublime-workspace
npm-debug.log
sauce_connect.log*
.idea
yarn-error.log
node_modules
/handlebars-release.tgz
.nyc_output

# Generated files
lib/handlebars/compiler/parser.js
/coverage/
/dist/
/integration-testing/*/dist/

# Third-party or files that must remain unchanged
/spec/expected/
/spec/vendor

# JS-Snippets
src/*.js
199 changes: 0 additions & 199 deletions .eslintrc

This file was deleted.

66 changes: 66 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
module.exports = {
extends: ['eslint:recommended', 'plugin:compat/recommended', 'prettier'],
globals: {
self: false
},
env: {
node: true,
es6: true
},
rules: {
'no-console': 'warn',

// temporarily disabled until the violating places are fixed.
'no-func-assign': 'off',
'no-sparse-arrays': 'off',

// Best Practices //
//----------------//
'default-case': 'warn',
'guard-for-in': 'warn',
'no-alert': 'error',
'no-caller': 'error',
'no-div-regex': 'warn',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-floating-decimal': 'error',
'no-implied-eval': 'error',
'no-iterator': 'error',
'no-labels': 'error',
'no-lone-blocks': 'error',
'no-loop-func': 'error',
'no-multi-str': 'warn',
'no-global-assign': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-octal-escape': 'error',
'no-process-env': 'error',
'no-proto': 'error',
'no-return-assign': 'error',
'no-script-url': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-throw-literal': 'error',
'no-unused-expressions': 'error',
'no-warning-comments': 'warn',
'no-with': 'error',
radix: 'error',

// Variables //
//-----------//
'no-label-var': 'error',
'no-undef-init': 'error',
'no-use-before-define': ['error', 'nofunc'],

// ECMAScript 6 //
//--------------//
'no-var': 'error'
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 6,
ecmaFeatures: {}
}
};
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Handlebars-template fixtures in test cases need deterministic eol
*.handlebars text eol=lf
*.hbs text eol=lf

# Lexer files as well
*.l text eol=lf
18 changes: 13 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
vendor
.rvmrc
.DS_Store
lib/handlebars/compiler/parser.js
/dist/
/tmp/
/coverage/
node_modules
*.sublime-project
*.sublime-workspace
npm-debug.log
sauce_connect.log*
.idea
/yarn-error.log
/yarn.lock
node_modules
/handlebars-release.tgz
.nyc_output

# Generated files
lib/handlebars/compiler/parser.js
/coverage/
/dist/
/integration-testing/*/dist/
/spec/tmp/*
2 changes: 0 additions & 2 deletions .istanbul.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .npmignore

This file was deleted.

22 changes: 22 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.rvmrc
.DS_Store
/tmp/
*.sublime-project
*.sublime-workspace
npm-debug.log
sauce_connect.log*
.idea
yarn-error.log
node_modules
/handlebars-release.tgz
.nyc_output

# Generated files
lib/handlebars/compiler/parser.js
/coverage/
/dist/
/integration-testing/*/dist/

# Third-party or files that must remain unchanged
/spec/expected/
/spec/vendor
Loading