diff --git a/eslint.config.mjs b/eslint.config.mjs index 788f234..5a6ba84 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,15 +1,14 @@ /* eslint-disable import-x/no-extraneous-dependencies */ import eslint from '@eslint/js'; -// eslint-disable-next-line import-x/no-unresolved -import tseslint from 'typescript-eslint'; +import { configs, config } from 'typescript-eslint'; import eslintPluginImportX from 'eslint-plugin-import-x'; import jest from 'eslint-plugin-jest'; /* eslint-disable @typescript-eslint/naming-convention */ -export default tseslint.config( +export default config( eslint.configs.recommended, - ...tseslint.configs.strict, + ...configs.strict, eslintPluginImportX.flatConfigs.recommended, eslintPluginImportX.flatConfigs.typescript, { diff --git a/package-lock.json b/package-lock.json index 4a04605..f92e6a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,8 +44,9 @@ "@types/supertest": "^6.0.2", "@types/xml2js": "^0.4.14", "eslint": "^9.9.1", - "eslint-plugin-import-x": "^4.1.1", - "eslint-plugin-jest": "^28.8.2", + "eslint-import-resolver-typescript": "^3.6.3", + "eslint-plugin-import-x": "^4.2.1", + "eslint-plugin-jest": "^28.8.3", "husky": "^9.1.5", "is-ci": "~3.0.1", "jest": "^29.7.0", @@ -2803,6 +2804,16 @@ "node": ">= 8" } }, + "node_modules/@nolyfill/is-core-module": { + "version": "1.0.39", + "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", + "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.4.0" + } + }, "node_modules/@npmcli/fs": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", @@ -7742,14 +7753,77 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.3.tgz", + "integrity": "sha512-ud9aw4szY9cCT1EWWdGv1L1XR6hh2PaRWif0j2QjQ0pgTY/69iw+W0Z4qZv5wHahOl8isEr+k/JnyAqNQkLkIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@nolyfill/is-core-module": "1.0.39", + "debug": "^4.3.5", + "enhanced-resolve": "^5.15.0", + "eslint-module-utils": "^2.8.1", + "fast-glob": "^3.3.2", + "get-tsconfig": "^4.7.5", + "is-bun-module": "^1.0.2", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-import-x": "*" + }, + "peerDependenciesMeta": { + "eslint-plugin-import": { + "optional": true + }, + "eslint-plugin-import-x": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.9.0.tgz", + "integrity": "sha512-McVbYmwA3NEKwRQY5g4aWMdcZE5xZxV8i8l7CqJSrameuGSQJtSWaL/LxTEzSKKaCcOhlpDR8XEfYXWPrdo/ZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, "node_modules/eslint-plugin-import-x": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.1.1.tgz", - "integrity": "sha512-dBEM8fACIFNt4H7GoOaRmnH6evJW6JSTJTYYgmRd3vI4geBTjgDM/JyUDKUwIw0HDSyI+u7Vs3vFRXUo/BOAtA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.2.1.tgz", + "integrity": "sha512-WWi2GedccIJa0zXxx3WDnTgouGQTtdYK1nhXMwywbqqAgB0Ov+p1pYBsWh3VaB0bvBOwLse6OfVII7jZD9xo5Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "^8.1.0", "@typescript-eslint/utils": "^8.1.0", "debug": "^4.3.4", "doctrine": "^3.0.0", @@ -7795,9 +7869,9 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "28.8.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.8.2.tgz", - "integrity": "sha512-mC3OyklHmS5i7wYU1rGId9EnxRI8TVlnFG56AE+8U9iRy6zwaNygZR+DsdZuCL0gRG0wVeyzq+uWcPt6yJrrMA==", + "version": "28.8.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.8.3.tgz", + "integrity": "sha512-HIQ3t9hASLKm2IhIOqnu+ifw7uLZkIlR7RYNv7fMcEi/p0CIiJmfriStQS2LDkgtY4nyLbIZAD+JL347Yc2ETQ==", "dev": true, "license": "MIT", "dependencies": { @@ -10031,6 +10105,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-bun-module": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-1.1.0.tgz", + "integrity": "sha512-4mTAVPlrXpaN3jtF0lsnPCMGnq4+qZjVIKq0HCpfcqf8OC1SM5oATCIAPM5V5FN05qp2NNnFndphmdZS9CV3hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.6.3" + } + }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", diff --git a/package.json b/package.json index f77dc62..0ccbd59 100644 --- a/package.json +++ b/package.json @@ -94,8 +94,9 @@ "@types/supertest": "^6.0.2", "@types/xml2js": "^0.4.14", "eslint": "^9.9.1", - "eslint-plugin-import-x": "^4.1.1", - "eslint-plugin-jest": "^28.8.2", + "eslint-import-resolver-typescript": "^3.6.3", + "eslint-plugin-import-x": "^4.2.1", + "eslint-plugin-jest": "^28.8.3", "husky": "^9.1.5", "is-ci": "~3.0.1", "jest": "^29.7.0", diff --git a/src/misc/services/xml.service.ts b/src/misc/services/xml.service.ts index 592ff70..646c235 100644 --- a/src/misc/services/xml.service.ts +++ b/src/misc/services/xml.service.ts @@ -1,12 +1,12 @@ import { Injectable } from '@nestjs/common'; -import xml2js from 'xml2js'; +import { parseStringPromise } from 'xml2js'; @Injectable() export class XmlService { public parse(xml: string): Promise { const resolved = this.resolveExternalEntities(xml); - return xml2js.parseStringPromise(resolved); + return parseStringPromise(resolved); } private resolveExternalEntities(xml: string): string {