@@ -46,17 +46,8 @@ use std::{
4646 sync:: Arc ,
4747} ;
4848
49- use crate :: {
50- builtins:: BUILTINS ,
51- cache:: { Cache , CachedPath } ,
52- context:: ResolveContext as Ctx ,
53- file_system:: FileSystemOs ,
54- package_json:: { ExportsField , ExportsKey , MatchObject } ,
55- path:: { PathUtil , SLASH_START } ,
56- specifier:: Specifier ,
57- tsconfig:: { ProjectReference , TsConfig } ,
58- } ;
5949pub use crate :: {
50+ builtins:: NODEJS_BUILTINS ,
6051 error:: { JSONError , ResolveError , SpecifierError } ,
6152 file_system:: { FileMetadata , FileSystem } ,
6253 options:: {
@@ -66,6 +57,15 @@ pub use crate::{
6657 package_json:: PackageJson ,
6758 resolution:: Resolution ,
6859} ;
60+ use crate :: {
61+ cache:: { Cache , CachedPath } ,
62+ context:: ResolveContext as Ctx ,
63+ file_system:: FileSystemOs ,
64+ package_json:: { ExportsField , ExportsKey , MatchObject } ,
65+ path:: { PathUtil , SLASH_START } ,
66+ specifier:: Specifier ,
67+ tsconfig:: { ProjectReference , TsConfig } ,
68+ } ;
6969
7070type ResolveResult = Result < Option < CachedPath > , ResolveError > ;
7171
@@ -275,7 +275,7 @@ impl<Fs: FileSystem + Default> ResolverGeneric<Fs> {
275275
276276 fn require_core ( & self , specifier : & str ) -> Result < ( ) , ResolveError > {
277277 if self . options . builtin_modules
278- && ( specifier. starts_with ( "node:" ) || BUILTINS . binary_search ( & specifier) . is_ok ( ) )
278+ && ( specifier. starts_with ( "node:" ) || NODEJS_BUILTINS . binary_search ( & specifier) . is_ok ( ) )
279279 {
280280 return Err ( ResolveError :: Builtin ( specifier. to_string ( ) ) ) ;
281281 }
0 commit comments