eleventy-plugin-vento 4.6.1 → 5.0.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 +28 -9
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js +3 -6
- package/package.json +13 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# eleventy-plugin-vento
|
|
2
2
|
|
|
3
|
+
## 5.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a2e961d: Update `debug` to 4.4.3.
|
|
8
|
+
|
|
9
|
+
4.4.3 handles a vulnerability in 4.4.2 which was never distributed by this package. Pinning 4.4.3 over 4.4.2 circumvents the now-yanked version.
|
|
10
|
+
|
|
11
|
+
See https://github.com/debug-js/debug/issues/1005#issuecomment-3293627810 for more information.
|
|
12
|
+
|
|
13
|
+
## 5.0.0
|
|
14
|
+
|
|
15
|
+
### Major Changes
|
|
16
|
+
|
|
17
|
+
- a17cc12: Update Vento language library to v2
|
|
18
|
+
|
|
19
|
+
This is a redo of release 4.6.0, now repackaged as a major release. As noted by @oscarotero in #327, Vento v2 is largely compatible with v1, so there shouldn't be any significant changes needed within your templates. Furthermore, he's released v2.0.2 (which this plugin has already adopted) that should solve the majority of incompatibility issues. Changes were made in 523a84ff and cdf5b104 to account for breaking changes upstream, though do be sure to review your own templates and configs for any breaking changes!
|
|
20
|
+
|
|
21
|
+
More critical to note for Vento v2 is the rearrangement of core library features that this plugin exposes. Definitely review [the changelog for v2](https://github.com/ventojs/vento/blob/main/CHANGELOG.md#200---2025-09-01) to determine whether your implementation needs updating.
|
|
22
|
+
|
|
23
|
+
The biggest changes are:
|
|
24
|
+
- `meriyah` was removed via https://github.com/ventojs/vento/pull/128 at the benefit of performance. If you were absorbing `meriyah`'s functionality via this plugin, you should adjust accordingly.
|
|
25
|
+
- `runStringSync` is no longer supported and has been removed
|
|
26
|
+
- `ventoOptions.useWith` was previously deprecated and has since been removed. If you relied on `useWith` in your [plugin options](https://github.com/noelforte/eleventy-plugin-vento?tab=readme-ov-file#plugin-options), you should instead use `ventoOptions.dataVarname` and `ventoOptions.autoDataVarname` to control how the global namespace for template data is exposed. For more info, see more on [the Vento docs](https://vento.js.org/configuration/#datavarname).
|
|
27
|
+
- Other external dependencies such as `ESTree` have also been removed and thusly are no longer accessible via this plugin.
|
|
28
|
+
|
|
29
|
+
_Side note: I've been considering migrating the integration this plugin provides with Eleventy Shortcodes to something more modular, [like how Lume handles components](https://lume.land/docs/core/components/). If this is something you're interested in, let me know by opening an issue!_
|
|
30
|
+
|
|
3
31
|
## 4.6.1
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
|
@@ -33,7 +61,6 @@
|
|
|
33
61
|
### Minor Changes
|
|
34
62
|
|
|
35
63
|
- 1f1a13a: Update ventojs to 1.14.0. This version bump incorporates the following new features:
|
|
36
|
-
|
|
37
64
|
- Loading templates via URLs
|
|
38
65
|
- Destructuring in `for` loops
|
|
39
66
|
- `{{ continue }}` and `{{ break }}` tags
|
|
@@ -90,7 +117,6 @@
|
|
|
90
117
|
- 335f21e: Select type updates (shouldn't affect compilation, however should improve DX)
|
|
91
118
|
|
|
92
119
|
Changes are:
|
|
93
|
-
|
|
94
120
|
- split types into separate files
|
|
95
121
|
- namespace `ventojs` type imports
|
|
96
122
|
- make `PluginOptions` optional by default
|
|
@@ -98,7 +124,6 @@
|
|
|
98
124
|
- declare a special (`EleventyVentoEnvironment`) for this plugin to replace Vento's own `Environment`
|
|
99
125
|
|
|
100
126
|
- 070109a: Refactored files and functions internally that shouldn't have any impact on usage or performance:
|
|
101
|
-
|
|
102
127
|
- Split `debug` functions into separate exports, renamed `runCompatiblityCheck -> compatibilityCheck` (dd4c379b)
|
|
103
128
|
- Utilities are now split into separate files (e06a83ab)
|
|
104
129
|
- Main file renamed from `index.ts` to `plugin.ts` (1b122d2a)
|
|
@@ -129,7 +154,6 @@
|
|
|
129
154
|
- 335f21e: Select type updates (shouldn't affect compilation, however should improve DX)
|
|
130
155
|
|
|
131
156
|
Changes are:
|
|
132
|
-
|
|
133
157
|
- split types into separate files
|
|
134
158
|
- namespace `ventojs` type imports
|
|
135
159
|
- make `PluginOptions` optional by default
|
|
@@ -139,7 +163,6 @@
|
|
|
139
163
|
- 9eaa059: Update `debug` to v4.4.0
|
|
140
164
|
- f387b5e: Update `ventojs` to v1.12.13
|
|
141
165
|
- 070109a: Refactored files and functions internally that shouldn't have any impact on usage or performance:
|
|
142
|
-
|
|
143
166
|
- Split `debug` functions into separate exports, renamed `runCompatiblityCheck -> compatibilityCheck` (dd4c379b)
|
|
144
167
|
- Utilities are now split into separate files (e06a83ab)
|
|
145
168
|
- Main file renamed from `index.ts` to `plugin.ts` (1b122d2a)
|
|
@@ -260,7 +283,6 @@
|
|
|
260
283
|
### Patch Changes
|
|
261
284
|
|
|
262
285
|
- 693e1a2: Refactored the following features internally:
|
|
263
|
-
|
|
264
286
|
- Reverts 2c3548c1 for modularity: The compatibility check has moved back to `modules/utils.js`
|
|
265
287
|
- Revises caching further: Instead of deferring to Vento for everything, permalink templates and templates loaded by Vento (like includes) are cached by Vento. Everything else is cached by Eleventy.
|
|
266
288
|
- Rename some internal variables to help with readability (`_11ty.ctx => _11Ctx`)
|
|
@@ -273,7 +295,6 @@
|
|
|
273
295
|
|
|
274
296
|
- 7e6ba68: Separate `shortcodes` and `pairedShortcodes` into seperate object namespaces. Prior to this version, Eleventy shortcodes and paired shortcodes were merged into a single object keyed as `_11ty.functions` which allowed for naming collisions between shortcodes and their paired counterparts.
|
|
275
297
|
- b8f0a03: Adds new dependency on `debug` package, to help out with testing and getting more verbose logs. The following `DEBUG` namespaces are implemented:
|
|
276
|
-
|
|
277
298
|
- `Eleventy:Vento:Setup` - Logs initial setup of the plugin, loading features, pre-page compile setup steps (like changing `page` and `eleventy` objects)
|
|
278
299
|
- `Eleventy:Vento:Cache` - Logs updates to Vento's own internal cache, which is used in tandem with Eleventy's cache.
|
|
279
300
|
- `Eleventy:Vento:Template` - Logs rendered templates and other template related actions
|
|
@@ -301,7 +322,6 @@
|
|
|
301
322
|
Templates are now compiled directly instead of using Vento's `.runString` method which reduces overhead and enables this plugin to manage the Vento cache in a more direct manner.
|
|
302
323
|
|
|
303
324
|
- 494b184: Permalink compilation optimizations:
|
|
304
|
-
|
|
305
325
|
- Permalinks now short-circuit to raw strings if they don't contain Vento template syntax, avoiding compilation entirely.
|
|
306
326
|
- Permalinks are now assigned (fake) pathnames in Vento's cache. If you change template content but don't change a dynamic permalink in development, Vento will reuse the compiled permalink template. Note that **any** modifications to a template file will **always** cause it to be recompiled (see 19c352fa) — this improvement just optimizes recompiling dynamic permalinks that haven't changed.
|
|
307
327
|
|
|
@@ -333,7 +353,6 @@
|
|
|
333
353
|
### Patch Changes
|
|
334
354
|
|
|
335
355
|
- 9f5a90f: Various Refactors - These changes shouldn't have any observable effect on your templates or usage.
|
|
336
|
-
|
|
337
356
|
- Replaced `class` based approach for a closure implementation instead. Since there was only 1 Vento `env` object ever instanced in this plugin, steering away from using `class` removes some complexity and overhead.
|
|
338
357
|
|
|
339
358
|
- `DATA_KEYS` (used internally) moved into utils file alongside other utilities (like compatibility checks) and renamed to `CONTEXT_DATA_KEYS`.
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import UserConfig from '@11ty/eleventy/UserConfig';
|
|
2
2
|
import { LiteralUnion } from 'type-fest';
|
|
3
3
|
import * as ventojs from 'ventojs';
|
|
4
|
-
import { Plugin } from 'ventojs/
|
|
4
|
+
import { Plugin } from 'ventojs/core/environment.js';
|
|
5
5
|
|
|
6
6
|
interface PluginOptions {
|
|
7
7
|
/**
|
package/dist/plugin.js
CHANGED
|
@@ -9,7 +9,8 @@ import createVentoEnv from "ventojs";
|
|
|
9
9
|
function createVentoTag(tagInfo) {
|
|
10
10
|
let LEVEL = 1;
|
|
11
11
|
const IS_PAIRED = tagInfo.group === "pairedShortcodes";
|
|
12
|
-
const tag = (env,
|
|
12
|
+
const tag = (env, token, output, tokens) => {
|
|
13
|
+
const code = token[1];
|
|
13
14
|
const match = code === tagInfo.name || code.startsWith(`${tagInfo.name} `);
|
|
14
15
|
if (!match) {
|
|
15
16
|
return;
|
|
@@ -28,12 +29,8 @@ function createVentoTag(tagInfo) {
|
|
|
28
29
|
compiled.push(
|
|
29
30
|
"{",
|
|
30
31
|
`let ${nestedVarname} = "";`,
|
|
31
|
-
...env.compileTokens(tokens, nestedVarname,
|
|
32
|
+
...env.compileTokens(tokens, nestedVarname, `/${tagInfo.name}`)
|
|
32
33
|
);
|
|
33
|
-
if (tokens.length > 0 && (tokens[0][0] !== "tag" || tokens[0][1] !== `/${tagInfo.name}`)) {
|
|
34
|
-
throw new Error(`Vento: Missing closing tag for ${tagInfo.name} tag: ${code}`);
|
|
35
|
-
}
|
|
36
|
-
tokens.shift();
|
|
37
34
|
}
|
|
38
35
|
args.unshift(thisArg);
|
|
39
36
|
compiled.push(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eleventy-plugin-vento",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Adds support for the Vento templating language to Eleventy.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -36,34 +36,29 @@
|
|
|
36
36
|
},
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"debug": "4.4.
|
|
40
|
-
"ventojs": "
|
|
39
|
+
"debug": "4.4.3",
|
|
40
|
+
"ventojs": "2.0.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"11ty.ts": "0.0.6",
|
|
44
44
|
"@11ty/eleventy": "3.1.2",
|
|
45
|
-
"@changesets/cli": "2.29.
|
|
46
|
-
"@eslint/js": "9.
|
|
45
|
+
"@changesets/cli": "2.29.7",
|
|
46
|
+
"@eslint/js": "9.35.0",
|
|
47
47
|
"@types/debug": "4.1.12",
|
|
48
|
-
"@types/node": "22.18.
|
|
49
|
-
"eslint": "9.
|
|
48
|
+
"@types/node": "22.18.1",
|
|
49
|
+
"eslint": "9.35.0",
|
|
50
50
|
"eslint-config-prettier": "10.1.8",
|
|
51
|
-
"eslint-plugin-unicorn": "61.0.
|
|
52
|
-
"globals": "16.
|
|
53
|
-
"knip": "5.63.
|
|
51
|
+
"eslint-plugin-unicorn": "61.0.2",
|
|
52
|
+
"globals": "16.4.0",
|
|
53
|
+
"knip": "5.63.1",
|
|
54
|
+
"prettier": "3.6.2",
|
|
54
55
|
"tsup": "8.5.0",
|
|
55
56
|
"tsx": "4.20.5",
|
|
56
57
|
"type-fest": "4.41.0",
|
|
57
58
|
"typescript": "5.9.2",
|
|
58
|
-
"typescript-eslint": "8.
|
|
59
|
+
"typescript-eslint": "8.43.0",
|
|
59
60
|
"vitest": "3.2.4"
|
|
60
61
|
},
|
|
61
|
-
"prettier": {
|
|
62
|
-
"bracketSameLine": true,
|
|
63
|
-
"singleQuote": true,
|
|
64
|
-
"semi": true,
|
|
65
|
-
"trailingComma": "es5"
|
|
66
|
-
},
|
|
67
62
|
"scripts": {
|
|
68
63
|
"test": "vitest --run",
|
|
69
64
|
"lint": "pnpm --color run '/^lint:/'",
|
|
@@ -75,6 +70,6 @@
|
|
|
75
70
|
"ci:version": "changeset version && pnpm install --no-frozen-lockfile",
|
|
76
71
|
"ci:publish": "changeset publish",
|
|
77
72
|
"ci:generate-renovate-changesets": "tsx .github/scripts/renovate-changesets.ts",
|
|
78
|
-
"
|
|
73
|
+
"fmt": "prettier --write ."
|
|
79
74
|
}
|
|
80
75
|
}
|