Skip to content

Commit 79c24fe

Browse files
authored
fix: drop is-builtin-module (#6595)
1 parent 1f09800 commit 79c24fe

File tree

4 files changed

+2
-35
lines changed

4 files changed

+2
-35
lines changed

package-lock.json

Lines changed: 0 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/zip-it-and-ship-it/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"fast-glob": "^3.3.3",
5656
"filter-obj": "^6.0.0",
5757
"find-up": "^7.0.0",
58-
"is-builtin-module": "^3.1.0",
5958
"is-path-inside": "^4.0.0",
6059
"junk": "^4.0.0",
6160
"locate-path": "^7.0.0",

packages/zip-it-and-ship-it/src/deps.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ declare module 'require-package-name' {
22
export default function requirePackageName(requireStatement: string): string
33
}
44

5-
declare module 'is-builtin-module' {
6-
export default function isBuiltInModule(moduleName: string): boolean
7-
}
8-
95
declare module 'precinct' {
106
export function paperwork(path: string, { includeCore: boolean }): Promise<string[]>
117
}

packages/zip-it-and-ship-it/src/runtimes/node/bundlers/zisi/list_imports.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as esbuild from 'esbuild'
2-
import isBuiltinModule from 'is-builtin-module'
2+
import { isBuiltin } from 'node:module'
33
import precinct from 'precinct'
44
import { tmpName } from 'tmp-promise'
55

@@ -19,7 +19,7 @@ const getListImportsPlugin = ({ imports, path }: { imports: Set<string>; path: s
1919
setup(build) {
2020
build.onResolve({ filter: /.*/ }, (args) => {
2121
const isEntryPoint = args.path === path
22-
const isImport = !isEntryPoint && !isBuiltinModule(args.path)
22+
const isImport = !isEntryPoint && !isBuiltin(args.path)
2323

2424
if (isImport) {
2525
imports.add(args.path)

0 commit comments

Comments
 (0)