fast-xml-parser 5.0.0 → 5.0.1

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,8 @@
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.0.1 / 2025-02-19**
4
+ - fix syntax error for CLI command
5
+
3
6
  **5.0.0 / 2025-02-19**
4
7
  - ESM support
5
8
  - no change in the functionality, syntax, APIs, options, or documentation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-xml-parser",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "Validate XML, Parse XML, Build XML without C/C++ based libraries",
5
5
  "main": "./lib/fxp.cjs",
6
6
  "type": "module",
package/src/cli/cli.js CHANGED
@@ -3,11 +3,12 @@
3
3
  /*eslint-disable no-console*/
4
4
  import fs from 'fs';
5
5
  import {XMLParser, XMLValidator} from "../fxp.js";
6
- import {readToEnd} from './read.js';
6
+ import ReadToEnd from './read.js';
7
7
  import cmdDetail from "./man.js"
8
- import pkg from '../../package.json';
8
+ import pkg from '../../package.json' assert { type: 'json' };
9
9
  const version = pkg.version;
10
10
 
11
+
11
12
  if (process.argv[2] === '--help' || process.argv[2] === '-h') {
12
13
  console.log(cmdDetail);
13
14
  } else if (process.argv[2] === '--version') {
@@ -65,7 +66,7 @@ if (process.argv[2] === '--help' || process.argv[2] === '-h') {
65
66
  try {
66
67
 
67
68
  if (!fileName) {
68
- readToEnd(process.stdin, function(err, data) {
69
+ ReadToEnd.readToEnd(process.stdin, function(err, data) {
69
70
  if (err) {
70
71
  throw err;
71
72
  }
package/src/cli/man.js CHANGED
@@ -1,6 +1,7 @@
1
- import pkg from '../../package.json';
1
+ import pkg from '../../package.json' assert { type: 'json' };
2
2
  const version = pkg.version;
3
3
 
4
+
4
5
  export default `Fast XML Parser ${version}
5
6
  ----------------
6
7
  $ fxparser [-ns|-a|-c|-v|-V] <filename> [-o outputfile.json]