From 2846f4f6a7505b963a3000fb6d635a61ac604e2e Mon Sep 17 00:00:00 2001 From: Sebastian Good <2230835+scagood@users.noreply.github.com> Date: Fri, 10 Nov 2023 10:06:53 +0000 Subject: [PATCH] fix: Change to using is-builtin-module (#138) --- .github/workflows/CI.yml | 3 +++ lib/util/import-target.js | 2 +- package.json | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ff639864..5c87676e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -35,6 +35,9 @@ jobs: node: [18.x, 20.x] include: # run on node lts(ubuntu-latest) + - os: ubuntu-latest + node: "16.0.x" + eslint: "8.x" - os: ubuntu-latest node: "16.x" eslint: "8.x" diff --git a/lib/util/import-target.js b/lib/util/import-target.js index b987b3ca..268a99f2 100644 --- a/lib/util/import-target.js +++ b/lib/util/import-target.js @@ -6,7 +6,7 @@ const path = require("path") const { pathToFileURL, fileURLToPath } = require("url") -const { isBuiltin } = require("module") +const isBuiltin = require("is-builtin-module") const resolve = require("resolve") const { defaultResolve: importResolve, diff --git a/package.json b/package.json index b8cb916f..39e13d5e 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "eslint-plugin-es-x": "^7.1.0", "get-tsconfig": "^4.7.0", "ignore": "^5.2.4", + "is-builtin-module": "^3.2.1", "is-core-module": "^2.12.1", "minimatch": "^3.1.2", "resolve": "^1.22.2",