eleventy-plugin-vento 5.2.0 → 5.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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # eleventy-plugin-vento
2
2
 
3
+ ## 5.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - d74eb1d: Simplify compatibility check with `eleventyConfig.versionCheck` call instead of checking individual features
8
+ - 928f544: Switch to fixed .mjs/.mts extensions for disambiguation of filetypes in package entrypoints.
9
+
10
+ This behavior is used by `tsdown` (the build system for this project) when the `platform` is set to `node` (the default).
11
+
12
+ - eb854e3: Revise `inputPath` used for cache key on dynamic permalinks to be more descriptive
13
+
3
14
  ## 5.2.0
4
15
 
5
16
  ### Minor Changes
@@ -104,24 +104,11 @@ async function renderVentoTemplate(template, data, from) {
104
104
  return content;
105
105
  }
106
106
 
107
- //#endregion
108
- //#region src/utils/compat-check.ts
109
- const REQUIRED_API_METHODS = [
110
- ["getShortcodes", "v3.0.0-alpha.15"],
111
- ["getPairedShortcodes", "v3.0.0-alpha.15"],
112
- ["getFilters", "v3.0.0-alpha.15"],
113
- ["addExtension", "v1.0.0"]
114
- ];
115
- function compatibilityCheck(config) {
116
- debugMain("Run compatibility check");
117
- for (const [method, version] of REQUIRED_API_METHODS) if (!(method in config)) console.error("[eleventy-plugin-vento] Plugin compatibility error:", `\`${method}\``, "not found. Please use Eleventy", version, "or later.");
118
- }
119
-
120
107
  //#endregion
121
108
  //#region src/plugin.ts
