cspell 8.1.2 → 8.1.3
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/esm/cli-reporter.js +7 -7
- package/dist/esm/cli-reporter.mjs +7 -7
- package/package.json +10 -10
package/dist/esm/cli-reporter.js
CHANGED
|
@@ -36,7 +36,7 @@ function errorEmitter(message, error) {
|
|
|
36
36
|
function nullEmitter() {
|
|
37
37
|
/* empty */
|
|
38
38
|
}
|
|
39
|
-
function relativeFilename(filename, cwd
|
|
39
|
+
function relativeFilename(filename, cwd) {
|
|
40
40
|
const rel = path.relative(cwd, filename);
|
|
41
41
|
if (rel.startsWith('..'))
|
|
42
42
|
return filename;
|
|
@@ -49,19 +49,19 @@ function relativeUriFilename(uri, fsPathRoot) {
|
|
|
49
49
|
return fsPath;
|
|
50
50
|
return '.' + path.sep + rel;
|
|
51
51
|
}
|
|
52
|
-
function reportProgress(p) {
|
|
52
|
+
function reportProgress(p, cwd) {
|
|
53
53
|
if (p.type === 'ProgressFileComplete') {
|
|
54
54
|
return reportProgressFileComplete(p);
|
|
55
55
|
}
|
|
56
56
|
if (p.type === 'ProgressFileBegin') {
|
|
57
|
-
return reportProgressFileBegin(p);
|
|
57
|
+
return reportProgressFileBegin(p, cwd);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function reportProgressFileBegin(p) {
|
|
60
|
+
function reportProgressFileBegin(p, cwd) {
|
|
61
61
|
const fc = '' + p.fileCount;
|
|
62
62
|
const fn = (' '.repeat(fc.length) + p.fileNum).slice(-fc.length);
|
|
63
63
|
const idx = fn + '/' + fc;
|
|
64
|
-
const filename = chalk.gray(relativeFilename(p.filename));
|
|
64
|
+
const filename = chalk.gray(relativeFilename(p.filename, cwd));
|
|
65
65
|
process.stderr.write(`\r${idx} ${filename}`);
|
|
66
66
|
}
|
|
67
67
|
function reportProgressFileComplete(p) {
|
|
@@ -102,7 +102,7 @@ export function getReporter(options, config) {
|
|
|
102
102
|
function infoEmitter(message, msgType) {
|
|
103
103
|
emitters[msgType]?.(message);
|
|
104
104
|
}
|
|
105
|
-
const root = URI.file(options.root || process.cwd());
|
|
105
|
+
const root = URI.file(path.resolve(options.root || process.cwd()));
|
|
106
106
|
const fsPathRoot = root.fsPath;
|
|
107
107
|
function relativeIssue(fn) {
|
|
108
108
|
const fnFilename = options.relative
|
|
@@ -129,7 +129,7 @@ export function getReporter(options, config) {
|
|
|
129
129
|
error: silent ? nullEmitter : errorEmitter,
|
|
130
130
|
info: infoEmitter,
|
|
131
131
|
debug: emitters.Debug,
|
|
132
|
-
progress: !silent && progress ? reportProgress : nullEmitter,
|
|
132
|
+
progress: !silent && progress ? (p) => reportProgress(p, fsPathRoot) : nullEmitter,
|
|
133
133
|
result: !silent && summary ? resultEmitter : nullEmitter,
|
|
134
134
|
};
|
|
135
135
|
}
|
|
@@ -36,7 +36,7 @@ function errorEmitter(message, error) {
|
|
|
36
36
|
function nullEmitter() {
|
|
37
37
|
/* empty */
|
|
38
38
|
}
|
|
39
|
-
function relativeFilename(filename, cwd
|
|
39
|
+
function relativeFilename(filename, cwd) {
|
|
40
40
|
const rel = path.relative(cwd, filename);
|
|
41
41
|
if (rel.startsWith('..'))
|
|
42
42
|
return filename;
|
|
@@ -49,19 +49,19 @@ function relativeUriFilename(uri, fsPathRoot) {
|
|
|
49
49
|
return fsPath;
|
|
50
50
|
return '.' + path.sep + rel;
|
|
51
51
|
}
|
|
52
|
-
function reportProgress(p) {
|
|
52
|
+
function reportProgress(p, cwd) {
|
|
53
53
|
if (p.type === 'ProgressFileComplete') {
|
|
54
54
|
return reportProgressFileComplete(p);
|
|
55
55
|
}
|
|
56
56
|
if (p.type === 'ProgressFileBegin') {
|
|
57
|
-
return reportProgressFileBegin(p);
|
|
57
|
+
return reportProgressFileBegin(p, cwd);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function reportProgressFileBegin(p) {
|
|
60
|
+
function reportProgressFileBegin(p, cwd) {
|
|
61
61
|
const fc = '' + p.fileCount;
|
|
62
62
|
const fn = (' '.repeat(fc.length) + p.fileNum).slice(-fc.length);
|
|
63
63
|
const idx = fn + '/' + fc;
|
|
64
|
-
const filename = chalk.gray(relativeFilename(p.filename));
|
|
64
|
+
const filename = chalk.gray(relativeFilename(p.filename, cwd));
|
|
65
65
|
process.stderr.write(`\r${idx} ${filename}`);
|
|
66
66
|
}
|
|
67
67
|
function reportProgressFileComplete(p) {
|
|
@@ -102,7 +102,7 @@ export function getReporter(options, config) {
|
|
|
102
102
|
function infoEmitter(message, msgType) {
|
|
103
103
|
emitters[msgType]?.(message);
|
|
104
104
|
}
|
|
105
|
-
const root = URI.file(options.root || process.cwd());
|
|
105
|
+
const root = URI.file(path.resolve(options.root || process.cwd()));
|
|
106
106
|
const fsPathRoot = root.fsPath;
|
|
107
107
|
function relativeIssue(fn) {
|
|
108
108
|
const fnFilename = options.relative
|
|
@@ -129,7 +129,7 @@ export function getReporter(options, config) {
|
|
|
129
129
|
error: silent ? nullEmitter : errorEmitter,
|
|
130
130
|
info: infoEmitter,
|
|
131
131
|
debug: emitters.Debug,
|
|
132
|
-
progress: !silent && progress ? reportProgress : nullEmitter,
|
|
132
|
+
progress: !silent && progress ? (p) => reportProgress(p, fsPathRoot) : nullEmitter,
|
|
133
133
|
result: !silent && summary ? resultEmitter : nullEmitter,
|
|
134
134
|
};
|
|
135
135
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cspell",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.3",
|
|
4
4
|
"description": "A Spelling Checker for Code!",
|
|
5
5
|
"funding": "https://github.com/streetsidesoftware/cspell?sponsor=1",
|
|
6
6
|
"bin": {
|
|
@@ -81,17 +81,17 @@
|
|
|
81
81
|
},
|
|
82
82
|
"homepage": "https://streetsidesoftware.github.io/cspell/",
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@cspell/cspell-json-reporter": "8.1.
|
|
85
|
-
"@cspell/cspell-pipe": "8.1.
|
|
86
|
-
"@cspell/cspell-types": "8.1.
|
|
87
|
-
"@cspell/dynamic-import": "8.1.
|
|
84
|
+
"@cspell/cspell-json-reporter": "8.1.3",
|
|
85
|
+
"@cspell/cspell-pipe": "8.1.3",
|
|
86
|
+
"@cspell/cspell-types": "8.1.3",
|
|
87
|
+
"@cspell/dynamic-import": "8.1.3",
|
|
88
88
|
"chalk": "^5.3.0",
|
|
89
89
|
"chalk-template": "^1.1.0",
|
|
90
90
|
"commander": "^11.1.0",
|
|
91
|
-
"cspell-gitignore": "8.1.
|
|
92
|
-
"cspell-glob": "8.1.
|
|
93
|
-
"cspell-io": "8.1.
|
|
94
|
-
"cspell-lib": "8.1.
|
|
91
|
+
"cspell-gitignore": "8.1.3",
|
|
92
|
+
"cspell-glob": "8.1.3",
|
|
93
|
+
"cspell-io": "8.1.3",
|
|
94
|
+
"cspell-lib": "8.1.3",
|
|
95
95
|
"fast-glob": "^3.3.2",
|
|
96
96
|
"fast-json-stable-stringify": "^2.1.0",
|
|
97
97
|
"file-entry-cache": "^7.0.2",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"micromatch": "^4.0.5",
|
|
112
112
|
"minimatch": "^9.0.3"
|
|
113
113
|
},
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "ea4335117b7c0e7b9ec22738315c82fae24ea997"
|
|
115
115
|
}
|