From 2880a6db60ce52439a5669f793c10d5356d1c199 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 00:51:15 +0000 Subject: [PATCH 1/7] chore(deps): bump fast-xml-parser from 5.4.2 to 5.5.7 Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.4.2 to 5.5.7. - [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases) - [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md) - [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.4.2...v5.5.7) --- updated-dependencies: - dependency-name: fast-xml-parser dependency-version: 5.5.7 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- package-lock.json | 75 ++++++++++++++++++++++++++++++++--------------- package.json | 2 +- 2 files changed, 52 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 42c3b0bcff..a67f623b14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@typed-mxgraph/typed-mxgraph": "~1.0.8", "es-toolkit": "~1.45.0", - "fast-xml-parser": "5.4.2", + "fast-xml-parser": "5.5.7", "mxgraph": "4.2.2" }, "devDependencies": { @@ -7845,20 +7845,23 @@ "license": "BSD-3-Clause" }, "node_modules/fast-xml-builder": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.0.0.tgz", - "integrity": "sha512-fpZuDogrAgnyt9oDDz+5DBz0zgPdPZz6D4IR7iESxRXElrlGTRkHJ9eEt+SACRJwT0FNFrt71DFQIUFBJfX/uQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.4.tgz", + "integrity": "sha512-f2jhpN4Eccy0/Uz9csxh3Nu6q4ErKxf0XIsasomfOihuSUa3/xw6w8dnOtCDgEItQFJG8KyXPzQXzcODDrrbOg==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" } - ] + ], + "dependencies": { + "path-expression-matcher": "^1.1.3" + } }, "node_modules/fast-xml-parser": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.4.2.tgz", - "integrity": "sha512-pw/6pIl4k0CSpElPEJhDppLzaixDEuWui2CUQQBH/ECDf7+y6YwA4Gf7Tyb0Rfe4DIMuZipYj4AEL0nACKglvQ==", + "version": "5.5.7", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.7.tgz", + "integrity": "sha512-LteOsISQ2GEiDHZch6L9hB0+MLoYVLToR7xotrzU0opCICBkxOPgHAy1HxAvtxfJNXDJpgAsQN30mkrfpO2Prg==", "funding": [ { "type": "github", @@ -7866,8 +7869,9 @@ } ], "dependencies": { - "fast-xml-builder": "^1.0.0", - "strnum": "^2.1.2" + "fast-xml-builder": "^1.1.4", + "path-expression-matcher": "^1.1.3", + "strnum": "^2.2.0" }, "bin": { "fxparser": "src/cli/cli.js" @@ -13943,6 +13947,20 @@ "node": ">=8" } }, + "node_modules/path-expression-matcher": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.1.3.tgz", + "integrity": "sha512-qdVgY8KXmVdJZRSS1JdEPOKPdTiEK/pi0RkcT2sw1RhXxohdujUlJFPuS1TSkevZ9vzd3ZlL7ULl1MHGTApKzQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "dev": true, @@ -16325,9 +16343,9 @@ } }, "node_modules/strnum": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.2.tgz", - "integrity": "sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.1.tgz", + "integrity": "sha512-BwRvNd5/QoAtyW1na1y1LsJGQNvRlkde6Q/ipqqEaivoMdV+B1OMOTVdwR+N/cwVUcIt9PYyHmV8HyexCZSupg==", "funding": [ { "type": "github", @@ -23050,17 +23068,21 @@ "dev": true }, "fast-xml-builder": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.0.0.tgz", - "integrity": "sha512-fpZuDogrAgnyt9oDDz+5DBz0zgPdPZz6D4IR7iESxRXElrlGTRkHJ9eEt+SACRJwT0FNFrt71DFQIUFBJfX/uQ==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.4.tgz", + "integrity": "sha512-f2jhpN4Eccy0/Uz9csxh3Nu6q4ErKxf0XIsasomfOihuSUa3/xw6w8dnOtCDgEItQFJG8KyXPzQXzcODDrrbOg==", + "requires": { + "path-expression-matcher": "^1.1.3" + } }, "fast-xml-parser": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.4.2.tgz", - "integrity": "sha512-pw/6pIl4k0CSpElPEJhDppLzaixDEuWui2CUQQBH/ECDf7+y6YwA4Gf7Tyb0Rfe4DIMuZipYj4AEL0nACKglvQ==", + "version": "5.5.7", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.7.tgz", + "integrity": "sha512-LteOsISQ2GEiDHZch6L9hB0+MLoYVLToR7xotrzU0opCICBkxOPgHAy1HxAvtxfJNXDJpgAsQN30mkrfpO2Prg==", "requires": { - "fast-xml-builder": "^1.0.0", - "strnum": "^2.1.2" + "fast-xml-builder": "^1.1.4", + "path-expression-matcher": "^1.1.3", + "strnum": "^2.2.0" } }, "fastq": { @@ -27237,6 +27259,11 @@ "version": "4.0.0", "dev": true }, + "path-expression-matcher": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.1.3.tgz", + "integrity": "sha512-qdVgY8KXmVdJZRSS1JdEPOKPdTiEK/pi0RkcT2sw1RhXxohdujUlJFPuS1TSkevZ9vzd3ZlL7ULl1MHGTApKzQ==" + }, "path-is-absolute": { "version": "1.0.1", "dev": true @@ -28795,9 +28822,9 @@ "dev": true }, "strnum": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.2.tgz", - "integrity": "sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ==" + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.1.tgz", + "integrity": "sha512-BwRvNd5/QoAtyW1na1y1LsJGQNvRlkde6Q/ipqqEaivoMdV+B1OMOTVdwR+N/cwVUcIt9PYyHmV8HyexCZSupg==" }, "stylehacks": { "version": "7.0.8", diff --git a/package.json b/package.json index 440b936491..941fbde447 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "dependencies": { "@typed-mxgraph/typed-mxgraph": "~1.0.8", "es-toolkit": "~1.45.0", - "fast-xml-parser": "5.4.2", + "fast-xml-parser": "5.5.7", "mxgraph": "4.2.2" }, "devDependencies": { From ee1205c9e852410db166683c117aa95eee20e36f Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 20 Mar 2026 17:44:44 +0100 Subject: [PATCH 2/7] fix compilation error: the X2jOptions.attributeValueProcessor signature changed in v5.5.0 --- src/component/parser/xml/BpmnXmlParser.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/component/parser/xml/BpmnXmlParser.ts b/src/component/parser/xml/BpmnXmlParser.ts index e2af0dc28b..ad6339c48c 100644 --- a/src/component/parser/xml/BpmnXmlParser.ts +++ b/src/component/parser/xml/BpmnXmlParser.ts @@ -68,16 +68,17 @@ export default class BpmnXmlParser { */ processEntities: false, - // See https://github.com/NaturalIntelligence/fast-xml-parser/blob/v4.3.4/docs/v4/2.XMLparseOptions.md#attributevalueprocessor - attributeValueProcessor: (name: string, value: string, nodePath: string): unknown => { - if (isNumeric(name, nodePath)) { + // See https://github.com/NaturalIntelligence/fast-xml-parser/blob/v5.5.7/docs/v4%2C%20v5/2.XMLparseOptions.md#attributevalueprocessor + // jPath Parameter: The third parameter is either a string (when jPath: true, default) or a Matcher instance (when jPath: false). + attributeValueProcessor: (attributeName: string, attributeValue: string, nodePathOrMatcher: unknown): unknown => { + if (typeof nodePathOrMatcher === 'string' && isNumeric(attributeName, nodePathOrMatcher)) { // The strnum lib used by fast-xml-parser is not able to parse all numbers // The only available options are https://github.com/NaturalIntelligence/fast-xml-parser/blob/v4.3.4/docs/v4/2.XMLparseOptions.md#numberparseoptions // This is a fix for https://github.com/process-analytics/bpmn-visualization-js/issues/2857 - return Number(value); + return Number(attributeValue); } - return this.processAttribute(value); + return this.processAttribute(attributeValue); }, }; private readonly xmlParser: XMLParser = new XMLParser(this.x2jOptions); From 0483058aeb004b4d83418ae21d035db22bcdae94 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 20 Mar 2026 18:10:41 +0100 Subject: [PATCH 3/7] fix impl --- src/component/parser/xml/BpmnXmlParser.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/component/parser/xml/BpmnXmlParser.ts b/src/component/parser/xml/BpmnXmlParser.ts index ad6339c48c..16f8c5be6d 100644 --- a/src/component/parser/xml/BpmnXmlParser.ts +++ b/src/component/parser/xml/BpmnXmlParser.ts @@ -68,10 +68,20 @@ export default class BpmnXmlParser { */ processEntities: false, + // Use Matcher object (jPath: false) to get paths without namespace prefixes via toString('.', false). + // With jPath: true (default), toString() includes namespace prefixes (e.g. "bpmn:definitions.bpmndi:BPMNDiagram") + // which don't match our expected paths in nodesWithNumericAttributes. + jPath: false, + // See https://github.com/NaturalIntelligence/fast-xml-parser/blob/v5.5.7/docs/v4%2C%20v5/2.XMLparseOptions.md#attributevalueprocessor - // jPath Parameter: The third parameter is either a string (when jPath: true, default) or a Matcher instance (when jPath: false). attributeValueProcessor: (attributeName: string, attributeValue: string, nodePathOrMatcher: unknown): unknown => { - if (typeof nodePathOrMatcher === 'string' && isNumeric(attributeName, nodePathOrMatcher)) { + // nodePathOrMatcher is a Matcher instance (jPath: false). Get path without namespace prefixes. + const nodePath = + typeof nodePathOrMatcher === 'object' && nodePathOrMatcher !== null + ? String((nodePathOrMatcher as { toString(separator?: string, includeNs?: boolean): string }).toString('.', false)) + : String(nodePathOrMatcher); + + if (isNumeric(attributeName, nodePath)) { // The strnum lib used by fast-xml-parser is not able to parse all numbers // The only available options are https://github.com/NaturalIntelligence/fast-xml-parser/blob/v4.3.4/docs/v4/2.XMLparseOptions.md#numberparseoptions // This is a fix for https://github.com/process-analytics/bpmn-visualization-js/issues/2857 From 732202641bb77ee5552c65a6ad91355023558b4f Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 23 Mar 2026 10:51:40 +0100 Subject: [PATCH 4/7] update link to fxp [skip ci] Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/component/parser/xml/BpmnXmlParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/component/parser/xml/BpmnXmlParser.ts b/src/component/parser/xml/BpmnXmlParser.ts index 16f8c5be6d..a1976d8e58 100644 --- a/src/component/parser/xml/BpmnXmlParser.ts +++ b/src/component/parser/xml/BpmnXmlParser.ts @@ -83,7 +83,7 @@ export default class BpmnXmlParser { if (isNumeric(attributeName, nodePath)) { // The strnum lib used by fast-xml-parser is not able to parse all numbers - // The only available options are https://github.com/NaturalIntelligence/fast-xml-parser/blob/v4.3.4/docs/v4/2.XMLparseOptions.md#numberparseoptions + // The only available options are https://github.com/NaturalIntelligence/fast-xml-parser/blob/v5.5.7/docs/v4%2C%20v5/2.XMLparseOptions.md#numberparseoptions // This is a fix for https://github.com/process-analytics/bpmn-visualization-js/issues/2857 return Number(attributeValue); } From f16d713005d46132e4ccd55c2ba6bbe136bd50e1 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Tue, 7 Apr 2026 15:31:41 +0200 Subject: [PATCH 5/7] chore: bump fxp to 5.5.10 --- package-lock.json | 64 +++++++++++++++++++++++++---------------------- package.json | 2 +- 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/package-lock.json b/package-lock.json index a67f623b14..dd6c0c9582 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@typed-mxgraph/typed-mxgraph": "~1.0.8", "es-toolkit": "~1.45.0", - "fast-xml-parser": "5.5.7", + "fast-xml-parser": "5.5.10", "mxgraph": "4.2.2" }, "devDependencies": { @@ -7859,19 +7859,20 @@ } }, "node_modules/fast-xml-parser": { - "version": "5.5.7", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.7.tgz", - "integrity": "sha512-LteOsISQ2GEiDHZch6L9hB0+MLoYVLToR7xotrzU0opCICBkxOPgHAy1HxAvtxfJNXDJpgAsQN30mkrfpO2Prg==", + "version": "5.5.10", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.10.tgz", + "integrity": "sha512-go2J2xODMc32hT+4Xr/bBGXMaIoiCwrwp2mMtAvKyvEFW6S/v5Gn2pBmE4nvbwNjGhpcAiOwEv7R6/GZ6XRa9w==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" } ], + "license": "MIT", "dependencies": { "fast-xml-builder": "^1.1.4", - "path-expression-matcher": "^1.1.3", - "strnum": "^2.2.0" + "path-expression-matcher": "^1.2.1", + "strnum": "^2.2.2" }, "bin": { "fxparser": "src/cli/cli.js" @@ -13948,15 +13949,16 @@ } }, "node_modules/path-expression-matcher": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.1.3.tgz", - "integrity": "sha512-qdVgY8KXmVdJZRSS1JdEPOKPdTiEK/pi0RkcT2sw1RhXxohdujUlJFPuS1TSkevZ9vzd3ZlL7ULl1MHGTApKzQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.4.0.tgz", + "integrity": "sha512-s4DQMxIdhj3jLFWd9LxHOplj4p9yQ4ffMGowFf3cpEgrrJjEhN0V5nxw4Ye1EViAGDoL4/1AeO6qHpqYPOzE4Q==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" } ], + "license": "MIT", "engines": { "node": ">=14.0.0" } @@ -14022,10 +14024,11 @@ "dev": true }, "node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -16343,15 +16346,16 @@ } }, "node_modules/strnum": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.1.tgz", - "integrity": "sha512-BwRvNd5/QoAtyW1na1y1LsJGQNvRlkde6Q/ipqqEaivoMdV+B1OMOTVdwR+N/cwVUcIt9PYyHmV8HyexCZSupg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.3.tgz", + "integrity": "sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" } - ] + ], + "license": "MIT" }, "node_modules/stylehacks": { "version": "7.0.8", @@ -23076,13 +23080,13 @@ } }, "fast-xml-parser": { - "version": "5.5.7", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.7.tgz", - "integrity": "sha512-LteOsISQ2GEiDHZch6L9hB0+MLoYVLToR7xotrzU0opCICBkxOPgHAy1HxAvtxfJNXDJpgAsQN30mkrfpO2Prg==", + "version": "5.5.10", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.10.tgz", + "integrity": "sha512-go2J2xODMc32hT+4Xr/bBGXMaIoiCwrwp2mMtAvKyvEFW6S/v5Gn2pBmE4nvbwNjGhpcAiOwEv7R6/GZ6XRa9w==", "requires": { "fast-xml-builder": "^1.1.4", - "path-expression-matcher": "^1.1.3", - "strnum": "^2.2.0" + "path-expression-matcher": "^1.2.1", + "strnum": "^2.2.2" } }, "fastq": { @@ -27260,9 +27264,9 @@ "dev": true }, "path-expression-matcher": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.1.3.tgz", - "integrity": "sha512-qdVgY8KXmVdJZRSS1JdEPOKPdTiEK/pi0RkcT2sw1RhXxohdujUlJFPuS1TSkevZ9vzd3ZlL7ULl1MHGTApKzQ==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.4.0.tgz", + "integrity": "sha512-s4DQMxIdhj3jLFWd9LxHOplj4p9yQ4ffMGowFf3cpEgrrJjEhN0V5nxw4Ye1EViAGDoL4/1AeO6qHpqYPOzE4Q==" }, "path-is-absolute": { "version": "1.0.1", @@ -27307,9 +27311,9 @@ "dev": true }, "picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true }, "pidtree": { @@ -28822,9 +28826,9 @@ "dev": true }, "strnum": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.1.tgz", - "integrity": "sha512-BwRvNd5/QoAtyW1na1y1LsJGQNvRlkde6Q/ipqqEaivoMdV+B1OMOTVdwR+N/cwVUcIt9PYyHmV8HyexCZSupg==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.3.tgz", + "integrity": "sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==" }, "stylehacks": { "version": "7.0.8", diff --git a/package.json b/package.json index 941fbde447..5be868ad4b 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "dependencies": { "@typed-mxgraph/typed-mxgraph": "~1.0.8", "es-toolkit": "~1.45.0", - "fast-xml-parser": "5.5.7", + "fast-xml-parser": "5.5.10", "mxgraph": "4.2.2" }, "devDependencies": { From 032ebc28a3ce1b1be9967f06c75f5a79821b9375 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Wed, 8 Apr 2026 16:16:47 +0200 Subject: [PATCH 6/7] refactor BpmnXmlParser.ts: first check the string type, for simplicity and make sonarcloud happy --- src/component/parser/xml/BpmnXmlParser.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/component/parser/xml/BpmnXmlParser.ts b/src/component/parser/xml/BpmnXmlParser.ts index a1976d8e58..1461bd51d5 100644 --- a/src/component/parser/xml/BpmnXmlParser.ts +++ b/src/component/parser/xml/BpmnXmlParser.ts @@ -75,11 +75,11 @@ export default class BpmnXmlParser { // See https://github.com/NaturalIntelligence/fast-xml-parser/blob/v5.5.7/docs/v4%2C%20v5/2.XMLparseOptions.md#attributevalueprocessor attributeValueProcessor: (attributeName: string, attributeValue: string, nodePathOrMatcher: unknown): unknown => { - // nodePathOrMatcher is a Matcher instance (jPath: false). Get path without namespace prefixes. + // nodePathOrMatcher is a Matcher instance (jPath: false) or a string (jPath: true). Get path without namespace prefixes. const nodePath = - typeof nodePathOrMatcher === 'object' && nodePathOrMatcher !== null - ? String((nodePathOrMatcher as { toString(separator?: string, includeNs?: boolean): string }).toString('.', false)) - : String(nodePathOrMatcher); + typeof nodePathOrMatcher === 'string' + ? nodePathOrMatcher + : (nodePathOrMatcher as { toString(separator?: string, includeNs?: boolean): string }).toString('.', false); if (isNumeric(attributeName, nodePath)) { // The strnum lib used by fast-xml-parser is not able to parse all numbers From ce710efe373f9119110451152f2e3b3cf1029793 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Wed, 8 Apr 2026 16:21:37 +0200 Subject: [PATCH 7/7] lint --- src/component/parser/xml/BpmnXmlParser.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/component/parser/xml/BpmnXmlParser.ts b/src/component/parser/xml/BpmnXmlParser.ts index 1461bd51d5..fbc228ac22 100644 --- a/src/component/parser/xml/BpmnXmlParser.ts +++ b/src/component/parser/xml/BpmnXmlParser.ts @@ -77,9 +77,7 @@ export default class BpmnXmlParser { attributeValueProcessor: (attributeName: string, attributeValue: string, nodePathOrMatcher: unknown): unknown => { // nodePathOrMatcher is a Matcher instance (jPath: false) or a string (jPath: true). Get path without namespace prefixes. const nodePath = - typeof nodePathOrMatcher === 'string' - ? nodePathOrMatcher - : (nodePathOrMatcher as { toString(separator?: string, includeNs?: boolean): string }).toString('.', false); + typeof nodePathOrMatcher === 'string' ? nodePathOrMatcher : (nodePathOrMatcher as { toString(separator?: string, includeNs?: boolean): string }).toString('.', false); if (isNumeric(attributeName, nodePath)) { // The strnum lib used by fast-xml-parser is not able to parse all numbers