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.
- package/CHANGELOG.md +18 -0
- package/README.md +11 -25
- package/dist/index.cjs +18 -711
- package/dist/index.cjs.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +19 -708
- package/dist/index.mjs.map +1 -1
- package/dist/native/index.node +0 -0
- package/dist/native-loader.cjs +3 -0
- package/package.json +7 -19
- package/disassemble.log +0 -452
- package/dist/index.min.umd.js +0 -2
- package/dist/index.min.umd.js.map +0 -1
- package/dist/index.umd.js +0 -768
- package/dist/index.umd.js.map +0 -1
- package/dist/typings/builders/buildDisassembledFile.d.ts +0 -2
- package/dist/typings/builders/buildDisassembledFiles.d.ts +0 -2
- package/dist/typings/builders/buildXMLString.d.ts +0 -2
- package/dist/typings/builders/extractRootAttributes.d.ts +0 -2
- package/dist/typings/builders/mergeXmlElements.d.ts +0 -2
- package/dist/typings/constants/constants.d.ts +0 -27
- package/dist/typings/handlers/disassembleXMLFileHandler.d.ts +0 -28
- package/dist/typings/handlers/reassembleXMLFileHandler.d.ts +0 -13
- package/dist/typings/index.d.ts +0 -8
- package/dist/typings/parsers/parseElement.d.ts +0 -4
- package/dist/typings/parsers/parseToXmlObject.d.ts +0 -1
- package/dist/typings/parsers/parseUniqueIdElements.d.ts +0 -2
- package/dist/typings/parsers/parseXML.d.ts +0 -2
- package/dist/typings/parsers/stripWhitespace.d.ts +0 -1
- package/dist/typings/transformers/getTransformer.d.ts +0 -2
- package/dist/typings/transformers/transformers.d.ts +0 -6
- package/dist/typings/types/types.d.ts +0 -60
- package/dist/typings/utils/asyncQueue.d.ts +0 -10
- package/dist/typings/utils/objectPool.d.ts +0 -15
- package/fixtures/array-of-leaves/Dreamhouse.app-meta.xml +0 -60
- package/fixtures/attributes/notes.xml +0 -14
- package/fixtures/cdata/VidLand_US.marketingappextension-meta.xml +0 -51
- package/fixtures/comments/Numbers-fr.globalValueSetTranslation-meta.xml +0 -17
- package/fixtures/deeply-nested-unique-id-element/Get_Info.flow-meta.xml +0 -343
- package/fixtures/general/HR_Admin.permissionset-meta.xml +0 -42
- package/fixtures/ignore/HR_Admin.permissionset-meta.xml +0 -44
- package/fixtures/no-namespace/HR_Admin.permissionset-meta.xml +0 -44
- package/fixtures/no-nested-elements/HR_Admin.xml +0 -6
- package/fixtures/no-root-element/Assessment_Bot/Assessment_Bot.bot-meta.xml +0 -6
- package/fixtures/no-root-element/Assessment_Bot/botMlDomain/419e0199.botMlDomain-meta.xml +0 -7
- 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
|
[](https://qlty.sh/gh/mcarvin8/projects/xml-disassembler)
|
|
8
8
|
[](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,
|
|
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
|
|
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
|
-
- [
|
|
28
|
+
- [Implementation](#implementation)
|
|
29
29
|
- [Use case](#use-case)
|
|
30
|
-
- [
|
|
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,
|
|
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** –
|
|
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
|
|
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`, `
|
|
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** | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-yaml.png) | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-yaml.png) |
|
|
129
129
|
| **JSON** | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json.png) | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json.png) |
|
|
130
130
|
| **JSON5** | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json5.png) | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json5.png) |
|
|
131
|
-
| **TOML** | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-toml.png) | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-toml.png) |
|
|
132
|
-
| **INI** | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-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** | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-yaml.png) |
|
|
146
144
|
| **JSON** | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json.png) |
|
|
147
145
|
| **JSON5** | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json5.png) |
|
|
148
|
-
| **TOML** | [](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-toml.png) |
|
|
149
|
-
| **INI** | [](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
|
-
|
|
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
|
-
##
|
|
201
|
-
|
|
202
|
-
Parsing is done with [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser), with support for:
|
|
190
|
+
## Implementation
|
|
203
191
|
|
|
204
|
-
-
|
|
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
|
|