read-data-file 2.0.10 → 2.1.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.
- package/package.json +13 -13
- package/rdf.mjs +2 -1
- package/test/usage.mjs +1 -1
- package/rdf.js +0 -2
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{ "name": "read-data-file",
|
|
2
|
-
"version": "2.0
|
|
2
|
+
"version": "2.1.0",
|
|
3
3
|
"description": "Read data/config files in various formats (parsers list is configurable).",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"read data file",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"contributors": [],
|
|
19
19
|
|
|
20
20
|
"private": false, "license": "ISC",
|
|
21
|
-
"main": "rdf.
|
|
21
|
+
"main": "rdf.mjs",
|
|
22
22
|
"bin": {
|
|
23
23
|
"datafile2json": "bin/df2json.mjs"
|
|
24
24
|
},
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"ceson": "^0.1.5",
|
|
32
|
-
"esmod-pmb": "^0.1.
|
|
33
|
-
"getown": "^1.0.
|
|
32
|
+
"esmod-pmb": "^0.1.14",
|
|
33
|
+
"getown": "^1.0.1",
|
|
34
34
|
"if-fun": "^1.0.1",
|
|
35
|
-
"ini": "^
|
|
35
|
+
"ini": "^6.0.0",
|
|
36
36
|
"is-string": "^1.0.7",
|
|
37
|
-
"json-parse-pmb": "^1.0.
|
|
37
|
+
"json-parse-pmb": "^1.0.1",
|
|
38
38
|
"json5": "^2.2.1",
|
|
39
39
|
"map-assoc-core": "^0.1.3",
|
|
40
40
|
"merge-options": "^3.0.4",
|
|
41
41
|
"p-each-series": "^2.2.0",
|
|
42
|
-
"p-fatal": "^0.1.
|
|
42
|
+
"p-fatal": "^0.1.6",
|
|
43
43
|
"pify": "^5.0.0",
|
|
44
44
|
"safeload-yaml-pmb": "^4.210519.0",
|
|
45
45
|
"strip-bom": "^4.0.0",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"absdir": "^1.0.6",
|
|
51
|
-
"equal-pmb": "^0.1.
|
|
52
|
-
"eslint-config-nodejs-pmb": "^0.3.
|
|
51
|
+
"equal-pmb": "^0.1.29",
|
|
52
|
+
"eslint-config-nodejs-pmb": "^0.3.13",
|
|
53
53
|
"eslint-plugin-json-light-pmb": "^1.0.7",
|
|
54
|
-
"eslint-plugin-n": "^
|
|
55
|
-
"eslint-pretty-pmb": "^1.0.
|
|
56
|
-
"nodemjs": "^0.1.
|
|
54
|
+
"eslint-plugin-n": "^17.16.2",
|
|
55
|
+
"eslint-pretty-pmb": "^1.0.7",
|
|
56
|
+
"nodemjs": "^0.1.17"
|
|
57
57
|
},
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
"
|
|
60
|
+
"engines": { "npm": ">=7.0.0", "node": ">=24.0.0" }
|
|
61
61
|
}
|
package/rdf.mjs
CHANGED
|
@@ -134,7 +134,8 @@ const defaultImpl = {
|
|
|
134
134
|
return data;
|
|
135
135
|
} catch (err) {
|
|
136
136
|
err.dataFilePath = path;
|
|
137
|
-
|
|
137
|
+
const trace = 'While reading file ' + JSON.stringify(path) + ': ';
|
|
138
|
+
err.message = trace + err.message;
|
|
138
139
|
throw err;
|
|
139
140
|
}
|
|
140
141
|
},
|
package/test/usage.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import absdir from 'absdir';
|
|
|
6
6
|
|
|
7
7
|
// ¦mjsUsageDemo¦+
|
|
8
8
|
import readDataFile from '../rdf.mjs';
|
|
9
|
-
import nativeCats from './cats.json';
|
|
9
|
+
import nativeCats from './cats.json' with { type: 'json' };
|
|
10
10
|
// ¦mjsUsageDemo¦- importPkgName
|
|
11
11
|
|
|
12
12
|
const addTestDirPath = absdir(import.meta, '.');
|
package/rdf.js
DELETED