122
109
  function VentoPlugin(eleventyConfig, userOptions) {
123
110
  debugMain("Initializing eleventy-plugin-vento");
124
- compatibilityCheck(eleventyConfig);
111
+ eleventyConfig.versionCheck(">=3.0.0");
125
112
  const options = {
126
113
  autotrim: false,
127
114
  plugins: [],
@@ -189,7 +176,7 @@ function VentoPlugin(eleventyConfig, userOptions) {
189
176
  },
190
177
  compileOptions: { async permalink(permalinkContent, inputPath) {
191
178
  if (typeof permalinkContent !== "string" || !/\{\{\s+.+\s+\}\}/.test(permalinkContent)) return permalinkContent;
192
- inputPath = "Permalink::" + path.normalize(inputPath);
179
+ inputPath = "EleventyVentoDynamicPermalink:".concat(path.normalize(inputPath));
193
180
  debugMain("Getting template function for `%s`", inputPath);
194
181
  const template = await engine.getTemplateFunction(permalinkContent, inputPath);
195
182
  return async (data) => await renderVentoTemplate(template, data, inputPath);
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "eleventy-plugin-vento",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "Adds support for the Vento templating language to Eleventy.",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=18"
8
8
  },
9
- "types": "./dist/plugin.d.ts",
9
+ "types": "./dist/plugin.d.mts",
10
10
  "exports": {
11
11
  ".": {
12
- "import": "./dist/plugin.js",
13
- "types": "./dist/plugin.d.ts"
12
+ "import": "./dist/plugin.mjs",
13
+ "types": "./dist/plugin.d.mts"
14
14
  }
15
15
  },
16
16
  "files": [
@@ -42,30 +42,20 @@
42
42
  "devDependencies": {
43
43
  "11ty.ts": "0.0.6",
44
44
  "@11ty/eleventy": "3.1.2",
45
- "@changesets/cli": "2.29.7",
46
- "@eslint/js": "9.37.0",
45
+ "@changesets/cli": "2.29.8",
46
+ "@eslint/js": "9.39.1",
47
47
  "@types/debug": "4.1.12",
48
- "@types/node": "22.18.10",
49
- "eslint": "9.37.0",
48
+ "@types/node": "24.10.1",
49
+ "eslint": "9.39.1",
50
50
  "eslint-config-prettier": "10.1.8",
51
- "eslint-plugin-unicorn": "61.0.2",
52
- "globals": "16.4.0",
53
- "knip": "5.65.0",
51
+ "eslint-plugin-unicorn": "62.0.0",
52
+ "globals": "16.5.0",
53
+ "knip": "5.70.2",
54
54
  "prettier": "3.6.2",
55
- "tsdown": "0.15.9",
56
- "type-fest": "5.1.0",
55
+ "tsdown": "0.16.7",
56
+ "type-fest": "5.2.0",
57
57
  "typescript": "5.9.3",
58
- "typescript-eslint": "8.46.1",
59
- "vitest": "3.2.4"
60
- },
61
- "scripts": {
62
- "test": "vitest --run",
63
- "lint": "pnpm --color run '/^lint:/'",
64
- "lint:syntax": "eslint '.'",
65
- "lint:types": "tsc --noEmit",
66
- "lint:project": "knip",
67
- "build": "tsdown",
68
- "dev": "tsdown --watch ./src",
69
- "fmt": "prettier --write ."
58
+ "typescript-eslint": "8.48.0",
59
+ "vitest": "4.0.14"
70
60
  }
71
61
  }
package/readme.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # eleventy-plugin-vento 🌬️🎈🐀
2
2
 
3
- <img src="https://img.shields.io/badge/Eleventy-v3_&amp;_later_-333?style=flat-square&logo=eleventy&logoColor=fff&labelColor=333&color=111" alt="Eleventy v3 and later">
4
- <a href="https://github.com/noelforte/eleventy-plugin-vento/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/noelforte/eleventy-plugin-vento/ci.yml?branch=main&style=flat-square&logo=github&logoColor=fff&label=Tests&labelColor=333" alt="Github Actions Status"></a>
5
- <a href="https://npmjs.com/package/eleventy-plugin-vento"><img src="https://img.shields.io/npm/v/eleventy-plugin-vento?style=flat-square&logo=npm&logoColor=fff&labelColor=333" alt="eleventy-plugin-vento on npm"></a>
6
- <a href="https://github.com/changesets/changesets/"><img src="https://img.shields.io/badge/🦋_Changesets-333?style=flat-square" alt="changesets on GitHub"></a>
3
+ [![Eleventy v3 and later](https://img.shields.io/badge/Eleventy-v3_&_later_-333?style=flat-square&logo=eleventy&logoColor=fff&labelColor=333&color=111)](https://11ty.dev)
4
+ [![Github Actions Status](https://img.shields.io/github/actions/workflow/status/noelforte/eleventy-plugin-vento/ci.yml?style=flat-square&logo=github&logoColor=fff&label=Tests&labelColor=333)](https://github.com/noelforte/eleventy-plugin-vento/actions/workflows/ci.yml)
5
+ [![eleventy-plugin-vento on npm](https://img.shields.io/npm/v/eleventy-plugin-vento?style=flat-square&logo=npm&logoColor=fff&labelColor=333)](https://npmjs.com/package/eleventy-plugin-vento)
6
+ [![Changesets on GitHub](https://img.shields.io/badge/🦋_Changesets-333?style=flat-square)](https://github.com/changesets/changesets/)
7
7
 
8
8
  An [Eleventy](https://11ty.dev/) plugin that adds support for [Vento](https://vento.js.org/) templates.
9
9
 
@@ -24,6 +24,8 @@ An [Eleventy](https://11ty.dev/) plugin that adds support for [Vento](https://ve
24
24
  npm install eleventy-plugin-vento
25
25
  ```
26
26
 
27
+ [↑ Return to Top](#contents)
28
+
27
29
  ## Usage
28
30
 
29
31
  This plugin is ESM only and cannot be required from CommonJS.
@@ -40,6 +42,8 @@ export default function (eleventyConfig) {
40
42
  }
41
43
  ```
42
44
 
45
+ [↑ Return to Top](#contents)
46
+
43
47
  ## Plugin Options
44
48
 
45
49
  This plugin ships with default options out of the box, but you can [pass an options object](https://www.11ty.dev/docs/plugins/#plugin-configuration-options) to your `addPlugin` call to configure things further. The below example shows the configurable options as well as their defaults.
@@ -72,6 +76,8 @@ export default function (eleventyConfig) {
72
76
 
73
77
  View the [full list of options](https://vento.js.org/configuration/#options/) to pass as a Vento Configuration object (as `ventoOptions`).
74
78
 
79
+ [↑ Return to Top](#contents)
80
+
75
81
  ## Filters
76
82
 
77
83
  > [!NOTE]
@@ -111,6 +117,8 @@ Vento: See [Filters](https://vento.js.org/configuration/#filters) and [Pipes](ht
111
117
 
112
118
  Eleventy: See [Filters](https://www.11ty.dev/docs/filters/)
113
119
 
120
+ [↑ Return to Top](#contents)
121
+
114
122
  ## Shortcodes (Single & Paired)
115
123
 
116
124
  > [!NOTE]
@@ -157,6 +165,8 @@ If you'd prefer to set shortcodes yourself (via a plugin or other method) or pre
157
165
 
158
166
  Eleventy: See [Shortcodes](https://www.11ty.dev/docs/shortcodes/) and the sub-section on [Paired Shortcodes](https://www.11ty.dev/docs/shortcodes/#paired-shortcodes).
159
167
 
168
+ [↑ Return to Top](#contents)
169
+
160
170
  ## Vento Plugins
161
171
 
162
172
  > [!NOTE]
@@ -178,6 +188,8 @@ export default function (eleventyConfig) {
178
188
  }
179
189
  ```
180
190
 
191
+ [↑ Return to Top](#contents)
192
+
181
193
  ## Auto-Trimming Tags
182
194
 
183
195
  One exception to Vento plugins is the `autoTrim` plugin which is bundled with Vento, and by extension, this plugin. This plugin provides a convenient way to control whitespace in the output by collapsing spaces left behind when Vento's tags are removed.
@@ -214,6 +226,8 @@ eleventyConfig.addPlugin(VentoPlugin, {
214
226
 
215
227
  Vento: See [Auto Trim Plugin](https://vento.js.org/plugins/auto-trim/).
216
228
 
229
+ [↑ Return to Top](#contents)
230
+
217
231
  ## Debugging
218
232
 
219
233
  Like Eleventy, this plugin uses the [`debug`](https://www.npmjs.com/package/debug) package to handle verbose logging. The following `DEBUG` namespaces are implemented:
@@ -243,3 +257,5 @@ $ DEBUG='Eleventy:Vento:Template' npx @11ty/eleventy
243
257
  Eleventy: See [Debug Mode](https://www.11ty.dev/docs/debugging/).
244
258
 
245
259
  Debug: See [`debug` on npm](https://www.npmjs.com/package/debug).
260
+
261
+ [↑ Return to Top](#contents)
File without changes