eleventy-plugin-vento 4.6.0-beta.0 → 4.6.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # eleventy-plugin-vento
2
2
 
3
+ ## 4.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2e34802: Reverts commit 1f2dce72e93794a7db1dd9e0f334da8e54c1cc7a introducing breaking changes from Vento v2 as raised in #327
8
+
9
+ ## 4.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 1a822a6: 🎉 Update `ventojs` to v2 🎉
14
+
15
+ **Note:** Vento v2 introduces some breaking changes that _shouldn't_ have an impact on functionality of this plugin unless you're going through this plugin to modify Vento's internal functionality.
16
+
17
+ The internals of this plugin were reworked in order to ensure that tests still pass. If you come across any issues while using Vento v2 please raise an issue!
18
+
3
19
  ## 4.6.0-beta.0
4
20
 
5
21
  ### Minor 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/core/environment.js';
4
+ import { Plugin } from 'ventojs/src/environment.js';
5
5
 
6
6
  interface PluginOptions {
7
7
  /**
package/dist/plugin.js CHANGED
@@ -9,8 +9,7 @@ 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, token, output, tokens) => {
13
- const code = token[1];
12
+ const tag = (env, code, output, tokens) => {
14
13
  const match = code === tagInfo.name || code.startsWith(`${tagInfo.name} `);
15
14
  if (!match) {
16
15
  return;
@@ -29,8 +28,12 @@ function createVentoTag(tagInfo) {
29
28
  compiled.push(
30
29
  "{",
31
30
  `let ${nestedVarname} = "";`,
32
- ...env.compileTokens(tokens, nestedVarname, `/${tagInfo.name}`)
31
+ ...env.compileTokens(tokens, nestedVarname, [`/${tagInfo.name}`])
33
32
  );
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();
34
37
  }
35
38
  args.unshift(thisArg);
36
39
  compiled.push(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleventy-plugin-vento",
3
- "version": "4.6.0-beta.0",
3
+ "version": "4.6.1",
4
4
  "description": "Adds support for the Vento templating language to Eleventy.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -37,7 +37,7 @@
37
37
  "license": "MIT",
38
38
  "dependencies": {
39
39
  "debug": "4.4.1",
40
- "ventojs": "2.0.0-canary.3"
40
+ "ventojs": "1.15.2"
41
41
  },
42
42
  "devDependencies": {
43
43
  "11ty.ts": "0.0.6",
@@ -48,14 +48,14 @@
48
48
  "@types/node": "22.18.0",
49
49
  "eslint": "9.34.0",
50
50
  "eslint-config-prettier": "10.1.8",
51
- "eslint-plugin-unicorn": "60.0.0",
51
+ "eslint-plugin-unicorn": "61.0.1",
52
52
  "globals": "16.3.0",
53
53
  "knip": "5.63.0",
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.40.0",
58
+ "typescript-eslint": "8.41.0",
59
59
  "vitest": "3.2.4"
60
60
  },
61
61
  "prettier": {
package/readme.md CHANGED
@@ -160,7 +160,7 @@ Eleventy: See [Shortcodes](https://www.11ty.dev/docs/shortcodes/) and the sub-se
160
160
  ## Vento Plugins
161
161
 
162
162
  > [!NOTE]
163
- > The `auto_trim` plugin that ships with Vento has a specific implementation in the scope of this plugin. See [Auto-Trimming Tags](#auto-trimming-tags) for more details.\_
163
+ > The `auto_trim` plugin that ships with Vento has a specific implementation in the scope of this plugin. See [Auto-Trimming Tags](#auto-trimming-tags) for more details.
164
164
 
165
165
  If you'd like to extend the Vento library with any plugins, include them in an array passed to the `plugins` option.
166
166