From 3e3f9fd97f82e65a2f43ff5d56e36155cc08c16c Mon Sep 17 00:00:00 2001 From: Willem Liu Date: Thu, 5 Sep 2024 08:43:08 +0200 Subject: [PATCH] Updated dependencies --- next-env.d.ts | 2 +- package-lock.json | 26 +++++++++++++------------- package.json | 6 +++--- src/utils/articleContent.tsx | 12 ++++++++---- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/next-env.d.ts b/next-env.d.ts index 4f11a03d..a4a7b3f5 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. diff --git a/package-lock.json b/package-lock.json index ffcf683c..5f7a0703 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,11 +13,11 @@ "@types/fetch-jsonp": "^1.1.0", "@types/micro-cors": "^0.1.5", "@types/node": "^22.5.4", - "@types/react": "^18.3.4", + "@types/react": "^18.3.5", "@types/react-dom": "^18.3.0", "@types/xmldom": "^0.1.34", "@webcomponents/webcomponentsjs": "^2.8.0", - "@xmldom/xmldom": "^0.8.10", + "@xmldom/xmldom": "^0.9.1", "autoprefixer": "^10.4.20", "copy-webpack-plugin": "^12.0.2", "copyfiles": "^2.4.1", @@ -42,7 +42,7 @@ "prettier": "^3.3.3", "react": "^18.3.1", "react-dom": "^18.3.1", - "sass": "^1.77.8", + "sass": "^1.78.0", "sass-loader": "^16.0.1", "ts-loader": "^9.5.1", "typescript": "^5.5.4", @@ -1906,9 +1906,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.3.4", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.4.tgz", - "integrity": "sha512-J7W30FTdfCxDDjmfRM+/JqLHBIyl7xUIp9kwK637FGmY7+mkSFSe6L4jpZzhj5QMfLssSDP4/i75AKkrdC7/Jw==", + "version": "18.3.5", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.5.tgz", + "integrity": "sha512-WeqMfGJLGuLCqHGYRGHxnKrXcTitc6L/nBUWfWPcTarG3t9PsquqUMuVeXZeca+mglY4Vo5GZjCi0A3Or2lnxA==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -2382,12 +2382,12 @@ } }, "node_modules/@xmldom/xmldom": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", - "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.1.tgz", + "integrity": "sha512-uXFabECwV3nxWzaWnhafM50sPa3jSqS8VGXJTBiQIko5mDTvB9UYX5rEF5dNqFf41Krhbtw0+IgB2CaWMD8mNw==", "dev": true, "engines": { - "node": ">=10.0.0" + "node": ">=14.0.0" } }, "node_modules/@xtuc/ieee754": { @@ -7810,9 +7810,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.77.8", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.8.tgz", - "integrity": "sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==", + "version": "1.78.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.78.0.tgz", + "integrity": "sha512-AaIqGSrjo5lA2Yg7RvFZrlXDBCp3nV4XP73GrLGvdRWWwk+8H3l0SDvq/5bA4eF+0RFPLuWUk3E+P1U/YqnpsQ==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/package.json b/package.json index cb207275..d99403d0 100644 --- a/package.json +++ b/package.json @@ -33,11 +33,11 @@ "@types/fetch-jsonp": "^1.1.0", "@types/micro-cors": "^0.1.5", "@types/node": "^22.5.4", - "@types/react": "^18.3.4", + "@types/react": "^18.3.5", "@types/react-dom": "^18.3.0", "@types/xmldom": "^0.1.34", "@webcomponents/webcomponentsjs": "^2.8.0", - "@xmldom/xmldom": "^0.8.10", + "@xmldom/xmldom": "^0.9.1", "autoprefixer": "^10.4.20", "copy-webpack-plugin": "^12.0.2", "copyfiles": "^2.4.1", @@ -62,7 +62,7 @@ "prettier": "^3.3.3", "react": "^18.3.1", "react-dom": "^18.3.1", - "sass": "^1.77.8", + "sass": "^1.78.0", "sass-loader": "^16.0.1", "ts-loader": "^9.5.1", "typescript": "^5.5.4", diff --git a/src/utils/articleContent.tsx b/src/utils/articleContent.tsx index f6f54e54..d059b2ff 100644 --- a/src/utils/articleContent.tsx +++ b/src/utils/articleContent.tsx @@ -11,7 +11,7 @@ import { TextFrame } from '@fdmg/design-system/components/textframe/TextFrame'; import { LinkBlock } from '@fdmg/design-system/components/article-link-block/LinkBlock'; import { Vimeo } from '@fdmg/design-system/components/vimeo/Vimeo'; import { Youtube } from '@fdmg/design-system/components/youtube/Youtube'; -import { XMLSerializer } from '@xmldom/xmldom'; +import { XMLSerializer, Node } from '@xmldom/xmldom'; import { BulletPoint, Alignment, @@ -25,12 +25,14 @@ function innerHTML(node: Element, tagName?: string) { return ''; } return new XMLSerializer() - .serializeToString(node.getElementsByTagName(tagName).item(0)) + .serializeToString( + node.getElementsByTagName(tagName).item(0) as unknown as Node + ) .replace(`<${tagName}>`, '') .replace(``, ''); } else { return new XMLSerializer() - .serializeToString(node) + .serializeToString(node as unknown as Node) .replace(`<${node.nodeName}>`, '') .replace(``, ''); } @@ -273,7 +275,9 @@ export function mergeInlineContent(doc: any) { ); } else { console.log( - new XMLSerializer().serializeToString(childNode) + new XMLSerializer().serializeToString( + childNode as unknown as Node + ) ); } }