Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@handlebars/parser

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@handlebars/parser - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## v2.0.0 (2020-12-09)
#### :boom: Breaking Change
* [#3](https://github.com/handlebars-lang/handlebars-parser/pull/3) Make sub-expressions callable ([@pzuraq](https://github.com/pzuraq))
#### Committers: 1
- Chris Garrett ([@pzuraq](https://github.com/pzuraq))
## v1.1.0 (2020-09-18)

@@ -2,0 +10,0 @@

2

package.json
{
"name": "@handlebars/parser",
"version": "1.1.0",
"version": "2.0.0",
"description": "The parser for the Handlebars language",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/handlebars-lang/handlebars-parser#readme",

@@ -285,2 +285,37 @@ import { parse, print } from '../dist/esm';

it('parses mustaches with sub-expressions as the callable', function() {
equals(
astFor('{{(my-helper foo)}}'),
'{{ PATH:my-helper [PATH:foo] [] }}\n'
);
});
it('parses mustaches with sub-expressions as the callable (with args)', function() {
equals(
astFor('{{(my-helper foo) bar}}'),
'{{ PATH:my-helper [PATH:foo] [PATH:bar] }}\n'
);
});
it('parses sub-expressions with a sub-expression as the callable', function() {
equals(
astFor('{{((my-helper foo))}}'),
'{{ PATH:my-helper [PATH:foo] [] [] }}\n'
);
});
it('parses sub-expressions with a sub-expression as the callable (with args)', function() {
equals(
astFor('{{((my-helper foo) bar)}}'),
'{{ PATH:my-helper [PATH:foo] [PATH:bar] [] }}\n'
);
});
it('parses arguments with a sub-expression as the callable (with args)', function() {
equals(
astFor('{{my-helper ((foo) bar) baz=((foo bar))}}'),
'{{ PATH:my-helper [PATH:foo [] [PATH:bar]] HASH{baz=PATH:foo [PATH:bar] []} }}\n'
);
});
it('parses inverse block with block params', function() {

@@ -287,0 +322,0 @@ equals(

@@ -26,3 +26,3 @@ export interface Node {

type: 'MustacheStatement';
path: PathExpression | Literal;
path: SubExpression | PathExpression | Literal;
params: Expression[];

@@ -85,3 +85,3 @@ hash: Hash;

type: 'SubExpression';
path: PathExpression;
path: SubExpression | PathExpression;
params: Expression[];

@@ -88,0 +88,0 @@ hash: Hash;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc