@plone/volto 16.28.0 → 16.28.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.draft +4 -8
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/packages/volto-slate/news/5347.bugfix +1 -0
- package/packages/volto-slate/package.json +1 -1
- package/packages/volto-slate/src/editor/extensions/insertData.js +3 -1
- package/packages/volto-slate/src/editor/extensions/normalizeExternalData.js +1 -1
- package/packages/volto-slate/src/utils/blocks.js +6 -2
- package/src/start-server.js +4 -0
package/.changelog.draft
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
## 16.28.
|
|
1
|
+
## 16.28.1 (2023-12-04)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### Bugfix
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Internal
|
|
9
|
-
|
|
10
|
-
- Update README and Makefile for Plone 5 KGS @sneridagh [#5453](https://github.com/plone/volto/issues/5453)
|
|
5
|
+
- Adjust DNS resolution to prefer IPv4 addresses when both IPv4 and IPv6 are resolved. @davisagli [#5261](https://github.com/plone/volto/issues/5261)
|
|
6
|
+
- Fix the right order of parameters in normalizeExternalData.js @dobri1408 [#5475](https://github.com/plone/volto/issues/5475)
|
|
11
7
|
|
|
12
8
|
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 16.28.1 (2023-12-04)
|
|
12
|
+
|
|
13
|
+
### Bugfix
|
|
14
|
+
|
|
15
|
+
- Adjust DNS resolution to prefer IPv4 addresses when both IPv4 and IPv6 are resolved. @davisagli [#5261](https://github.com/plone/volto/issues/5261)
|
|
16
|
+
- Fix the right order of parameters in normalizeExternalData.js @dobri1408 [#5475](https://github.com/plone/volto/issues/5475)
|
|
17
|
+
|
|
11
18
|
## 16.28.0 (2023-11-30)
|
|
12
19
|
|
|
13
20
|
### Feature
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Fix the right order of parameters in normalizeExternalData.js @dobri1408
|
|
@@ -98,7 +98,9 @@ export const insertData = (editor) => {
|
|
|
98
98
|
if (Editor.string(editor, [])) {
|
|
99
99
|
if (
|
|
100
100
|
Array.isArray(fragment) &&
|
|
101
|
-
fragment.findIndex(
|
|
101
|
+
fragment.findIndex(
|
|
102
|
+
(b) => Editor.isInline(editor, b) || Text.isText(b),
|
|
103
|
+
) > -1
|
|
102
104
|
) {
|
|
103
105
|
// console.log('insert fragment', fragment);
|
|
104
106
|
// TODO: we want normalization also when dealing with fragments
|
|
@@ -2,7 +2,7 @@ import { normalizeExternalData as normalize } from '@plone/volto-slate/utils';
|
|
|
2
2
|
|
|
3
3
|
export function normalizeExternalData(editor) {
|
|
4
4
|
editor.normalizeExternalData = (fragment) => {
|
|
5
|
-
return normalize(fragment);
|
|
5
|
+
return normalize(editor, fragment);
|
|
6
6
|
};
|
|
7
7
|
return editor;
|
|
8
8
|
}
|
|
@@ -73,7 +73,10 @@ export const normalizeExternalData = (editor, nodes) => {
|
|
|
73
73
|
// put all the non-blocks (e.g. images which are inline Elements) inside p-s
|
|
74
74
|
Editor.withoutNormalizing(fakeEditor, () => {
|
|
75
75
|
//for htmlSlateWidget compatibility
|
|
76
|
-
if (
|
|
76
|
+
if (
|
|
77
|
+
nodes &&
|
|
78
|
+
(!Editor.isBlock(fakeEditor, nodes[0]) || Text.isText(nodes[0]))
|
|
79
|
+
)
|
|
77
80
|
Transforms.wrapNodes(
|
|
78
81
|
fakeEditor,
|
|
79
82
|
{ type: 'p' },
|
|
@@ -81,7 +84,8 @@ export const normalizeExternalData = (editor, nodes) => {
|
|
|
81
84
|
at: [],
|
|
82
85
|
match: (node, path) =>
|
|
83
86
|
(!Editor.isEditor(node) && !Editor.isBlock(fakeEditor, node)) ||
|
|
84
|
-
fakeEditor.isInline(node)
|
|
87
|
+
fakeEditor.isInline(node) ||
|
|
88
|
+
Text.isText(node),
|
|
85
89
|
mode: 'highest',
|
|
86
90
|
},
|
|
87
91
|
);
|
package/src/start-server.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/* eslint no-console: 0 */
|
|
2
|
+
import dns from 'dns';
|
|
2
3
|
import http from 'http';
|
|
3
4
|
|
|
4
5
|
import app from './server';
|
|
5
6
|
import debug from 'debug';
|
|
6
7
|
|
|
7
8
|
export default function server() {
|
|
9
|
+
// If DNS returns both ipv4 and ipv6 addresses, prefer ipv4
|
|
10
|
+
dns.setDefaultResultOrder('ipv4first');
|
|
11
|
+
|
|
8
12
|
const server = http.createServer(app);
|
|
9
13
|
// const host = process.env.HOST || 'localhost';
|
|
10
14
|
const port = process.env.PORT || 3000;
|