@datalackey/update-markdown-toc 1.0.2 → 1.0.4
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.
|
@@ -128,8 +128,6 @@ function generateTOC(content) {
|
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
|
|
133
131
|
/* ============================================================
|
|
134
132
|
* File processing
|
|
135
133
|
* ============================================================ */
|
|
@@ -141,7 +139,8 @@ function processFile(filePath) {
|
|
|
141
139
|
try {
|
|
142
140
|
content = fs.readFileSync(filePath, "utf8");
|
|
143
141
|
} catch {
|
|
144
|
-
|
|
142
|
+
const absolutePath = path.resolve(filePath);
|
|
143
|
+
throw new Error(`Unable to read markdown file: ${absolutePath}`);
|
|
145
144
|
}
|
|
146
145
|
|
|
147
146
|
let updated;
|
|
@@ -153,9 +152,10 @@ function processFile(filePath) {
|
|
|
153
152
|
debugLog("result: skipped (no markers)");
|
|
154
153
|
return { status: "skipped" };
|
|
155
154
|
}
|
|
156
|
-
throw err;
|
|
157
155
|
}
|
|
158
|
-
|
|
156
|
+
|
|
157
|
+
const absolutePath = path.resolve(filePath);
|
|
158
|
+
throw new Error(`${absolutePath}: ${err.message}`);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
if (updated === content) {
|
package/package.json
CHANGED