diff --git a/README.md b/README.md index 1674fce2..0fe0ca0f 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ See the [examples](./examples/README.md) for more details on how to use the libr ## Built With -- [xmldom](https://github.com/xmldom/xmldom) - Used to serialize the XML +- [@xmldom/xmldom](https://github.com/xmldom/xmldom) - Used to serialize the XML ## Contributing diff --git a/package-lock.json b/package-lock.json index c0414d8d..4f076e42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2062,12 +2062,6 @@ "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", "dev": true }, - "@types/xmldom": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/@types/xmldom/-/xmldom-0.1.31.tgz", - "integrity": "sha512-bVy7s0nvaR5D1mT1a8ZkByHWNOGb6Vn4yi5TWhEdmyKlAG+08SA7Md6+jH+tYmMLueAwNeWvHHpeKrr6S4c4BA==", - "dev": true - }, "@types/yargs": { "version": "15.0.4", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.4.tgz", @@ -2317,6 +2311,11 @@ "eslint-visitor-keys": "^2.0.0" } }, + "@xmldom/xmldom": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.2.tgz", + "integrity": "sha512-t/Zqo0ewes3iq6zGqEqJNUWI27Acr3jkmSUNp6E3nl0Z2XbtqAG5XYqPNLdYonILmhcxANsIidh69tHzjXtuRg==" + }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -13437,11 +13436,6 @@ "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==", "dev": true }, - "xmldom": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.6.0.tgz", - "integrity": "sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg==" - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index dff633eb..6103c7c7 100644 --- a/package.json +++ b/package.json @@ -49,14 +49,13 @@ "docs": "rm -r ./dist && tsc && jsdoc2md --name-format --param-list-format list --separators --partial ./tools/jsdoc2md/body.hbs ./tools/jsdoc2md/params-list.hbs ./tools/jsdoc2md/returns.hbs ./tools/jsdoc2md/scope.hbs --files ./dist/api/**/*.js > ./docs/API.md" }, "dependencies": { - "xmldom": "^0.6.0" + "@xmldom/xmldom": "^0.7.2" }, "devDependencies": { "@semantic-release/changelog": "^5.0.1", "@semantic-release/git": "^9.0.0", "@types/jest": "^26.0.23", "@types/node": "^10.17.59", - "@types/xmldom": "^0.1.29", "@typescript-eslint/eslint-plugin": "^4.22.1", "@typescript-eslint/parser": "^4.22.1", "eslint": "^7.26.0", diff --git a/src/api/office/TextDocument.ts b/src/api/office/TextDocument.ts index bd013747..ff09054d 100644 --- a/src/api/office/TextDocument.ts +++ b/src/api/office/TextDocument.ts @@ -1,6 +1,6 @@ import { writeFile } from 'fs'; import { promisify } from 'util'; -import { XMLSerializer } from 'xmldom'; +import { XMLSerializer } from '@xmldom/xmldom'; import { TextDocumentWriter } from '../../xml/TextDocumentWriter'; import { Meta } from '../meta'; import { CommonStyles } from './CommonStyles'; diff --git a/src/xml/DomVisitor.spec.ts b/src/xml/DomVisitor.spec.ts index af7a6f4e..1f7795b7 100644 --- a/src/xml/DomVisitor.spec.ts +++ b/src/xml/DomVisitor.spec.ts @@ -1,5 +1,5 @@ import { join } from 'path'; -import { DOMImplementation, XMLSerializer } from 'xmldom'; +import { DOMImplementation, XMLSerializer } from '@xmldom/xmldom'; import { Image, AnchorType } from '../api/draw'; import { Heading, Hyperlink, List, Paragraph } from '../api/text'; import { DomVisitor } from './DomVisitor'; diff --git a/src/xml/TextDocumentWriter.spec.ts b/src/xml/TextDocumentWriter.spec.ts index f125eda8..06ccd595 100644 --- a/src/xml/TextDocumentWriter.spec.ts +++ b/src/xml/TextDocumentWriter.spec.ts @@ -1,4 +1,4 @@ -import { XMLSerializer } from 'xmldom'; +import { XMLSerializer } from '@xmldom/xmldom'; import { TextDocument } from '../api/office'; import { TextDocumentWriter } from './TextDocumentWriter'; diff --git a/src/xml/TextDocumentWriter.ts b/src/xml/TextDocumentWriter.ts index 04b7bac6..89a8aa83 100644 --- a/src/xml/TextDocumentWriter.ts +++ b/src/xml/TextDocumentWriter.ts @@ -1,4 +1,4 @@ -import { DOMImplementation } from 'xmldom'; +import { DOMImplementation } from '@xmldom/xmldom'; import { AutomaticStyles, TextDocument } from '../api/office'; import { MetaWriter } from './meta/MetaWriter'; import { FontFaceDeclarationsWriter } from './office/FontFaceDeclarationsWriter'; diff --git a/src/xml/meta/MetaWriter.spec.ts b/src/xml/meta/MetaWriter.spec.ts index a287823a..b65474a7 100644 --- a/src/xml/meta/MetaWriter.spec.ts +++ b/src/xml/meta/MetaWriter.spec.ts @@ -1,5 +1,5 @@ import { userInfo } from 'os'; -import { DOMImplementation, XMLSerializer } from 'xmldom'; +import { DOMImplementation, XMLSerializer } from '@xmldom/xmldom'; import { Meta } from '../../api/meta'; import { OdfElementName } from '../OdfElementName'; import { MetaWriter } from './MetaWriter'; diff --git a/src/xml/office/FontFaceDeclarationsWriter.spec.ts b/src/xml/office/FontFaceDeclarationsWriter.spec.ts index a3522d11..3fce5f47 100644 --- a/src/xml/office/FontFaceDeclarationsWriter.spec.ts +++ b/src/xml/office/FontFaceDeclarationsWriter.spec.ts @@ -1,4 +1,4 @@ -import { DOMImplementation, XMLSerializer } from 'xmldom'; +import { DOMImplementation, XMLSerializer } from '@xmldom/xmldom'; import { FontFaceDeclarations } from '../../api/office'; import { FontPitch } from '../../api/style'; import { OdfElementName } from '../OdfElementName'; diff --git a/src/xml/office/StylesWriter.spec.ts b/src/xml/office/StylesWriter.spec.ts index 3de4575b..03bf205f 100644 --- a/src/xml/office/StylesWriter.spec.ts +++ b/src/xml/office/StylesWriter.spec.ts @@ -1,4 +1,4 @@ -import { DOMImplementation, XMLSerializer } from 'xmldom'; +import { DOMImplementation, XMLSerializer } from '@xmldom/xmldom'; import { CommonStyles, AutomaticStyles } from '../../api/office'; import { BorderStyle,