@bookshop/eleventy-engine
Advanced tools
Comparing version
@@ -1,1 +0,1 @@ | ||
{"processes":{"8958ccdb-e3e2-4f62-a8e5-76c8c08a323f":{"parent":"a33739dc-d9b0-49dd-b2c6-3a42eae694ef","children":[]},"97f905a4-2e48-4033-9bd3-d59864117a36":{"parent":"a33739dc-d9b0-49dd-b2c6-3a42eae694ef","children":[]},"a33739dc-d9b0-49dd-b2c6-3a42eae694ef":{"parent":null,"children":["8958ccdb-e3e2-4f62-a8e5-76c8c08a323f","97f905a4-2e48-4033-9bd3-d59864117a36","b22e0b74-4d86-4327-85e6-70bce876e12c"]},"b22e0b74-4d86-4327-85e6-70bce876e12c":{"parent":"a33739dc-d9b0-49dd-b2c6-3a42eae694ef","children":[]}},"files":{},"externalIds":{}} | ||
{"processes":{"0c82bdf0-be66-48c4-a94e-d9088766793d":{"parent":"f8b0241f-dc92-4431-9913-eaf45d648731","children":[]},"ab19607c-adba-46dd-bc8d-7b5d68b633ca":{"parent":"f8b0241f-dc92-4431-9913-eaf45d648731","children":[]},"b5d63ee9-4743-4894-8d0b-65b4c6efb4b8":{"parent":"f8b0241f-dc92-4431-9913-eaf45d648731","children":[]},"f8b0241f-dc92-4431-9913-eaf45d648731":{"parent":null,"children":["0c82bdf0-be66-48c4-a94e-d9088766793d","ab19607c-adba-46dd-bc8d-7b5d68b633ca","b5d63ee9-4743-4894-8d0b-65b4c6efb4b8"]}},"files":{},"externalIds":{}} |
@@ -33,12 +33,12 @@ import { Liquid, Context } from 'liquidjs'; | ||
fs: { | ||
readFileSync (file) { | ||
readFileSync(file) { | ||
return "LiquidJS readFileSync unimplemented" | ||
}, | ||
async readFile (file) { | ||
async readFile(file) { | ||
return await eleventyEngine.retrieveInclude(file); | ||
}, | ||
existsSync () { | ||
existsSync() { | ||
return true | ||
}, | ||
async exists () { | ||
async exists() { | ||
return true | ||
@@ -117,3 +117,3 @@ }, | ||
} | ||
const [,value, index] = str.match(/^(.*?)(?:\[(\d+)\])?$/); | ||
const [, value, index] = str.match(/^(.*?)(?:\[(\d+)\])?$/); | ||
let result = await this.liquid.evalValue(value, ctx); | ||
@@ -124,3 +124,3 @@ if (index && typeof result === 'object' && !Array.isArray(result)) { | ||
return index ? result[index] : result; | ||
} catch(e) { | ||
} catch (e) { | ||
console.error(`Error evaluating ${str}`, e); | ||
@@ -127,0 +127,0 @@ return ''; |
{ | ||
"name": "@bookshop/eleventy-engine", | ||
"packageManager": "yarn@3.0.0", | ||
"version": "2.0.9", | ||
"version": "2.0.10-editorlinks.0", | ||
"description": "Bookshop frontend Eleventy renderer", | ||
@@ -26,3 +26,3 @@ "type": "module", | ||
"dependencies": { | ||
"@bookshop/helpers": "2.0.9", | ||
"@bookshop/helpers": "2.0.10-editorlinks.0", | ||
"esbuild": "^0.11.23", | ||
@@ -29,0 +29,0 @@ "liquidjs": "9.28.0", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
18439
0.15%2
100%+ Added
- Removed