Skip to content

Commit 719de7e

Browse files
committed
Remove MyApp and make update-data-npm Node 23 aware
1 parent d843a59 commit 719de7e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

data/npm/legacy-names.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,6 @@
15871587
"My1ink",
15881588
"MyAngularGruntt",
15891589
"MyAnimalModule",
1590-
"MyApp",
15911590
"myappSriniAppala",
15921591
"myappUSBankExample",
15931592
"myAries",

scripts/update-data-npm.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const npmDataPath = path.join(dataPath, 'npm')
2424
const npmBuiltinNamesJsonPath = path.join(npmDataPath, 'builtin-names.json')
2525
const 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

8383
void (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

Comments
 (0)