@d1g1tal/tsbuild 1.2.0 → 1.2.2

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.
@@ -154,19 +154,35 @@ var Paths = class {
154
154
  }
155
155
  /**
156
156
  * Checks if the given path is a directory.
157
+ * Returns false if the path does not exist.
157
158
  * @param path - The path to check
158
159
  * @returns True if the path is a directory, false otherwise
159
160
  */
160
161
  static async isDirectory(path) {
161
- return (await lstat(path)).isDirectory();
162
+ try {
163
+ return (await lstat(path)).isDirectory();
164
+ } catch (error) {
165
+ if (error.code === "ENOENT") {
166
+ return false;
167
+ }
168
+ throw error;
169
+ }
162
170
  }
163
171
  /**
164
172
  * Checks if the given path is a file.
173
+ * Returns false if the path does not exist.
165
174
  * @param path - The path to check
166
175
  * @returns True if the path is a file, false otherwise
167
176
  */
168
177
  static async isFile(path) {
169
- return (await lstat(path)).isFile();
178
+ try {
179
+ return (await lstat(path)).isFile();
180
+ } catch (error) {
181
+ if (error.code === "ENOENT") {
182
+ return false;
183
+ }
184
+ throw error;
185
+ }
170
186
  }
171
187
  /**
172
188
  * Checks if a module specifier represents a local path (not a bare specifier).
@@ -3,7 +3,7 @@ import {
3
3
  Json,
4
4
  Paths,
5
5
  typeScriptExtensionExpression
6
- } from "./VMWNQL2J.js";
6
+ } from "./7FPDHUPW.js";
7
7
 
8
8
  // src/plugins/decorator-metadata.ts
9
9
  import { dirname } from "node:path";