@bookshop/eleventy-bookshop
Advanced tools
Comparing version 3.2.0-beta.0 to 3.2.0
@@ -1,1 +0,1 @@ | ||
{"processes":{"33acf286-213b-467f-8bda-0e27c52a7a3a":{"parent":"b47c7c81-56d9-42e8-89e6-19053df0afa2","children":[]},"b47c7c81-56d9-42e8-89e6-19053df0afa2":{"parent":null,"children":["33acf286-213b-467f-8bda-0e27c52a7a3a"]}},"files":{},"externalIds":{}} | ||
{"processes":{"35b4dcc5-ba70-458c-b624-1c145426332e":{"parent":null,"children":["e7bbd906-94a5-490d-b512-4394b469e71e"]},"e7bbd906-94a5-490d-b512-4394b469e71e":{"parent":"35b4dcc5-ba70-458c-b624-1c145426332e","children":[]}},"files":{},"externalIds":{}} |
@@ -21,14 +21,2 @@ const LiquidJS = require("liquidjs"); | ||
// TODO: Use forloop.name once 11ty uses liquidjs >=9.28.0 | ||
const contextHunt = (ctx, hash, index) => { | ||
let h = stringify(hash); | ||
for (let [k, v] of Object.entries(ctx.getAll())) { | ||
if (!Array.isArray(v)) continue; | ||
if (stringify(v[index]) === h) { | ||
return k; | ||
} | ||
} | ||
return "UNKNOWN"; | ||
} | ||
module.exports = (tagType, locations, baseLocation, bookshopConfig) => (liquidEngine) => { | ||
@@ -73,8 +61,5 @@ return { | ||
if (top_context["forloop"]) { | ||
const variable = Object.keys(top_context).filter(k => k !== 'forloop')[0]; | ||
// TODO: Find the actual source. This is a guess. | ||
const index = top_context["forloop"].index0(); | ||
const guessedSource = contextHunt(ctx, top_context[variable], index); | ||
loop_context = `${variable}: ${guessedSource}[${index}]`; | ||
let name = top_context["forloop"]?.name; | ||
let index = top_context["forloop"]?.index0?.(); | ||
loop_context = `${name}[${index}]`.replace(/-/g, ': '); | ||
} | ||
@@ -81,0 +66,0 @@ |
{ | ||
"name": "@bookshop/eleventy-bookshop", | ||
"packageManager": "yarn@3.0.0", | ||
"version": "3.2.0-beta.0", | ||
"version": "3.2.0", | ||
"description": "Eleventy plugin for consuming Bookshop components", | ||
@@ -24,3 +24,3 @@ "main": "main.js", | ||
"dependencies": { | ||
"@bookshop/helpers": "3.2.0-beta.0", | ||
"@bookshop/helpers": "3.2.0", | ||
"normalize-path": "^3.0.0", | ||
@@ -27,0 +27,0 @@ "safe-stable-stringify": "^2.3.1" |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
354496
13
1
228
+ Added@bookshop/helpers@3.2.0(transitive)
- Removed@bookshop/helpers@3.2.0-beta.0(transitive)
Updated@bookshop/helpers@3.2.0