@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.
- package/dist/{VMWNQL2J.js → 7FPDHUPW.js} +18 -2
- package/dist/{7ALTNLQM.js → DSHNVGWV.js} +1 -1
- package/dist/SYNDYAJC.js +2401 -0
- package/dist/index.js +7 -0
- package/dist/tsbuild.js +43 -2381
- package/package.json +1 -1
- /package/dist/{tsbuild.d.ts → index.d.ts} +0 -0
|
@@ -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
|
-
|
|
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
|
-
|
|
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).
|