eleventy-plugin-vento 4.1.1-beta.0 → 4.1.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,44 @@
1
1
  # eleventy-plugin-vento
2
2
 
3
+ ## 4.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 335f21e: Select type updates (shouldn't affect compilation, however should improve DX)
8
+
9
+ Changes are:
10
+
11
+ - split types into separate files
12
+ - namespace `ventojs` type imports
13
+ - make `PluginOptions` optional by default
14
+ - make Eleventy types more readable
15
+ - declare a special (`EleventyVentoEnvironment`) for this plugin to replace Vento's own `Environment`
16
+
17
+ - 070109a: Refactored files and functions internally that shouldn't have any impact on usage or performance:
18
+
19
+ - Split `debug` functions into separate exports, renamed `runCompatiblityCheck -> compatibilityCheck` (dd4c379b)
20
+ - Utilities are now split into separate files (e06a83ab)
21
+ - Main file renamed from `index.ts` to `plugin.ts` (1b122d2a)
22
+
23
+ - c382be0: Wrap all filters as regular synchronous functions to avoid ambiguity with sync and async handling. (fixes #96)
24
+
25
+ This change enforces explicit use of the `await` keyword to unwrap returned values from filters before chaining more or printing the result.
26
+
27
+ ```diff
28
+ <!-- Single filters -->
29
+ - {{ "Hello, async!" |> someAsyncFilter }}
30
+ + {{ "Hello, async!" |> await someAsyncFilter }}
31
+
32
+ <!-- Filter chains -->
33
+ - {{ "Hello, async!" |> someAsyncFilter |> someSyncFilter }}
34
+ + {{ "Hello, async!" |> await someAsyncFilter |> someSyncFilter }}
35
+ ```
36
+
37
+ See the [Vento docs on async chains](https://vento.js.org/syntax/pipes/#chain-pipes) for more information.
38
+
39
+ - 9eaa059: Update `debug` to v4.4.0
40
+ - 0b0f96a: Update ventojs to v1.12.14
41
+
3
42
  ## 4.1.1-beta.0
4
43
 
5
44
  ### Patch Changes
package/dist/plugin.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { UserConfig } from '@11ty/eleventy';
1
+ import UserConfig from '@11ty/eleventy/UserConfig';
2
2
  import { LiteralUnion } from 'type-fest';
3
3
  import * as ventojs from 'ventojs';
4
4
  import { Plugin } from 'ventojs/src/environment.js';
package/dist/plugin.js CHANGED
@@ -45,7 +45,7 @@ function createVentoTag(tagInfo) {
45
45
  return compiled.join("\n");
46
46
  };
47
47
  return Object.defineProperty(tag, "name", {
48
- value: tagInfo.name + IS_PAIRED ? `PairedTag` : `Tag`
48
+ value: `${tagInfo.name}_${IS_PAIRED ? `EleventyPairedTag` : `EleventyTag`}`
49
49
  });
50
50
  }
51
51
 
@@ -67,10 +67,9 @@ function createVentoEngine(options) {
67
67
  }
68
68
  function loadFilters(filters) {
69
69
  for (const [name, fn] of Object.entries(filters)) {
70
- env.filters[name] = async function(...args) {
70
+ env.filters[name] = function(...args) {
71
71
  const { page, eleventy } = this.data;
72
- const filterResult = await fn.apply({ ...this, page, eleventy }, args);
73
- return filterResult;
72
+ return fn.apply({ ...this, page, eleventy }, args);
74
73
  };
75
74
  }
76
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleventy-plugin-vento",
3
- "version": "4.1.1-beta.0",
3
+ "version": "4.1.1",
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.0",
40
- "ventojs": "1.12.13"
40
+ "ventojs": "1.12.14"
41
41
  },
42
42
  "devDependencies": {
43
43
  "11ty.ts": "0.0.5",
44
- "@11ty/eleventy": "3.0.0",
45
- "@changesets/cli": "2.27.10",
46
- "@eslint/js": "9.16.0",
44
+ "@11ty/eleventy": "3.0.1-alpha.1",
45
+ "@changesets/cli": "2.27.11",
46
+ "@eslint/js": "9.17.0",
47
47
  "@types/debug": "4.1.12",
48
48
  "@types/eslint-config-prettier": "6.11.3",
49
49
  "@types/eslint__js": "8.42.3",
50
- "@types/node": "22.10.1",
51
- "eslint": "9.16.0",
50
+ "@types/node": "22.10.5",
51
+ "eslint": "9.17.0",
52
52
  "eslint-config-prettier": "9.1.0",
53
53
  "eslint-plugin-unicorn": "56.0.1",
54
- "globals": "15.13.0",
54
+ "globals": "15.14.0",
55
55
  "tsup": "8.3.5",
56
- "type-fest": "4.30.0",
56
+ "type-fest": "4.31.0",
57
57
  "typescript": "5.7.2",
58
- "typescript-eslint": "8.18.0",
58
+ "typescript-eslint": "8.19.0",
59
59
  "vitest": "2.1.8"
60
60
  },
61
61
  "prettier": {