read-data-file 2.0.6 → 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.
Files changed (3) hide show
  1. package/README.md +7 -0
  2. package/package.json +3 -3
  3. package/rdf.mjs +3 -2
package/README.md CHANGED
@@ -77,6 +77,13 @@ see [test/usage.js](test/usage.js)
77
77
  <!--#toc stop="scan" -->
78
78
 
79
79
 
80
+ Compatibility
81
+ -------------
82
+
83
+ * If you need ancient versions of Node.js (older than 14.x),
84
+ stay with `read-data-file` v2.x.
85
+
86
+
80
87
 
81
88
  Known issues
82
89
  ------------
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  { "name": "read-data-file",
2
- "version": "2.0.6",
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",
@@ -32,15 +32,15 @@
32
32
  "esmod-pmb": "^0.1.13",
33
33
  "getown": "^1.0.0",
34
34
  "if-fun": "^1.0.1",
35
- "ini": "^3.0.1",
35
+ "ini": "^2.0.0",
36
36
  "is-string": "^1.0.7",
37
37
  "json-parse-pmb": "^1.0.0",
38
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",
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 promisedFs.readFile(path,
97
+ const text = stripBom(await pify(nodeFs.readFile)(path,
97
98
  { encoding: 'UTF-8' }));
98
99
  return text;
99
100
  },