fast-xml-parser 5.2.4 → 5.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  <small>Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.</small>
2
2
 
3
+ **5.2.5 / 2025-06-08**
4
+ - Inform user to use [fxp-cli](https://github.com/NaturalIntelligence/fxp-cli) instead of in-built CLI feature
5
+ - Export typings for direct use
6
+
3
7
  **5.2.4 / 2025-06-06**
4
8
  - fix (#747): fix EMPTY and ANY with ELEMENT in DOCTYPE
5
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-xml-parser",
3
- "version": "5.2.4",
3
+ "version": "5.2.5",
4
4
  "description": "Validate XML, Parse XML, Build XML without C/C++ based libraries",
5
5
  "main": "./lib/fxp.cjs",
6
6
  "type": "module",
@@ -51,7 +51,6 @@
51
51
  "x2js",
52
52
  "xml2json",
53
53
  "js",
54
- "cli",
55
54
  "validator",
56
55
  "validate",
57
56
  "transformer",
package/src/cli/cli.js CHANGED
@@ -7,6 +7,10 @@ import {XMLParser, XMLValidator} from "../fxp.js";
7
7
  import ReadToEnd from './read.js';
8
8
  import cmdDetail from "./man.js"
9
9
 
10
+ console.warn("\x1b[33m%s\x1b[0m", "⚠️ Warning: The built-in CLI interface is now deprecated.");
11
+ console.warn("Please install the dedicated CLI package instead:");
12
+ console.warn(" npm install -g fxp-cli");
13
+
10
14
  if (process.argv[2] === '--help' || process.argv[2] === '-h') {
11
15
  console.log(cmdDetail);
12
16
  } else if (process.argv[2] === '--version') {
package/src/fxp.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- type X2jOptions = {
1
+ export type X2jOptions = {
2
2
  /**
3
3
  * Preserve the order of tags in resulting JS object
4
4
  *
@@ -218,14 +218,14 @@ type X2jOptions = {
218
218
  captureMetaData?: boolean;
219
219
  };
220
220
 
221
- type strnumOptions = {
221
+ export type strnumOptions = {
222
222
  hex: boolean;
223
223
  leadingZeros: boolean,
224
224
  skipLike?: RegExp,
225
225
  eNotation?: boolean
226
226
  }
227
227
 
228
- type validationOptions = {
228
+ export type validationOptions = {
229
229
  /**
230
230
  * Whether to allow attributes without value
231
231
  *
@@ -241,7 +241,7 @@ type validationOptions = {
241
241
  unpairedTags?: string[];
242
242
  };
243
243
 
244
- type XmlBuilderOptions = {
244
+ export type XmlBuilderOptions = {
245
245
  /**
246
246
  * Give a prefix to the attribute name in the resulting JS object
247
247
  *
@@ -395,7 +395,7 @@ type XmlBuilderOptions = {
395
395
 
396
396
  type ESchema = string | object | Array<string|object>;
397
397
 
398
- type ValidationError = {
398
+ export type ValidationError = {
399
399
  err: {
400
400
  code: string;
401
401
  msg: string,