From e047660a3e001dd3e88860da8dbabc7774ef12b0 Mon Sep 17 00:00:00 2001
From: "rnystrom@google.com" <rnystrom@google.com>
Date: Fri, 3 Apr 2015 20:02:56 +0000
Subject: [PATCH] Allow packages up to 100MB.

BUG=https://code.google.com/p/dart/issues/detail?id=22935
R=nweiz@google.com

Review URL: https://codereview.chromium.org//1060713002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@44885 260f80e4-7a28-3924-810f-c04153c831b5
---
 lib/src/validator/size.dart   | 6 +++---
 test/validator/size_test.dart | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/src/validator/size.dart b/lib/src/validator/size.dart
index 0b8d05f2..b3da3883 100644
--- a/lib/src/validator/size.dart
+++ b/lib/src/validator/size.dart
@@ -10,8 +10,8 @@ import 'dart:math' as math;
 import '../entrypoint.dart';
 import '../validator.dart';
 
-/// The maximum size of the package to upload (10 MB).
-const _MAX_SIZE = 10 * 1024 * 1024;
+/// The maximum size of the package to upload (100 MB).
+const _MAX_SIZE = 100 * 1024 * 1024;
 
 /// A validator that validates that a package isn't too big.
 class SizeValidator extends Validator {
@@ -25,7 +25,7 @@ class SizeValidator extends Validator {
       if (size <= _MAX_SIZE) return;
       var sizeInMb = (size / math.pow(2, 20)).toStringAsPrecision(4);
       errors.add("Your package is $sizeInMb MB. Hosted packages must be "
-          "smaller than 10 MB.");
+          "smaller than 100 MB.");
     });
   }
 }
diff --git a/test/validator/size_test.dart b/test/validator/size_test.dart
index 9949280e..37b9eab1 100644
--- a/test/validator/size_test.dart
+++ b/test/validator/size_test.dart
@@ -22,12 +22,12 @@ main() {
 
   setUp(d.validPackage.create);
 
-  integration('should consider a package valid if it is <= 10 MB', () {
+  integration('considers a package valid if it is <= 100 MB', () {
     expectNoValidationError(size(100));
-    expectNoValidationError(size(10 * math.pow(2, 20)));
+    expectNoValidationError(size(100 * math.pow(2, 20)));
   });
 
-  integration('should consider a package invalid if it is more than 10 MB', () {
-    expectValidationError(size(10 * math.pow(2, 20) + 1));
+  integration('considers a package invalid if it is more than 100 MB', () {
+    expectValidationError(size(100 * math.pow(2, 20) + 1));
   });
 }
-- 
GitLab