eleventy-plugin-vento 1.1.1 → 1.1.3

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.
@@ -1,5 +1,5 @@
1
- name: Handle pnpm dependencies
2
- description: Cache and restore the dependencies with pnpm
1
+ name: Setup
2
+ description: Setup project with pnpm
3
3
 
4
4
  outputs:
5
5
  cache-hit:
@@ -17,7 +17,6 @@ runs:
17
17
  uses: actions/setup-node@v4
18
18
  with:
19
19
  node-version-file: .node-version
20
- registry-url: 'https://registry.npmjs.org'
21
20
  cache: pnpm
22
21
  cache-dependency-path: pnpm-lock.yaml
23
22
 
@@ -2,8 +2,9 @@ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [renovate/**, dev]
5
+ branches: [renovate/**]
6
6
  workflow_dispatch:
7
+ workflow_call:
7
8
 
8
9
  jobs:
9
10
  ci:
@@ -2,35 +2,40 @@ name: Release
2
2
 
3
3
  on:
4
4
  push:
5
- tags:
6
- - 'v*.*.*'
5
+ branches:
6
+ - main
7
+ - alpha
8
+ - beta
9
+ - next
10
+ - next-major
11
+ - v[0-9]+.[0-9]+.[0-9]+
12
+ - v[0-9]+.[0-9]+.[0-9]+-[a-z]+.[0-9]+
7
13
 
8
14
  jobs:
15
+ test:
16
+ uses: ./.github/workflows/ci.yml
17
+
9
18
  release:
10
19
  runs-on: ubuntu-latest
11
20
  permissions:
12
- id-token: write
13
- contents: write
21
+ contents: write # to be able to publish a GitHub release
22
+ id-token: write # to enable use of OIDC for npm provenance
23
+ issues: write # to be able to comment on released issues
24
+ pull-requests: write # to be able to comment on released pull requests
25
+ needs: test
14
26
  steps:
15
27
  - uses: actions/checkout@v4
28
+ with:
29
+ fetch-depth: 0
16
30
 
17
31
  - name: Setup
18
32
  uses: ./.github/actions/setup
19
33
 
20
- - name: Test
21
- run: pnpm test
22
-
23
- - name: Publish
24
- env:
25
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26
- NPM_CONFIG_PROVENANCE: true
27
- run: |
28
- pnpm publish --no-git-checks --access public
29
-
30
- - name: Write changelog
31
- run: pnpm dlx changelogithub@latest --output CHANGELOG.md
34
+ - name: Verify provenance attestations and registry signatures
35
+ run: npm audit signatures
32
36
 
33
37
  - name: Release
34
- uses: softprops/action-gh-release@v2
35
- with:
36
- body_path: CHANGELOG.md
38
+ env:
39
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41
+ run: pnpm exec semantic-release
package/VentoPlugin.js CHANGED
@@ -49,15 +49,13 @@ export function VentoPlugin(eleventyConfig, options = {}) {
49
49
  // Load user-defined plugins into vento
50
50
  for (const plugin of options.plugins) env.use(plugin);
51
51
 
52
- eleventyConfig.on('eleventy.before', () => {
53
- env.cache.clear();
54
- });
55
-
56
52
  // Add vto as a template format and create a custom template for it
57
53
  eleventyConfig.addTemplateFormats('vto');
58
54
  eleventyConfig.addExtension('vto', {
59
55
  outputFileExtension: 'html',
56
+
60
57
  async compile(inputContent, inputPath) {
58
+ env.cache.clear();
61
59
  return async (data) => {
62
60
  if (options.addHelpers) {
63
61
  // Extract a possible namespace from the addHelpers option
@@ -73,7 +71,9 @@ export function VentoPlugin(eleventyConfig, options = {}) {
73
71
  else data = { ...data, ...helpers };
74
72
  }
75
73
 
76
- return await env.runString(inputContent, data, inputPath).then((result) => result.content);
74
+ const result = await env.runString(inputContent, data, inputPath);
75
+
76
+ return result.content;
77
77
  };
78
78
  },
79
79
  });
package/package.json CHANGED
@@ -1,46 +1,49 @@
1
1
  {
2
- "name": "eleventy-plugin-vento",
3
- "version": "1.1.1",
4
- "description": "Adds support for the Vento templating language to Eleventy.",
5
- "type": "module",
6
- "engines": {
7
- "node": ">=16"
8
- },
9
- "main": "./VentoPlugin.js",
10
- "repository": "git@github.com:noelforte/eleventy-plugin-vento.git",
11
- "bugs": {
12
- "url": "https://github.com/noelforte/eleventy-plugin-vento/issues"
13
- },
14
- "keywords": [
15
- "eleventy",
16
- "eleventy-plugin",
17
- "ventojs",
18
- "templating"
19
- ],
20
- "author": {
21
- "name": "Noel Forte",
22
- "email": "noel@forte.is",
23
- "url": "https://forte.is/"
24
- },
25
- "license": "MIT",
26
- "dependencies": {
27
- "ventojs": "0.12.6"
28
- },
29
- "devDependencies": {
30
- "eslint": "9.4.0",
31
- "eslint-config-flat-gitignore": "0.1.5",
32
- "eslint-config-prettier": "9.1.0",
33
- "globals": "15.3.0",
34
- "@11ty/eleventy": "3.0.0-alpha.10"
35
- },
36
- "prettier": {
37
- "bracketSameLine": true,
38
- "singleQuote": true,
39
- "semi": true,
40
- "trailingComma": "es5"
41
- },
42
- "scripts": {
43
- "test": "rm -rf test/output; cd test/input; eleventy",
44
- "test-serve": "rm -rf test/output; cd test/input; eleventy --serve"
45
- }
46
- }
2
+ "name": "eleventy-plugin-vento",
3
+ "version": "1.1.3",
4
+ "description": "Adds support for the Vento templating language to Eleventy.",
5
+ "type": "module",
6
+ "packageManager": "pnpm@9.1.4",
7
+ "engines": {
8
+ "node": ">=16"
9
+ },
10
+ "scripts": {
11
+ "test": "rm -rf test/output; cd test/input; eleventy",
12
+ "test-serve": "rm -rf test/output; cd test/input; eleventy --serve"
13
+ },
14
+ "main": "./VentoPlugin.js",
15
+ "repository": "git@github.com:noelforte/eleventy-plugin-vento.git",
16
+ "bugs": {
17
+ "url": "https://github.com/noelforte/eleventy-plugin-vento/issues"
18
+ },
19
+ "keywords": [
20
+ "eleventy",
21
+ "eleventy-plugin",
22
+ "ventojs",
23
+ "templating"
24
+ ],
25
+ "author": {
26
+ "name": "Noel Forte",
27
+ "email": "noel@forte.is",
28
+ "url": "https://forte.is/"
29
+ },
30
+ "license": "MIT",
31
+ "dependencies": {
32
+ "ventojs": "0.12.6"
33
+ },
34
+ "devDependencies": {
35
+ "@11ty/eleventy": "3.0.0-alpha.10",
36
+ "conventional-changelog-conventionalcommits": "^8.0.0",
37
+ "eslint": "9.4.0",
38
+ "eslint-config-flat-gitignore": "0.1.5",
39
+ "eslint-config-prettier": "9.1.0",
40
+ "globals": "15.3.0",
41
+ "semantic-release": "24.0.0"
42
+ },
43
+ "prettier": {
44
+ "bracketSameLine": true,
45
+ "singleQuote": true,
46
+ "semi": true,
47
+ "trailingComma": "es5"
48
+ }
49
+ }
package/readme.md CHANGED
@@ -6,6 +6,7 @@ An [Eleventy](https://11ty.dev/) plugin that adds support for [Vento](https://ve
6
6
  [Usage](#usage)<br>
7
7
  [Plugin Options](#plugin-options)<br>
8
8
  [Vento Filters](#vento-filters)<br>
9
+ [Vento Plugins](#vento-plugins)<br>
9
10
  [JavaScript Helpers](#javascript-helpers)<br>
10
11
 
11
12
  ## Installing
@@ -0,0 +1,24 @@
1
+ const presetConfig = {
2
+ types: [
3
+ { type: 'feat', section: 'New Features' },
4
+ { type: 'fix', section: 'Bug Fixes' },
5
+ { type: 'refactor', section: 'Refactorings' },
6
+ { type: 'docs', hidden: 'Documentation' },
7
+ { type: 'chore', hidden: true },
8
+ { type: 'perf', hidden: true },
9
+ { type: 'style', hidden: true },
10
+ { type: 'test', hidden: true },
11
+ ],
12
+ };
13
+
14
+ /** @type {import('semantic-release').Options} */
15
+ export default {
16
+ preset: 'conventionalcommits',
17
+ presetConfig,
18
+ plugins: [
19
+ ['@semantic-release/commit-analyzer'],
20
+ '@semantic-release/release-notes-generator',
21
+ '@semantic-release/npm',
22
+ '@semantic-release/github',
23
+ ],
24
+ };
@@ -0,0 +1,7 @@
1
+ ---
2
+ permalink: /test/page/permalink/
3
+ title: Test page
4
+ layout: page-layout.vto
5
+ ---
6
+
7
+ This content lives at `/test/page/permalink/`
@@ -0,0 +1,6 @@
1
+ ---
2
+ permalink: /
3
+ layout: page-layout.vto
4
+ ---
5
+
6
+ This should render on the homepage.