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: f691db546e7563e1db3437d5a72f478f9e556714
Choose a head ref
Loading
Showing with 1,644 additions and 487 deletions.
  1. +0 −200 .eslintrc
  2. +129 −0 .eslintrc.js
  3. +6 −0 .gitattributes
  4. +2 −0 .gitignore
  5. +1 −1 .istanbul.yml
  6. +0 −25 .npmignore
  7. +2 −2 .travis.yml
  8. +39 −4 CONTRIBUTING.md
  9. +6 −6 Gruntfile.js
  10. +1 −1 LICENSE
  11. +3 −0 README.markdown
  12. +37 −0 appveyor.yml
  13. +1 −1 bench/dist-size.js
  14. +1 −1 bench/templates/complex.js
  15. +1 −1 bench/util/benchwarmer.js
  16. +1 −1 components/bower.json
  17. +1 −1 components/handlebars.js.nuspec
  18. +20 −0 components/package.json
  19. +29 −7 docs/compiler-api.md
  20. +2 −2 docs/decorators-api.md
  21. +356 −0 lib/handlebars.d.ts
  22. +1 −1 lib/handlebars/base.js
  23. +1 −1 lib/handlebars/compiler/code-gen.js
  24. +6 −5 lib/handlebars/compiler/compiler.js
  25. +3 −5 lib/handlebars/compiler/helpers.js
  26. +18 −13 lib/handlebars/compiler/javascript-compiler.js
  27. +17 −3 lib/handlebars/exception.js
  28. +2 −2 lib/handlebars/logger.js
  29. +18 −6 lib/handlebars/runtime.js
  30. +35 −13 lib/precompiler.js
  31. +114 −0 multi-nodejs-test/.eslintrc.js
  32. +1 −0 multi-nodejs-test/expected.txt
  33. +13 −0 multi-nodejs-test/run-handlebars.js
  34. +21 −0 multi-nodejs-test/run-tests.sh
  35. +1 −0 multi-nodejs-test/template.txt.hbs
  36. +28 −17 package.json
  37. +354 −127 release-notes.md
  38. +5 −0 runtime.d.ts
  39. +2 −0 spec/ast.js
  40. +9 −2 spec/builtins.js
  41. +37 −0 spec/compiler.js
  42. +2 −1 spec/env/browser.js
  43. +2 −0 spec/env/common.js
  44. +1 −1 spec/env/runner.js
  45. +1 −1 spec/helpers.js
  46. +1 −1 spec/mustache
  47. +6 −6 spec/parser.js
  48. +127 −0 spec/partials.js
  49. +63 −2 spec/precompiler.js
  50. +44 −0 spec/regressions.js
  51. +28 −0 spec/security.js
  52. +2 −2 spec/spec.js
  53. +5 −5 spec/tokenizer.js
  54. +2 −2 src/handlebars.l
  55. +1 −1 src/parser-prefix.js
  56. +1 −2 src/parser-suffix.js
  57. +1 −1 tasks/metrics.js
  58. +15 −7 tasks/publish.js
  59. +16 −6 tasks/test.js
  60. +2 −1 tasks/version.js
200 changes: 0 additions & 200 deletions .eslintrc

This file was deleted.

