Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase asset limits to 256 kb. #7065

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/lib/package/backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import 'upload_signer_service.dart';

// The maximum stored length of `README.md` and other user-provided file content
// that is stored separately in the database.
final maxAssetContentLength = 128 * 1024;
final maxAssetContentLength = 256 * 1024;

/// The maximum number of versions a package is allowed to have.
final _defaultMaxVersionsPerPackage = 1000;
Expand Down
4 changes: 2 additions & 2 deletions pkg/pub_integration/lib/script/publishing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class PublishingScript {

await dart.publish(_dummyDir.path,
expectedErrorContains:
'`CHANGELOG.md` exceeds the maximum content length (131072 bytes).');
'`CHANGELOG.md` exceeds the maximum content length');
await _dummyDir.delete(recursive: true);

// upload package
Expand Down Expand Up @@ -159,7 +159,7 @@ class PublishingScript {
_dummyExampleDir = Directory(path.join(_dummyDir.path, 'example'));
await _dummyDir.create(recursive: true);
await createDummyPkg(_dummyDir.path, _newDummyVersion,
changelogContentSizeInKB: oversized ? 129 : 4);
changelogContentSizeInKB: oversized ? 257 : 4);
}

Future<void> _createFakeRetryPkg() async {
Expand Down
2 changes: 1 addition & 1 deletion pkg/pub_package_reader/lib/pub_package_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class PackageSummary {
Future<PackageSummary> summarizePackageArchive(
String archivePath, {
/// The maximum length of the extracted content text.
int maxContentLength = 128 * 1024,
int maxContentLength = 256 * 1024,

/// The maximum file size of the archive (gzipped or compressed) and
/// the maximum total size of the files inside the archive.
Expand Down