fxrjson 18.0.0 → 20.0.0

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 (2) hide show
  1. package/fxrjson.js +7 -3
  2. package/package.json +3 -3
package/fxrjson.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import fs from 'node:fs/promises'
4
4
  import path from 'node:path'
5
5
  import { FXR, Game } from '@cccode/fxr'
6
- import beautify from 'json-beautify'
6
+ import stringify from 'fabulous-json'
7
7
  import { fileURLToPath } from 'node:url'
8
8
 
9
9
  const CTX_MENU_NAME = 'FXR ⇄ JSON'
@@ -84,10 +84,14 @@ await (async () => {
84
84
 
85
85
  if (content.subarray(0, 4).equals(Buffer.from('FXR\0'))) {
86
86
  const fxr = FXR.read(content, Game.Heuristic, { round: true })
87
- await fs.writeFile(filePath + '.json', beautify({
87
+ await fs.writeFile(filePath + '.json', stringify({
88
88
  version: `${name}@${version}`,
89
89
  fxr
90
- }, null, 2, 80))
90
+ }, {
91
+ allowInline(key, value) {
92
+ return Array.isArray(value) || !('type' in value) || Object.keys(value).length === 1
93
+ },
94
+ }))
91
95
  } else {
92
96
  if (game === null) try {
93
97
  const cliSelect = (await import('cli-select')).default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fxrjson",
3
- "version": "18.0.0",
3
+ "version": "20.0.0",
4
4
  "description": "Convert FXR files from Dark Souls 3, Sekiro, Elden Ring, and Armored Core 6 to and from JSON.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,9 +21,9 @@
21
21
  "url": "https://github.com/EvenTorset/fxrjson/issues"
22
22
  },
23
23
  "dependencies": {
24
- "@cccode/fxr": "^18.0.0",
24
+ "@cccode/fxr": "^20.0.1",
25
25
  "cli-select": "^1.1.2",
26
- "json-beautify": "^1.1.1",
26
+ "fabulous-json": "^1.0.0",
27
27
  "rage-edit": "^1.2.0"
28
28
  }
29
29
  }