Skip to content

Commit d075bd9

Browse files
Dillon Nysdnys1
authored andcommitted
fix(aft): Publish updates for Dart 3
1 parent 090ed5c commit d075bd9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

packages/aft/lib/src/commands/publish_command.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ class PublishCommand extends AmplifyCommand with GlobOptions {
127127
static final _validationPreReleaseRegex = RegExp(
128128
r'\* Packages dependent on a pre-release of another package should themselves be published as a pre-release version\.',
129129
);
130+
static final _validationPreReleaseSdkRegex = RegExp(
131+
r'\* Packages with an SDK constraint on a pre-release of the Dart SDK should themselves be published as a pre-release version\.',
132+
);
133+
static final _validationNonDevOverridesRegex = RegExp(
134+
r'\* Non-dev dependencies are overridden in pubspec_overrides\.yaml\.',
135+
);
130136
static final _validationErrorRegex = RegExp(r'^\s*\*');
131137

132138
/// Publishes the package using `pub`.
@@ -161,7 +167,9 @@ class PublishCommand extends AmplifyCommand with GlobOptions {
161167
.where(_validationErrorRegex.hasMatch)
162168
.where((line) => !_validationConstraintRegex.hasMatch(line))
163169
.where((line) => !_validationPreReleaseRegex.hasMatch(line))
164-
.where((line) => !_validationCheckedInFilesRegex.hasMatch(line));
170+
.where((line) => !_validationCheckedInFilesRegex.hasMatch(line))
171+
.where((line) => !_validationNonDevOverridesRegex.hasMatch(line))
172+
.where((line) => !_validationPreReleaseSdkRegex.hasMatch(line));
165173
if (failures.isNotEmpty) {
166174
logger
167175
..error(
@@ -268,7 +276,6 @@ Future<void> runBuildRunner(
268276
'run',
269277
'build_runner',
270278
'build',
271-
if (verbose) '--verbose',
272279
'--delete-conflicting-outputs',
273280
],
274281
workingDirectory: package.path,

0 commit comments

Comments
 (0)