@cspell/cspell-json-reporter 6.19.2 → 6.20.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/dist/index.js +4 -5
- package/package.json +3 -7
package/dist/index.js
CHANGED
|
@@ -22,17 +22,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
exports.getReporter = void 0;
|
|
30
27
|
const cspell_types_1 = require("@cspell/cspell-types");
|
|
31
28
|
const fs_1 = require("fs");
|
|
32
|
-
const mkdirp_1 = __importDefault(require("mkdirp"));
|
|
33
29
|
const path = __importStar(require("path"));
|
|
34
30
|
const setToJSONReplacer_1 = require("./utils/setToJSONReplacer");
|
|
35
31
|
const validateSettings_1 = require("./utils/validateSettings");
|
|
32
|
+
function mkdirp(p) {
|
|
33
|
+
return fs_1.promises.mkdir(p, { recursive: true });
|
|
34
|
+
}
|
|
36
35
|
const noopReporter = () => undefined;
|
|
37
36
|
function getReporter(settings) {
|
|
38
37
|
(0, validateSettings_1.validateSettings)(settings);
|
|
@@ -75,7 +74,7 @@ function getReporter(settings) {
|
|
|
75
74
|
...reportData,
|
|
76
75
|
result,
|
|
77
76
|
};
|
|
78
|
-
await (
|
|
77
|
+
await mkdirp(path.dirname(outFilePath));
|
|
79
78
|
return fs_1.promises.writeFile(outFilePath, JSON.stringify(output, setToJSONReplacer_1.setToJSONReplacer, 4));
|
|
80
79
|
},
|
|
81
80
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cspell/cspell-json-reporter",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.20.0",
|
|
4
4
|
"description": "JSON reporter for CSpell",
|
|
5
5
|
"author": "Jason Dent",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,14 +38,10 @@
|
|
|
38
38
|
"update-snapshot": "jest --updateSnapshot"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@cspell/cspell-types": "6.
|
|
42
|
-
"mkdirp": "^1.0.4"
|
|
43
|
-
},
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"@types/mkdirp": "^1.0.2"
|
|
41
|
+
"@cspell/cspell-types": "6.20.0"
|
|
46
42
|
},
|
|
47
43
|
"engines": {
|
|
48
44
|
"node": ">=14"
|
|
49
45
|
},
|
|
50
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "9de0bdd5b8da54daa72ccd6c328274bd796ada33"
|
|
51
47
|
}
|