Skip to content

Commits

Commits on Oct 29, 2022

  1. Make library compatible with workers

    Pulled from 4.x branch, see #1894.
    jaylinski committed Oct 29, 2022
    Copy the full SHA
    6186128 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. 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
  3. 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

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 Dec 29, 2021

  1. Update repository URL

    Related to c295ef0.
    jaylinski committed Dec 29, 2021
    Copy the full SHA
    c18ed16 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. Copy the full SHA
    82c6132 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  3. Copy the full SHA
    03d387b 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 Dec 3, 2021

  1. Don't rely on Node.js global object

    If `global` is used and handlebars is compiled for browser
    usage without a Node.js `global` polyfill, handlebars
    fails with a `global is undefined` error.
    
    Fixes #1593
    jaylinski committed Dec 3, 2021
    Copy the full SHA
    2954e7e 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. v4.7.7

    nknapp committed Feb 15, 2021
    1
    Copy the full SHA
    a9a8e40 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  3. [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 Apr 15, 2020

  1. docs: Fix simple typo, mulitple -> multiple

    There is a small typo in lib/handlebars/compiler/whitespace-control.js.
    
    Should read `multiple` rather than `mulitple`.
    timgates42 authored and nknapp committed Apr 15, 2020
    Copy the full SHA
    b1034a6 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. 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
  2. v4.7.6

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

Commits on Apr 2, 2020

  1. Merge branch '4.x'

    ErisDS committed Apr 2, 2020
    Copy the full SHA
    6f17a8e View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. v4.7.5

    ErisDS committed Apr 2, 2020
    Copy the full SHA
    1fd2ede 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. v4.7.4

    ErisDS committed Apr 1, 2020
    Copy the full SHA
    7adc19a View commit details
    View at this point in the history
    Browse the repository at this point in the history

Commits on Feb 5, 2020

  1. Merge branch '4.x'

    # Conflicts:
    #	components/bower.json
    #	components/handlebars.js.nuspec
    #	components/package.json
    #	package.json
    nknapp committed Feb 5, 2020
    Copy the full SHA
    2ea32e8 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. v4.7.3

    nknapp committed Feb 5, 2020
    Copy the full SHA
    c978969 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. v4.7.2

    nknapp committed Jan 13, 2020
    Copy the full SHA
    586e672 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  3. 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. v4.7.1

    nknapp committed Jan 12, 2020
    Copy the full SHA
    14ba3d0 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. fix: fix log output in case of illegal property access

    - fix link url to handlebarsjs.com
    nknapp committed Jan 12, 2020
    Copy the full SHA
    f152dfc View commit details
    View at this point in the history
    Browse the repository at this point in the history
  3. 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. v4.7.0

    nknapp committed Jan 10, 2020
    Copy the full SHA
    0d5c807 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  2. fix: use "logger" instead of console.error

    ... to be graceful with older browser without "console"
    nknapp committed Jan 10, 2020
    Copy the full SHA
    575d877 View commit details
    View at this point in the history
    Browse the repository at this point in the history
  3. 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. v4.6.0

    nknapp committed Jan 8, 2020
    Copy the full SHA
    91a1b5d 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
Older