eleventy-plugin-vento 5.4.3 → 5.5.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,17 @@
1
1
  # eleventy-plugin-vento
2
2
 
3
+ ## 5.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 3702292: Partially revert 1087bec127bf569a601cb7afb76230b51f5be652, which introduced a regression causing the package to be published without first being built. (fixes #603)
8
+
9
+ ## 5.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - a8f6efe: Update Vento to v2.4.0 ([release notes](https://github.com/ventojs/vento/blob/HEAD/CHANGELOG.md#240---2026-07-09))
14
+
3
15
  ## 5.4.3
4
16
 
5
17
  ### Patch Changes
package/dist/plugin.d.mts CHANGED
@@ -1,45 +1,6 @@
1
- /// <reference types="node" />
2
1
  import * as ventojs$1 from "ventojs";
3
2
  import _UserConfig from "@11ty/eleventy/UserConfig";
4
3
  import { Plugin } from "ventojs/core/environment.js";
5
-
6
- //#region node_modules/.pnpm/11ty.ts@0.0.7_@11ty+eleventy@3.1.5/node_modules/11ty.ts/dist/index.d.ts
7
- declare global {
8
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
9
- interface SymbolConstructor {
10
- readonly observable: symbol;
11
- }
12
- }
13
- /**
14
- Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
15
-
16
- Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
17
-
18
- This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
19
-
20
- @example
21
- ```
22
- import type {LiteralUnion} from 'type-fest';
23
-
24
- // Before
25
-
26
- type Pet = 'dog' | 'cat' | string;
27
-
28
- const pet: Pet = '';
29
- // Start typing in your TypeScript-enabled IDE.
30
- // You **will not** get auto-completion for `dog` and `cat` literals.
31
-
32
- // After
33
-
34
- type Pet2 = LiteralUnion<'dog' | 'cat', string>;
35
-
36
- const pet: Pet2 = '';
37
- // You **will** get auto-completion for `dog` and `cat` literals.
38
- ```
39
-
40
- @category Type
41
- */
42
- //#endregion
43
4
  //#region src/types/utilities.d.ts
44
5
  /**
45
6
  * Matches any given string so autocomplete in literal unions works as expected
package/dist/plugin.mjs CHANGED
@@ -50,12 +50,8 @@ function warn(...messages) {
50
50
  }
51
51
  //#endregion
52
52
  //#region src/utils/errors.ts
53
- const LINE_TERMINATOR = /(\r\n?|[\n\u2028\u2029])/;
53
+ const LINE_TERMINATOR = /(\r\n?|[\n\u{2028}\u{2029}])/u;
54
54
  var EleventyVentoError = class extends Error {
55
- constructor(message, context, cause) {
56
- super(message, { cause });
57
- this.context = context;
58
- }
59
55
  static async createFromContext(error) {
60
56
  const ctx = await error.getContext();
61
57
  const err = new this("An unknown error occured processing Vento templates", ctx, error);
@@ -69,13 +65,17 @@ var EleventyVentoError = class extends Error {
69
65
  err.message += `:${sourceLine}:${sourceColumn}:\n\n`;
70
66
  const pad = sourceLine.toString().length;
71
67
  const indent = " ".repeat(pad);
72
- for (let line = Math.max(sourceLine - 3, 1); line <= sourceLine; line++) err.message += `${`${line}`.padStart(pad)} │ ${sourceLines[line - 1].trimEnd()}\n`;
68
+ for (let line = Math.max(sourceLine - 3, 1); line <= sourceLine; line++) err.message += `${String(line).padStart(pad)} │ ${sourceLines[line - 1].trimEnd()}\n`;
73
69
  err.message += `${indent} ${" ".repeat(sourceColumn - 1)}^`;
74
70
  if (!ctx.code || ctx.line === void 0 || ctx.column === void 0) return err;
75
71
  const codelines = codeToLines(ctx.code);
76
72
  err.message += `\n\n${indent} │ /// compiled Vento function for ${ctx.file} ///\n${indent} │ ${codelines[ctx.line - 1].trimEnd()}\n${indent} ${" ".repeat(ctx.column - 1)}^`;
77
73
  return err;
78
74
  }
75
+ constructor(message, context, cause) {
76
+ super(message, { cause });
77
+ this.context = context;
78
+ }
79
79
  };
80
80
  /**
81
81
  * Converts a code string to an array of lines
@@ -247,7 +247,7 @@ function VentoPlugin(eleventyConfig, userOptions) {
247
247
  },
248
248
  compileOptions: { async permalink(permalinkContent, inputPath) {
249
249
  if (typeof permalinkContent !== "string" || !/\{\{\s+.+\s+\}\}/.test(permalinkContent)) return permalinkContent;
250
- inputPath = "EleventyVentoDynamicPermalink:".concat(path.normalize(inputPath));
250
+ inputPath = `EleventyVentoDynamicPermalink:${path.normalize(inputPath)}`;
251
251
  return await engine.getRenderFunction(permalinkContent, inputPath);
252
252
  } }
253
253
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleventy-plugin-vento",
3
- "version": "5.4.3",
3
+ "version": "5.5.1",
4
4
  "description": "Adds support for the Vento templating language to Eleventy.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -19,7 +19,10 @@
19
19
  "CHANGELOG.md",
20
20
  "readme.md"
21
21
  ],
22
- "repository": "git@github.com:noelforte/eleventy-plugin-vento.git",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git@github.com:noelforte/eleventy-plugin-vento.git"
25
+ },
23
26
  "bugs": {
24
27
  "url": "https://github.com/noelforte/eleventy-plugin-vento/issues"
25
28
  },
@@ -37,24 +40,23 @@
37
40
  "license": "MIT",
38
41
  "dependencies": {
39
42
  "debug": "4.4.3",
40
- "ventojs": "2.3.1"
43
+ "ventojs": "2.4.0"
41
44
  },
42
45
  "devDependencies": {
43
- "11ty.ts": "0.0.7",
44
- "@11ty/eleventy": "3.1.5",
45
- "@changesets/cli": "2.30.0",
46
+ "@11ty/eleventy": "3.1.6",
47
+ "@changesets/cli": "2.31.0",
46
48
  "@eslint/js": "10.0.1",
47
49
  "@types/debug": "4.1.13",
48
- "@types/node": "24.12.0",
49
- "eslint": "10.1.0",
50
+ "@types/node": "24.13.3",
51
+ "eslint": "10.7.0",
50
52
  "eslint-config-prettier": "10.1.8",
51
- "eslint-plugin-unicorn": "64.0.0",
52
- "globals": "17.4.0",
53
- "knip": "6.0.6",
54
- "prettier": "3.8.1",
55
- "tsdown": "0.21.4",
56
- "typescript": "6.0.2",
57
- "typescript-eslint": "8.57.2",
58
- "vitest": "4.1.2"
53
+ "eslint-plugin-unicorn": "71.1.0",
54
+ "globals": "17.7.0",
55
+ "knip": "6.26.0",
56
+ "prettier": "3.9.5",
57
+ "tsdown": "0.22.7",
58
+ "typescript": "6.0.3",
59
+ "typescript-eslint": "8.63.0",
60
+ "vitest": "4.1.10"
59
61
  }
60
62
  }