miniread 1.119.0 → 1.119.1

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.
@@ -60,8 +60,14 @@ export const computeDirectoryDiff = async (options) => {
60
60
  }
61
61
  if (!outputStream)
62
62
  continue;
63
- if (outputStreamError)
63
+ if (outputStreamError) {
64
+ if (outputPath &&
65
+ isErrnoException(outputStreamError) &&
66
+ outputStreamError.code === "EEXIST") {
67
+ throw new Error(`Refusing to overwrite existing diff output file: ${outputPath}. Re-run with --overwrite to replace.`);
68
+ }
64
69
  throw outputStreamError;
70
+ }
65
71
  if (outputStream.write(outputLine))
66
72
  continue;
67
73
  await once(outputStream, "drain");
@@ -71,9 +77,9 @@ export const computeDirectoryDiff = async (options) => {
71
77
  rl.close();
72
78
  }
73
79
  if (outputStreamError) {
74
- if (outputPath && isErrnoException(outputStreamError)) {
75
- if (outputStreamError.code !== "EEXIST")
76
- throw outputStreamError;
80
+ if (outputPath &&
81
+ isErrnoException(outputStreamError) &&
82
+ outputStreamError.code === "EEXIST") {
77
83
  throw new Error(`Refusing to overwrite existing diff output file: ${outputPath}. Re-run with --overwrite to replace.`);
78
84
  }
79
85
  throw outputStreamError;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "miniread",
3
3
  "author": "Łukasz Jerciński",
4
4
  "license": "MIT",
5
- "version": "1.119.0",
5
+ "version": "1.119.1",
6
6
  "description": "Transform minified JavaScript/TypeScript into a more readable form using deterministic AST-based transforms.",
7
7
  "repository": {
8
8
  "type": "git",