Skip to content

Commit 6a60fa8

Browse files
chore(deps): Update Node.js version and package dependencies (dotCMS#31990)
- Updated Node.js version in and to v22.15.0. - Adjusted package dependencies in , including updates to , , and various Babel packages for improved compatibility and performance. - Enhanced type imports in for better type safety and clarity in Angular component properties. - Refactored to streamline imports and improve code organization. These changes aim to ensure compatibility with the latest Node.js features and enhance overall project maintainability. --------- Co-authored-by: Jose Castro <[email protected]>
1 parent dbf19d3 commit 6a60fa8

24 files changed

+55995
-59350
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.20.3
1+
v22.15.0

core-web/.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.20.3
1+
v22.15.0

core-web/libs/block-editor/src/lib/NodeViewRenderer.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,28 @@ import {
1313
import { AngularRenderer } from './AngularRenderer';
1414

1515
import type { Node as ProseMirrorNode } from 'prosemirror-model';
16-
import type { Decoration } from 'prosemirror-view';
16+
import type { DecorationSource } from 'prosemirror-view';
17+
import { DecorationSet } from 'prosemirror-view';
1718

1819
export type toJSONFn = (this: { node: ProseMirrorNode }) => Record<string, unknown>;
1920

2021
@Component({ template: '' })
2122
export class AngularNodeViewComponent implements NodeViewProps {
2223
@Input() editor!: NodeViewProps['editor'];
2324
@Input() node!: NodeViewProps['node'];
24-
@Input() decorations!: NodeViewProps['decorations'];
25+
@Input() decorations!: readonly DecorationWithType[];
2526
@Input() selected!: NodeViewProps['selected'];
2627
@Input() extension!: NodeViewProps['extension'];
2728
@Input() getPos!: NodeViewProps['getPos'];
2829
@Input() updateAttributes!: NodeViewProps['updateAttributes'];
2930
@Input() deleteNode!: NodeViewProps['deleteNode'];
31+
@Input() view!: NodeViewProps['view'];
32+
@Input() innerDecorations!: DecorationSource;
33+
@Input() HTMLAttributes!: NodeViewProps['HTMLAttributes'];
3034
}
3135

3236
interface AngularNodeViewRendererOptions extends NodeViewRendererOptions {
33-
update?: ((node: ProseMirrorNode, decorations: Decoration[]) => boolean) | null;
37+
update?: ((node: ProseMirrorNode, decorations: DecorationWithType[]) => boolean) | null;
3438
toJSON?: toJSONFn;
3539
injector: Injector;
3640
}
@@ -42,19 +46,23 @@ class AngularNodeView extends NodeView<
4246
> {
4347
renderer!: AngularRenderer<AngularNodeViewComponent, NodeViewProps>;
4448
contentDOMElement!: HTMLElement | null;
49+
override decorations!: readonly DecorationWithType[];
4550

4651
override mount() {
4752
const injector = this.options.injector as Injector;
4853

4954
const props: NodeViewProps = {
5055
editor: this.editor,
5156
node: this.node,
52-
decorations: this.decorations,
57+
decorations: this.decorations as readonly DecorationWithType[],
5358
selected: false,
5459
extension: this.extension,
5560
getPos: () => this.getPos(),
5661
updateAttributes: (attributes = {}) => this.updateAttributes(attributes),
57-
deleteNode: () => this.deleteNode()
62+
deleteNode: () => this.deleteNode(),
63+
view: this.editor.view,
64+
innerDecorations: DecorationSet.empty,
65+
HTMLAttributes: {}
5866
};
5967

6068
// create renderer

core-web/libs/block-editor/src/lib/extensions/bubble-link-form/bubble-link-form.extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ declare module '@tiptap/core' {
1919
bubbleLinkForm: {
2020
openLinkForm: ({ openOnClick }) => ReturnType;
2121
closeLinkForm: () => ReturnType;
22+
setHighlight: () => ReturnType;
23+
unsetHighlight: () => ReturnType;
2224
};
2325
}
2426
}
@@ -47,7 +49,6 @@ export const BubbleLinkFormExtension = (viewContainerRef: ViewContainerRef, lang
4749
?.setHighlight?.()
4850
.command(({ tr }) => {
4951
tr.setMeta(LINK_FORM_PLUGIN_KEY, { isOpen: true, openOnClick });
50-
5152
return true;
5253
})
5354
.freezeScroll(true)
@@ -64,7 +65,6 @@ export const BubbleLinkFormExtension = (viewContainerRef: ViewContainerRef, lang
6465
isOpen: false,
6566
openOnClick: false
6667
});
67-
6868
return true;
6969
})
7070
.freezeScroll(false)

core-web/libs/block-editor/src/lib/extensions/bubble-menu/plugins/dot-bubble-menu.plugin.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { filter, take } from 'rxjs/operators';
99
import { posToDOMRect } from '@tiptap/core';
1010
import { BubbleMenuView } from '@tiptap/extension-bubble-menu';
1111

12+
import { DotContentTypeService, DotMessageService } from '@dotcms/data-access';
13+
import { FeaturedFlags } from '@dotcms/dotcms-models';
1214
import { ImageNode } from '../../../nodes';
1315
import {
1416
changeToItems,
@@ -33,8 +35,6 @@ import {
3335
popperModifiers,
3436
setBubbleMenuCoords
3537
} from '../utils';
36-
import { DotContentTypeService, DotMessageService } from '@dotcms/data-access';
37-
import { FeaturedFlags } from '@dotcms/dotcms-models';
3838

3939
export const DotBubbleMenuPlugin = (options: DotBubbleMenuPluginProps) => {
4040
const component = options.component.instance;
@@ -168,6 +168,7 @@ export class DotBubbleMenuPluginView extends BubbleMenuView {
168168

169169
this.shouldShowProp = this.shouldShow?.({
170170
editor: this.editor,
171+
element: this.element,
171172
view,
172173
state,
173174
oldState,

core-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "23.4.0-next.1",
44
"license": "MIT",
55
"engines": {
6-
"node": ">=18.20.3"
6+
"node": ">=v22.15.0"
77
},
88
"scripts": {
99
"ng": "nx",

0 commit comments

Comments
 (0)