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: v4.2.1
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: v4.7.6
Choose a head ref

Commits on Sep 24, 2019

  1. Copy the full SHA
    2078c72 View commit details
  2. adjust compiler revision

    nknapp committed Sep 24, 2019
    Copy the full SHA
    06b7224 View commit details
  3. Update release notes

    nknapp committed Sep 24, 2019
    Copy the full SHA
    bba6560 View commit details
  4. v4.3.0

    nknapp committed Sep 24, 2019
    Copy the full SHA
    a89081d View commit details
  5. Copy the full SHA
    d148d7c View commit details
  6. Copy the full SHA
    93444c5 View commit details
  7. add test for #1560

    nknapp committed Sep 24, 2019
    Copy the full SHA
    64ecb9e View commit details
  8. do not break on precompiled templates from Handlebars >=4.0.0 <4.3.0

    - The version-range above have compiler version 7 and
      precompiled templates expecte the (block)
      HelperMissing-functions in "helpers" and not in "container.hooks".
    - Handlebars now accepts precompiled templates of version 7.
    - If a precompiled template with version 7 is loaded,
      the (block)HelperMissing-functions are kept in "helpers"
    nknapp committed Sep 24, 2019
    Copy the full SHA
    1266838 View commit details
  9. Copy the full SHA
    c2a17c7 View commit details
  10. Copy the full SHA
    e3639e2 View commit details
  11. Update release notes

    nknapp committed Sep 24, 2019
    Copy the full SHA
    2d55790 View commit details
  12. v4.3.1

    nknapp committed Sep 24, 2019
    Copy the full SHA
    050cca0 View commit details

Commits on Sep 26, 2019

  1. Use Object.prototype.propertyIsEnumerable to check for constructors

    - context.propertyIsEnumerable can be replaced
      via __definedGetter__
    - This is a fix specific to counter a known RCE exploit.
      Other fixes will follow.
    
    closes #1563
    nknapp committed Sep 26, 2019
    Copy the full SHA
    213c0bb View commit details
  2. Update release notes

    nknapp committed Sep 26, 2019
    Copy the full SHA
    c5cbeac View commit details
  3. v4.3.2

    nknapp committed Sep 26, 2019
    Copy the full SHA
    2357140 View commit details
  4. Copy the full SHA
    8742bde View commit details

Commits on Sep 27, 2019

  1. Update release notes

    nknapp committed Sep 27, 2019
    Copy the full SHA
    54f7e11 View commit details
  2. v4.3.3

    nknapp committed Sep 27, 2019
    Copy the full SHA
    e473849 View commit details

Commits on Sep 28, 2019

  1. fix: harden "propertyIsEnumerable"-check

    - "container" is an internal object that is most likely
      not accessible through templateing (unlike the proto of "Object", which might be.)
      In order to prevent overriding this method, we
      use "propertyIsEnumerable" from the constructor.
    nknapp committed Sep 28, 2019
    Copy the full SHA
    ff4d827 View commit details
  2. Update release notes

    nknapp committed Sep 28, 2019
    Copy the full SHA
    b250b2d View commit details
  3. v4.3.4

    nknapp committed Sep 28, 2019
    Copy the full SHA
    c958cc8 View commit details

