Skip to content

Commit f279ec7

Browse files
authored
Update variables for non-nullability in latest pkg:pubspec_parse (#500)
1 parent 0efbe70 commit f279ec7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

mono_repo/lib/src/ci_shared.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Map<String, List<CIJobEntry>> groupCIJobEntries(List<CIJobEntry> jobEntries) =>
7777

7878
void validateRootConfig(RootConfig rootConfig) {
7979
for (var config in rootConfig) {
80-
final sdkConstraint = config.pubspec.environment?['sdk'];
80+
final sdkConstraint = config.pubspec.environment['sdk'];
8181

8282
if (sdkConstraint == null) {
8383
continue;

mono_repo/lib/src/utilities.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void handlePubspecInSdkList(
4848
return;
4949
}
5050

51-
final sdkConstraint = pubspec.environment?['sdk'];
51+
final sdkConstraint = pubspec.environment['sdk'];
5252

5353
Version? lowerVersion;
5454
if (sdkConstraint is VersionRange && sdkConstraint.includeMin) {
@@ -142,7 +142,7 @@ extension PubspecExtension on Pubspec {
142142
? '[![pub package](https://img.shields.io/pub/v/$name.svg)](https://pub.dev/packages/$name)'
143143
: '';
144144

145-
bool get _dependsOnFlutterSdk => environment?.containsKey('flutter') ?? false;
145+
bool get _dependsOnFlutterSdk => environment.containsKey('flutter');
146146

147147
bool get _dependsOnFlutterPackage => _dependsOnPackage('flutter');
148148

mono_repo/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
meta: ^1.0.0
2323
path: ^1.4.1
2424
pub_semver: ^2.0.0
25-
pubspec_parse: ^1.0.0
25+
pubspec_parse: ^1.4.0
2626
yaml: ^3.0.0
2727

2828
dev_dependencies:

0 commit comments

Comments
 (0)