eleventy-plugin-vento 4.6.1 → 5.0.0
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 +19 -0
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js +3 -6
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# eleventy-plugin-vento
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- a17cc12: Update Vento language library to v2
|
|
8
|
+
|
|
9
|
+
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!
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
The biggest changes are:
|
|
14
|
+
|
|
15
|
+
- `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.
|
|
16
|
+
- `runStringSync` is no longer supported and has been removed
|
|
17
|
+
- `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).
|
|
18
|
+
- Other external dependencies such as `ESTree` have also been removed and thusly are no longer accessible via this plugin.
|
|
19
|
+
|
|
20
|
+
_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!_
|
|
21
|
+
|
|
3
22
|
## 4.6.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
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.0",
|
|
4
4
|
"description": "Adds support for the Vento templating language to Eleventy.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -37,25 +37,25 @@
|
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"debug": "4.4.1",
|
|
40
|
-
"ventojs": "
|
|
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
54
|
"tsup": "8.5.0",
|
|
55
55
|
"tsx": "4.20.5",
|
|
56
56
|
"type-fest": "4.41.0",
|
|
57
57
|
"typescript": "5.9.2",
|
|
58
|
-
"typescript-eslint": "8.
|
|
58
|
+
"typescript-eslint": "8.43.0",
|
|
59
59
|
"vitest": "3.2.4"
|
|
60
60
|
},
|
|
61
61
|
"prettier": {
|