Skip to content

Commits

Commits on Oct 29, 2022

  1. Upgrade prettier to v2

    Prettier v2 has the following breaking changes:
    * enforces spaces between `function` and params
    * enforces trailing commas by default
    jaylinski committed Oct 29, 2022
    Copy the full SHA
    e534a91 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. Upgrade to ECMAScript 2020

    This is needed in order to use `globalThis`, see #1894.
    It also made it possible to remove some old polyfills and fallbacks.
    jaylinski committed Oct 29, 2022
    Copy the full SHA
    f6ff3bf View commit details
    View at this point in the history
    Browse the repository at this point in the history
  3. Copy the full SHA
    da41887 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  4. Remove support for IE11 and dead browsers

    Handlebars v5 will target modern browsers,
    while older browsers will still receive support
    via version 4.x.
    jaylinski committed Oct 29, 2022
    Copy the full SHA
    83baaa4 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on May 25, 2022

  1. Fix compiling of each block params in strict mode

    Fixes #1820
    Closes #1821
    arturmakaranka authored and jaylinski committed May 25, 2022
    Copy the full SHA
    b14ff4a View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Jan 2, 2022

  1. Enable IDE code-highlighting for bin-file

    By adding the `.js`-extension to the bin-file, IDEs will
    know that js code-highlighting should be applied to the
    file, which makes it easier for devs to read the code.
    jaylinski committed Jan 2, 2022
    Copy the full SHA
    30bd78d View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Dec 29, 2021

  1. Copy the full SHA
    82c6132 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. Replace Saucelabs with Playwright

    Also reorganized npm scripts.
    jaylinski committed Dec 29, 2021
    Copy the full SHA
    9ed9418 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Dec 22, 2021

  1. Fix typos

    This was found by running an IntellijIDE
    code inspection for proofreading.
    jaylinski committed Dec 22, 2021
    Copy the full SHA
    fe58756 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Feb 15, 2021

  1. Merge branch '4.x'

    # Conflicts:
    #	components/bower.json
    #	components/handlebars.js.nuspec
    #	components/package.json
    #	integration-testing/multi-nodejs-test/test.sh
    #	package-lock.json
    #	package.json
    nknapp committed Feb 15, 2021
    Copy the full SHA
    6790c08 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. [FEAT] Extract the Handlebars parser (#1713)

    Extracts the parser to `@handlebars/parser`, where it can be shared
    between different implementations. This means that e.g. Glimmer/Ember
    will be able to iterate on new features without forcing Handlebars to
    adopt them immediately, and vice versa. All implementors will be able to
    absorb changes as it makes sense for them.
    Chris Garrett committed Feb 15, 2021
    Copy the full SHA
    19bdace View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Feb 13, 2021

  1. Copy the full SHA
    b6d3de7 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. Copy the full SHA
    f058970 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on May 4, 2020

  1. Merge branch '4.x'

    # Conflicts:
    #	integration-testing/multi-nodejs-test/test.sh
    #	spec/string-params.js
    #	spec/subexpressions.js
    #	spec/track-ids.js
    nknapp committed May 4, 2020
    Copy the full SHA
    212f9d9 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. Copy the full SHA
    77825f8 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Apr 3, 2020

  1. Revert "Switch cmd parser to latest minimist"

    This reverts commit c2f1e62.
    ErisDS committed Apr 3, 2020
    Copy the full SHA
    3438891 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. Merge branch '4.x'

    ErisDS committed Apr 3, 2020
    Copy the full SHA
    0ec71dc View commit details
    View at this point in the history
    Browse the repository at this point in the history
  3. Switch cmd parser to latest minimist

    dougwilson authored and ErisDS committed Apr 3, 2020
    Copy the full SHA
    c2f1e62 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Apr 1, 2020

  1. Merge branch '4.x'

    ErisDS committed Apr 1, 2020
    Copy the full SHA
    f8eade7 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. Use tmp directory for files written during tests

    - Add spec/tmp directory with .gitkeep file to indicate the folder is intentional
    - Add the folder contents to .gitignore
    - Use this folder to output the sourcemap file during bin tests. This file is a sideeffect of the main test
    ErisDS committed Apr 1, 2020
    Copy the full SHA
    4671c4b View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Mar 31, 2020

  1. chore: add unit tests for cli options (#1666)

    - adds full unit tests for all cli options
    - demonstrates that nothing changes between minimist and yargs except a minor order change in the --help text
    - proves b9c4b25 works the same as before
    
    Co-authored-by: fabb <fabb@users.noreply.github.com>
    2 people authored and ErisDS committed Mar 31, 2020
    Copy the full SHA
    80c4516 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Jan 13, 2020

  1. Merge branch '4.x'

    # Conflicts:
    #	components/bower.json
    #	components/handlebars.js.nuspec
    #	components/package.json
    #	package.json
    nknapp committed Jan 13, 2020
    Copy the full SHA
    edfe6b8 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. fix: don't wrap helpers that are not functions

    - helpers should always be a function, but in #1639 one seems to
      be undefined. This was not a problem before 4.6 because helpers
      weren't wrapped then.
      Now, we must take care only to wrap helpers (when adding
      the "lookupProperty" function to the options), if they
      are really functions.
    nknapp committed Jan 13, 2020
    Copy the full SHA
    9d5aa36 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Jan 12, 2020

  1. Copy the full SHA
    3c1e252 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Jan 10, 2020

  1. feat: default options for controlling proto access

    This commmit adds the runtime options
    - `allowProtoPropertiesByDefault` (boolean, default: false) and
    - `allowProtoMethodsByDefault` (boolean, default: false)`
    which can be used to allow access to prototype properties and
    functions in general.
    
    Specific properties and methods can still be disabled from access
    via `allowedProtoProperties` and `allowedProtoMethods` by
    setting the corresponding values to false.
    
    The methods `constructor`, `__defineGetter__`, `__defineSetter__`, `__lookupGetter__`
    and the property `__proto__` will be disabled, even if the allow...ByDefault-options
    are set to true. In order to allow access to those properties and methods, they have
    to be explicitly set to true in the 'allowedProto...'-options.
    
    A warning is logged when the a proto-access it attempted and denied
    by default (i.e. if no option is set by the user to make the access
    decision explicit)
    nknapp committed Jan 10, 2020
    Copy the full SHA
    7af1c12 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Jan 8, 2020

  1. Merge branch '4.x'

    # Conflicts:
    #	components/bower.json
    #	components/handlebars.js.nuspec
    #	components/package.json
    #	package.json
    nknapp committed Jan 8, 2020
    Copy the full SHA
    0c8230c View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. Copy the full SHA
    d7f0dcf View commit details
    View at this point in the history
    Browse the repository at this point in the history
  3. feat: access control to prototype properties via whitelist

    Disallow access to prototype properties and methods by default.
    Access to properties is always checked via
    `Object.prototype.hasOwnProperty.call(parent, propertyName)`.
    
    New runtime options:
    - **allowedProtoMethods**: a string-to-boolean map of property-names that are allowed if they are methods of the parent object.
    - **allowedProtoProperties**: a string-to-boolean map of property-names that are allowed if they are properties but not methods of the parent object.
    
    ```js
    const template = handlebars.compile('{{aString.trim}}')
    const result = template({ aString: '  abc  ' })
    // result is empty, because trim is defined at String prototype
    ```
    
    ```js
    const template = handlebars.compile('{{aString.trim}}')
    const result = template({ aString: '  abc  ' }, {
      allowedProtoMethods: {
        trim: true
      }
    })
    // result = 'abc'
    ```
    
    Implementation details: The method now "container.lookupProperty"
    handles the prototype-checks and the white-lists. It is used in
    - JavaScriptCompiler#nameLookup
    - The "lookup"-helper (passed to all helpers as "options.lookupProperty")
    - The "lookup" function at the container, which is used for recursive lookups in "compat" mode
    
    Compatibility:
    - **Old precompiled templates work with new runtimes**: The "options.lookupPropery"-function is passed to the helper by a wrapper, not by the compiled templated.
    - **New templates work with old runtimes**: The template contains a function that is used as fallback if the "lookupProperty"-function cannot be found at the container. However, the runtime-options "allowedProtoProperties" and "allowedProtoMethods" only work with the newest runtime.
    
    BREAKING CHANGE:
    - access to prototype properties is forbidden completely by default
    nknapp committed Jan 8, 2020
    Copy the full SHA
    d03b6ec View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Dec 14, 2019

  1. Merge branch '4.x'

    # Conflicts:
    #	Gruntfile.js
    #	package-lock.json
    #	package.json
    nknapp committed Dec 14, 2019
    Copy the full SHA
    d23ccf6 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. 1
    Copy the full SHA
    1ebce2b View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Dec 3, 2019

  1. Copy the full SHA
    3fb331e View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. Copy the full SHA
    e97685e View commit details
    View at this point in the history
    Browse the repository at this point in the history
  3. Merge branch 'rebuild'

    # Conflicts:
    #	Gruntfile.js
    #	package-lock.json
    #	package.json
    #	spec/amd-runtime.html
    #	spec/amd.html
    nknapp committed Dec 3, 2019
    Copy the full SHA
    4085e06 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Dec 2, 2019

  1. chore: configure prettier and eslint

    - add prettier to do formatting
    - add eslint-config-prettier to
      disable rules conflicting with prettier
    - remove eslint from grunt workflow
    - use lint-stage to lint and format
      on precommit
    - use eslint and prettier in travis directly
    - remove rules that are already part of
      the "recommended" ruleset
    
    That rational is that eslint and prettier should be run in
    Travis-CI, on commit and as IDE integration (highlighting
    errors directlry). They don't need to be run along with
    test-cases. Getting linting errors when running the tests
    because of missing semicolons is just annoying, but doesn't
    help the overall code-quality.
    nknapp committed Dec 2, 2019
    Copy the full SHA
    1f61f21 View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Nov 18, 2019

  1. fix(runtime.js): partials compile not caching (#1600)

    Reintroduce "merge" function, no called "mergeIfNeeded", that only creates a new partials
    object if both "env.partials" and "options.partials" are set.
    
    closes #1598
    ole-martin authored and nknapp committed Nov 18, 2019
    Copy the full SHA
    23d58e7 View commit details
    View at this point in the history
    Browse the repository at this point in the history
Older