Comparing version 6.0.0-8 to 6.0.0-9
@@ -1506,3 +1506,2 @@ import { | ||
} | ||
#executedPlugins = false; | ||
/** | ||
@@ -1527,3 +1526,3 @@ * An array of registered plugins | ||
*/ | ||
globals = edgeGlobals; | ||
globals = { ...edgeGlobals }; | ||
/** | ||
@@ -1560,16 +1559,14 @@ * List of registered tags. Adding new tags will only impact | ||
/** | ||
* Execute plugins. Since plugins are meant to be called only | ||
* once we empty out the array after first call | ||
* Execute plugins | ||
*/ | ||
#executePlugins() { | ||
if (this.#executedPlugins) { | ||
this.#plugins.filter(({ options }) => options && options.recurring).forEach(({ fn, options }) => { | ||
fn(this, false, options); | ||
}); | ||
} else { | ||
this.#executedPlugins = true; | ||
this.#plugins.forEach(({ fn, options }) => { | ||
fn(this, true, options); | ||
}); | ||
} | ||
this.#plugins.filter(({ options, executed }) => { | ||
if (options && options.recurring) { | ||
return true; | ||
} | ||
return !executed; | ||
}).forEach((plugin) => { | ||
plugin.fn(this, !plugin.executed, plugin.options); | ||
plugin.executed = true; | ||
}); | ||
} | ||
@@ -1583,2 +1580,3 @@ /** | ||
fn: pluginFn, | ||
executed: false, | ||
options | ||
@@ -1585,0 +1583,0 @@ }); |
{ | ||
"name": "edge.js", | ||
"description": "Template engine", | ||
"version": "6.0.0-8", | ||
"version": "6.0.0-9", | ||
"engines": { | ||
@@ -6,0 +6,0 @@ "node": ">=18.16.0" |
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
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
96620
3158