chore: update min supported node version to >=18 (#19)

Update required minimum node version to >=18 in preparation for updating other dependencies that require newer node versions.
This commit is contained in:
M. George Hansen 2024-07-15 00:01:14 -07:00
parent a13295b223
commit 999b9b54a2
Signed by: mgeorgehansen
SSH key fingerprint: SHA256:JlIGiQLPyQ2RHTH3a2oVlb20Xkh9Glr8DUF4YTXHJxM
9 changed files with 2712 additions and 1745 deletions

View file

@ -3,11 +3,17 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { isErrnoException } from "./error";
const resolveModulePath = (importPath: string): string | undefined => {
try {
return require.resolve(importPath);
} catch (error) {
if (error.code === "MODULE_NOT_FOUND") {
if (
error instanceof Error &&
isErrnoException(error) &&
error.code === "MODULE_NOT_FOUND"
) {
return;
}
throw error;