-
Notifications
You must be signed in to change notification settings - Fork 2k
Comparing changes
Open a pull request
base repository: handlebars-lang/handlebars.js
base: 7ef86173abb446cf564ad6dc2646a4c361e2ab9f
head repository: handlebars-lang/handlebars.js
compare: 7adc19ab40917389fc1372d19677f1d024ec42b1
Commits on Nov 13, 2019
-
test: add fluent API for testing Handlebars
use "expectTemplate(template)....toCompileTo(output)"
Configuration menu - View commit details
-
Copy full SHA for c2ac79c - Browse repository at this point
Copy the full SHA c2ac79cView commit details -
Configuration menu - View commit details
-
Copy full SHA for d541378 - Browse repository at this point
Copy the full SHA d541378View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6914090 - Browse repository at this point
Copy the full SHA 6914090View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8de121d - Browse repository at this point
Copy the full SHA 8de121dView commit details
Commits on Nov 15, 2019
-
Configuration menu - View commit details
-
Copy full SHA for c02b05f - Browse repository at this point
Copy the full SHA c02b05fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 93e284e - Browse repository at this point
Copy the full SHA 93e284eView commit details -
test: add sinon.js for spies, deprecate current assertions
- the goal is to get overall cleaner test. - chai and sinon are standard libraries for testing assertions and spies. We should not use custom ones.
Configuration menu - View commit details
-
Copy full SHA for 93516a0 - Browse repository at this point
Copy the full SHA 93516a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0817dad - Browse repository at this point
Copy the full SHA 0817dadView commit details
Commits on Nov 17, 2019
-
1
Configuration menu - View commit details
-
Copy full SHA for 886ba86 - Browse repository at this point
Copy the full SHA 886ba86View commit details
Commits on Nov 18, 2019
-
fix: add more properties required to be enumerable
- __defineGetter__, __defineSetter__, __lookupGetter__, __proto__
Configuration menu - View commit details
-
Copy full SHA for 1988878 - Browse repository at this point
Copy the full SHA 1988878View commit details -
1
Configuration menu - View commit details
-
Copy full SHA for f7f05d7 - Browse repository at this point
Copy the full SHA f7f05d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 827c9d0 - Browse repository at this point
Copy the full SHA 827c9d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for c819c8b - Browse repository at this point
Copy the full SHA c819c8bView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 23d58e7 - Browse repository at this point
Copy the full SHA 23d58e7View commit details
Commits on Dec 2, 2019
-
Update readme.md with updated links (#1620)
* Update readme.md with updated links Fix http->https where possible and update links doc links * Update README.markdown * Fix precompilation link
Configuration menu - View commit details
-
Copy full SHA for edcc84f - Browse repository at this point
Copy the full SHA edcc84fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 587e7a3 - Browse repository at this point
Copy the full SHA 587e7a3View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 1f61f21 - Browse repository at this point
Copy the full SHA 1f61f21View commit details
Commits on Dec 3, 2019
-
chore: restructure build commands
- move dtslint (checkTypes) away from Gruntfile.js (as it disturbs debugging `grunt`) and call it directly as npm-script in travis-ci - re-group task definition in Gruntfile.js - use a multi-job travis build to run linting, format, dtslint and tests in parallel - run only "npm test" on appveyor - rename Grunt-tasks for be more descriptive - SAUCE_USERNAME is not a secret variable anymore it can be easily guessed anyway and the [secure] value messes up with a lot of the log output - linting on commit disable during transition
Configuration menu - View commit details
-
Copy full SHA for e913dc5 - Browse repository at this point
Copy the full SHA e913dc5View commit details -
Configuration menu - View commit details
-
Copy full SHA for e97685e - Browse repository at this point
Copy the full SHA e97685eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8901c28 - Browse repository at this point
Copy the full SHA 8901c28View commit details
Commits on Dec 5, 2019
-
Configuration menu - View commit details
-
Copy full SHA for c40d9f3 - Browse repository at this point
Copy the full SHA c40d9f3View commit details
Commits on Dec 8, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 04b1984 - Browse repository at this point
Copy the full SHA 04b1984View commit details -
Update (C) year in the LICENSE file
Welcome to 2019!
Configuration menu - View commit details
-
Copy full SHA for d1fb07b - Browse repository at this point
Copy the full SHA d1fb07bView commit details
Commits on Dec 14, 2019
-
chore: change eslint-rules for tasks/
- use es2017 rules as NodeJS supports it today - add "prefer-const"
Configuration menu - View commit details
-
Copy full SHA for dc54952 - Browse repository at this point
Copy the full SHA dc54952View commit details -
Configuration menu - View commit details
-
Copy full SHA for dde108e - Browse repository at this point
Copy the full SHA dde108eView commit details -
1
Configuration menu - View commit details
-
Copy full SHA for 3a5b65e - Browse repository at this point
Copy the full SHA 3a5b65eView commit details -
1
Configuration menu - View commit details
-
Copy full SHA for 1ebce2b - Browse repository at this point
Copy the full SHA 1ebce2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ec1737 - Browse repository at this point
Copy the full SHA 1ec1737View commit details -
Configuration menu - View commit details
-
Copy full SHA for 14b621c - Browse repository at this point
Copy the full SHA 14b621cView commit details -
chore: disable "dot-notation" rule
- I don't think it makes much sense. In some cases, it is more readable to wrap property access in quotes, some times not, but there is no universal rule for that. - a promises "catch"-function should not be wrapped, but it has to be, if "allow-keywords" is set to false - an "if"-helper should be wrapped, but it is not allowed to be if "allow-keywords" is set to true (default).
Configuration menu - View commit details
-
Copy full SHA for ac4655e - Browse repository at this point
Copy the full SHA ac4655eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 164b7ff - Browse repository at this point
Copy the full SHA 164b7ffView commit details
Commits on Jan 8, 2020
-
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
Configuration menu - View commit details
-
Copy full SHA for d03b6ec - Browse repository at this point
Copy the full SHA d03b6ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for d337f40 - Browse repository at this point
Copy the full SHA d337f40View commit details -
test: add path to nodeJs when running test:bin
- this allows the test to be run in a debugger without the complete PATH
Configuration menu - View commit details
-
Copy full SHA for 187d611 - Browse repository at this point
Copy the full SHA 187d611View commit details -
Configuration menu - View commit details
-
Copy full SHA for d7f0dcf - Browse repository at this point
Copy the full SHA d7f0dcfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 770d746 - Browse repository at this point
Copy the full SHA 770d746View commit details -
1
Configuration menu - View commit details
-
Copy full SHA for 91a1b5d - Browse repository at this point
Copy the full SHA 91a1b5dView commit details
Commits on Jan 10, 2020
-
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)
Configuration menu - View commit details
-
Copy full SHA for 7af1c12 - Browse repository at this point
Copy the full SHA 7af1c12View commit details -
fix: use "logger" instead of console.error
... to be graceful with older browser without "console"
Configuration menu - View commit details
-
Copy full SHA for 575d877 - Browse repository at this point
Copy the full SHA 575d877View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f0834b - Browse repository at this point
Copy the full SHA 1f0834bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d5c807 - Browse repository at this point
Copy the full SHA 0d5c807View commit details
Commits on Jan 12, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 3c1e252 - Browse repository at this point
Copy the full SHA 3c1e252View commit details -
fix: fix log output in case of illegal property access
- fix link url to handlebarsjs.com
Configuration menu - View commit details
-
Copy full SHA for f152dfc - Browse repository at this point
Copy the full SHA f152dfcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cddfe7 - Browse repository at this point
Copy the full SHA 4cddfe7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 14ba3d0 - Browse repository at this point
Copy the full SHA 14ba3d0View commit details
Commits on Jan 13, 2020
-
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.
Configuration menu - View commit details
-
Copy full SHA for 9d5aa36 - Browse repository at this point
Copy the full SHA 9d5aa36View commit details -
chore: execute saucelabs-task only if access-key exists
- up to now, the existance of the SAUCE_USERNAME was checked but this variable is even present in pull-requests from other repos. This means that builds fail, because the access key is not there. This change looks for SAUCE_ACCESS_KEY instead, which is a secure variable, only present in build originating from the handlebars.js repo.
Configuration menu - View commit details
-
Copy full SHA for a4fd391 - Browse repository at this point
Copy the full SHA a4fd391View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0c6c4c - Browse repository at this point
Copy the full SHA f0c6c4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 586e672 - Browse repository at this point
Copy the full SHA 586e672View commit details
Commits on Jan 21, 2020
-
Configuration menu - View commit details
-
Copy full SHA for ad63f51 - Browse repository at this point
Copy the full SHA ad63f51View commit details
There are no files selected for viewing
This file was deleted.
Large diffs are not rendered by default.