@plone/volto 16.21.1 → 16.21.2

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.draft CHANGED
@@ -1,6 +1,7 @@
1
- ## 16.21.1 (2023-06-23)
1
+ ## 16.21.2 (2023-06-24)
2
2
 
3
3
  ### Bugfix
4
4
 
5
- - Added current page parameter to route in listing and search block pagination - Fix: #3868 @bipoza [#4159](https://github.com/plone/volto/issues/4159)
5
+ - Update to version 6.0.5 of Plone backend. @davisagli [#4897](https://github.com/plone/volto/issues/4897)
6
+ - Fix "digital envelope routines::unsupported" error when running Volto 16 in Node 17+. @davisagli [#4901](https://github.com/plone/volto/issues/4901)
6
7
 
Binary file
package/CHANGELOG.md CHANGED
@@ -8,6 +8,14 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 16.21.2 (2023-06-24)
12
+
13
+ ### Bugfix
14
+
15
+ - Update to version 6.0.5 of Plone backend. @davisagli [#4897](https://github.com/plone/volto/issues/4897)
16
+ - Fix "digital envelope routines::unsupported" error when running Volto 16 in Node 17+. @davisagli [#4901](https://github.com/plone/volto/issues/4901)
17
+
18
+
11
19
  ## 16.21.1 (2023-06-23)
12
20
 
13
21
  ### Bugfix
package/README.md CHANGED
@@ -53,20 +53,16 @@ First get all the requirements installed on your system.
53
53
 
54
54
  ### Prerequisites
55
55
 
56
- - [Node.js LTS (16.x)](https://nodejs.org/)
56
+ - [Node.js LTS (16.x or 18.x)](https://nodejs.org/)
57
57
  - [Python](https://python.org/) - See below for specific versions.
58
58
  - [Docker](https://www.docker.com/get-started) (if using the Plone docker images)
59
59
 
60
- *UPDATE 2022-10-25*: Since 2022-10-25, NodeJS 18 is in LTS state (https://github.com/nodejs/release#release-schedule). However, due to changes in internal SSL libraries, some Volto dependencies have been deprecated and need to be updated in order to continue working in NodeJS 18, mainly Webpack 4 (see: https://github.com/webpack/webpack/issues/14532#issuecomment-947525539 for further information). You can still use it, but NodeJS should be run under a special flag: `NODE_OPTIONS=--openssl-legacy-provider`. See also Volto's PR: https://github.com/plone/volto/pull/3699 for more information.
61
-
62
60
  The versions of Python that are supported in Volto depend on the version of Plone that you use.
63
61
 
64
62
  | Plone | Python | Volto |
65
63
  |---|---|---|
66
64
  | 5.2 | 2.7, 3.6-3.8 | 15.0 |
67
- | 6.0 (beta) | 3.8-3.10 | 16.0 (alpha) |
68
-
69
- At the time of this writing, Volto 16 is still in alpha status, and Plone 6 is in beta status.
65
+ | 6.0 | 3.8-3.11 | 16.0 |
70
66
 
71
67
  ### Create a Volto project using the generator
72
68
 
@@ -90,7 +86,7 @@ cd myvoltoproject
90
86
  You can bootstrap a ready Docker Plone container with all the dependencies and ready for Volto use. We recommend to use the Plone docker builds based in `pip` [plone/plone-backend](https://github.com/plone/plone-backend) image:
91
87
 
92
88
  ```shell
93
- docker run -it --rm --name=plone -p 8080:8080 -e SITE=Plone -e PROFILES="plone.volto:default-homepage" plone/plone-backend:6.0.0b3
89
+ docker run -it --rm --name=plone -p 8080:8080 -e SITE=Plone -e PROFILES="plone.volto:default-homepage" plone/plone-backend:6.0.5
94
90
  ```
95
91
 
96
92
  or as an alternative if you have experience with Plone and you have all the
@@ -229,10 +225,11 @@ JavaScript-centered trainings.
229
225
 
230
226
  ## Node Support
231
227
 
228
+ - Node 18: Supported since Volto 16
232
229
  - Node 16: Supported since Volto 14
233
- - Node 14: Supported since Volto 8.8.0
234
- - Node 12: Deprecated from Volto 16 onwards. It was supported since Volto 4
235
- - Node 10: Deprecated from Volto 13 onwards. It was supported since Volto 1 (and its predecessor "plone-react")
230
+ - Node 14: Supported from Volto 8.8.0 - 16
231
+ - Node 12: No longer supported. It was supported from Volto 4 - 15
232
+ - Node 10: No longer supported. It was supported from Volto 1 - 12
236
233
 
237
234
  ## Browser support
238
235
 
@@ -267,7 +264,7 @@ yarn
267
264
  Either using a Docker command:
268
265
 
269
266
  ```shell
270
- docker run -it --rm --name=plone -p 8080:8080 -e SITE=Plone -e PROFILES="plone.volto:default-homepage" plone/plone-backend:6.0.0b3
267
+ docker run -it --rm --name=plone -p 8080:8080 -e SITE=Plone -e PROFILES="plone.volto:default-homepage" plone/plone-backend:6.0.5
271
268
  ```
272
269
 
273
270
  or using the convenience makefile command:
@@ -2,7 +2,7 @@ version: '3.3'
2
2
  services:
3
3
 
4
4
  backend:
5
- image: plone/plone-backend:6.0.0b2
5
+ image: plone/plone-backend:6.0.5
6
6
  # Plone 5.2 series can be used too
7
7
  # image: plone/plone-backend:5.2.9
8
8
  ports:
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "16.21.1",
12
+ "version": "16.21.2",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plone/volto-slate",
3
- "version": "16.21.1",
3
+ "version": "16.21.2",
4
4
  "description": "Slate.js integration with Volto",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
package/razzle.config.js CHANGED
@@ -22,6 +22,13 @@ const { poToJson } = require('@plone/scripts/i18n.cjs');
22
22
 
23
23
  const packageJson = require(path.join(projectRootPath, 'package.json'));
24
24
 
25
+ // This is a workaround to support webpack 4 on Node 17+,
26
+ // because the MD4 hash algorithm is no longer supported by Node.
27
+ const crypto = require('crypto');
28
+ const crypto_orig_createHash = crypto.createHash;
29
+ crypto.createHash = (algorithm) =>
30
+ crypto_orig_createHash(algorithm === 'md4' ? 'sha256' : algorithm);
31
+
25
32
  const registry = new AddonConfigurationRegistry(projectRootPath);
26
33
 
27
34
  const defaultModify = ({
@@ -61,12 +61,12 @@ const DiffField = ({
61
61
  break;
62
62
  case 'datetime':
63
63
  parts = diffWords(
64
- new Intl.DateTimeFormat(language, readable_date_format).format(
65
- new Date(one),
66
- ),
67
- new Intl.DateTimeFormat(language, readable_date_format).format(
68
- new Date(two),
69
- ),
64
+ new Intl.DateTimeFormat(language, readable_date_format)
65
+ .format(new Date(one))
66
+ .replace('\u202F', ' '),
67
+ new Intl.DateTimeFormat(language, readable_date_format)
68
+ .format(new Date(two))
69
+ .replace('\u202F', ' '),
70
70
  );
71
71
  break;
72
72
  case 'json':
@@ -23,9 +23,9 @@ const FormattedDate = ({
23
23
  <time
24
24
  className={className}
25
25
  dateTime={date}
26
- title={new Intl.DateTimeFormat(language, long_date_format).format(
27
- new Date(toDate(date)),
28
- )}
26
+ title={new Intl.DateTimeFormat(language, long_date_format)
27
+ .format(new Date(toDate(date)))
28
+ .replace('\u202F', ' ')}
29
29
  >
30
30
  {children
31
31
  ? children(
@@ -48,7 +48,9 @@ export function formatDate({
48
48
  : short_date_format;
49
49
 
50
50
  const formatter = new Intl.DateTimeFormat(locale, format);
51
- return formatToParts ? formatter.formatToParts(date) : formatter.format(date);
51
+ return formatToParts
52
+ ? formatter.formatToParts(date)
53
+ : formatter.format(date).replace('\u202F', ' ');
52
54
  }
53
55
 
54
56
  export function formatRelativeDate({
@@ -93,5 +95,5 @@ export function formatRelativeDate({
93
95
  ? ''
94
96
  : formatToParts
95
97
  ? formatter.formatToParts(v, tag)
96
- : formatter.format(v, tag); // use "now" ?
98
+ : formatter.format(v, tag).replace('\u202F', ' '); // use "now" ?
97
99
  }
@@ -192,6 +192,8 @@ describe('formatRelativeDate helper', () => {
192
192
  it('can use alternate style narrow', () => {
193
193
  const now = Date.now();
194
194
  const d = new Date(now + 3 * MONTH);
195
- expect(formatRelativeDate({ date: d, style: 'narrow' })).toBe('in 3 mo.');
195
+ expect(['in 3 mo.', 'in 3mo']).toContain(
196
+ formatRelativeDate({ date: d, style: 'narrow' }),
197
+ );
196
198
  });
197
199
  });