read-data-file 2.0.4 → 2.0.5
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/bin/df2json.mjs +14 -0
- package/package.json +16 -8
- package/rdf.js +2 -1
- package/rdf.mjs +1 -1
- package/test/all.mjs +1 -1
- package/test/usage.mjs +1 -1
package/bin/df2json.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// -*- coding: utf-8, tab-width: 2 -*-
|
|
3
|
+
|
|
4
|
+
import 'p-fatal';
|
|
5
|
+
import 'usnam-pmb';
|
|
6
|
+
|
|
7
|
+
import pEachSeries from 'p-each-series';
|
|
8
|
+
|
|
9
|
+
import readDataFile from '../rdf.mjs';
|
|
10
|
+
|
|
11
|
+
pEachSeries(process.argv.slice(2), async function repack(arg) {
|
|
12
|
+
const data = await readDataFile(arg);
|
|
13
|
+
console.log(JSON.stringify(data, null, 2));
|
|
14
|
+
});
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{ "name": "read-data-file",
|
|
2
|
-
"version": "2.0.
|
|
2
|
+
"version": "2.0.5",
|
|
3
3
|
"description": "Read data/config files in various formats (parsers list is configurable).",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"read data file",
|
|
@@ -19,11 +19,14 @@
|
|
|
19
19
|
|
|
20
20
|
"private": false, "license": "ISC",
|
|
21
21
|
"main": "rdf.js",
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"test": "nodemjs test/all.mjs"
|
|
22
|
+
"bin": {
|
|
23
|
+
"datafile2json": "bin/df2json.mjs"
|
|
25
24
|
},
|
|
26
25
|
|
|
26
|
+
"scripts": { "test": "elp && nodemjs test/all.mjs" },
|
|
27
|
+
"directories": { "test": "test" },
|
|
28
|
+
"eslintConfig": { "extends": "nodejs-pmb" },
|
|
29
|
+
|
|
27
30
|
"dependencies": {
|
|
28
31
|
"ceson": "^0.1.5",
|
|
29
32
|
"esmod-pmb": "^0.1.13",
|
|
@@ -36,16 +39,21 @@
|
|
|
36
39
|
"map-assoc-core": "^0.1.3",
|
|
37
40
|
"merge-options": "^3.0.4",
|
|
38
41
|
"nofs": "^0.12.2",
|
|
42
|
+
"p-each-series": "^2.2.0",
|
|
43
|
+
"p-fatal": "^0.1.3",
|
|
39
44
|
"safeload-yaml-pmb": "^4.210519.0",
|
|
40
45
|
"strip-bom": "^4.0.0",
|
|
41
|
-
"toml": "^3.0.0"
|
|
46
|
+
"toml": "^3.0.0",
|
|
47
|
+
"usnam-pmb": "^0.2.5"
|
|
42
48
|
},
|
|
43
49
|
"devDependencies": {
|
|
44
50
|
"absdir": "^1.0.6",
|
|
45
51
|
"equal-pmb": "^0.1.24",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
52
|
+
"eslint-config-nodejs-pmb": "^0.3.5",
|
|
53
|
+
"eslint-plugin-json-light-pmb": "^1.0.7",
|
|
54
|
+
"eslint-plugin-n": "^15.2.4",
|
|
55
|
+
"eslint-pretty-pmb": "^1.0.5",
|
|
56
|
+
"nodemjs": "^0.1.11"
|
|
49
57
|
},
|
|
50
58
|
|
|
51
59
|
|
package/rdf.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
require('esmod-pmb')(module);
|
package/rdf.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import mergeOpts from 'merge-options';
|
|
|
10
10
|
import promisedFs from 'nofs';
|
|
11
11
|
import stripBom from 'strip-bom';
|
|
12
12
|
|
|
13
|
-
import cesonParser from 'ceson/parse';
|
|
13
|
+
import cesonParser from 'ceson/parse.js';
|
|
14
14
|
import iniLib from 'ini';
|
|
15
15
|
import json5Lib from 'json5';
|
|
16
16
|
import jsonParser from 'json-parse-pmb';
|
package/test/all.mjs
CHANGED
package/test/usage.mjs
CHANGED