Comparing version 0.7.12 to 0.7.13
@@ -55,3 +55,8 @@ var esprima = require('esprima'), | ||
'exports.apply = function apply(ctx) {\n' + | ||
' return applyc(ctx || this);\n' + | ||
' try {\n' + | ||
' return applyc(ctx || this);\n' + | ||
' } catch (e) {\n' + | ||
' e.xjstContext = ctx || this;\n' + | ||
' throw e;\n' + | ||
' }\n' + | ||
'};' + | ||
@@ -699,2 +704,8 @@ 'function applyc(ctx) {\n' + | ||
}, this), | ||
applyContext = { | ||
type: 'LogicalExpression', | ||
operator: '||', | ||
left: { type: 'Identifier', name: 'ctx' }, | ||
right: { type: 'ThisExpression' } | ||
}, | ||
apply = { | ||
@@ -711,13 +722,37 @@ type: 'FunctionDeclaration', | ||
body: [{ | ||
type: 'ReturnStatement', | ||
argument: { | ||
type: 'CallExpression', | ||
callee: { type: 'Identifier', name: 'applyc' }, | ||
arguments: [{ | ||
type: 'LogicalExpression', | ||
operator: '||', | ||
left: { type: 'Identifier', name: 'ctx' }, | ||
right: { type: 'ThisExpression' } | ||
type: 'TryStatement', | ||
block: { | ||
type: 'BlockStatement', | ||
body: [{ | ||
type: 'ReturnStatement', | ||
argument: { | ||
type: 'CallExpression', | ||
callee: { type: 'Identifier', name: 'applyc' }, | ||
arguments: [applyContext] | ||
} | ||
}] | ||
} | ||
}, | ||
guardedHandlers: [], | ||
handlers: [{ | ||
type: 'CatchClause', | ||
param: { type: 'Identifier', name: 'e' }, | ||
body: { | ||
type: 'BlockStatement', | ||
body: [{ | ||
type: 'ExpressionStatement', | ||
expression: { | ||
type: 'AssignmentExpression', | ||
operator: '=', | ||
left: { | ||
type: 'MemberExpression', | ||
computed: false, | ||
object: applyContext, | ||
property: { type: 'Identifier', name: 'xjstContext' } | ||
}, | ||
right: { type: 'Identifier', name: 'e' } | ||
} | ||
}] | ||
} | ||
}], | ||
finalizer: null | ||
}] | ||
@@ -724,0 +759,0 @@ } |
{ | ||
"name": "xjst", | ||
"description": "XSLT inspired JavaScript templates (with spices)", | ||
"version": "0.7.12", | ||
"version": "0.7.13", | ||
"homepage": "http://github.com/veged/xjst", | ||
@@ -6,0 +6,0 @@ "author": "Sergey Berezhnoy <veged@mail.ru> (http://github.com/veged)", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85720
20
1720
1