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