jwalker 3.0.0 → 3.0.2

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/README.md CHANGED
@@ -8,15 +8,21 @@ Parses a file stream for JSON and pretty prints it.
8
8
  Using jwalker on the command line.
9
9
 
10
10
  ````
11
- Usage: jwalker [options]
12
-
13
- Use -- (or omit) for stdin or stdout.
14
-
15
- Options:
16
- -i=[file], --input=[file] Input file (-- for stdin) (default=stdin).
17
- -o=[file], --output=[file] Output file (-- for stdout) (default=stdout).
18
- -p, --passthrough Passthrough non-JSON.
19
- -s=[spaces], --spaces=[spaces] Number of spaces per indentation (default=4).
11
+ Usage: index.js <options>
12
+
13
+ Options:
14
+
15
+ --input <input> Input file (-- for stdin).
16
+ (default: `--`)
17
+
18
+ --output <output> Output file (-- for stdout).
19
+ (default: `--`)
20
+
21
+ --spaces <spaces> Use number of spaces for indentation.
22
+ (default: ` `)
23
+
24
+ --passthrough Passthrough non-JSON lines.
25
+ (default: disabled)
20
26
  ````
21
27
 
22
28
  # Usage (code)
package/bin/index.js CHANGED
@@ -9,7 +9,7 @@ import JWalker from '../lib/index.js';
9
9
  const {
10
10
  input,
11
11
  output,
12
- spaces = '\t',
12
+ spaces,
13
13
  passthrough
14
14
  } = await argumentsParser().options({
15
15
  'input': {
@@ -24,7 +24,8 @@ const {
24
24
  },
25
25
  'spaces': {
26
26
  type: Number,
27
- description: 'Use number of spaces for indentation (default is tab).'
27
+ default: '\t',
28
+ description: 'Use number of spaces for indentation.'
28
29
  },
29
30
  'passthrough': {
30
31
  type: Boolean,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jwalker",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "A JSON pretty-printer for each line in a stream. Useful for JSON logs.",
5
5
  "main": "index.js",
6
6
  "type": "module",