xml-disassembler 1.11.5 → 2.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +11 -25
  3. package/dist/index.cjs +18 -711
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.min.cjs +1 -1
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.mjs +1 -1
  8. package/dist/index.min.mjs.map +1 -1
  9. package/dist/index.mjs +19 -708
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/native/index.node +0 -0
  12. package/dist/native-loader.cjs +3 -0
  13. package/package.json +7 -19
  14. package/disassemble.log +0 -452
  15. package/dist/index.min.umd.js +0 -2
  16. package/dist/index.min.umd.js.map +0 -1
  17. package/dist/index.umd.js +0 -768
  18. package/dist/index.umd.js.map +0 -1
  19. package/dist/typings/builders/buildDisassembledFile.d.ts +0 -2
  20. package/dist/typings/builders/buildDisassembledFiles.d.ts +0 -2
  21. package/dist/typings/builders/buildXMLString.d.ts +0 -2
  22. package/dist/typings/builders/extractRootAttributes.d.ts +0 -2
  23. package/dist/typings/builders/mergeXmlElements.d.ts +0 -2
  24. package/dist/typings/constants/constants.d.ts +0 -27
  25. package/dist/typings/handlers/disassembleXMLFileHandler.d.ts +0 -28
  26. package/dist/typings/handlers/reassembleXMLFileHandler.d.ts +0 -13
  27. package/dist/typings/index.d.ts +0 -8
  28. package/dist/typings/parsers/parseElement.d.ts +0 -4
  29. package/dist/typings/parsers/parseToXmlObject.d.ts +0 -1
  30. package/dist/typings/parsers/parseUniqueIdElements.d.ts +0 -2
  31. package/dist/typings/parsers/parseXML.d.ts +0 -2
  32. package/dist/typings/parsers/stripWhitespace.d.ts +0 -1
  33. package/dist/typings/transformers/getTransformer.d.ts +0 -2
  34. package/dist/typings/transformers/transformers.d.ts +0 -6
  35. package/dist/typings/types/types.d.ts +0 -60
  36. package/dist/typings/utils/asyncQueue.d.ts +0 -10
  37. package/dist/typings/utils/objectPool.d.ts +0 -15
  38. package/fixtures/array-of-leaves/Dreamhouse.app-meta.xml +0 -60
  39. package/fixtures/attributes/notes.xml +0 -14
  40. package/fixtures/cdata/VidLand_US.marketingappextension-meta.xml +0 -51
  41. package/fixtures/comments/Numbers-fr.globalValueSetTranslation-meta.xml +0 -17
  42. package/fixtures/deeply-nested-unique-id-element/Get_Info.flow-meta.xml +0 -343
  43. package/fixtures/general/HR_Admin.permissionset-meta.xml +0 -42
  44. package/fixtures/ignore/HR_Admin.permissionset-meta.xml +0 -44
  45. package/fixtures/no-namespace/HR_Admin.permissionset-meta.xml +0 -44
  46. package/fixtures/no-nested-elements/HR_Admin.xml +0 -6
  47. package/fixtures/no-root-element/Assessment_Bot/Assessment_Bot.bot-meta.xml +0 -6
  48. package/fixtures/no-root-element/Assessment_Bot/botMlDomain/419e0199.botMlDomain-meta.xml +0 -7
  49. package/fixtures/no-root-element/Assessment_Bot.bot-meta.xml +0 -10
package/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@
5
5
 
6
6
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
7
7
 
