@fractality/nunjucks 2.2.3 → 2.3.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 +34 -18
- package/README.md +3 -3
- package/package.json +19 -5
- package/src/extensions/render.js +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.1](https://github.com/sitepark/fractality/compare/%40fractality%2Fnunjucks%402.3.0...%40fractality%2Fnunjucks%402.3.1) (2026-08-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @fractality/nunjucks
|
|
9
|
+
|
|
10
|
+
# [2.3.0](https://github.com/sitepark/fractality/compare/%40fractality%2Fnunjucks%402.2.3...%40fractality%2Fnunjucks%402.3.0) (2026-08-19)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **deps:** update dependencies ([3c598f9](https://github.com/sitepark/fractality/commit/3c598f95a148a151c97f0d3c3293ba924862155c))
|
|
15
|
+
- **nunjucks:** don't hang forever when context resolution fails ([e317763](https://github.com/sitepark/fractality/commit/e3177638f3f34c4f8ab9d97663f0d091c369f95e))
|
|
16
|
+
- use workspace protocol for inter-package dependencies ([79b0fd6](https://github.com/sitepark/fractality/commit/79b0fd6634ec319c7f6e8dcaebd385ee2a8181a3))
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- add files allowlists and exports maps to all packages ([298d693](https://github.com/sitepark/fractality/commit/298d69391c96b5a2c6751eb87653b17796d36ab9))
|
|
21
|
+
|
|
6
22
|
## 2.2.3 (2024-09-24)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @fractality/nunjucks
|
|
@@ -19,25 +35,25 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
19
35
|
|
|
20
36
|
### Bug Fixes
|
|
21
37
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
38
|
+
- **engine:** update to remove deprecated flatten behaviour ([b89be05](https://github.com/frctl/fractal/commit/b89be05f091c9eb61b14c510b91eb3c548b849cd))
|
|
39
|
+
- fetch request context for README.md ([#13](https://github.com/frctl/fractal/issues/13)) ([dec6fea](https://github.com/frctl/fractal/commit/dec6feae727801f5a61291cd8cd1e167b37bee18))
|
|
24
40
|
|
|
25
41
|
### Features
|
|
26
42
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
43
|
+
- **partials:** support new handle-based import syntax ([2719df7](https://github.com/frctl/fractal/commit/2719df71a1e385b21a5c8d0cfb5be173e68269ad))
|
|
44
|
+
- replace bluebird with native promises ([1c8daa0](https://github.com/frctl/fractal/commit/1c8daa09a70962211ce550eff9a930ee3d9a9323))
|
|
29
45
|
|
|
30
46
|
# 2.1.0 (2024-03-19)
|
|
31
47
|
|
|
32
48
|
### Bug Fixes
|
|
33
49
|
|
|
34
|
-
-
|
|
35
|
-
-
|
|
50
|
+
- **engine:** update to remove deprecated flatten behaviour ([b89be05](https://github.com/frctl/fractal/commit/b89be05f091c9eb61b14c510b91eb3c548b849cd))
|
|
51
|
+
- fetch request context for README.md ([#13](https://github.com/frctl/fractal/issues/13)) ([dec6fea](https://github.com/frctl/fractal/commit/dec6feae727801f5a61291cd8cd1e167b37bee18))
|
|
36
52
|
|
|
37
53
|
### Features
|
|
38
54
|
|
|
39
|
-
-
|
|
40
|
-
-
|
|
55
|
+
- **partials:** support new handle-based import syntax ([2719df7](https://github.com/frctl/fractal/commit/2719df71a1e385b21a5c8d0cfb5be173e68269ad))
|
|
56
|
+
- replace bluebird with native promises ([1c8daa0](https://github.com/frctl/fractal/commit/1c8daa09a70962211ce550eff9a930ee3d9a9323))
|
|
41
57
|
|
|
42
58
|
## [2.0.15](https://github.com/frctl/fractal/compare/@frctl/nunjucks@2.0.14...@frctl/nunjucks@2.0.15) (2022-08-17)
|
|
43
59
|
|
|
@@ -95,31 +111,31 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
95
111
|
|
|
96
112
|
### Bug Fixes
|
|
97
113
|
|
|
98
|
-
-
|
|
114
|
+
- fetch request context for component notes file (#13)
|
|
99
115
|
|
|
100
116
|
### Chores
|
|
101
117
|
|
|
102
|
-
-
|
|
118
|
+
- bump lodash from 4.17.11 to 4.17.13 (#14)
|
|
103
119
|
|
|
104
120
|
## 2.0.1
|
|
105
121
|
|
|
106
|
-
-
|
|
122
|
+
- Fix issue with `render`and `view` tag output being escaped
|
|
107
123
|
|
|
108
124
|
## 2.0
|
|
109
125
|
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
126
|
+
- Update Nunjucks to v3.x
|
|
127
|
+
- Prevent array merging in `render` tag context data
|
|
128
|
+
- Enable autoescaping by default
|
|
129
|
+
- Add ability to provide environment configuration options
|
|
114
130
|
|
|
115
131
|
## 1.0.2
|
|
116
132
|
|
|
117
|
-
-
|
|
133
|
+
- [FIX] Fix issue with path filter in components rendered using the `render` extension.
|
|
118
134
|
|
|
119
135
|
## 1.0.1
|
|
120
136
|
|
|
121
|
-
-
|
|
122
|
-
-
|
|
137
|
+
- Provide support for future changes to `_` ('special') variables setting
|
|
138
|
+
- Update Nunjucks 2.3.0 -> 2.4.2
|
|
123
139
|
|
|
124
140
|
## 1.0.0
|
|
125
141
|
|
package/README.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
## 🚨 Breaking changes in v2.0
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
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.
|
|
3
|
+
"version": "2.3.1",
|
|
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.
|
|
23
|
-
"lodash": "^4.
|
|
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.
|
|
41
|
+
"@fractality/fractality": "1.7.1"
|
|
28
42
|
},
|
|
29
43
|
"publishConfig": {
|
|
30
44
|
"access": "public"
|
|
31
45
|
},
|
|
32
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "1b9c790ce660d31bae15fa3dd76d45333009097e"
|
|
33
47
|
}
|
package/src/extensions/render.js
CHANGED
|
@@ -34,19 +34,19 @@ export default function (fractality) {
|
|
|
34
34
|
context = utils.defaultsDeep(context, defaultContext);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
source
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
.
|
|
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
|
|