read-data-file 2.0.5 → 2.0.8
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 +7 -0
- package/package.json +6 -6
- package/rdf.mjs +3 -2
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{ "name": "read-data-file",
|
|
2
|
-
"version": "2.0.
|
|
2
|
+
"version": "2.0.8",
|
|
3
3
|
"description": "Read data/config files in various formats (parsers list is configurable).",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"read data file",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"ini": "^2.0.0",
|
|
36
36
|
"is-string": "^1.0.7",
|
|
37
37
|
"json-parse-pmb": "^1.0.0",
|
|
38
|
-
"json5": "^2.2.
|
|
38
|
+
"json5": "^2.2.1",
|
|
39
39
|
"map-assoc-core": "^0.1.3",
|
|
40
40
|
"merge-options": "^3.0.4",
|
|
41
|
-
"nofs": "^0.12.2",
|
|
42
41
|
"p-each-series": "^2.2.0",
|
|
43
42
|
"p-fatal": "^0.1.3",
|
|
43
|
+
"pify": "^5.0.0",
|
|
44
44
|
"safeload-yaml-pmb": "^4.210519.0",
|
|
45
45
|
"strip-bom": "^4.0.0",
|
|
46
46
|
"toml": "^3.0.0",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"absdir": "^1.0.6",
|
|
51
51
|
"equal-pmb": "^0.1.24",
|
|
52
|
-
"eslint-config-nodejs-pmb": "^0.3.
|
|
52
|
+
"eslint-config-nodejs-pmb": "^0.3.4",
|
|
53
53
|
"eslint-plugin-json-light-pmb": "^1.0.7",
|
|
54
|
-
"eslint-plugin-
|
|
54
|
+
"eslint-plugin-node": "^11.1.0",
|
|
55
55
|
"eslint-pretty-pmb": "^1.0.5",
|
|
56
|
-
"nodemjs": "^0.1.
|
|
56
|
+
"nodemjs": "^0.1.12"
|
|
57
57
|
},
|
|
58
58
|
|
|
59
59
|
|
package/rdf.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
// -*- coding: utf-8, tab-width: 2 -*-
|
|
2
2
|
|
|
3
3
|
import pathLib from 'path';
|
|
4
|
+
import nodeFs from 'fs';
|
|
5
|
+
import pify from 'pify';
|
|
4
6
|
|
|
5
7
|
import getOwn from 'getown';
|
|
6
8
|
import ifFun from 'if-fun';
|
|
7
9
|
import isStr from 'is-string';
|
|
8
10
|
import mapObj from 'map-assoc-core';
|
|
9
11
|
import mergeOpts from 'merge-options';
|
|
10
|
-
import promisedFs from 'nofs';
|
|
11
12
|
import stripBom from 'strip-bom';
|
|
12
13
|
|
|
13
14
|
import cesonParser from 'ceson/parse.js';
|
|
@@ -93,7 +94,7 @@ const defaultImpl = {
|
|
|
93
94
|
},
|
|
94
95
|
|
|
95
96
|
async defaultReader(path) {
|
|
96
|
-
const text = stripBom(await
|
|
97
|
+
const text = stripBom(await pify(nodeFs.readFile)(path,
|
|
97
98
|
{ encoding: 'UTF-8' }));
|
|
98
99
|
return text;
|
|
99
100
|
},
|