eleventy-plugin-vento 4.1.1 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/plugin.js +7 -6
- package/package.json +19 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# eleventy-plugin-vento
|
|
2
2
|
|
|
3
|
+
## 4.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- aa931db: handle shortcode names that start with the same sequence (fixes #220)
|
|
8
|
+
|
|
9
|
+
## 4.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- fc6aa07: Update `ventojs` to 1.12.16
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 02d75fd: Adjust `nestedVarname` for Eleventy-provided shortcodes so that conflicts in internal template variable names are less likely. Should not have significant impact on builds.
|
|
18
|
+
- 12e04fe: Made `DEBUG` messages regarding whether Eleventy or Vento was caching a template more verbose
|
|
19
|
+
|
|
3
20
|
## 4.1.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/plugin.js
CHANGED
|
@@ -7,10 +7,12 @@ import createVentoEnv from "ventojs";
|
|
|
7
7
|
|
|
8
8
|
// src/utils/create-vento-tag.ts
|
|
9
9
|
function createVentoTag(tagInfo) {
|
|
10
|
+
let LEVEL = 1;
|
|
10
11
|
const IS_PAIRED = tagInfo.group === "pairedShortcodes";
|
|
11
|
-
let INT = 0;
|
|
12
12
|
const tag = (env, code, output, tokens) => {
|
|
13
|
-
if (!code.startsWith(tagInfo.name))
|
|
13
|
+
if (code !== tagInfo.name && !code.startsWith(`${tagInfo.name} `)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
14
16
|
const { dataVarname } = env.options;
|
|
15
17
|
const thisArg = `{
|
|
16
18
|
page: ${dataVarname}.page,
|
|
@@ -20,7 +22,7 @@ function createVentoTag(tagInfo) {
|
|
|
20
22
|
const args = [code.replace(tagInfo.name, "").trim()];
|
|
21
23
|
const compiled = [];
|
|
22
24
|
if (IS_PAIRED) {
|
|
23
|
-
const nestedVarname = `
|
|
25
|
+
const nestedVarname = `__content${output.startsWith("__content") ? LEVEL++ : 0}`;
|
|
24
26
|
args.unshift(env.compileFilters(tokens, nestedVarname, env.options.autoescape));
|
|
25
27
|
compiled.push(
|
|
26
28
|
"{",
|
|
@@ -94,12 +96,11 @@ function createVentoEngine(options) {
|
|
|
94
96
|
} else {
|
|
95
97
|
template = env.compile(source, file);
|
|
96
98
|
debugCache(
|
|
97
|
-
`Cache MISS for \`%s\`, compiled new template
|
|
98
|
-
Use Vento cache: %o
|
|
99
|
+
`Cache MISS for \`%s\`, compiled new template; %s
|
|
99
100
|
|
|
100
101
|
${template}`,
|
|
101
102
|
file,
|
|
102
|
-
useVentoCache
|
|
103
|
+
useVentoCache ? "let Vento cache result" : "defer result caching to Eleventy"
|
|
103
104
|
);
|
|
104
105
|
if (useVentoCache) {
|
|
105
106
|
env.cache.set(file, template);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eleventy-plugin-vento",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "Adds support for the Vento templating language to Eleventy.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -37,26 +37,28 @@
|
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"debug": "4.4.0",
|
|
40
|
-
"ventojs": "1.12.
|
|
40
|
+
"ventojs": "1.12.16"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"11ty.ts": "0.0.5",
|
|
44
|
-
"@11ty/eleventy": "3.0.1-alpha.
|
|
45
|
-
"@changesets/cli": "2.
|
|
46
|
-
"@eslint/js": "9.
|
|
44
|
+
"@11ty/eleventy": "3.0.1-alpha.5",
|
|
45
|
+
"@changesets/cli": "2.29.2",
|
|
46
|
+
"@eslint/js": "9.25.1",
|
|
47
47
|
"@types/debug": "4.1.12",
|
|
48
48
|
"@types/eslint-config-prettier": "6.11.3",
|
|
49
|
-
"@types/
|
|
50
|
-
"
|
|
51
|
-
"eslint": "
|
|
52
|
-
"eslint-
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
49
|
+
"@types/node": "22.15.3",
|
|
50
|
+
"eslint": "9.25.1",
|
|
51
|
+
"eslint-config-prettier": "10.1.2",
|
|
52
|
+
"eslint-plugin-unicorn": "59.0.0",
|
|
53
|
+
"globals": "16.0.0",
|
|
54
|
+
"nano-spawn": "0.2.0",
|
|
55
|
+
"picocolors": "1.1.1",
|
|
56
|
+
"tsup": "8.4.0",
|
|
57
|
+
"tsx": "4.19.3",
|
|
58
|
+
"type-fest": "4.40.1",
|
|
59
|
+
"typescript": "5.8.3",
|
|
60
|
+
"typescript-eslint": "8.31.0",
|
|
61
|
+
"vitest": "3.1.2"
|
|
60
62
|
},
|
|
61
63
|
"prettier": {
|
|
62
64
|
"bracketSameLine": true,
|
|
@@ -73,6 +75,7 @@
|
|
|
73
75
|
"dev": "tsup --watch ./src",
|
|
74
76
|
"ci:version": "changeset version && pnpm install --no-frozen-lockfile",
|
|
75
77
|
"ci:publish": "changeset publish",
|
|
78
|
+
"ci:generate-renovate-changesets": "tsx .github/scripts/renovate-changesets.ts",
|
|
76
79
|
"format": "pnpm dlx prettier --config ./package.json --write ."
|
|
77
80
|
}
|
|
78
81
|
}
|