@@ -24,7 +24,7 @@ const npmDataPath = path.join(dataPath, 'npm')
2424const npmBuiltinNamesJsonPath = path . join ( npmDataPath , 'builtin-names.json' )
2525const npmLegacyNamesJsonPath = path . join ( npmDataPath , 'legacy-names.json' )
2626
27- const { compare : alphanumericComparator } = new Intl . Collator ( undefined , {
27+ const { compare : naturalCompare } = new Intl . Collator ( undefined , {
2828 numeric : true ,
2929 sensitivity : 'base'
3030} )
@@ -82,7 +82,11 @@ async function pFilterChunk(chunks, callbackFn, options) {
8282
8383void ( async ( ) => {
8484 const spinner = yoctoSpinner ( ) . start ( )
85- const builtinNames = Module . builtinModules . toSorted ( alphanumericComparator )
85+ const builtinNames = Module . builtinModules
86+ // Node 23 introduces 'node:sea', 'node:sqlite', 'node:test', and
87+ // 'node:test/reporters' that have no unprefixed version so we skip them.
88+ . filter ( n => ! n . startsWith ( 'node:' ) )
89+ . toSorted ( naturalCompare )
8690 const allThePackageNames = [
8791 ...new Set ( [
8892 // Load the 43.1MB names.json file of '[email protected] ' @@ -97,7 +101,7 @@ void (async () => {
97101 ]
98102 const rawLegacyNames = allThePackageNames
99103 . filter ( n => ! validateNpmPackageName ( n ) . validForNewPackages )
100- . sort ( alphanumericComparator )
104+ . sort ( naturalCompare )
101105 const seenNames = new Set ( )
102106 const invalidNames = new Set ( )
103107 const legacyNames =
0 commit comments