@@ -440,14 +440,10 @@ export function validatePackageJson(
440440 if ( Object . keys ( pkg . bin ?? { } ) . length > 0 ) {
441441 if ( opts . includesCommonJS === true ) {
442442 expect ( 'main' , presetFields . main ) ;
443- expect ( 'module' , presetFields . module ) ;
444443 expect ( 'typings' , presetFields . typings ) ;
445- expect ( 'typescript.definition' , presetFields . typescript . definition ) ;
446444 } else {
447445 expect ( 'main' , presetFieldsESM . main ) ;
448- expect ( 'module' , presetFieldsESM . module ) ;
449446 expect ( 'typings' , presetFieldsESM . typings ) ;
450- expect ( 'typescript.definition' , presetFieldsESM . typescript . definition ) ;
451447 }
452448 } else if (
453449 pkg . main !== undefined ||
@@ -459,19 +455,15 @@ export function validatePackageJson(
459455 if ( opts . includesCommonJS === true ) {
460456 // if there is no bin property, we NEED to check the exports.
461457 expect ( 'main' , presetFields . main ) ;
462- expect ( 'module' , presetFields . module ) ;
463458 expect ( 'typings' , presetFields . typings ) ;
464- expect ( 'typescript.definition' , presetFields . typescript . definition ) ;
465459
466460 // For now we enforce a top level exports property
467461 expect ( "exports['.'].require" , presetFields . exports [ '.' ] . require ) ;
468462 expect ( "exports['.'].import" , presetFields . exports [ '.' ] . import ) ;
469463 expect ( "exports['.'].default" , presetFields . exports [ '.' ] . default ) ;
470464 } else {
471465 expect ( 'main' , presetFieldsESM . main ) ;
472- expect ( 'module' , presetFieldsESM . module ) ;
473466 expect ( 'typings' , presetFieldsESM . typings ) ;
474- expect ( 'typescript.definition' , presetFieldsESM . typescript . definition ) ;
475467
476468 // For now, we enforce a top level exports property
477469 expect ( "exports['.']" , presetFieldsESM . exports [ '.' ] ) ;
0 commit comments