@fractality/nunjucks 2.2.3 → 2.3.0

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
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.3.0](https://github.com/sitepark/fractality/compare/%40fractality%2Fnunjucks%402.2.3...%40fractality%2Fnunjucks%402.3.0) (2026-08-19)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **deps:** update dependencies ([3c598f9](https://github.com/sitepark/fractality/commit/3c598f95a148a151c97f0d3c3293ba924862155c))
11
+ - **nunjucks:** don't hang forever when context resolution fails ([e317763](https://github.com/sitepark/fractality/commit/e3177638f3f34c4f8ab9d97663f0d091c369f95e))
12
+ - use workspace protocol for inter-package dependencies ([79b0fd6](https://github.com/sitepark/fractality/commit/79b0fd6634ec319c7f6e8dcaebd385ee2a8181a3))
13
+
14
+ ### Features
15
+
16
+ - add files allowlists and exports maps to all packages ([298d693](https://github.com/sitepark/fractality/commit/298d69391c96b5a2c6751eb87653b17796d36ab9))
17
+
6
18
  ## 2.2.3 (2024-09-24)
7
19
 
8
20
  **Note:** Version bump only for package @fractality/nunjucks
@@ -19,25 +31,25 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
19
31
 
20
32
  ### Bug Fixes
21
33
 
22
- - **engine:** update to remove deprecated flatten behaviour ([b89be05](https://github.com/frctl/fractal/commit/b89be05f091c9eb61b14c510b91eb3c548b849cd))
23
- - fetch request context for README.md ([#13](https://github.com/frctl/fractal/issues/13)) ([dec6fea](https://github.com/frctl/fractal/commit/dec6feae727801f5a61291cd8cd1e167b37bee18))
34
+ - **engine:** update to remove deprecated flatten behaviour ([b89be05](https://github.com/frctl/fractal/commit/b89be05f091c9eb61b14c510b91eb3c548b849cd))
35
+ - fetch request context for README.md ([#13](https://github.com/frctl/fractal/issues/13)) ([dec6fea](https://github.com/frctl/fractal/commit/dec6feae727801f5a61291cd8cd1e167b37bee18))
24
36
 
25
37
  ### Features
26
38
 
27
- - **partials:** support new handle-based import syntax ([2719df7](https://github.com/frctl/fractal/commit/2719df71a1e385b21a5c8d0cfb5be173e68269ad))
28
- - replace bluebird with native promises ([1c8daa0](https://github.com/frctl/fractal/commit/1c8daa09a70962211ce550eff9a930ee3d9a9323))
39
+ - **partials:** support new handle-based import syntax ([2719df7](https://github.com/frctl/fractal/commit/2719df71a1e385b21a5c8d0cfb5be173e68269ad))
40
+ - replace bluebird with native promises ([1c8daa0](https://github.com/frctl/fractal/commit/1c8daa09a70962211ce550eff9a930ee3d9a9323))
29
41
 
30
42
  # 2.1.0 (2024-03-19)
31
43
 
32
44
  ### Bug Fixes
33
45
 
34
- - **engine:** update to remove deprecated flatten behaviour ([b89be05](https://github.com/frctl/fractal/commit/b89be05f091c9eb61b14c510b91eb3c548b849cd))
35
- - fetch request context for README.md ([#13](https://github.com/frctl/fractal/issues/13)) ([dec6fea](https://github.com/frctl/fractal/commit/dec6feae727801f5a61291cd8cd1e167b37bee18))
46
+ - **engine:** update to remove deprecated flatten behaviour ([b89be05](https://github.com/frctl/fractal/commit/b89be05f091c9eb61b14c510b91eb3c548b849cd))
47
+ - fetch request context for README.md ([#13](https://github.com/frctl/fractal/issues/13)) ([dec6fea](https://github.com/frctl/fractal/commit/dec6feae727801f5a61291cd8cd1e167b37bee18))
36
48
 
37
49
  ### Features
38
50
 
39
- - **partials:** support new handle-based import syntax ([2719df7](https://github.com/frctl/fractal/commit/2719df71a1e385b21a5c8d0cfb5be173e68269ad))
40
- - replace bluebird with native promises ([1c8daa0](https://github.com/frctl/fractal/commit/1c8daa09a70962211ce550eff9a930ee3d9a9323))
51
+ - **partials:** support new handle-based import syntax ([2719df7](https://github.com/frctl/fractal/commit/2719df71a1e385b21a5c8d0cfb5be173e68269ad))
52
+ - replace bluebird with native promises ([1c8daa0](https://github.com/frctl/fractal/commit/1c8daa09a70962211ce550eff9a930ee3d9a9323))
41
53
 
42
54
  ## [2.0.15](https://github.com/frctl/fractal/compare/@frctl/nunjucks@2.0.14...@frctl/nunjucks@2.0.15) (2022-08-17)
43
55
 
@@ -95,31 +107,31 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
95
107
 
96
108
  ### Bug Fixes
97
109
 
98
- - fetch request context for component notes file (#13)
110
+ - fetch request context for component notes file (#13)
99
111
 
100
112
  ### Chores
101
113
 
102
- - bump lodash from 4.17.11 to 4.17.13 (#14)
114
+ - bump lodash from 4.17.11 to 4.17.13 (#14)
103
115
 
104
116
  ## 2.0.1
105
117
 
106
- - Fix issue with `render`and `view` tag output being escaped
118
+ - Fix issue with `render`and `view` tag output being escaped
107
119
 
108
120
  ## 2.0
109
121
 
110
- - Update Nunjucks to v3.x
111
- - Prevent array merging in `render` tag context data
112
- - Enable autoescaping by default
113
- - Add ability to provide environment configuration options
122
+ - Update Nunjucks to v3.x
123
+ - Prevent array merging in `render` tag context data
124
+ - Enable autoescaping by default
125
+ - Add ability to provide environment configuration options
114
126
 
115
127
  ## 1.0.2
116
128
 
117
- - [FIX] Fix issue with path filter in components rendered using the `render` extension.
129
+ - [FIX] Fix issue with path filter in components rendered using the `render` extension.
118
130
 
119
131
  ## 1.0.1
120
132
 
121
- - Provide support for future changes to `_` ('special') variables setting
122
- - Update Nunjucks 2.3.0 -> 2.4.2
133
+ - Provide support for future changes to `_` ('special') variables setting
134
+ - Update Nunjucks 2.3.0 -> 2.4.2
123
135
 
124
136
  ## 1.0.0
125
137
 
package/README.md CHANGED
@@ -6,9 +6,9 @@
6
6
 
7
7
  ## 🚨 Breaking changes in v2.0
8
8
 
9
- - `render` tag - Arrays in context data are **no longer merged** with those in the default component context
10
- - **Autoescaping** - this is now **disabled by default**. Preview templates will need to be updated to mark the `yield` output as safe using the Nunjucks `safe` filter: `{{ yield | safe }}`. Alternatively this can be enabled globally again using the environment options when [configuring the adapter](#customisation) (not recommended).
11
- - **Nunjucks version** - bumped to 3.x
9
+ - `render` tag - Arrays in context data are **no longer merged** with those in the default component context
10
+ - **Autoescaping** - this is now **disabled by default**. Preview templates will need to be updated to mark the `yield` output as safe using the Nunjucks `safe` filter: `{{ yield | safe }}`. Alternatively this can be enabled globally again using the environment options when [configuring the adapter](#customisation) (not recommended).
11
+ - **Nunjucks version** - bumped to 3.x
12
12
 
13
13
  ## Installation
14
14
 
package/package.json CHANGED
@@ -1,9 +1,23 @@
1
1
  {
2
2
  "name": "@fractality/nunjucks",
3
- "version": "2.2.3",
3
+ "version": "2.3.0",
4
4
  "type": "module",
5
5
  "description": "Nunjucks template adapter for Fractalility.",
6
6
  "main": "index.js",
7
+ "exports": {
8
+ ".": {
9
+ "default": "./index.js"
10
+ },
11
+ "./package.json": "./package.json"
12
+ },
13
+ "files": [
14
+ "src",
15
+ "index.js",
16
+ "CHANGELOG.md"
17
+ ],
18
+ "engines": {
19
+ "node": ">=22.0.0"
20
+ },
7
21
  "repository": {
8
22
  "type": "git",
9
23
  "url": "https://github.com/sitepark/fractality.git",
@@ -19,15 +33,15 @@
19
33
  "@fractality/fractality": ">= 1.5 < 2"
20
34
  },
21
35
  "dependencies": {
22
- "@fractality/core": "0.5.3",
23
- "lodash": "^4.17.21",
36
+ "@fractality/core": "0.6.0",
37
+ "lodash": "^4.18.1",
24
38
  "nunjucks": "^3.2.4"
25
39
  },
26
40
  "devDependencies": {
27
- "@fractality/fractality": "1.6.3"
41
+ "@fractality/fractality": "1.7.0"
28
42
  },
29
43
  "publishConfig": {
30
44
  "access": "public"
31
45
  },
32
- "gitHead": "731216ddfcec69395c3e3e6f9b85cde374e6687e"
46
+ "gitHead": "c067f18e528fab0b9b90e8dabe59d3fe5e1b9371"
33
47
  }
@@ -34,19 +34,19 @@ export default function (fractality) {
34
34
  context = utils.defaultsDeep(context, defaultContext);
35
35
  }
36
36
 
37
- source.resolve(context).then((context) => {
38
- // fix env for rendered components
39
- let env = JSON.parse(JSON.stringify(rootContext._env));
40
- context._env = env;
41
- entity
42
- .render(context)
43
- .then((html) => {
37
+ source
38
+ .resolve(context)
39
+ .then((context) => {
40
+ // fix env for rendered components
41
+ let env = JSON.parse(JSON.stringify(rootContext._env));
42
+ context._env = env;
43
+ return entity.render(context).then((html) => {
44
44
  callback(null, new nunjucks.runtime.SafeString(html));
45
- })
46
- .catch((err) => {
47
- callback(err);
48
45
  });
49
- });
46
+ })
47
+ .catch((err) => {
48
+ callback(err);
49
+ });
50
50
  };
51
51
  }
52
52