8
+ ## [2.0.1](https://github.com/mcarvin8/xml-disassembler/compare/v2.0.0...v2.0.1) (2026-02-09)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * resolve "xml-disassembler-crate" path error on npm install ([aafc4eb](https://github.com/mcarvin8/xml-disassembler/commit/aafc4eb9441f4075df032371db10b589e68b5f75))
14
+
15
+ ## [2.0.0](https://github.com/mcarvin8/xml-disassembler/compare/v1.11.5...v2.0.0) (2026-02-09)
16
+
17
+
18
+ ### ⚠ BREAKING CHANGES
19
+
20
+ *
21
+
22
+ ### Features
23
+
24
+ * embed Rust xml-disassembler via Neon addon ([#191](https://github.com/mcarvin8/xml-disassembler/issues/191)) ([af991a8](https://github.com/mcarvin8/xml-disassembler/commit/af991a84402bffad17b7832d72d56019f425d957))
25
+
8
26
  ## [1.11.5](https://github.com/mcarvin8/xml-disassembler/compare/v1.11.4...v1.11.5) (2026-02-04)
9
27
 
10
28
 
package/README.md CHANGED
@@ -7,11 +7,11 @@
7
7
  [![Code Coverage](https://qlty.sh/badges/e226ad95-4b8d-484a-9484-25862941262d/test_coverage.svg)](https://qlty.sh/gh/mcarvin8/projects/xml-disassembler)
8
8
  [![Known Vulnerabilities](https://snyk.io//test/github/mcarvin8/xml-disassembler/badge.svg?targetFile=package.json)](https://snyk.io//test/github/mcarvin8/xml-disassembler?targetFile=package.json)
9
9
 
10
- Split large XML files into smaller, version-control–friendly pieces—then reassemble them when needed. Output as XML, INI, JSON, JSON5, TOML, or YAML.
10
+ Split large XML files into smaller, version-control–friendly pieces—then reassemble them when needed. Output as XML, JSON, JSON5, or YAML.
11
11
 
12
12
  Useful for cleaner diffs, easier collaboration, and workflows like Salesforce metadata.
13
13
 
14
- > **Rust implementation:** For a native, high-performance alternative, see [xml-disassembler-rust](https://github.com/mcarvin8/xml-disassembler-rust).
14
+ > **Native Rust:** Core logic is in the [xml-disassembler](https://crates.io/crates/xml-disassembler) crate; this package provides Node.js bindings via [Neon](https://neon-bindings.com).
15
15
 
16
16
  ---
17
17
 
@@ -25,9 +25,9 @@ Useful for cleaner diffs, easier collaboration, and workflows like Salesforce me
25
25
  - [Reassembling](#reassembling)
26
26
  - [Ignore file](#ignore-file)
27
27
  - [Logging](#logging)
28
- - [XML parser](#xml-parser)
28
+ - [Implementation](#implementation)
29
29
  - [Use case](#use-case)
30
- - [Development](#development)
30
+ - [Contributing](#contributing)
31
31
  - [License](#license)
32
32
 
33
33
  ---
@@ -64,13 +64,13 @@ await reassemble.reassemble({
64
64
 
65
65
  - **Disassemble** – Break XML into smaller components (by unique ID or by tag).
66
66
  - **Reassemble** – Rebuild the original XML from disassembled output.
67
- - **Multiple formats** – Output (and reassemble from) XML, INI, JSON, JSON5, TOML, or YAML.
67
+ - **Multiple formats** – Output (and reassemble from) XML, JSON, JSON5, or YAML.
68
68
  - **Strategies** – `unique-id` (one file per nested element) or `grouped-by-tag` (one file per tag).
69
69
  - **Ignore rules** – Exclude paths via a `.xmldisassemblerignore` file (same style as `.gitignore`).
70
- - **Logging** – Configurable logging via `log4js` (writes to `disassemble.log` by default).
70
+ - **Logging** – Uses [env_logger](https://docs.rs/env_logger); set `RUST_LOG` for verbosity (e.g. `RUST_LOG=debug`).
71
71
  - **Salesforce-friendly** – Fits metadata and similar XML-heavy workflows.
72
72
 
73
- Reassembly preserves element content and structure; element order may differ (especially with TOML).
73
+ Reassembly preserves element content and structure.
74
74
 
75
75
  ---
76
76
 
@@ -107,7 +107,7 @@ await handler.disassemble({
107
107
  | `prePurge` | Remove existing disassembly output before running (default: `false`). |
108
108
  | `postPurge` | Remove the source XML after disassembly (default: `false`). |
109
109
  | `ignorePath` | Path to the ignore file (default: `.xmldisassemblerignore`). |
110
- | `format` | Output format: `xml`, `ini`, `json`, `json5`, `toml`, `yaml`. |
110
+ | `format` | Output format: `xml`, `json`, `json5`, `yaml`. |
111
111
  | `strategy` | `unique-id` or `grouped-by-tag`. |
112
112
 
113
113
  ---
@@ -128,8 +128,6 @@ Best for fine-grained diffs and version control.
128
128
  | **YAML** | [![YAML UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-yaml.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-yaml.png) | [![YAML Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-yaml.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-yaml.png) |
129
129
  | **JSON** | [![JSON UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json.png) | [![JSON Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json.png) |
130
130
  | **JSON5** | [![JSON5 UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json5.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json5.png) | [![JSON5 Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json5.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json5.png) |
131
- | **TOML** | [![TOML UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-toml.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-toml.png) | [![TOML Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-toml.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-toml.png) |
132
- | **INI** | [![INI UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-ini.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-ini.png) | [![INI Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-ini.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-ini.png) |
133
131
 
134
132
  ### grouped-by-tag
135
133
 
@@ -145,8 +143,6 @@ Best for fewer files and quick inspection.
145
143
  | **YAML** | [![YAML tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-yaml.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-yaml.png) |
146
144
  | **JSON** | [![JSON tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json.png) |
147
145
  | **JSON5** | [![JSON5 tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json5.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json5.png) |
148
- | **TOML** | [![TOML tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-toml.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-toml.png) |
149
- | **INI** | [![INI tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-ini.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-ini.png) |
150
146
 
151
147
  ---
152
148
 
@@ -187,23 +183,13 @@ Example:
187
183
 
188
184
  ## Logging
189
185
 
190
- Logging uses [log4js](https://github.com/log4js-node/log4js-node). By default, logs go to `disassemble.log` at `error` level.
191
-
192
- ```typescript
193
- import { setLogLevel } from "xml-disassembler";
194
-
195
- setLogLevel("debug"); // Verbose logging
196
- ```
186
+ The Rust crate uses [env_logger](https://docs.rs/env_logger). Set `RUST_LOG` to control verbosity (e.g. `RUST_LOG=debug`).
197
187
 
198
188
  ---
199
189
 
200
- ## XML parser
201
-
202
- Parsing is done with [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser), with support for:
190
+ ## Implementation
203
191
 
204
- - **CDATA** `"![CDATA["`
205
- - **Comments** – `"!---"`
206
- - **Attributes** – `"@__**"`
192
+ The core logic is implemented in Rust ([xml-disassembler](https://crates.io/crates/xml-disassembler)) and exposed to Node.js via [Neon](https://neon-bindings.com). Building from source requires Rust and Node.js.
207
193
 
208
194
  ---
209
195