Commits on Sep 29, 2019

  1. Added support for iterable objects in {{#each}} helper (#1557)

    * Added support for iterable object in {{#each}} helper
    Currently {{#each}} helper supports either arrays, or objects,
    however nowadays you can define custom iterable objects by overriding
    a special method called Symbol.iterator, which results in empty result
    being rendered.
    * improved a test for iterables in {{#each}} returning empty result
    * #each helper: using ES5 instead of generator functions in tests
    * #each helper: using ES5 in the helper itself
    antelle authored and nknapp committed Sep 29, 2019
    Copy the full SHA
    cf7545e View commit details
  2. Update release notes

    nknapp committed Sep 29, 2019
    Copy the full SHA
    8f6047c View commit details
  3. v4.4.0

    nknapp committed Sep 29, 2019
    Copy the full SHA
    059b330 View commit details

Commits on Oct 2, 2019

  1. chore: use @knappi/grunt-saucelabs instead of github-dependency

    - mostly because installing dependencies from github takes really
      long in this case.
    nknapp committed Oct 2, 2019
    Copy the full SHA
    c53f340 View commit details
  2. Update release notes

    nknapp committed Oct 2, 2019
    Copy the full SHA
    9cb3165 View commit details
  3. v4.4.1

    nknapp committed Oct 2, 2019
    Copy the full SHA
    b8e769f View commit details
  4. Copy the full SHA
    b7eada0 View commit details
  5. Update release notes

    nknapp committed Oct 2, 2019
    Copy the full SHA
    26d0f7a View commit details
  6. v4.4.2

    nknapp committed Oct 2, 2019
    Copy the full SHA
    b793350 View commit details

Commits on Oct 8, 2019

  1. Copy the full SHA
    0440af2 View commit details
  2. Update release notes

    nknapp committed Oct 8, 2019
    Copy the full SHA
    ba570c4 View commit details
  3. v4.4.3

    nknapp committed Oct 8, 2019
    Copy the full SHA
    2e53fba View commit details
  4. Copy the full SHA
    0b593bf View commit details

Commits on Oct 9, 2019

  1. Copy the full SHA
    feb60f8 View commit details

Commits on Oct 20, 2019

  1. fix: prevent zero length tokens in raw-blocks (#1577)

    This comment ensures that the lexer is not stuck on zero-length tokens, in raw-blocks like {{{{a}}}} {{{{/a}}}}
    nknapp authored Oct 20, 2019
    Copy the full SHA
    aaab609 View commit details
  2. fix: prevent zero length tokens in raw-blocks (#1577)

    This comment ensures that the lexer is not stuck on zero-length tokens, in raw-blocks like {{{{a}}}} {{{{/a}}}}
    nknapp committed Oct 20, 2019
    Copy the full SHA
    f1752fe View commit details
  3. Update release notes

    nknapp committed Oct 20, 2019
    Copy the full SHA
    143ac80 View commit details
  4. v4.4.4

    nknapp committed Oct 20, 2019
    Copy the full SHA
    2ab261e View commit details
  5. fix: non-eager matching raw-block-contents

    In 4.4.4 the block-contents was matched with an eager match, which means
    that with multiple raw-blocks of the same kind, the block was spanned
    over the first ending-tag until the last one.
    This commit replaces this by a non-eager match.
    
    closes #1579
    nknapp committed Oct 20, 2019
    Copy the full SHA
    8d5530e View commit details
  6. fix: non-eager matching raw-block-contents

    In 4.4.4 the block-contents was matched with an eager match, which means
    that with multiple raw-blocks of the same kind, the block was spanned
    over the first ending-tag until the last one.
    This commit replaces this by a non-eager match.
    
    closes #1579
    nknapp committed Oct 20, 2019
    Copy the full SHA
    fd2e5c9 View commit details
  7. Update release notes

    nknapp committed Oct 20, 2019
    Copy the full SHA
    def79fd View commit details
  8. v4.4.5

    nknapp committed Oct 20, 2019
    Copy the full SHA
    8e1cce7 View commit details

Commits on Oct 21, 2019

  1. Merge branch '4.4.x' into 4.x

    nknapp committed Oct 21, 2019
    Copy the full SHA
    a15d01d View commit details

Commits on Oct 27, 2019

  1. fix: add guard to if & unless helpers (#1549)

    fixes #1548
    
    - add a guard to show readable syntax error for if / unless helper
    - prevents against 3 different errors that can be generated by different systax errors
    ErisDS authored and nknapp committed Oct 27, 2019
    Copy the full SHA
    c76ded8 View commit details
  2. Use objects for hash value tracking

    The use of arrays was incorrect for the data type and causing problems when hash keys conflicted with array behaviors.
    
    Fixes #1194
    
    (cherry picked from commit 768ddbd)
    kpdecker authored and nknapp committed Oct 27, 2019
    Copy the full SHA
    7fcf9d2 View commit details
  3. Add Handlebars.parseWithoutProcessing (#1584)

    When authoring tooling that parses Handlebars files and emits Handlebars
    files, you often want to preserve the **exact** formatting of the input.
    The changes in this commit add a new method to the `Handlebars`
    namespace: `parseWithoutProcessing`. Unlike, `Handlebars.parse` (which
    will mutate the parsed AST to apply whitespace control) this method will
    parse the template and return it directly (**without** processing
    :wink:).
    
    For example, parsing the following template:
    
    ```hbs
     {{#foo}}
       {{~bar~}} {{baz~}}
     {{/foo}}
    ```
    
    Using `Handlebars.parse`, the AST returned would have truncated the
    following whitespace:
    
    * The whitespace prior to the `{{#foo}}`
    * The newline following `{{#foo}}`
    * The leading whitespace before `{{~bar~}}`
    * The whitespace between `{{~bar~}}` and `{{baz~}}`
    * The newline after `{{baz~}}`
    * The whitespace prior to the `{{/foo}}`
    
    When `Handlebars.parse` is used from  `Handlebars.precompile` or
    `Handlebars.compile`, this whitespace stripping is **very** important
    (these behaviors are intentional, and generally lead to better rendered
    output).
    
    When the same template is parsed with
    `Handlebars.parseWithoutProcessing` none of those modifications to the
    AST are made. This enables "codemod tooling" (e.g. `prettier` and
    `ember-template-recast`) to preserve the **exact** initial formatting.
    Prior to these changes, those tools would have to _manually_ reconstruct
    the whitespace that is lost prior to emitting source.
    rwjblue authored and nknapp committed Oct 27, 2019
    Copy the full SHA
    62ed3c2 View commit details

Commits on Oct 28, 2019

  1. Add missing types for the Exception class properties (#1583)

    * Convert Exception to a class
    * Add node param type declaration
    * Test the types
    kabirbaidhya authored and nknapp committed Oct 28, 2019
    Copy the full SHA
    b8913fc View commit details
  2. Resolve deprecation warning message from eslint while running eslint (#…

    …1586)
    
    * Resolve eslint deprecation warning
    
      There was a DeprecationWarning message from eslint saying that `ecmaFeatures` property has 
      been deprecated.
      Moved it under the `parserOptions` as per recommended here - 
      https://eslint.org/docs/user-guide/migrating-to-2.0.0.
    * Set escmaVersion = 6
    * Use ES6 built-in global variables
    * Remove flags in favor of ecmaVersion
    kabirbaidhya authored and nknapp committed Oct 28, 2019
    Copy the full SHA
    7052e88 View commit details
  3. chore: add eslint-plugin-compat and eslint-plugin-es5

    - tests are not compiled with babel and must thus be in
      es5
    - we don't use polyfills, so we need to make sure no
      functions aren't used that are not supported by popular browsers. (like Object.assign in Safari and IE11)
    - Boths are errors that usually only appear when running
      tests in SauceLabs, which happens only on _after_
      merging a PR.
    nknapp committed Oct 28, 2019
    Copy the full SHA
    088e618 View commit details
Showing with 13,937 additions and 5,030 deletions.
  1. +25 −0 .eslintignore
  2. +51 −114 .eslintrc.js
  3. +11 −6 .gitignore
  4. +0 −2 .istanbul.yml
  5. +22 −0 .prettierignore
  6. +33 −20 .travis.yml
  7. +43 −20 CONTRIBUTING.md
  8. +123 −80 Gruntfile.js
  9. +1 −1 LICENSE
  10. +9 −9 README.markdown
  11. +3 −4 appveyor.yml
  12. +2 −1 bench/.eslintrc
  13. +11 −6 bench/dist-size.js
  14. +1 −1 bench/index.js
  15. +9 −4 bench/precompile-size.js
  16. +2 −1 bench/templates/arguments.js
  17. +8 −1 bench/templates/array-each.js
  18. +8 −1 bench/templates/array-mustache.js
  19. +3 −3 bench/templates/complex.js
  20. +8 −1 bench/templates/data.js
  21. +9 −1 bench/templates/depth-1.js
  22. +13 −3 bench/templates/depth-2.js
  23. +1 −1 bench/templates/index.js
  24. +4 −1 bench/templates/partial-recursion.js
  25. +10 −2 bench/templates/partial.js
  26. +5 −3 bench/templates/paths.js
  27. +1 −2 bench/templates/variables.js
  28. +50 −26 bench/throughput.js
  29. +52 −26 bench/util/benchwarmer.js
  30. +3 −3 bench/util/template-runner.js
  31. +6 −0 bin/.eslintrc.js
  32. +160 −112 bin/handlebars
  33. +1 −1 components/bower.json
  34. +1 −1 components/handlebars.js.nuspec
  35. +1 −1 components/package.json
  36. +28 −0 docs/compiler-api.md
  37. +9 −8 integration-testing/multi-nodejs-test/.eslintrc.js
  38. +1 −1 integration-testing/multi-nodejs-test/run-handlebars.js
  39. +7 −4 integration-testing/multi-nodejs-test/test.sh
  40. +6 −4 integration-testing/run-integration-tests.sh
  41. +5 −5 integration-testing/webpack-babel-test/src/handlebars-inline-precompile-test.js
  42. +3 −3 integration-testing/webpack-babel-test/src/lib/assert.js
  43. +24 −24 integration-testing/webpack-babel-test/webpack.config.js
  44. +2 −2 integration-testing/webpack-test/src/handlebars-default-import-pre-4.2-test.js
  45. +2 −3 integration-testing/webpack-test/src/handlebars-default-import-test.js
  46. +6 −4 integration-testing/webpack-test/src/handlebars-loader-test.js
  47. +3 −3 integration-testing/webpack-test/src/handlebars-require-vs-import-test.js
  48. +2 −2 integration-testing/webpack-test/src/handlebars-wildcard-import-pre-4.2-test.js
  49. +2 −2 integration-testing/webpack-test/src/handlebars-wildcard-import-test.js
  50. +3 −3 integration-testing/webpack-test/src/lib/assert.js
  51. +12 −14 integration-testing/webpack-test/webpack.config.js
  52. +6 −1 lib/handlebars.js
  53. +26 −10 lib/handlebars/base.js
  54. +10 −6 lib/handlebars/compiler/ast.js
  55. +13 −3 lib/handlebars/compiler/base.js
  56. +26 −23 lib/handlebars/compiler/code-gen.js
  57. +97 −62 lib/handlebars/compiler/compiler.js
  58. +29 −20 lib/handlebars/compiler/helpers.js
  59. +246 −99 lib/handlebars/compiler/javascript-compiler.js
  60. +19 −12 lib/handlebars/compiler/printer.js
  61. +8 −1 lib/handlebars/compiler/visitor.js
  62. +47 −29 lib/handlebars/compiler/whitespace-control.js
  63. +0 −1 lib/handlebars/decorators.js
  64. +1 −1 lib/handlebars/decorators/inline.js
  65. +23 −4 lib/handlebars/exception.js
  66. +9 −0 lib/handlebars/helpers.js
  67. +7 −4 lib/handlebars/helpers/block-helper-missing.js
  68. +45 −23 lib/handlebars/helpers/each.js
  69. +3 −1 lib/handlebars/helpers/helper-missing.js
  70. +16 −3 lib/handlebars/helpers/if.js
  71. +2 −2 lib/handlebars/helpers/log.js
  72. +3 −5 lib/handlebars/helpers/lookup.js
  73. +18 −3 lib/handlebars/helpers/with.js
  74. +11 −0 lib/handlebars/internal/create-new-lookup-object.js
  75. +70 −0 lib/handlebars/internal/proto-access.js
  76. +13 −0 lib/handlebars/internal/wrapHelper.js
  77. +7 −3 lib/handlebars/logger.js
  78. +1 −2 lib/handlebars/no-conflict.js
  79. +215 −49 lib/handlebars/runtime.js
  80. +17 −9 lib/handlebars/utils.js
  81. +117 −75 lib/precompiler.js
  82. +9 −0 nyc.config.js
  83. +4,854 −2,073 package-lock.json
  84. +47 −11 package.json
  85. +5 −0 prettier.config.js
  86. +423 −29 release-notes.md
  87. +17 −6 spec/.eslintrc
  88. +6 −3 spec/amd-runtime.html
  89. +6 −3 spec/amd.html
  90. +6 −0 spec/artifacts/known.helpers.handlebars
  91. +1 −0 spec/artifacts/non.default.extension.hbs
  92. +1 −0 spec/artifacts/partial.template.handlebars
  93. +260 −75 spec/ast.js
  94. +442 −139 spec/basic.js
  95. +260 −102 spec/blocks.js
  96. +415 −104 spec/builtins.js
  97. +112 −35 spec/compiler.js
  98. +141 −48 spec/data.js
  99. +13 −2 spec/env/browser.js
  100. +142 −13 spec/env/common.js
  101. +8 −0 spec/env/node.js
  102. +12 −8 spec/env/runner.js
  103. +18 −3 spec/env/runtime.js
  104. +6 −0 spec/expected/bom.amd.js
  105. +3 −0 spec/expected/compiled.string.txt
  106. +1 −1 spec/expected/empty.amd.js
  107. +1 −0 spec/expected/empty.amd.min.js
  108. +6 −0 spec/expected/empty.amd.namespace.js
  109. +3 −0 spec/expected/empty.amd.simple.js
  110. +6 −0 spec/expected/empty.common.js
  111. +10 −0 spec/expected/empty.name.amd.js
  112. +6 −0 spec/expected/empty.root.amd.js
  113. +6 −0 spec/expected/handlebar.path.amd.js
  114. +25 −0 spec/expected/help.menu.txt
  115. +10 −0 spec/expected/namespace.amd.js
  116. +6 −0 spec/expected/non.default.extension.amd.js
  117. +24 −0 spec/expected/non.empty.amd.known.helper.js
  118. +6 −0 spec/expected/partial.template.js
  119. +2 −0 spec/expected/source.map.amd.js
  120. +810 −208 spec/helpers.js
  121. +5 −2 spec/index.html
  122. +35 −4 spec/javascript-compiler.js
  123. +260 −98 spec/parser.js
  124. +504 −162 spec/partials.js
  125. +186 −92 spec/precompiler.js
  126. +331 −95 spec/regressions.js
  127. +2 −2 spec/require.js
  128. +75 −43 spec/runtime.js
  129. +415 −22 spec/security.js
  130. +15 −9 spec/source-map.js
  131. +26 −14 spec/spec.js
  132. +147 −57 spec/strict.js
  133. +110 −40 spec/string-params.js
  134. +75 −21 spec/subexpressions.js
  135. +1 −0 spec/tmp/.gitkeep
  136. +398 −46 spec/tokenizer.js
  137. +253 −63 spec/track-ids.js
  138. +6 −3 spec/umd-runtime.html
  139. +7 −3 spec/umd.html
  140. +16 −5 spec/utils.js
  141. 0 spec/{env → vendor}/json2.js
  142. 0 spec/{env → vendor}/require.js
  143. +50 −28 spec/visitor.js
  144. +65 −16 spec/whitespace-control.js
  145. +1 −1 src/handlebars.l
  146. +1 −1 src/handlebars.yy
  147. +0 −16 tasks/.eslintrc
  148. +14 −0 tasks/.eslintrc.js
  149. +20 −14 tasks/metrics.js
  150. +26 −22 tasks/parser.js
  151. +102 −0 tasks/publish-to-aws.js
  152. +0 −91 tasks/publish.js
  153. +9 −0 tasks/task-tests/.eslintrc.js
  154. +1 −0 tasks/task-tests/README.md
  155. +121 −0 tasks/task-tests/git.test.js
  156. 0 tasks/task-tests/mocha.opts
  157. +232 −0 tasks/test-bin.js
  158. +22 −0 tasks/test-mocha.js
  159. +0 −77 tasks/test.js
  160. +13 −0 tasks/util/async-grunt-task.js
  161. +51 −0 tasks/util/exec-file.js
  162. +61 −95 tasks/util/git.js
  163. +47 −27 tasks/version.js
  164. +43 −5 types/index.d.ts
  165. +150 −1 types/test.ts
  166. +2 −1 types/tsconfig.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
165 changes: 51 additions & 114 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,129 +1,66 @@
module.exports = {
"extends": "eslint:recommended",
"globals": {
"self": false
extends: ['eslint:recommended', 'plugin:compat/recommended', 'prettier'],
globals: {
self: false
},
"env": {
"node": true
env: {
node: true,
es6: 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",
rules: {
'no-console': 'warn',

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

// 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",

'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-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",
'no-label-var': 'error',
'no-undef-init': 'error',
'no-use-before-define': ['error', 'nofunc'],

// ECMAScript 6 //
//--------------//
"no-var": "warn"
'no-var': 'error'
},
"parserOptions": {
"sourceType": "module"
parserOptions: {
sourceType: 'module',
ecmaVersion: 6,
ecmaFeatures: {}
}
}
};
17 changes: 11 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +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-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.

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
53 changes: 33 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
language: node_js
before_install:
- npm install -g grunt-cli
script:
- grunt --stack travis
jobs:
include:
- stage: test
name: check javascript (eslint)
node_js: lts/*
script: npm run lint
- stage: test
name: check formatting (prettier)
node_js: lts/*
script: npm run check-format
- stage: test
name: check typescript definitions (dtslint)
node_js: lts/*
script: npm run dtslint
- stage: test
name: extensive tests and publish to aws
script: npm run extensive-tests-and-publish-to-aws
env:
- S3_BUCKET_NAME=builds.handlebarsjs.com
- secure: ckyEe5dzjdFDjmZ6wIrhGm0CFBEnKq8c1dYptfgVV/Q5/nJFGzu8T0yTjouS/ERxzdT2H327/63VCxhFnLCRHrsh4rlW/rCy4XI3O/0TeMLgFPa4TXkO8359qZ4CB44TBb3NsJyQXNMYdJpPLTCVTMpuiqqkFFOr+6OeggR7ufA=
- secure: Nm4AgSfsgNB21kgKrF9Tl7qVZU8YYREhouQunFracTcZZh2NZ2XH5aHuSiXCj88B13Cr/jGbJKsZ4T3QS3wWYtz6lkyVOx3H3iI+TMtqhD9RM3a7A4O+4vVN8IioB2YjhEu0OKjwgX5gp+0uF+pLEi7Hpj6fupD3AbbL5uYcKg8=
- SAUCE_USERNAME=handlebars
- secure: 1VkLQhbsEug4ZMQ52tTOus/WLvW3Etqe7GbCzZfzsI8d2ygJPjFfzU8fNm4pVVwoTI21MaM5AQq7SVPu8DWN1YbDjJycMdY1zO3DsB9aZBxTal98fIB7ZIUce9r5z2EP6mETrsbYjZkeckzIBI0A4UVa+F2BO4KbRDXP1Db3u3I=
node_js: '10'
- stage: test
name: test with latest nodejs-lts
node_js: lts/*
script: npm run test
- stage: test
name: test with active nodejs
node_js: node
script: npm run test
cache: npm
email:
on_failure: change
on_success: never
env:
global:
- S3_BUCKET_NAME=builds.handlebarsjs.com
- secure: ckyEe5dzjdFDjmZ6wIrhGm0CFBEnKq8c1dYptfgVV/Q5/nJFGzu8T0yTjouS/ERxzdT2H327/63VCxhFnLCRHrsh4rlW/rCy4XI3O/0TeMLgFPa4TXkO8359qZ4CB44TBb3NsJyQXNMYdJpPLTCVTMpuiqqkFFOr+6OeggR7ufA=
- secure: Nm4AgSfsgNB21kgKrF9Tl7qVZU8YYREhouQunFracTcZZh2NZ2XH5aHuSiXCj88B13Cr/jGbJKsZ4T3QS3wWYtz6lkyVOx3H3iI+TMtqhD9RM3a7A4O+4vVN8IioB2YjhEu0OKjwgX5gp+0uF+pLEi7Hpj6fupD3AbbL5uYcKg8=
matrix:
include:
- node_js: '10'
env:
- PUBLISH=true
- secure: pLTzghtVll9yGKJI0AaB0uI8GypfWxLTaIB0ZL8//yN3nAEIKMhf/RRilYTsn/rKj2NUa7vt2edYILi3lttOUlCBOwTc9amiRms1W8Lwr/3IdWPeBLvLuH1zNJRm2lBAwU4LBSqaOwhGaxOQr6KHTnWudhNhgOucxpZfvfI/dFw=
- secure: yERYCf7AwL11D9uMtacly/THGV8BlzsMmrt+iQVvGA3GaY6QMmfYqf6P6cCH98sH5etd1Y+1e6YrPeMjqI6lyRllT7FptoyOdHulazQe86VQN4sc0EpqMlH088kB7gGjTut9Z+X9ViooT5XEh9WA5jXEI9pXhQJNoIHkWPuwGuY=
cache:
directories:
- node_modules

git:
depth: 100
Loading