Skip to content

Releases: noelforte/eleventy-plugin-vento

v4.1.1

07 Jan 02:12
Compare
Choose a tag to compare

Patch Changes

  • 335f21e: Select type updates (shouldn't affect compilation, however should improve DX)

    Changes are:

    • split types into separate files
    • namespace ventojs type imports
    • make PluginOptions optional by default
    • make Eleventy types more readable
    • declare a special (EleventyVentoEnvironment) for this plugin to replace Vento's own Environment
  • 070109a: Refactored files and functions internally that shouldn't have any impact on usage or performance:

    • Split debug functions into separate exports, renamed runCompatiblityCheck -> compatibilityCheck (dd4c379)
    • Utilities are now split into separate files (e06a83a)
    • Main file renamed from index.ts to plugin.ts (1b122d2)
  • c382be0: Wrap all filters as regular synchronous functions to avoid ambiguity with sync and async handling. (fixes #96)

    This change enforces explicit use of the await keyword to unwrap returned values from filters before chaining more or printing the result.

    <!-- Single filters -->
    - {{ "Hello, async!" |> someAsyncFilter }}
    + {{ "Hello, async!" |> await someAsyncFilter }}
    
    <!-- Filter chains -->
    - {{ "Hello, async!" |> someAsyncFilter |> someSyncFilter }}
    + {{ "Hello, async!" |> await someAsyncFilter |> someSyncFilter }}

    See the Vento docs on async chains for more information.

  • 9eaa059: Update debug to v4.4.0

  • 0b0f96a: Update ventojs to v1.12.14

v4.1.1-beta.0

10 Dec 21:08
6f2eed3
Compare
Choose a tag to compare
v4.1.1-beta.0 Pre-release
Pre-release

Patch Changes

  • 335f21e: Select type updates (shouldn't affect compilation, however should improve DX)

    Changes are:

    • split types into separate files
    • namespace ventojs type imports
    • make PluginOptions optional by default
    • make Eleventy types more readable
    • declare a special (EleventyVentoEnvironment) for this plugin to replace Vento's own Environment
  • 9eaa059: Update debug to v4.4.0

  • f387b5e: Update ventojs to v1.12.13

  • 070109a: Refactored files and functions internally that shouldn't have any impact on usage or performance:

    • Split debug functions into separate exports, renamed runCompatiblityCheck -> compatibilityCheck (dd4c379)
    • Utilities are now split into separate files (e06a83a)
    • Main file renamed from index.ts to plugin.ts (1b122d2)

v4.1.0

25 Nov 00:02
73ae6fe
Compare
Choose a tag to compare

Minor Changes

  • eb33d79: Expose Vento's FilterThis on Eleventy-declared filters. (fixes #72)

    [!IMPORTANT]
    Using this feature incurs the same performance regression that eleventyComputed template strings do. Caching can assist with this, see README for more information.

    Vento binds its own this object when executing filter functions. The this object contains 2 keys, this.env and this.data, for getting access to both the Vento environment and the template data respectively.

    In addition to Vento's object, this.page and this.eleventy are also cloned to the top level from this.data to maintain feature-parity with Eleventy.

    With this change, you can now create filters that leverage the Vento environment. See README for more info.

  • eb33d79: Update vento to 1.12.12

v4.0.1

06 Nov 00:06
Compare
Choose a tag to compare

Patch Changes

  • hotfix - include types field in package.json to declare bundled types

v4.0.0

05 Nov 23:54
ab495b2
Compare
Choose a tag to compare

Major Changes

  • fc80b5f: Removed ignore tag {{! ... }} syntax. As mentioned in the 3.3.0 release notes, the now preferred way to "pass through" tags is with string literals.

    You should update code with {{! ... }} to be {{ '{{ }}' }} like so:

    - {{! if condition }}
    + {{ '{{ if condition }}' }}
        do something
    - {{! /if }}
    + {{ '{{ /if }}' }}

    While more verbose, this change ensures that there isn't any ambiguity between a tag that needs ignoring and JS negation expressions.

Minor Changes

  • 2b5f337: Rewrite project in Typescript and add a build/packaging step for releases and testing.

    These changes also include .d.ts generation as part of the build step. If you're using 11ty.ts's defineConfig function, it will pick the types from this plugin up automatically. (resolves #22)

v3.4.0

05 Nov 01:26
Compare
Choose a tag to compare

Minor Changes

  • 8c6b8a2: Update ventojs to v1.12.11

v4.0.0-beta.0

31 Oct 20:10
d136718
Compare
Choose a tag to compare
v4.0.0-beta.0 Pre-release
Pre-release

Major Changes

  • fc80b5f: Removed ignore tag {{! ... }} syntax. As mentioned in the 3.3.0 release notes, the now preferred way to "pass through" tags is with string literals.

    You should update code with {{! ... }} to be {{ '{{ }}' }} like so:

    - {{! if condition }}
    + {{ '{{ if condition }}' }}
        do something
    - {{! /if }}
    + {{ '{{ /if }}' }}

    While more verbose, this change ensures that there isn't any ambiguity between a tag that needs ignoring and JS negation expressions.

Minor Changes

  • 2b5f337: Rewrite project in Typescript and add a build/packaging step for releases and testing.

    These changes also include .d.ts generation as part of the build step. If you're using 11ty.ts's defineConfig function, it will pick the types from this plugin up automatically. (resolves #22)

v3.3.0

30 Oct 18:23
Compare
Choose a tag to compare

Minor Changes

  • 387eb48: ⚠️ DEPRECATION NOTICE: Ignore tag {{! ... }} syntax is now deprecated and will be removed in 4.0.0.

    This change comes in favor of using string literals to "pass through" tags without rendering them, like so:

    - {{! if condition }}
    + {{ '{{ if condition }}' }}
        do something
    - {{! /if }}
    - {{ '{{ /if }}' }}

    While more verbose, this change ensures that there isn't any ambiguity between a tag that needs ignoring and JS negation expressions:

    <!-- These are functionally equivalent and can lead to collisions in rendering functionality -->
    
    {{! conditionStatementToIgnore }}
    
    {{ !conditionStatementToIgnore }}

    If an improved syntax for deferred rendering scenarios ever makes its way to Vento, it will be made available in this plugin.

v3.2.0

30 Oct 03:13
36a9942
Compare
Choose a tag to compare

Minor Changes

  • f9388e1: Further refine caching between Eleventy and Vento: commit ec02a76 deferred all caching to Vento and turned off Eleventy's cache (released in 3.1.0). This release allows Vento to cache only the templates that Eleventy can't cache (permalinks, includes, etc.), and Eleventy caches everything else.

    A performance oversight has also been resolved by this change. Now, template functions are pre-compiled and saved by Eleventy, only running the template on render without having to go through a re-compile or get a template from the cache.

Patch Changes

  • 693e1a2: Refactored the following features internally:

    • Reverts 2c3548c for modularity: The compatibility check has moved back to modules/utils.js
    • Revises caching further: Instead of deferring to Vento for everything, permalink templates and templates loaded by Vento (like includes) are cached by Vento. Everything else is cached by Eleventy.
    • Rename some internal variables to help with readability (_11ty.ctx => _11Ctx)
    • DEBUG key Eleventy:Vento:Template renamed to Eleventy:Vento:Render
    • Declare engine functions separately and return as an object after everything has been declared.

v3.1.0

24 Oct 23:27
bb128ce
Compare
Choose a tag to compare

NOTE: This release replaces the (now-unpublished) pre-release version 3.0.3-next.0. Users of this plugin should use 3.1.0.

Minor Changes

  • 7e6ba68: Separate shortcodes and pairedShortcodes into seperate object namespaces. Prior to this version, Eleventy shortcodes and paired shortcodes were merged into a single object keyed as _11ty.functions which allowed for naming collisions between shortcodes and their paired counterparts.

  • b8f0a03: Adds new dependency on debug package, to help out with testing and getting more verbose logs. The following DEBUG namespaces are implemented:

    • Eleventy:Vento:Setup - Logs initial setup of the plugin, loading features, pre-page compile setup steps (like changing page and eleventy objects)
    • Eleventy:Vento:Cache - Logs updates to Vento's own internal cache, which is used in tandem with Eleventy's cache.
    • Eleventy:Vento:Template - Logs rendered templates and other template related actions

    Because it is a child of the Eleventy: namespace, the following command will include output from this plugin as well:

    $ DEBUG='Eleventy:*' npx @11ty/eleventy

    Alternatively, use a finer grained namespace to see only the output generated by eleventy-plugin-vento.

    $ DEBUG='Eleventy:Vento:*' npx @11ty/eleventy
    $ DEBUG='Eleventy:Vento:Template' npx @11ty/eleventy

    See the docs on 11ty.dev as well as the debug package README for more information.

  • ec02a76: Further caching improvements to e811123 and e46ce6e. Eleventy now defers all template caching to Vento.

    Templates are now compiled directly instead of using Vento's .runString method which reduces overhead and enables this plugin to manage the Vento cache in a more direct manner.

  • 494b184: Permalink compilation optimizations:

    • Permalinks now short-circuit to raw strings if they don't contain Vento template syntax, avoiding compilation entirely.
    • Permalinks are now assigned (fake) pathnames in Vento's cache. If you change template content but don't change a dynamic permalink in development, Vento will reuse the compiled permalink template. Note that any modifications to a template file will always cause it to be recompiled (see 19c352fa) — this improvement just optimizes recompiling dynamic permalinks that haven't changed.

Patch Changes

  • 4b4b387: Entries for changed files are now deleted from Vento's cache when running the Eleventy Dev server. (fixes #38)