@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 CHANGED
@@ -1,12 +1,8 @@
1
- ## 16.28.0 (2023-11-30)
1
+ ## 16.28.1 (2023-12-04)
2
2
 
3
- ### Feature
3
+ ### Bugfix
4
4
 
5
- - Backport `References and Links` menu from 17 series. The feature is opt-in using the `config.settings.excludeLinksAndReferencesMenuItem` setting in the configuration object.
6
- Improvements to link integrity detection on content deletion @ksuess @pgrunewald @danlavrz @jaroel @stevepiercy @sneridagh [#5399](https://github.com/plone/volto/issues/5399)
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
 
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
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "16.28.0",
12
+ "version": "16.28.1",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -0,0 +1 @@
1
+ Fix the right order of parameters in normalizeExternalData.js @dobri1408
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plone/volto-slate",
3
- "version": "16.28.0",
3
+ "version": "16.28.1",
4
4
  "description": "Slate.js integration with Volto",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -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((b) => Editor.isInline(b) || Text.isText(b)) > -1
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 (nodes && !Editor.isBlock(fakeEditor, nodes[0]))
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
  );
@@ -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;