diff --git a/app/lib/package/backend.dart b/app/lib/package/backend.dart index 0322336949..3f8f4a2007 100644 --- a/app/lib/package/backend.dart +++ b/app/lib/package/backend.dart @@ -1139,9 +1139,11 @@ class PackageBackend { package = Package.fromVersion(newVersion); } - if (package!.versionCount >= maxVersionsPerPackage) { + final maxVersionCount = maxVersionsPerPackageOverrides[package!.name] ?? + maxVersionsPerPackage; + if (package!.versionCount >= maxVersionCount) { throw PackageRejectedException.maxVersionCountReached( - newVersion.package, maxVersionsPerPackage); + newVersion.package, maxVersionCount); } if (package!.deletedVersions != null && diff --git a/app/lib/package/overrides.dart b/app/lib/package/overrides.dart index e850130711..41d87ad613 100644 --- a/app/lib/package/overrides.dart +++ b/app/lib/package/overrides.dart @@ -103,3 +103,8 @@ bool isDartDevPublisher(String? publisherId) { if (publisherId.endsWith('.google.com')) return true; return false; } + +/// Overriding the default maximum number of the allowed package version counts. +const maxVersionsPerPackageOverrides = { + 'masamune': 1500, // last updated: 2024-09-16 +};