129 changes: 129 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
module.exports = {
"extends": "eslint:recommended",
"globals": {
"self": false
},
"env": {
"node": true
},
"ecmaFeatures": {
// Enabling features that can be implemented without polyfills. Want to avoid polyfills at this time.
"arrowFunctions": true,
"blockBindings": true,
"defaultParams": true,
"destructuring": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"restParams": true,
"spread": true,
"templateStrings": true
},
"rules": {
// overrides eslint:recommended defaults
"no-sparse-arrays": "off",
"no-func-assign": "off",
"no-console": "warn",
"no-debugger": "warn",
"no-unreachable": "warn",

// Possible Errors //
//-----------------//
"no-unsafe-negation": "error",


// Best Practices //
//----------------//
"curly": "error",
"default-case": "warn",
"dot-notation": ["error", { "allowKeywords": false }],
"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-spaces": "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",
"wrap-iife": "error",


// Variables //
//-----------//
"no-catch-shadow": "error",
"no-label-var": "error",
"no-shadow-restricted-names": "error",
"no-undef-init": "error",
"no-use-before-define": ["error", "nofunc"],


// Stylistic Issues //
//------------------//
"comma-dangle": ["error", "never"],
"quote-props": ["error", "as-needed", { "keywords": true, "unnecessary": false }],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"camelcase": "error",
"comma-spacing": ["error", { "before": false, "after": true }],
"comma-style": ["error", "last"],
"consistent-this": ["warn", "self"],
"eol-last": "error",
"func-style": ["error", "declaration"],
"key-spacing": ["error", {
"beforeColon": false,
"afterColon": true
}],
"new-cap": "error",
"new-parens": "error",
"no-array-constructor": "error",
"no-lonely-if": "error",
"no-mixed-spaces-and-tabs": "error",
"no-nested-ternary": "warn",
"no-new-object": "error",
"no-spaced-func": "error",
"no-trailing-spaces": "error",
"no-extra-parens": ["error", "functions"],
"quotes": ["error", "single", "avoid-escape"],
"semi": "error",
"semi-spacing": ["error", { "before": false, "after": true }],
"keyword-spacing": "error",
"space-before-blocks": ["error", "always"],
"space-before-function-paren": ["error", { "anonymous": "never", "named": "never" }],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": ["error", "always", { "markers": [","] }],
"wrap-regex": "warn",

// ECMAScript 6 //
//--------------//
"no-var": "warn"
},
"parserOptions": {
"sourceType": "module"
}
}
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -10,3 +10,5 @@ node_modules
*.sublime-workspace
npm-debug.log
sauce_connect.log*
.idea
yarn-error.log
2 changes: 1 addition & 1 deletion .istanbul.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
instrumentation:
excludes: ['**/spec/**']
excludes: ['**/spec/**', '**/handlebars/compiler/parser.js']
25 changes: 0 additions & 25 deletions .npmignore

This file was deleted.

4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ before_install:
- npm install -g grunt-cli
script:
- grunt --stack travis
- multi-nodejs-test/run-tests.sh 0.10 0.12 4 5 6 7 8 9 10 11
email:
on_failure: change
on_success: never
@@ -13,12 +14,11 @@ env:
- secure: Nm4AgSfsgNB21kgKrF9Tl7qVZU8YYREhouQunFracTcZZh2NZ2XH5aHuSiXCj88B13Cr/jGbJKsZ4T3QS3wWYtz6lkyVOx3H3iI+TMtqhD9RM3a7A4O+4vVN8IioB2YjhEu0OKjwgX5gp+0uF+pLEi7Hpj6fupD3AbbL5uYcKg8=
matrix:
include:
- node_js: '0.12'
- node_js: '10'
env:
- PUBLISH=true
- secure: pLTzghtVll9yGKJI0AaB0uI8GypfWxLTaIB0ZL8//yN3nAEIKMhf/RRilYTsn/rKj2NUa7vt2edYILi3lttOUlCBOwTc9amiRms1W8Lwr/3IdWPeBLvLuH1zNJRm2lBAwU4LBSqaOwhGaxOQr6KHTnWudhNhgOucxpZfvfI/dFw=
- secure: yERYCf7AwL11D9uMtacly/THGV8BlzsMmrt+iQVvGA3GaY6QMmfYqf6P6cCH98sH5etd1Y+1e6YrPeMjqI6lyRllT7FptoyOdHulazQe86VQN4sc0EpqMlH088kB7gGjTut9Z+X9ViooT5XEh9WA5jXEI9pXhQJNoIHkWPuwGuY=
- node_js: '4.0.0'
cache:
directories:
- node_modules
Loading