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: 205c61cfb1acdb599bbdfcf2d356641254e09e5c
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
Loading
Showing with 22,010 additions and 4,161 deletions.
  1. +25 −0 .eslintignore
  2. +0 −200 .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. +33 −21 .travis.yml
  10. +71 −13 CONTRIBUTING.md
  11. +134 −74 Gruntfile.js
  12. +1 −1 LICENSE
  13. +12 −9 README.markdown
  14. +36 −0 appveyor.yml
  15. +2 −1 bench/.eslintrc
  16. +12 −7 bench/dist-size.js
  17. +1 −1 bench/index.js
  18. +9 −4 bench/precompile-size.js
  19. +2 −1 bench/templates/arguments.js
  20. +8 −1 bench/templates/array-each.js
  21. +8 −1 bench/templates/array-mustache.js
  22. +4 −4 bench/templates/complex.js
  23. +8 −1 bench/templates/data.js
  24. +9 −1 bench/templates/depth-1.js
  25. +13 −3 bench/templates/depth-2.js
  26. +1 −1 bench/templates/index.js
  27. +4 −1 bench/templates/partial-recursion.js
  28. +10 −2 bench/templates/partial.js
  29. +5 −3 bench/templates/paths.js
  30. +1 −2 bench/templates/variables.js
  31. +50 −26 bench/throughput.js
  32. +53 −27 bench/util/benchwarmer.js
  33. +3 −3 bench/util/template-runner.js
  34. +6 −0 bin/.eslintrc.js
  35. +160 −112 bin/handlebars
  36. +1 −1 components/bower.json
  37. +1 −1 components/handlebars.js.nuspec
  38. +20 −0 components/package.json
  39. +57 −7 docs/compiler-api.md
  40. +2 −2 docs/decorators-api.md
  41. +12 −0 integration-testing/README.md
  42. +13 −0 integration-testing/multi-nodejs-test/.eslintrc.js
  43. +2 −0 integration-testing/multi-nodejs-test/.gitignore
  44. +16 −0 integration-testing/multi-nodejs-test/package.json
  45. +1 −0 integration-testing/multi-nodejs-test/precompile-test-template.txt.hbs
  46. +11 −0 integration-testing/multi-nodejs-test/run-handlebars.js
  47. +31 −0 integration-testing/multi-nodejs-test/test.sh
  48. +15 −0 integration-testing/run-integration-tests.sh
  49. +11 −0 integration-testing/webpack-babel-test/.babelrc
  50. +3 −0 integration-testing/webpack-babel-test/.gitignore
  51. +24 −0 integration-testing/webpack-babel-test/package.json
  52. +12 −0 integration-testing/webpack-babel-test/src/handlebars-inline-precompile-test.js
  53. +5 −0 integration-testing/webpack-babel-test/src/lib/assert.js
  54. +16 −0 integration-testing/webpack-babel-test/test.sh
  55. +32 −0 integration-testing/webpack-babel-test/webpack.config.js
  56. +3 −0 integration-testing/webpack-test/.gitignore
  57. +21 −0 integration-testing/webpack-test/package.json
  58. +6 −0 integration-testing/webpack-test/src/handlebars-default-import-pre-4.2-test.js
  59. +5 −0 integration-testing/webpack-test/src/handlebars-default-import-test.js
  60. +10 −0 integration-testing/webpack-test/src/handlebars-loader-test.js
  61. +10 −0 integration-testing/webpack-test/src/handlebars-require-vs-import-test.js
  62. +6 −0 integration-testing/webpack-test/src/handlebars-wildcard-import-pre-4.2-test.js
  63. +5 −0 integration-testing/webpack-test/src/handlebars-wildcard-import-test.js
  64. +5 −0 integration-testing/webpack-test/src/lib/assert.js
  65. +2 −0 integration-testing/webpack-test/src/test-template.handlebars
  66. +16 −0 integration-testing/webpack-test/test.sh
  67. +20 −0 integration-testing/webpack-test/webpack.config.js
  68. +6 −1 lib/handlebars.js
  69. +26 −10 lib/handlebars/base.js
  70. +10 −6 lib/handlebars/compiler/ast.js
  71. +13 −3 lib/handlebars/compiler/base.js
  72. +26 −23 lib/handlebars/compiler/code-gen.js
  73. +98 −62 lib/handlebars/compiler/compiler.js
  74. +30 −23 lib/handlebars/compiler/helpers.js
  75. +265 −108 lib/handlebars/compiler/javascript-compiler.js
  76. +19 −12 lib/handlebars/compiler/printer.js
  77. +8 −1 lib/handlebars/compiler/visitor.js
  78. +48 −30 lib/handlebars/compiler/whitespace-control.js
  79. +0 −1 lib/handlebars/decorators.js
  80. +1 −1 lib/handlebars/decorators/inline.js
  81. +40 −7 lib/handlebars/exception.js
  82. +9 −0 lib/handlebars/helpers.js
  83. +7 −4 lib/handlebars/helpers/block-helper-missing.js
  84. +45 −23 lib/handlebars/helpers/each.js
  85. +3 −1 lib/handlebars/helpers/helper-missing.js
  86. +16 −3 lib/handlebars/helpers/if.js
  87. +2 −2 lib/handlebars/helpers/log.js
  88. +6 −2 lib/handlebars/helpers/lookup.js
  89. +18 −3 lib/handlebars/helpers/with.js
  90. +11 −0 lib/handlebars/internal/create-new-lookup-object.js
  91. +70 −0 lib/handlebars/internal/proto-access.js
  92. +13 −0 lib/handlebars/internal/wrapHelper.js
  93. +8 −4 lib/handlebars/logger.js
  94. +1 −2 lib/handlebars/no-conflict.js
  95. +234 −53 lib/handlebars/runtime.js
  96. +17 −9 lib/handlebars/utils.js
  97. +149 −85 lib/precompiler.js
  98. +9 −0 nyc.config.js
  99. +10,869 −0 package-lock.json
  100. +75 −19 package.json
  101. +5 −0 prettier.config.js
  102. +765 −136 release-notes.md
  103. +5 −0 runtime.d.ts
  104. +17 −6 spec/.eslintrc
  105. +6 −3 spec/amd-runtime.html
  106. +6 −3 spec/amd.html
  107. +6 −0 spec/artifacts/known.helpers.handlebars
  108. +1 −0 spec/artifacts/non.default.extension.hbs
  109. +1 −0 spec/artifacts/partial.template.handlebars
  110. +262 −75 spec/ast.js
  111. +467 −176 spec/basic.js
  112. +304 −195 spec/blocks.js
  113. +530 −208 spec/builtins.js
  114. +141 −27 spec/compiler.js
  115. +179 −172 spec/data.js
  116. +14 −2 spec/env/browser.js
  117. +176 −12 spec/env/common.js
  118. +8 −0 spec/env/node.js
  119. +12 −8 spec/env/runner.js
  120. +18 −3 spec/env/runtime.js
  121. +6 −0 spec/expected/bom.amd.js
  122. +3 −0 spec/expected/compiled.string.txt
  123. +1 −1 spec/expected/empty.amd.js
  124. +1 −0 spec/expected/empty.amd.min.js
  125. +6 −0 spec/expected/empty.amd.namespace.js
  126. +3 −0 spec/expected/empty.amd.simple.js
  127. +6 −0 spec/expected/empty.common.js
  128. +10 −0 spec/expected/empty.name.amd.js
  129. +6 −0 spec/expected/empty.root.amd.js
  130. +6 −0 spec/expected/handlebar.path.amd.js
  131. +25 −0 spec/expected/help.menu.txt
  132. +10 −0 spec/expected/namespace.amd.js
  133. +6 −0 spec/expected/non.default.extension.amd.js
  134. +24 −0 spec/expected/non.empty.amd.known.helper.js
  135. +6 −0 spec/expected/partial.template.js
  136. +2 −0 spec/expected/source.map.amd.js
  137. +749 −442 spec/helpers.js
  138. +5 −2 spec/index.html
  139. +50 −9 spec/javascript-compiler.js
  140. +1 −1 spec/mustache
  141. +261 −99 spec/parser.js
  142. +510 −205 spec/partials.js
  143. +239 −84 spec/precompiler.js
  144. +408 −155 spec/regressions.js
  145. +2 −2 spec/require.js
  146. +75 −43 spec/runtime.js
  147. +432 −0 spec/security.js
  148. +15 −9 spec/source-map.js
  149. +19 −17 spec/spec.js
  150. +112 −88 spec/strict.js
  151. +162 −131 spec/string-params.js
  152. +215 −175 spec/subexpressions.js
  153. +1 −0 spec/tmp/.gitkeep
  154. +406 −54 spec/tokenizer.js
  155. +269 −145 spec/track-ids.js
  156. +6 −3 spec/umd-runtime.html
  157. +7 −3 spec/umd.html
  158. +14 −5 spec/utils.js
  159. 0 spec/{env → vendor}/json2.js
  160. 0 spec/{env → vendor}/require.js
  161. +50 −28 spec/visitor.js
  162. +123 −43 spec/whitespace-control.js
  163. +3 −3 src/handlebars.l
  164. +1 −1 src/handlebars.yy
  165. +1 −1 src/parser-prefix.js
  166. +1 −2 src/parser-suffix.js
  167. +0 −16 tasks/.eslintrc
  168. +14 −0 tasks/.eslintrc.js
  169. +20 −14 tasks/metrics.js
  170. +26 −22 tasks/parser.js
  171. +102 −0 tasks/publish-to-aws.js
  172. +0 −83 tasks/publish.js
  173. +9 −0 tasks/task-tests/.eslintrc.js
  174. +1 −0 tasks/task-tests/README.md
  175. +121 −0 tasks/task-tests/git.test.js
  176. 0 tasks/task-tests/mocha.opts
  177. +232 −0 tasks/test-bin.js
  178. +22 −0 tasks/test-mocha.js
  179. +0 −67 tasks/test.js
  180. +13 −0 tasks/util/async-grunt-task.js
  181. +51 −0 tasks/util/exec-file.js
  182. +61 −95 tasks/util/git.js
  183. +47 −26 tasks/version.js
  184. +422 −0 types/index.d.ts
  185. +258 −0 types/test.ts
  186. +17 −0 types/tsconfig.json
  187. +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
200 changes: 0 additions & 200 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