@@ -36,7 +36,7 @@ const {
3636  rekeySourceMap
3737}  =  require ( 'internal/source_map/source_map_cache' ) ; 
3838const  {  pathToFileURL,  fileURLToPath,  URL  }  =  require ( 'internal/url' ) ; 
39- const  {  deprecate }  =  require ( 'internal/util' ) ; 
39+ const  {  deprecate,  emitExperimentalWarning  }  =  require ( 'internal/util' ) ; 
4040const  vm  =  require ( 'vm' ) ; 
4141const  assert  =  require ( 'internal/assert' ) ; 
4242const  fs  =  require ( 'fs' ) ; 
@@ -576,17 +576,21 @@ function resolveExportsTarget(pkgPath, target, subpath, basePath, mappingKey) {
576576    if  ( experimentalConditionalExports  && 
577577        ObjectPrototype . hasOwnProperty ( target ,  'require' ) )  { 
578578      try  { 
579-         return  resolveExportsTarget ( pkgPath ,  target . require ,  subpath , 
580-                                     basePath ,  mappingKey ) ; 
579+         const  result  =  resolveExportsTarget ( pkgPath ,  target . require ,  subpath , 
580+                                             basePath ,  mappingKey ) ; 
581+         emitExperimentalWarning ( 'Conditional exports' ) ; 
582+         return  result ; 
581583      }  catch  ( e )  { 
582584        if  ( e . code  !==  'MODULE_NOT_FOUND' )  throw  e ; 
583585      } 
584586    } 
585587    if  ( experimentalConditionalExports  && 
586588        ObjectPrototype . hasOwnProperty ( target ,  'node' ) )  { 
587589      try  { 
588-         return  resolveExportsTarget ( pkgPath ,  target . node ,  subpath , 
589-                                     basePath ,  mappingKey ) ; 
590+         const  result  =  resolveExportsTarget ( pkgPath ,  target . node ,  subpath , 
591+                                             basePath ,  mappingKey ) ; 
592+         emitExperimentalWarning ( 'Conditional exports' ) ; 
593+         return  result ; 
590594      }  catch  ( e )  { 
591595        if  ( e . code  !==  'MODULE_NOT_FOUND' )  throw  e ; 
592596      } 
@@ -689,6 +693,7 @@ Module._findPath = function(request, paths, isMain) {
689693
690694  const  selfFilename  =  trySelf ( paths ,  exts ,  isMain ,  trailingSlash ,  request ) ; 
691695  if  ( selfFilename )  { 
696+     emitExperimentalWarning ( 'Package name self resolution' ) ; 
692697    Module . _pathCache [ cacheKey ]  =  selfFilename ; 
693698    return  selfFilename ; 
694699  } 
0 commit comments