Add (more) trailing commas (#3950)
diff --git a/lib/src/command/add.dart b/lib/src/command/add.dart
index 6286f74..6ee94b7 100644
--- a/lib/src/command/add.dart
+++ b/lib/src/command/add.dart
@@ -630,7 +630,7 @@
},
'environment': {
'sdk': sdk.version.toString(),
- }
+ },
},
cache.sources,
// Resolve relative paths relative to current, not where the pubspec.yaml is.
diff --git a/lib/src/command/dependency_services.dart b/lib/src/command/dependency_services.dart
index f1d8143..24cb04c 100644
--- a/lib/src/command/dependency_services.dart
+++ b/lib/src/command/dependency_services.dart
@@ -792,7 +792,7 @@
'previous': _source(
currentPackages[oldPackageName]!,
containingDir: entrypoint.root.dir,
- )
+ ),
},
];
}
diff --git a/lib/src/command/deps.dart b/lib/src/command/deps.dart
index a3e2be8..73f482c 100644
--- a/lib/src/command/deps.dart
+++ b/lib/src/command/deps.dart
@@ -118,7 +118,7 @@
'version': currentPackage.version.toString(),
'kind': kind,
'source': source,
- 'dependencies': next
+ 'dependencies': next,
});
toVisit.addAll(next);
}
@@ -126,13 +126,13 @@
for (final package in [
entrypoint.root,
...entrypoint.root.immediateDependencies.keys
- .map((name) => entrypoint.packageGraph.packages[name])
+ .map((name) => entrypoint.packageGraph.packages[name]),
])
...package!.executableNames.map(
(name) => package == entrypoint.root
? ':$name'
: (package.name == name ? name : '${package.name}:$name'),
- )
+ ),
];
buffer.writeln(
@@ -143,9 +143,9 @@
'sdks': [
for (var sdk in sdks.values)
if (sdk.version != null)
- {'name': sdk.name, 'version': sdk.version.toString()}
+ {'name': sdk.name, 'version': sdk.version.toString()},
],
- 'executables': executables
+ 'executables': executables,
},
),
);
@@ -372,7 +372,7 @@
? entrypoint.root.immediateDependencies
: entrypoint.root.dependencies)
.keys
- .map((name) => entrypoint.packageGraph.packages[name]!)
+ .map((name) => entrypoint.packageGraph.packages[name]!),
];
for (var package in packages) {
diff --git a/lib/src/command/outdated.dart b/lib/src/command/outdated.dart
index 050cedc..521bce0 100644
--- a/lib/src/command/outdated.dart
+++ b/lib/src/command/outdated.dart
@@ -277,7 +277,7 @@
for (final id in [
...currentPackages,
...upgradablePackages,
- ...resolvablePackages
+ ...resolvablePackages,
]) {
if (!visited.add(id.name)) continue;
rows.add(await analyzeDependency(id.toRef()));
@@ -448,8 +448,8 @@
'resolvable': markedRows[packageDetails]![2].toJson(),
'latest': markedRows[packageDetails]![3].toJson(),
},
- )
- ]
+ ),
+ ],
},
),
);
@@ -506,7 +506,7 @@
if (directRows.isEmpty)
_format('\ndirect dependencies: ${mode.allGood}', log.bold)
else
- _format('\ndirect dependencies:', log.bold)
+ _format('\ndirect dependencies:', log.bold),
],
...directRows,
],
@@ -515,7 +515,7 @@
if (devRows.isEmpty)
_format('\ndev_dependencies: ${mode.allGood}', log.bold)
else
- _format('\ndev_dependencies:', log.bold)
+ _format('\ndev_dependencies:', log.bold),
],
...devRows,
],
@@ -697,7 +697,7 @@
packageDetails.current,
packageDetails.upgradable,
packageDetails.resolvable,
- packageDetails.latest
+ packageDetails.latest,
]) {
String Function(String)? color;
String? prefix;
diff --git a/lib/src/command/upgrade.dart b/lib/src/command/upgrade.dart
index 8cf9821..0f15430 100644
--- a/lib/src/command/upgrade.dart
+++ b/lib/src/command/upgrade.dart
@@ -152,7 +152,7 @@
final directDeps = [
...entrypoint.root.pubspec.dependencies.keys,
- ...entrypoint.root.pubspec.devDependencies.keys
+ ...entrypoint.root.pubspec.devDependencies.keys,
];
final toUpgrade = argResults.rest.isEmpty ? directDeps : argResults.rest;
diff --git a/lib/src/command_runner.dart b/lib/src/command_runner.dart
index f9687fe..8c7f134 100644
--- a/lib/src/command_runner.dart
+++ b/lib/src/command_runner.dart
@@ -117,7 +117,7 @@
'normal': 'Show errors, warnings, and user messages.',
'io': 'Also show IO operations.',
'solver': 'Show steps during version resolution.',
- 'all': 'Show all output including internal tracing messages.'
+ 'all': 'Show all output including internal tracing messages.',
},
);
argParser.addFlag(
diff --git a/lib/src/crc32c.dart b/lib/src/crc32c.dart
index e346a59..ad1bd8a 100644
--- a/lib/src/crc32c.dart
+++ b/lib/src/crc32c.dart
@@ -99,5 +99,5 @@
0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81,
0x34f4f86a, 0xc69f7b69, 0xd5cf889d, 0x27a40b9e,
0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e,
- 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351
+ 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351,
];
diff --git a/lib/src/entrypoint.dart b/lib/src/entrypoint.dart
index cb1ecee..b38589d 100644
--- a/lib/src/entrypoint.dart
+++ b/lib/src/entrypoint.dart
@@ -511,7 +511,7 @@
executable,
additionalSources: additionalSources,
nativeAssets: nativeAssets,
- )
+ ),
]);
});
}
diff --git a/lib/src/flutter_releases.dart b/lib/src/flutter_releases.dart
index 38e8ca8..20752a4 100644
--- a/lib/src/flutter_releases.dart
+++ b/lib/src/flutter_releases.dart
@@ -32,7 +32,7 @@
final channel = {
'beta': Channel.beta,
'stable': Channel.stable,
- 'dev': Channel.dev
+ 'dev': Channel.dev,
}[release['channel']];
if (channel == null) throw FormatException('Release with bad channel');
final dartVersion = release['dart_sdk_version'];
diff --git a/lib/src/http.dart b/lib/src/http.dart
index 041e94e..bcf4316 100644
--- a/lib/src/http.dart
+++ b/lib/src/http.dart
@@ -308,7 +308,7 @@
HttpStatus.movedTemporarily,
HttpStatus.seeOther,
HttpStatus.temporaryRedirect,
- HttpStatus.permanentRedirect
+ HttpStatus.permanentRedirect,
];
/// Throws [PubHttpResponseException], calls [fail], or does nothing depending
diff --git a/lib/src/ignore.dart b/lib/src/ignore.dart
index 8b7aff1..61cb6f5 100644
--- a/lib/src/ignore.dart
+++ b/lib/src/ignore.dart
@@ -267,7 +267,7 @@
// Do a depth first tree-search starting at [beneath].
// toVisit is a stack containing all items that are waiting to be processed.
final toVisit = [
- [beneath]
+ [beneath],
];
while (toVisit.isNotEmpty) {
final topOfStack = toVisit.last;
diff --git a/lib/src/lock_file.dart b/lib/src/lock_file.dart
index b7fe219..af85886 100644
--- a/lib/src/lock_file.dart
+++ b/lib/src/lock_file.dart
@@ -57,7 +57,7 @@
}) : this._(
{
for (final id in ids)
- if (!id.isRoot) id.name: id
+ if (!id.isRoot) id.name: id,
},
sdkConstraints ?? {'dart': SdkConstraint(VersionConstraint.any)},
mainDependencies ?? const UnmodifiableSetView.empty(),
@@ -429,7 +429,7 @@
'source': id.source.name,
'description':
id.description.serializeForLockfile(containingDir: packageDir),
- 'dependency': _dependencyType(id.name)
+ 'dependency': _dependencyType(id.name),
};
}
@@ -438,7 +438,7 @@
sdkConstraints,
value: (_, constraint) => constraint.effectiveConstraint.toString(),
),
- 'packages': packageMap
+ 'packages': packageMap,
};
return '''
# Generated by pub
diff --git a/lib/src/log.dart b/lib/src/log.dart
index 9bc467f..35870e4 100644
--- a/lib/src/log.dart
+++ b/lib/src/log.dart
@@ -107,7 +107,7 @@
Level.message: null,
Level.io: null,
Level.solver: null,
- Level.fine: null
+ Level.fine: null,
});
/// Shows only errors.
@@ -117,7 +117,7 @@
Level.message: null,
Level.io: null,
Level.solver: null,
- Level.fine: null
+ Level.fine: null,
});
/// Shows only errors and warnings.
@@ -127,7 +127,7 @@
Level.message: null,
Level.io: null,
Level.solver: null,
- Level.fine: null
+ Level.fine: null,
});
/// The default verbosity which shows errors, warnings, and messages.
@@ -137,7 +137,7 @@
Level.message: _logToStdout,
Level.io: null,
Level.solver: null,
- Level.fine: null
+ Level.fine: null,
});
/// Shows errors, warnings, messages, and IO event logs.
@@ -147,7 +147,7 @@
Level.message: _logToStdoutWithLabel,
Level.io: _logToStderrWithLabel,
Level.solver: null,
- Level.fine: null
+ Level.fine: null,
});
/// Shows errors, warnings, messages, and version solver logs.
@@ -157,7 +157,7 @@
Level.message: _logToStdout,
Level.io: null,
Level.solver: _logToStdout,
- Level.fine: null
+ Level.fine: null,
});
/// Shows all logs.
@@ -167,7 +167,7 @@
Level.message: _logToStdoutWithLabel,
Level.io: _logToStderrWithLabel,
Level.solver: _logToStderrWithLabel,
- Level.fine: _logToStderrWithLabel
+ Level.fine: _logToStderrWithLabel,
});
/// Shows all logs.
@@ -177,7 +177,7 @@
Level.message: _logToStdoutWithLabel,
Level.io: _logToStderrWithLabel,
Level.solver: _logToStderrWithLabel,
- Level.fine: _logToStderrWithLabel
+ Level.fine: _logToStderrWithLabel,
});
const Verbosity._(this.name, this._loggers);
diff --git a/lib/src/package_graph.dart b/lib/src/package_graph.dart
index db2b02d..a375493 100644
--- a/lib/src/package_graph.dart
+++ b/lib/src/package_graph.dart
@@ -42,7 +42,7 @@
: Package(
result.pubspecs[id.name]!,
entrypoint.cache.getDirectory(id),
- )
+ ),
};
return PackageGraph(entrypoint, packages);
diff --git a/lib/src/pubspec.dart b/lib/src/pubspec.dart
index 18b0e99..1df9d51 100644
--- a/lib/src/pubspec.dart
+++ b/lib/src/pubspec.dart
@@ -171,7 +171,7 @@
defaultUpperBoundConstraint: _includeDefaultSdkConstraint
? _defaultUpperBoundSdkConstraint
: null,
- )
+ ),
};
if (yaml is YamlMap) {
diff --git a/lib/src/pubspec_utils.dart b/lib/src/pubspec_utils.dart
index f843337..5a19f11 100644
--- a/lib/src/pubspec_utils.dart
+++ b/lib/src/pubspec_utils.dart
@@ -176,7 +176,7 @@
containingDir: relativeEntrypoint.rootDir,
languageVersion: relativeEntrypoint.root.pubspec.languageVersion,
),
- if (!constraint.isAny) 'version': constraint.toString()
+ if (!constraint.isAny) 'version': constraint.toString(),
};
}
}
diff --git a/lib/src/solver/failure.dart b/lib/src/solver/failure.dart
index 6c6b3f4..f205015 100644
--- a/lib/src/solver/failure.dart
+++ b/lib/src/solver/failure.dart
@@ -48,7 +48,7 @@
@override
String toString() => [
_Writer(incompatibility).write(),
- if (suggestions != null) suggestions
+ if (suggestions != null) suggestions,
].join('\n');
}
diff --git a/lib/src/solver/package_lister.dart b/lib/src/solver/package_lister.dart
index 45ec5b8..174e9e9 100644
--- a/lib/src/solver/package_lister.dart
+++ b/lib/src/solver/package_lister.dart
@@ -210,7 +210,7 @@
Incompatibility(
[Term(id.toRange(), true)],
NoVersionsIncompatibilityCause(),
- )
+ ),
];
} on PackageNotFoundException {
// We can only get here if the lockfile refers to a specific package
@@ -220,7 +220,7 @@
Incompatibility(
[Term(id.toRange(), true)],
NoVersionsIncompatibilityCause(),
- )
+ ),
];
}
@@ -240,7 +240,7 @@
pubspec.sdkConstraints[sdk.identifier]?.effectiveConstraint,
sdk,
),
- )
+ ),
];
}
}
diff --git a/lib/src/solver/result.dart b/lib/src/solver/result.dart
index f7a5d41..3174aaf 100644
--- a/lib/src/solver/result.dart
+++ b/lib/src/solver/result.dart
@@ -156,7 +156,7 @@
final dependencyKind = const {
DependencyType.dev: 'dev',
DependencyType.direct: 'direct',
- DependencyType.none: 'transitive'
+ DependencyType.none: 'transitive',
}[_root.pubspec.dependencyType(package.name)]!;
analytics.sendEvent(
'pub-get',
diff --git a/lib/src/solver/solve_suggestions.dart b/lib/src/solver/solve_suggestions.dart
index ef95486..68a6d43 100644
--- a/lib/src/solver/solve_suggestions.dart
+++ b/lib/src/solver/solve_suggestions.dart
@@ -110,7 +110,7 @@
} else {
descriptor = json.encode({
'version': VersionConstraint.compatibleWith(id.version).toString(),
- id.source.name: d
+ id.source.name: d,
});
}
@@ -152,7 +152,7 @@
entrypoint.root.pubspec,
sdkOverrides: {
'dart': bestRelease.dartVersion,
- 'flutter': bestRelease.flutterVersion
+ 'flutter': bestRelease.flutterVersion,
},
);
if (result == null) {
diff --git a/lib/src/solver/version_solver.dart b/lib/src/solver/version_solver.dart
index 5194e59..e54814b 100644
--- a/lib/src/solver/version_solver.dart
+++ b/lib/src/solver/version_solver.dart
@@ -529,7 +529,7 @@
..._dependencyOverrides.keys,
// If the package is overridden, ignore its dependencies back onto the
// root package.
- if (_dependencyOverrides.containsKey(package.name)) _root.name
+ if (_dependencyOverrides.containsKey(package.name)) _root.name,
};
return PackageLister(
diff --git a/lib/src/source/git.dart b/lib/src/source/git.dart
index 32ef867..f7ff4f9 100644
--- a/lib/src/source/git.dart
+++ b/lib/src/source/git.dart
@@ -294,7 +294,7 @@
ref.name,
pubspec.version,
GitResolvedDescription(description, revision),
- )
+ ),
];
});
}
diff --git a/lib/src/source/path.dart b/lib/src/source/path.dart
index 8db723e..051ecc3 100644
--- a/lib/src/source/path.dart
+++ b/lib/src/source/path.dart
@@ -267,7 +267,7 @@
'path': PathSource.relativePathWithPosixSeparators(
p.relative(description.path, from: containingDir),
),
- 'relative': true
+ 'relative': true,
};
}
return {'path': description.path, 'relative': p.relative('false')};
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index 4f144e4..246d042 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -60,7 +60,7 @@
'var',
'void',
'while',
- 'with'
+ 'with',
];
/// An cryptographically secure instance of [math.Random].
@@ -376,7 +376,7 @@
if (index == -1) return [toSplit];
return [
toSplit.substring(0, index),
- toSplit.substring(index + pattern.length)
+ toSplit.substring(index + pattern.length),
];
}
diff --git a/lib/src/validator/compiled_dartdoc.dart b/lib/src/validator/compiled_dartdoc.dart
index ae25f83..bba6a75 100644
--- a/lib/src/validator/compiled_dartdoc.dart
+++ b/lib/src/validator/compiled_dartdoc.dart
@@ -25,7 +25,7 @@
path.join(dir, 'index.html'),
path.join(dir, 'styles.css'),
path.join(dir, 'dart-logo-small.png'),
- path.join(dir, 'client-live-nav.js')
+ path.join(dir, 'client-live-nav.js'),
];
if (files.every(fileExists)) {
diff --git a/lib/src/validator/directory.dart b/lib/src/validator/directory.dart
index a7ef221..c0d6a12 100644
--- a/lib/src/validator/directory.dart
+++ b/lib/src/validator/directory.dart
@@ -16,7 +16,7 @@
'docs',
'examples',
'tests',
- 'tools'
+ 'tools',
];
static String docRef = 'See https://dart.dev/tools/pub/package-layout.';
diff --git a/lib/src/validator/gitignore.dart b/lib/src/validator/gitignore.dart
index e30bb01..e120ce9 100644
--- a/lib/src/validator/gitignore.dart
+++ b/lib/src/validator/gitignore.dart
@@ -28,7 +28,7 @@
'ls-files',
'--cached',
'--exclude-standard',
- '--recurse-submodules'
+ '--recurse-submodules',
],
workingDir: entrypoint.rootDir,
);
diff --git a/lib/src/validator/leak_detection.dart b/lib/src/validator/leak_detection.dart
index 4c41905..69a9054 100644
--- a/lib/src/validator/leak_detection.dart
+++ b/lib/src/validator/leak_detection.dart
@@ -85,7 +85,7 @@
if (files.length > 10) '...',
'',
'Add git-ignore style patterns to `false_secrets` in `pubspec.yaml`',
- 'to ignore this. See $_falseSecretsDocumentationLink'
+ 'to ignore this. See $_falseSecretsDocumentationLink',
].join('\n'),
);
} else if (leaks.isNotEmpty) {
diff --git a/test/add/common/add_test.dart b/test/add/common/add_test.dart
index 6c8daa3..995fea8 100644
--- a/test/add/common/add_test.dart
+++ b/test/add/common/add_test.dart
@@ -45,7 +45,7 @@
]).validate();
await d.appDir(
dependencies: {
- 'fo_o1.a': {'path': '../foo'}
+ 'fo_o1.a': {'path': '../foo'},
},
).validate();
});
@@ -105,7 +105,7 @@
environment:
sdk: $defaultSdkConstraint
- ''')
+ '''),
]).create();
await pubAdd(args: ['foo:1.2.3']);
@@ -119,8 +119,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': '1.2.3'},
- 'dev_dependencies': null
- })
+ 'dev_dependencies': null,
+ }),
]).validate();
});
@@ -157,7 +157,7 @@
name: myapp
environment:
"sdk": "$defaultSdkConstraint"
-''')
+'''),
]).create();
await pubAdd(args: ['foo:1.2.3']);
@@ -186,7 +186,7 @@
d.file(
'pubspec.yaml',
'{"name":"myapp", "environment": {"sdk": "$defaultSdkConstraint"}}',
- )
+ ),
]).create();
await pubAdd(args: ['foo:1.2.3']);
@@ -275,7 +275,7 @@
foo: 1.2.2
environment:
sdk: '$defaultSdkConstraint'
-''')
+'''),
]).create();
await pubAdd(
@@ -293,8 +293,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependencies': {'foo': '1.2.3'}
- })
+ 'dependencies': {'foo': '1.2.3'},
+ }),
]).validate();
});
@@ -308,8 +308,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).create();
await pubAdd(args: ['foo']);
@@ -322,8 +322,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': '^1.2.2'},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).validate();
});
@@ -341,9 +341,9 @@
'name': 'myapp',
'dependencies': {},
'dependency_overrides': {
- 'foo': {'git': '../foo.git'}
- }
- })
+ 'foo': {'git': '../foo.git'},
+ },
+ }),
]).create();
await pubAdd(args: ['foo:1.2.3']);
@@ -353,9 +353,9 @@
'name': 'myapp',
'dependencies': {'foo': '1.2.3'},
'dependency_overrides': {
- 'foo': {'git': '../foo.git'}
- }
- })
+ 'foo': {'git': '../foo.git'},
+ },
+ }),
]).validate();
});
@@ -372,9 +372,9 @@
'name': 'myapp',
'dependencies': {},
'dependency_overrides': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).create();
await pubAdd(args: ['foo:1.2.2']);
@@ -384,9 +384,9 @@
'name': 'myapp',
'dependencies': {'foo': '1.2.2'},
'dependency_overrides': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).validate();
});
@@ -395,7 +395,7 @@
server.serve('foo', '1.2.3');
await d.dir(appPath, [
- d.pubspec({'name': 'myapp', 'dependencies': {}})
+ d.pubspec({'name': 'myapp', 'dependencies': {}}),
]).create();
await pubAdd(
@@ -422,8 +422,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).create();
await pubAdd(
@@ -438,7 +438,7 @@
d.pubspec({
'name': 'myapp',
'dependencies': {},
- 'dependency_overrides': {'foo': '1.2.2'}
+ 'dependency_overrides': {'foo': '1.2.2'},
}),
d.nothing('.dart_tool/package_config.json'),
d.nothing('pubspec.lock'),
@@ -460,9 +460,9 @@
'name': 'myapp',
'dependencies': {},
'dependency_overrides': {
- 'foo': {'git': '../foo.git'}
- }
- })
+ 'foo': {'git': '../foo.git'},
+ },
+ }),
]).create();
await pubAdd(
@@ -478,8 +478,8 @@
'name': 'myapp',
'dependencies': {},
'dependency_overrides': {
- 'foo': {'git': '../foo.git'}
- }
+ 'foo': {'git': '../foo.git'},
+ },
}),
d.nothing('.dart_tool/package_config.json'),
d.nothing('pubspec.lock'),
@@ -501,9 +501,9 @@
'name': 'myapp',
'dependencies': {},
'dependency_overrides': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).create();
await pubAdd(
@@ -519,8 +519,8 @@
'name': 'myapp',
'dependencies': {},
'dependency_overrides': {
- 'foo': {'path': '../foo'}
- }
+ 'foo': {'path': '../foo'},
+ },
}),
d.nothing('.dart_tool/package_config.json'),
d.nothing('pubspec.lock'),
@@ -548,7 +548,7 @@
server.serve('foo', '1.2.3');
await d.dir(appPath, [
- d.pubspec({'name': 'myapp', 'dev_dependencies': {}})
+ d.pubspec({'name': 'myapp', 'dev_dependencies': {}}),
]).create();
await pubAdd(args: ['--dev', 'foo:1.2.3']);
@@ -560,8 +560,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '1.2.3'}
- })
+ 'dev_dependencies': {'foo': '1.2.3'},
+ }),
]).validate();
});
@@ -569,7 +569,7 @@
await d.dir('foo', [d.libPubspec('foo', '1.2.3')]).create();
await d.dir(appPath, [
- d.pubspec({'name': 'myapp', 'dev_dependencies': {}})
+ d.pubspec({'name': 'myapp', 'dev_dependencies': {}}),
]).create();
await pubAdd(
@@ -587,7 +587,7 @@
server.serve('foo', '1.2.3');
await d.dir(appPath, [
- d.pubspec({'name': 'myapp', 'dev_dependencies': {}})
+ d.pubspec({'name': 'myapp', 'dev_dependencies': {}}),
]).create();
await pubAdd(args: ['dev:foo:1.2.3']);
@@ -599,8 +599,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '1.2.3'}
- })
+ 'dev_dependencies': {'foo': '1.2.3'},
+ }),
]).validate();
});
@@ -608,7 +608,7 @@
await d.dir('foo', [d.libPubspec('foo', '1.2.3')]).create();
await d.dir(appPath, [
- d.pubspec({'name': 'myapp', 'dev_dependencies': {}})
+ d.pubspec({'name': 'myapp', 'dev_dependencies': {}}),
]).create();
await pubAdd(
@@ -624,7 +624,7 @@
server.serve('bar', '1.2.3');
await d.dir(appPath, [
- d.pubspec({'name': 'myapp', 'dev_dependencies': {}})
+ d.pubspec({'name': 'myapp', 'dev_dependencies': {}}),
]).create();
await pubAdd(args: ['dev:foo:1.2.3', 'bar:1.2.3']);
@@ -639,7 +639,7 @@
'name': 'myapp',
'dependencies': {'bar': '1.2.3'},
'dev_dependencies': {'foo': '1.2.3'},
- })
+ }),
]).validate();
});
@@ -652,8 +652,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '1.2.2'}
- })
+ 'dev_dependencies': {'foo': '1.2.2'},
+ }),
]).create();
await pubAdd(
@@ -666,8 +666,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '^1.2.3'}
- })
+ 'dev_dependencies': {'foo': '^1.2.3'},
+ }),
]).validate();
});
@@ -679,8 +679,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '1.2.2'}
- })
+ 'dev_dependencies': {'foo': '1.2.2'},
+ }),
]).create();
await pubAdd(
@@ -693,8 +693,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '1.2.3'}
- })
+ 'dev_dependencies': {'foo': '1.2.3'},
+ }),
]).validate();
});
@@ -706,8 +706,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '1.2.2'}
- })
+ 'dev_dependencies': {'foo': '1.2.2'},
+ }),
]).create();
await pubAdd(
@@ -720,8 +720,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '>=1.2.2'}
- })
+ 'dev_dependencies': {'foo': '>=1.2.2'},
+ }),
]).validate();
});
});
@@ -736,8 +736,8 @@
d.pubspec({
'name': 'myapp',
'dev_dependencies': {},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).create();
await pubAdd(args: ['foo', '--dev']);
@@ -750,8 +750,8 @@
d.pubspec({
'name': 'myapp',
'dev_dependencies': {'foo': '^1.2.2'},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).validate();
});
@@ -768,9 +768,9 @@
'name': 'myapp',
'dev_dependencies': {},
'dependency_overrides': {
- 'foo': {'git': '../foo.git'}
- }
- })
+ 'foo': {'git': '../foo.git'},
+ },
+ }),
]).create();
await pubAdd(args: ['foo:1.2.3', '--dev']);
@@ -780,9 +780,9 @@
'name': 'myapp',
'dev_dependencies': {'foo': '1.2.3'},
'dependency_overrides': {
- 'foo': {'git': '../foo.git'}
- }
- })
+ 'foo': {'git': '../foo.git'},
+ },
+ }),
]).validate();
});
@@ -799,9 +799,9 @@
'name': 'myapp',
'dev_dependencies': {},
'dependency_overrides': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).create();
await pubAdd(args: ['foo:1.2.2', '--dev']);
@@ -811,9 +811,9 @@
'name': 'myapp',
'dev_dependencies': {'foo': '1.2.2'},
'dependency_overrides': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).validate();
});
@@ -826,8 +826,8 @@
d.pubspec({
'name': 'myapp',
'dev_dependencies': {},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).create();
await pubAdd(
@@ -842,7 +842,7 @@
d.pubspec({
'name': 'myapp',
'dev_dependencies': {},
- 'dependency_overrides': {'foo': '1.2.2'}
+ 'dependency_overrides': {'foo': '1.2.2'},
}),
d.nothing('.dart_tool/package_config.json'),
d.nothing('pubspec.lock'),
@@ -864,9 +864,9 @@
'name': 'myapp',
'dev_dependencies': {},
'dependency_overrides': {
- 'foo': {'git': '../foo.git'}
- }
- })
+ 'foo': {'git': '../foo.git'},
+ },
+ }),
]).create();
await pubAdd(
@@ -882,8 +882,8 @@
'name': 'myapp',
'dev_dependencies': {},
'dependency_overrides': {
- 'foo': {'git': '../foo.git'}
- }
+ 'foo': {'git': '../foo.git'},
+ },
}),
d.nothing('.dart_tool/package_config.json'),
d.nothing('pubspec.lock'),
@@ -906,9 +906,9 @@
'name': 'myapp',
'dev_dependencies': {},
'dependency_overrides': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).create();
await pubAdd(
@@ -924,8 +924,8 @@
'name': 'myapp',
'dev_dependencies': {},
'dependency_overrides': {
- 'foo': {'path': '../foo'}
- }
+ 'foo': {'path': '../foo'},
+ },
}),
d.nothing('.dart_tool/package_config.json'),
d.nothing('pubspec.lock'),
@@ -945,8 +945,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': '1.2.2'},
- 'dev_dependencies': {}
- })
+ 'dev_dependencies': {},
+ }),
]).create();
await pubAdd(
@@ -961,7 +961,7 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': '1.2.2'},
- 'dev_dependencies': {}
+ 'dev_dependencies': {},
}),
d.nothing('.dart_tool/package_config.json'),
d.nothing('pubspec.lock'),
@@ -1023,7 +1023,7 @@
contains('# comment A'),
contains('# comment B'),
contains('# comment C'),
- contains('# comment D')
+ contains('# comment D'),
]),
);
});
@@ -1063,7 +1063,7 @@
dependency_overrides:
bar: 2.0.0
'''),
- )
+ ),
]).validate();
// Can override with a descriptor:
@@ -1078,7 +1078,7 @@
foo:
path: ../local_foo
'''),
- )
+ ),
]).validate();
});
@@ -1094,9 +1094,9 @@
await d.dir(appPath, [
d.pubspecOverrides({
'dependency_overrides': {
- 'bar': {'path': '../bar'}
- }
- })
+ 'bar': {'path': '../bar'},
+ },
+ }),
]).create();
await pubGet();
diff --git a/test/add/common/invalid_options.dart b/test/add/common/invalid_options.dart
index 37c82e8..784b842 100644
--- a/test/add/common/invalid_options.dart
+++ b/test/add/common/invalid_options.dart
@@ -26,7 +26,7 @@
error: allOf([
contains('Packages can only have one source, pub add flags '
'"--git-url" and "--path" are'),
- contains('conflicting.')
+ contains('conflicting.'),
]),
exitCode: exit_codes.USAGE,
);
@@ -57,12 +57,12 @@
'--hosted-url',
'http://localhost:${server.port}',
'--path',
- '../bar'
+ '../bar',
],
error: allOf([
contains('Packages can only have one source, pub add flags '
'"--hosted-url" and "--path" are'),
- contains('conflicting.')
+ contains('conflicting.'),
]),
exitCode: exit_codes.USAGE,
);
@@ -97,12 +97,12 @@
'--hosted-url',
'http://localhost:${server.port}',
'--git-url',
- '../foo.git'
+ '../foo.git',
],
error: allOf([
contains('Packages can only have one source, pub add flags '
'"--git-url" and "--hosted-url"'),
- contains('are conflicting.')
+ contains('are conflicting.'),
]),
exitCode: exit_codes.USAGE,
);
diff --git a/test/add/git/git_test.dart b/test/add/git/git_test.dart
index 540a219..fc1f9a0 100644
--- a/test/add/git/git_test.dart
+++ b/test/add/git/git_test.dart
@@ -23,13 +23,13 @@
await d.dir(cachePath, [
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
- d.gitPackageRevisionCacheDir('foo')
- ])
+ d.gitPackageRevisionCacheDir('foo'),
+ ]),
]).validate();
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).validate();
});
@@ -53,13 +53,13 @@
await d.dir(cachePath, [
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
- d.gitPackageRevisionCacheDir('foo')
- ])
+ d.gitPackageRevisionCacheDir('foo'),
+ ]),
]).validate();
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).validate();
});
@@ -97,13 +97,13 @@
await d.dir(cachePath, [
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
- d.gitPackageRevisionCacheDir('foo')
- ])
+ d.gitPackageRevisionCacheDir('foo'),
+ ]),
]).validate();
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git', 'version': '1.0.0'}
+ 'foo': {'git': '../foo.git', 'version': '1.0.0'},
},
).validate();
});
@@ -186,8 +186,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).create();
await pubAdd(args: ['foo', '--git-url', '../foo.git']);
@@ -200,10 +200,10 @@
d.pubspec({
'name': 'myapp',
'dependencies': {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).validate();
});
@@ -221,7 +221,7 @@
test('Can add a package with a git descriptor and relative path', () async {
await d.git('foo.git', [
- d.dir('subdir', [d.libPubspec('foo', '1.2.3')])
+ d.dir('subdir', [d.libPubspec('foo', '1.2.3')]),
]).create();
await d.appDir(dependencies: {}).create();
await pubAdd(
@@ -237,8 +237,8 @@
await d.appDir(
dependencies: {
'foo': {
- 'git': {'url': '../foo.git', 'path': 'subdir'}
- }
+ 'git': {'url': '../foo.git', 'path': 'subdir'},
+ },
},
).validate();
});
@@ -271,7 +271,7 @@
'foo': {'git': '../foo.git'},
'bar': {'git': '../bar.git'},
},
- })
+ }),
]).validate();
});
}
diff --git a/test/add/git/ref_test.dart b/test/add/git/ref_test.dart
index 65e430d..e0ba11f 100644
--- a/test/add/git/ref_test.dart
+++ b/test/add/git/ref_test.dart
@@ -34,14 +34,14 @@
d.gitPackageRepoCacheDir('foo'),
]),
d.gitPackageRevisionCacheDir('foo', modifier: 1),
- ])
+ ]),
]).validate();
await d.appDir(
dependencies: {
'foo': {
- 'git': {'url': '../foo.git', 'ref': 'old'}
- }
+ 'git': {'url': '../foo.git', 'ref': 'old'},
+ },
},
).validate();
});
diff --git a/test/add/git/subdir_test.dart b/test/add/git/subdir_test.dart
index 8d3146f..b17ebde 100644
--- a/test/add/git/subdir_test.dart
+++ b/test/add/git/subdir_test.dart
@@ -12,7 +12,7 @@
ensureGit();
final repo = d.git('foo.git', [
- d.dir('subdir', [d.libPubspec('sub', '1.0.0'), d.libDir('sub', '1.0.0')])
+ d.dir('subdir', [d.libPubspec('sub', '1.0.0'), d.libDir('sub', '1.0.0')]),
]);
await repo.create();
@@ -27,9 +27,9 @@
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
d.hashDir('foo', [
- d.dir('subdir', [d.libDir('sub', '1.0.0')])
- ])
- ])
+ d.dir('subdir', [d.libDir('sub', '1.0.0')]),
+ ]),
+ ]),
]).validate();
await d.appPackageConfigFile([
d.packageConfigEntry(
@@ -41,8 +41,8 @@
await d.appDir(
dependencies: {
'sub': {
- 'git': {'url': '../foo.git', 'path': 'subdir'}
- }
+ 'git': {'url': '../foo.git', 'path': 'subdir'},
+ },
},
).validate();
});
@@ -52,8 +52,8 @@
final repo = d.git('foo.git', [
d.dir('sub', [
- d.dir('dir', [d.libPubspec('sub', '1.0.0'), d.libDir('sub', '1.0.0')])
- ])
+ d.dir('dir', [d.libPubspec('sub', '1.0.0'), d.libDir('sub', '1.0.0')]),
+ ]),
]);
await repo.create();
@@ -68,10 +68,10 @@
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
d.hashDir('foo', [
d.dir('sub', [
- d.dir('dir', [d.libDir('sub', '1.0.0')])
- ])
- ])
- ])
+ d.dir('dir', [d.libDir('sub', '1.0.0')]),
+ ]),
+ ]),
+ ]),
]).validate();
await d.appPackageConfigFile([
@@ -84,8 +84,8 @@
await d.appDir(
dependencies: {
'sub': {
- 'git': {'url': '../foo.git', 'path': 'sub/dir'}
- }
+ 'git': {'url': '../foo.git', 'path': 'sub/dir'},
+ },
},
).validate();
});
diff --git a/test/add/hosted/non_default_pub_server_test.dart b/test/add/hosted/non_default_pub_server_test.dart
index c2a339e..b31552f 100644
--- a/test/add/hosted/non_default_pub_server_test.dart
+++ b/test/add/hosted/non_default_pub_server_test.dart
@@ -33,7 +33,7 @@
await d.appDir(
dependencies: {
- 'foo': {'version': '1.2.3', 'hosted': url}
+ 'foo': {'version': '1.2.3', 'hosted': url},
},
).validate();
});
@@ -49,7 +49,7 @@
server.serve('foo', '1.2.3');
final oldSyntaxSdkConstraint = {
'environment': {
- 'sdk': '>=2.14.0 <3.0.0' // Language version for old syntax.
+ 'sdk': '>=2.14.0 <3.0.0', // Language version for old syntax.
},
};
@@ -66,8 +66,8 @@
dependencies: {
'foo': {
'version': '1.2.3',
- 'hosted': {'name': 'foo', 'url': url}
- }
+ 'hosted': {'name': 'foo', 'url': url},
+ },
},
pubspec: oldSyntaxSdkConstraint,
).validate();
@@ -109,7 +109,7 @@
dependencies: {
'foo': {'version': '1.2.3', 'hosted': url},
'bar': {'version': '3.2.3', 'hosted': url},
- 'baz': {'version': '1.3.5', 'hosted': url}
+ 'baz': {'version': '1.3.5', 'hosted': url},
},
).validate();
});
@@ -162,7 +162,7 @@
]).validate();
await d.appDir(
dependencies: {
- 'foo': {'version': '^1.2.3', 'hosted': url}
+ 'foo': {'version': '^1.2.3', 'hosted': url},
},
).validate();
});
@@ -190,7 +190,7 @@
]).validate();
await d.appDir(
dependencies: {
- 'foo': {'version': '^1.2.3', 'hosted': url}
+ 'foo': {'version': '^1.2.3', 'hosted': url},
},
).validate();
});
@@ -219,7 +219,7 @@
]).validate();
await d.appDir(
dependencies: {
- 'foo': {'hosted': url}
+ 'foo': {'hosted': url},
},
).validate();
});
diff --git a/test/add/path/absolute_path_test.dart b/test/add/path/absolute_path_test.dart
index 9999b81..adb44c8 100644
--- a/test/add/path/absolute_path_test.dart
+++ b/test/add/path/absolute_path_test.dart
@@ -26,7 +26,7 @@
await d.appDir(
dependencies: {
- 'foo': {'path': absolutePath}
+ 'foo': {'path': absolutePath},
},
).validate();
});
@@ -42,7 +42,7 @@
await d.appDir(
dependencies: {
- 'foo': {'path': absolutePath, 'version': '0.0.1'}
+ 'foo': {'path': absolutePath, 'version': '0.0.1'},
},
).validate();
});
@@ -132,8 +132,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).create();
final absolutePath = path.join(d.sandbox, 'foo');
@@ -147,10 +147,10 @@
d.pubspec({
'name': 'myapp',
'dependencies': {
- 'foo': {'path': absolutePath}
+ 'foo': {'path': absolutePath},
},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).validate();
});
}
diff --git a/test/add/path/relative_path_test.dart b/test/add/path/relative_path_test.dart
index 7da10f8..e7c4a8e 100644
--- a/test/add/path/relative_path_test.dart
+++ b/test/add/path/relative_path_test.dart
@@ -25,7 +25,7 @@
await d.appDir(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
).validate();
});
@@ -44,9 +44,9 @@
d.pubspec({
'name': 'myapp',
'dev_dependencies': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).validate();
});
@@ -68,7 +68,7 @@
await d.appDir(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
).validate();
});
@@ -103,7 +103,7 @@
await d.appDir(
dependencies: {
- 'foo': {'path': '../foo', 'version': '0.0.1'}
+ 'foo': {'path': '../foo', 'version': '0.0.1'},
},
).validate();
});
@@ -145,8 +145,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).create();
await pubAdd(args: ['foo', '--path', '../foo']);
@@ -159,10 +159,10 @@
d.pubspec({
'name': 'myapp',
'dependencies': {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- 'dependency_overrides': {'foo': '1.2.2'}
- })
+ 'dependency_overrides': {'foo': '1.2.2'},
+ }),
]).validate();
});
diff --git a/test/add/sdk/sdk_test.dart b/test/add/sdk/sdk_test.dart
index 144f02d..c70471f 100644
--- a/test/add/sdk/sdk_test.dart
+++ b/test/add/sdk/sdk_test.dart
@@ -18,16 +18,16 @@
d.dir('packages', [
d.dir('foo', [
d.libDir('foo', 'foo 0.0.1'),
- d.libPubspec('foo', '0.0.1', deps: {'bar': 'any'})
- ])
+ d.libPubspec('foo', '0.0.1', deps: {'bar': 'any'}),
+ ]),
]),
d.dir('bin/cache/pkg', [
d.dir(
'baz',
[d.libDir('baz', 'foo 0.0.1'), d.libPubspec('baz', '0.0.1')],
- )
+ ),
]),
- d.file('version', '1.2.3')
+ d.file('version', '1.2.3'),
]).create();
});
@@ -42,8 +42,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {
- 'foo': {'sdk': 'flutter'}
- }
+ 'foo': {'sdk': 'flutter'},
+ },
}),
]).validate();
@@ -69,8 +69,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {
- 'foo': {'sdk': 'flutter', 'version': '0.0.1'}
- }
+ 'foo': {'sdk': 'flutter', 'version': '0.0.1'},
+ },
}),
]).validate();
await d.appPackageConfigFile([
@@ -93,7 +93,7 @@
d.packageConfigEntry(
name: 'baz',
path: p.join(d.sandbox, 'flutter', 'bin', 'cache', 'pkg', 'baz'),
- )
+ ),
]).validate();
});
diff --git a/test/ascii_tree_test.dart b/test/ascii_tree_test.dart
index 5a775e8..d0a921b 100644
--- a/test/ascii_tree_test.dart
+++ b/test/ascii_tree_test.dart
@@ -96,8 +96,8 @@
'join_test.dart': <String, Map>{},
'normalize_test.dart': <String, Map>{},
'relative_test.dart': <String, Map>{},
- 'split_test.dart': <String, Map>{}
- }
+ 'split_test.dart': <String, Map>{},
+ },
};
ctx.expectNextSection(tree.fromMap(map));
diff --git a/test/cache/add/adds_latest_matching_version_test.dart b/test/cache/add/adds_latest_matching_version_test.dart
index 420a1cc..6efa953 100644
--- a/test/cache/add/adds_latest_matching_version_test.dart
+++ b/test/cache/add/adds_latest_matching_version_test.dart
@@ -35,7 +35,7 @@
await d.hostedCache([
d.nothing('foo-1.2.2'),
d.nothing('foo-2.0.0-dev'),
- d.nothing('foo-2.0.0')
+ d.nothing('foo-2.0.0'),
]).validate();
});
}
diff --git a/test/cache/add/all_with_some_versions_present_test.dart b/test/cache/add/all_with_some_versions_present_test.dart
index 3dcb2d1..a90f479 100644
--- a/test/cache/add/all_with_some_versions_present_test.dart
+++ b/test/cache/add/all_with_some_versions_present_test.dart
@@ -31,7 +31,7 @@
args: ['cache', 'add', 'foo', '--all'],
silent: allOf([
contains('Downloading foo 1.2.2...'),
- contains('Downloading foo 2.0.0...')
+ contains('Downloading foo 2.0.0...'),
]),
output: '''
Already cached foo 1.2.1.
diff --git a/test/cache/create_readme_test.dart b/test/cache/create_readme_test.dart
index ffec057..f2fd5d4 100644
--- a/test/cache/create_readme_test.dart
+++ b/test/cache/create_readme_test.dart
@@ -18,7 +18,7 @@
await d.appDir(dependencies: {'foo': '1.0.0'}).create();
await pubGet();
await d.dir(cachePath, [
- d.file('README.md', contains('https://dart.dev/go/pub-cache'))
+ d.file('README.md', contains('https://dart.dev/go/pub-cache')),
]).validate();
File(pathInCache('README.md')).deleteSync();
// No new download, so 'README.md' doesn't get updated.
@@ -32,7 +32,7 @@
await d.appDir(dependencies: {'foo': '1.0.0'}).create();
await pubGet();
await d.dir(cachePath, [
- d.file('README.md', contains('https://dart.dev/go/pub-cache'))
+ d.file('README.md', contains('https://dart.dev/go/pub-cache')),
]).validate();
});
@@ -53,13 +53,13 @@
d.dir(
'bin',
[d.outOfDateSnapshot('foo.dart-3.1.2+3.snapshot')],
- )
- ])
- ])
+ ),
+ ]),
+ ]),
]).create();
await runPub(args: ['global', 'run', 'foo'], output: contains('Hello'));
await d.dir(cachePath, [
- d.file('README.md', contains('https://dart.dev/go/pub-cache'))
+ d.file('README.md', contains('https://dart.dev/go/pub-cache')),
]).validate();
});
}
diff --git a/test/cache/detect_deprecated_dir_test.dart b/test/cache/detect_deprecated_dir_test.dart
index 3320452..865c2d9 100644
--- a/test/cache/detect_deprecated_dir_test.dart
+++ b/test/cache/detect_deprecated_dir_test.dart
@@ -11,7 +11,7 @@
test('Detects and warns about old cache dir', skip: !Platform.isWindows,
() async {
await d.dir('APPDATA', [
- d.dir('Pub', [d.dir('Cache')])
+ d.dir('Pub', [d.dir('Cache')]),
]).create();
final server = await servePackages();
server.serve('foo', '1.0.0');
diff --git a/test/cache/list_test.dart b/test/cache/list_test.dart
index 72f9339..7b4e5f5 100644
--- a/test/cache/list_test.dart
+++ b/test/cache/list_test.dart
@@ -20,7 +20,7 @@
test('running pub cache list on empty cache', () async {
// Set up a cache.
await d.dir(cachePath, [
- d.dir('hosted', [d.dir('pub.dev', [])])
+ d.dir('hosted', [d.dir('pub.dev', [])]),
]).create();
await runPub(args: ['cache', 'list'], outputJson: {'packages': {}});
@@ -32,9 +32,9 @@
d.dir('hosted', [
d.dir('pub.dev', [
d.dir('foo-1.2.3', [d.libPubspec('foo', '1.2.3'), d.libDir('foo')]),
- d.dir('bar-2.0.0', [d.libPubspec('bar', '2.0.0'), d.libDir('bar')])
- ])
- ])
+ d.dir('bar-2.0.0', [d.libPubspec('bar', '2.0.0'), d.libDir('bar')]),
+ ]),
+ ]),
]).create();
await runPub(
@@ -42,12 +42,12 @@
outputJson: {
'packages': {
'bar': {
- '2.0.0': {'location': hostedDir('bar-2.0.0')}
+ '2.0.0': {'location': hostedDir('bar-2.0.0')},
},
'foo': {
- '1.2.3': {'location': hostedDir('foo-1.2.3')}
- }
- }
+ '1.2.3': {'location': hostedDir('foo-1.2.3')},
+ },
+ },
},
);
});
@@ -62,13 +62,13 @@
'foo',
'1.2.3',
deps: {
- 'bar': {'bad': 'bar'}
+ 'bar': {'bad': 'bar'},
},
),
- d.libDir('foo')
- ])
- ])
- ])
+ d.libDir('foo'),
+ ]),
+ ]),
+ ]),
]).create();
await runPub(
@@ -76,9 +76,9 @@
outputJson: {
'packages': {
'foo': {
- '1.2.3': {'location': hostedDir('foo-1.2.3')}
- }
- }
+ '1.2.3': {'location': hostedDir('foo-1.2.3')},
+ },
+ },
},
);
});
diff --git a/test/cache/preload_test.dart b/test/cache/preload_test.dart
index 3796672..314e5ed 100644
--- a/test/cache/preload_test.dart
+++ b/test/cache/preload_test.dart
@@ -85,7 +85,7 @@
output: allOf([
contains(
'Installed $archivePath in cache as foo 1.0.0 from ${server.url}.',
- )
+ ),
]),
);
await d.cacheDir({'foo': '1.0.0'}).validate();
@@ -130,7 +130,7 @@
allOf([contains('Installed $archivePath in cache as foo 1.0.0.')]),
);
await hostedCache([
- dir('foo-1.0.0', [file('new-file.txt'), nothing('old-file.txt')])
+ dir('foo-1.0.0', [file('new-file.txt'), nothing('old-file.txt')]),
]).validate();
});
diff --git a/test/cache/repair/git_test.dart b/test/cache/repair/git_test.dart
index 0a6fa18..5a0cb32 100644
--- a/test/cache/repair/git_test.dart
+++ b/test/cache/repair/git_test.dart
@@ -21,7 +21,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
await pubGet();
@@ -59,7 +59,7 @@
var fooLibs = fooDirs.map((dir) {
var fooDirName = path.basename(dir);
return d.dir(fooDirName, [
- d.dir('lib', [d.file('foo.dart', 'main() => "foo";')])
+ d.dir('lib', [d.file('foo.dart', 'main() => "foo";')]),
]);
}).toList();
@@ -92,7 +92,7 @@
);
await d.dir(cachePath, [
- d.dir('git', fooDirs.map((dir) => d.nothing(path.basename(dir))))
+ d.dir('git', fooDirs.map((dir) => d.nothing(path.basename(dir)))),
]).validate();
});
@@ -122,7 +122,7 @@
);
await d.dir(cachePath, [
- d.dir('git', fooDirs.map((dir) => d.nothing(path.basename(dir))))
+ d.dir('git', fooDirs.map((dir) => d.nothing(path.basename(dir)))),
]).validate();
});
});
@@ -131,20 +131,20 @@
setUp(() async {
// Create two cached revisions of foo.
await d.git('foo.git', [
- d.dir('subdir', [d.libDir('sub'), d.libPubspec('sub', '1.0.0')])
+ d.dir('subdir', [d.libDir('sub'), d.libPubspec('sub', '1.0.0')]),
]).create();
await d.appDir(
dependencies: {
'sub': {
- 'git': {'url': '../foo.git', 'path': 'subdir'}
- }
+ 'git': {'url': '../foo.git', 'path': 'subdir'},
+ },
},
).create();
await pubGet();
await d.git('foo.git', [
- d.dir('subdir', [d.libDir('sub'), d.libPubspec('sub', '1.0.1')])
+ d.dir('subdir', [d.libDir('sub'), d.libPubspec('sub', '1.0.1')]),
]).commit();
await pubUpgrade();
@@ -176,8 +176,8 @@
var fooDirName = path.basename(dir);
return d.dir(fooDirName, [
d.dir('subdir', [
- d.dir('lib', [d.file('sub.dart', 'main() => "sub";')])
- ])
+ d.dir('lib', [d.file('sub.dart', 'main() => "sub";')]),
+ ]),
]);
}).toList();
@@ -211,7 +211,7 @@
);
await d.dir(cachePath, [
- d.dir('git', fooDirs.map((dir) => d.nothing(path.basename(dir))))
+ d.dir('git', fooDirs.map((dir) => d.nothing(path.basename(dir)))),
]).validate();
});
});
diff --git a/test/cache/repair/handles_corrupted_binstub_test.dart b/test/cache/repair/handles_corrupted_binstub_test.dart
index 86f9f8e..11f4d7e 100644
--- a/test/cache/repair/handles_corrupted_binstub_test.dart
+++ b/test/cache/repair/handles_corrupted_binstub_test.dart
@@ -14,14 +14,14 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
+ d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")]),
],
);
await runPub(args: ['global', 'activate', 'foo']);
await d.dir(cachePath, [
- d.dir('bin', [d.file(binStubName('script'), 'junk')])
+ d.dir('bin', [d.file(binStubName('script'), 'junk')]),
]).create();
await runPub(
diff --git a/test/cache/repair/handles_corrupted_global_lockfile_test.dart b/test/cache/repair/handles_corrupted_global_lockfile_test.dart
index 1681e42..275eec5 100644
--- a/test/cache/repair/handles_corrupted_global_lockfile_test.dart
+++ b/test/cache/repair/handles_corrupted_global_lockfile_test.dart
@@ -11,7 +11,7 @@
void main() {
test('handles a corrupted global lockfile', () async {
await d.dir(cachePath, [
- d.dir('global_packages/foo', [d.file('pubspec.lock', 'junk')])
+ d.dir('global_packages/foo', [d.file('pubspec.lock', 'junk')]),
]).create();
await runPub(
diff --git a/test/cache/repair/handles_failure_test.dart b/test/cache/repair/handles_failure_test.dart
index d220759..d59fab7 100644
--- a/test/cache/repair/handles_failure_test.dart
+++ b/test/cache/repair/handles_failure_test.dart
@@ -30,9 +30,9 @@
d.dir(
'foo-1.2.5',
[d.libPubspec('foo', '1.2.5'), d.file('broken.txt')],
- )
- ])
- ])
+ ),
+ ]),
+ ]),
]).create();
// Repair them.
diff --git a/test/cache/repair/handles_orphaned_binstub_test.dart b/test/cache/repair/handles_orphaned_binstub_test.dart
index 300a3cb..1df3d16 100644
--- a/test/cache/repair/handles_orphaned_binstub_test.dart
+++ b/test/cache/repair/handles_orphaned_binstub_test.dart
@@ -20,14 +20,14 @@
void main() {
test('handles an orphaned binstub script', () async {
await d.dir(cachePath, [
- d.dir('bin', [d.file(binStubName('script'), _orphanedBinstub)])
+ d.dir('bin', [d.file(binStubName('script'), _orphanedBinstub)]),
]).create();
await runPub(
args: ['cache', 'repair'],
error: allOf([
contains('Binstubs exist for non-activated packages:'),
- contains('From foo: foo-script')
+ contains('From foo: foo-script'),
]),
);
});
diff --git a/test/cache/repair/hosted.dart b/test/cache/repair/hosted.dart
index d841399..3a0fd00 100644
--- a/test/cache/repair/hosted.dart
+++ b/test/cache/repair/hosted.dart
@@ -36,9 +36,9 @@
d.dir(
'bar-1.2.4',
[d.libPubspec('bar', '1.2.4'), d.file('broken.txt')],
- )
- ])
- ])
+ ),
+ ]),
+ ]),
]).create();
// Repair them.
@@ -63,7 +63,7 @@
await d.hostedCache([
d.dir('bar-1.2.4', [d.nothing('broken.txt')]),
d.dir('foo-1.2.3', [d.nothing('broken.txt')]),
- d.dir('foo-1.2.5', [d.nothing('broken.txt')])
+ d.dir('foo-1.2.5', [d.nothing('broken.txt')]),
]).validate();
});
@@ -75,8 +75,8 @@
d.dir('bar-1.2.4', [d.file('broken.txt')]),
d.dir('foo-1.2.3', [d.file('broken.txt')]),
d.dir('foo-1.2.5', [d.file('broken.txt')]),
- ])
- ])
+ ]),
+ ]),
]).create();
await runPub(
@@ -112,8 +112,8 @@
d.dir('bar-1.2.4', [d.file('pubspec.yaml', '{')]),
d.dir('foo-1.2.3', [d.file('pubspec.yaml', '{')]),
d.dir('foo-1.2.5', [d.file('pubspec.yaml', '{')]),
- ])
- ])
+ ]),
+ ]),
]).create();
await runPub(
diff --git a/test/cache/repair/recompiles_snapshots_test.dart b/test/cache/repair/recompiles_snapshots_test.dart
index 86a27d2..9c59fae 100644
--- a/test/cache/repair/recompiles_snapshots_test.dart
+++ b/test/cache/repair/recompiles_snapshots_test.dart
@@ -14,14 +14,17 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
+ d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")]),
],
);
await runPub(args: ['global', 'activate', 'foo']);
await d.dir(cachePath, [
- d.dir('global_packages/foo/bin', [d.file('script.dart.snapshot', 'junk')])
+ d.dir(
+ 'global_packages/foo/bin',
+ [d.file('script.dart.snapshot', 'junk')],
+ ),
]).create();
await runPub(
diff --git a/test/cache/repair/updates_binstubs_test.dart b/test/cache/repair/updates_binstubs_test.dart
index 262eab5..e318cf7 100644
--- a/test/cache/repair/updates_binstubs_test.dart
+++ b/test/cache/repair/updates_binstubs_test.dart
@@ -24,20 +24,20 @@
'foo',
'1.0.0',
pubspec: {
- 'executables': {'foo-script': 'script'}
+ 'executables': {'foo-script': 'script'},
},
contents: [
d.dir(
'bin',
[d.file('script.dart', "main(args) => print('ok \$args');")],
- )
+ ),
],
);
await runPub(args: ['global', 'activate', 'foo']);
await d.dir(cachePath, [
- d.dir('bin', [d.file(binStubName('foo-script'), _outdatedBinstub)])
+ d.dir('bin', [d.file(binStubName('foo-script'), _outdatedBinstub)]),
]).create();
// Repair them.
@@ -58,8 +58,8 @@
d.file(
binStubName('foo-script'),
contains('This file was created by pub v3.1.2+3'),
- )
- ])
+ ),
+ ]),
]).validate();
});
}
diff --git a/test/dart3_sdk_constraint_hack_test.dart b/test/dart3_sdk_constraint_hack_test.dart
index 354fb9a..921479b 100644
--- a/test/dart3_sdk_constraint_hack_test.dart
+++ b/test/dart3_sdk_constraint_hack_test.dart
@@ -13,7 +13,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '>=2.11.0 <3.0.0'}
+ 'environment': {'sdk': '>=2.11.0 <3.0.0'},
}),
]).create();
@@ -29,7 +29,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '>=2.12.0 <3.1.0'}
+ 'environment': {'sdk': '>=2.12.0 <3.1.0'},
}),
]).create();
@@ -45,7 +45,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '>=2.11.0 <2.999.0'}
+ 'environment': {'sdk': '>=2.11.0 <2.999.0'},
}),
]).create();
@@ -62,7 +62,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '>=2.11.0 <3.0.0-0.0'}
+ 'environment': {'sdk': '>=2.11.0 <3.0.0-0.0'},
}),
]).create();
@@ -79,7 +79,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '>=2.12.0 <3.0.0'}
+ 'environment': {'sdk': '>=2.12.0 <3.0.0'},
}),
]).create();
@@ -92,7 +92,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '>=2.12.0 <3.0.0-0'}
+ 'environment': {'sdk': '>=2.12.0 <3.0.0-0'},
}),
]).create();
@@ -105,7 +105,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '>=3.0.0-dev <3.0.0'}
+ 'environment': {'sdk': '>=3.0.0-dev <3.0.0'},
}),
]).create();
@@ -123,7 +123,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '>=2.12.0 <3.0.0'}
+ 'environment': {'sdk': '>=2.12.0 <3.0.0'},
}),
]).create();
@@ -140,7 +140,7 @@
await d.appDir(
dependencies: {'foo': 'any'},
pubspec: {
- 'environment': {'sdk': '^2.12.0'}
+ 'environment': {'sdk': '^2.12.0'},
},
).create();
final server = await servePackages();
@@ -150,7 +150,7 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '>=2.10.0 <3.0.0'}
+ 'environment': {'sdk': '>=2.10.0 <3.0.0'},
},
);
await pubGet(
@@ -165,7 +165,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '>=2.19.1 <3.0.0'}
+ 'environment': {'sdk': '>=2.19.1 <3.0.0'},
}),
]).create();
diff --git a/test/dependency_name_validation_test.dart b/test/dependency_name_validation_test.dart
index ae924c6..fefb4be 100644
--- a/test/dependency_name_validation_test.dart
+++ b/test/dependency_name_validation_test.dart
@@ -17,7 +17,7 @@
test('Dev-dependency names have to be valid package names', () async {
await appDir(
pubspec: {
- 'dev_dependencies': {'abc def': '1.0.0'}
+ 'dev_dependencies': {'abc def': '1.0.0'},
},
).create();
await pubGet(error: contains('Not a valid package name.'), exitCode: DATA);
diff --git a/test/dependency_override_test.dart b/test/dependency_override_test.dart
index 8a263f5..2898e80 100644
--- a/test/dependency_override_test.dart
+++ b/test/dependency_override_test.dart
@@ -21,8 +21,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': '>2.0.0'},
- 'dependency_overrides': {'foo': '<3.0.0'}
- })
+ 'dependency_overrides': {'foo': '<3.0.0'},
+ }),
]).create();
await pubCommand(command);
@@ -39,8 +39,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependency_overrides': {'foo': 'any'}
- })
+ 'dependency_overrides': {'foo': 'any'},
+ }),
]).create();
await pubCommand(command);
@@ -59,7 +59,7 @@
'bar',
'1.0.0',
pubspec: {
- 'dependencies': {'foo': '5.0.0-nonexistent'}
+ 'dependencies': {'foo': '5.0.0-nonexistent'},
},
);
@@ -67,8 +67,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'bar': 'any'},
- 'dependency_overrides': {'foo': '<3.0.0'}
- })
+ 'dependency_overrides': {'foo': '<3.0.0'},
+ }),
]).create();
await pubCommand(command);
@@ -85,15 +85,15 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '5.6.7-fblthp'}
+ 'environment': {'sdk': '5.6.7-fblthp'},
},
);
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependency_overrides': {'foo': 'any'}
- })
+ 'dependency_overrides': {'foo': 'any'},
+ }),
]).create();
await pubCommand(command);
@@ -116,9 +116,9 @@
'dependency_overrides': {
'foo': 'any',
'bar': 'any',
- 'baz': {'path': '../baz'}
- }
- })
+ 'baz': {'path': '../baz'},
+ },
+ }),
]).create();
var bazPath = path.join('..', 'baz');
diff --git a/test/dependency_services/dependency_services_test.dart b/test/dependency_services/dependency_services_test.dart
index f372701..1e307fe 100644
--- a/test/dependency_services/dependency_services_test.dart
+++ b/test/dependency_services/dependency_services_test.dart
@@ -126,9 +126,9 @@
{
'name': e.key,
'url': globalServer.url,
- 'versions': e.value.map((d) => {'range': d}).toList()
- }
- ]
+ 'versions': e.value.map((d) => {'range': d}).toList(),
+ },
+ ],
});
final report = await context.runDependencyServices(['report'], stdin: input);
if (resultAssertions != null) {
@@ -167,7 +167,7 @@
'dependencies': {
'foo': '^1.0.0',
},
- })
+ }),
]).create();
await pubGet();
server.dontAllowDownloads();
@@ -197,7 +197,7 @@
'dependencies': {
'foo': '^1.0.0',
},
- })
+ }),
]).create();
await pubGet();
@@ -238,7 +238,7 @@
'git': {'url': '../bar.git'},
},
},
- })
+ }),
]).create();
server.dontAllowDownloads();
@@ -268,7 +268,7 @@
'bar': '^1.0.0',
'boo': '^1.0.0',
},
- })
+ }),
]).create();
await pubGet();
server.serve('foo', '1.2.4');
@@ -307,7 +307,7 @@
'bar': '^1.0.0',
'boo': '^1.0.0',
},
- })
+ }),
]).create();
await pubGet();
final lockFile = File(path(p.join(appPath, 'pubspec.lock')));
@@ -342,7 +342,7 @@
'foo': '^1.0.0',
'bar': '^1.0.0',
},
- })
+ }),
]).create();
await pubGet();
final lockFile = File(path(p.join(appPath, 'pubspec.lock')));
@@ -382,7 +382,7 @@
'dependencies': {
'foo': '^1.0.0',
},
- })
+ }),
]).create();
await pubGet();
server.dontAllowDownloads();
@@ -419,7 +419,7 @@
// Pinned version. See that the widened constraint is correct.
'baz': '1.0.0',
},
- })
+ }),
]).create();
await pubGet();
server
@@ -440,7 +440,7 @@
'3.0.1',
constraint: VersionConstraint.parse('^3.0.0'),
),
- _PackageVersion('bar', '2.0.0')
+ _PackageVersion('bar', '2.0.0'),
],
reportAssertions: (report) {
expect(
@@ -463,7 +463,7 @@
await d.appDir(
dependencies: {
'foo': '^1.0.0',
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
).create();
await pubGet();
@@ -494,13 +494,13 @@
await d.appDir(
dependencies: {
'foo': {
- 'git': {'url': '../foo.git'}
+ 'git': {'url': '../foo.git'},
},
'bar': {
// A git dependency with a version constraint.
'git': {'url': '../bar.git'},
'version': '^1.0.0',
- }
+ },
},
).create();
await pubGet();
@@ -546,7 +546,7 @@
await _reportWithForbidden(
context,
{
- 'foo': ['1.1.1', '1.1.2']
+ 'foo': ['1.1.1', '1.1.2'],
},
targetPackage: 'foo',
resultAssertions: (r) {
@@ -573,7 +573,7 @@
await _reportWithForbidden(
context,
{
- 'foo': ['1.1.1', '2.0.0']
+ 'foo': ['1.1.1', '2.0.0'],
},
targetPackage: 'foo',
resultAssertions: (r) {
@@ -619,7 +619,7 @@
context,
{
'foo': ['1.1.1', '2.0.0'],
- 'bar': ['2.0.0']
+ 'bar': ['2.0.0'],
},
targetPackage: 'foo',
resultAssertions: (r) {
@@ -645,7 +645,7 @@
Map<String, Object?> toJson() => {
'name': name,
'version': version,
- if (constraint != null) 'constraint': constraint.toString()
+ if (constraint != null) 'constraint': constraint.toString(),
};
}
diff --git a/test/deps/executables_test.dart b/test/deps/executables_test.dart
index 4eb61ff..86988e2 100644
--- a/test/deps/executables_test.dart
+++ b/test/deps/executables_test.dart
@@ -25,7 +25,7 @@
testWithGolden('skips non-Dart executables', (ctx) async {
await d.dir(appPath, [
d.appPubspec(),
- d.dir('bin', [d.file('foo.py'), d.file('bar.sh')])
+ d.dir('bin', [d.file('foo.py'), d.file('bar.sh')]),
]).create();
await ctx.runExecutablesTest();
@@ -37,7 +37,7 @@
d.dir(
'bin',
[d.file('foo.dart', _validMain), d.file('bar.dart', _invalidMain)],
- )
+ ),
]).create();
await ctx.runExecutablesTest();
@@ -48,8 +48,8 @@
d.appPubspec(),
d.dir('bin', [
d.file('foo.dart', _validMain),
- d.dir('sub', [d.file('bar.dart', _validMain)])
- ])
+ d.dir('sub', [d.file('bar.dart', _validMain)]),
+ ]),
]).create();
await ctx.runExecutablesTest();
@@ -58,15 +58,15 @@
testWithGolden('lists executables from a dependency', (ctx) async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('bar.dart', _validMain)])
+ d.dir('bin', [d.file('bar.dart', _validMain)]),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await ctx.runExecutablesTest();
@@ -77,9 +77,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await d.dir('foo', [
@@ -87,15 +87,15 @@
'foo',
'1.0.0',
deps: {
- 'baz': {'path': '../baz'}
+ 'baz': {'path': '../baz'},
},
),
- d.dir('bin', [d.file('bar.dart', _validMain)])
+ d.dir('bin', [d.file('bar.dart', _validMain)]),
]).create();
await d.dir('baz', [
d.libPubspec('baz', '1.0.0'),
- d.dir('bin', [d.file('qux.dart', _validMain)])
+ d.dir('bin', [d.file('qux.dart', _validMain)]),
]).create();
await ctx.runExecutablesTest();
@@ -106,10 +106,10 @@
d.appPubspec(
dependencies: {
'foo': {'path': '../foo'},
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
),
- d.dir('bin', [d.file('myapp.dart', _validMain)])
+ d.dir('bin', [d.file('myapp.dart', _validMain)]),
]).create();
await d.dir('foo', [
@@ -117,12 +117,12 @@
d.dir(
'bin',
[d.file('baz.dart', _validMain), d.file('foo.dart', _validMain)],
- )
+ ),
]).create();
await d.dir('bar', [
d.libPubspec('bar', '1.0.0'),
- d.dir('bin', [d.file('qux.dart', _validMain)])
+ d.dir('bin', [d.file('qux.dart', _validMain)]),
]).create();
await ctx.runExecutablesTest();
@@ -131,16 +131,16 @@
testWithGolden('dev dependencies', (ctx) async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('bar.dart', _validMain)])
+ d.dir('bin', [d.file('bar.dart', _validMain)]),
]).create();
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
'dev_dependencies': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).create();
await ctx.runExecutablesTest();
@@ -149,7 +149,7 @@
testWithGolden('overriden dependencies executables', (ctx) async {
await d.dir('foo-1.0', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('bar.dart', _validMain)])
+ d.dir('bin', [d.file('bar.dart', _validMain)]),
]).create();
await d.dir('foo-2.0', [
@@ -157,19 +157,19 @@
d.dir(
'bin',
[d.file('bar.dart', _validMain), d.file('baz.dart', _validMain)],
- )
+ ),
]).create();
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
'dependencies': {
- 'foo': {'path': '../foo-1.0'}
+ 'foo': {'path': '../foo-1.0'},
},
'dependency_overrides': {
- 'foo': {'path': '../foo-2.0'}
- }
- })
+ 'foo': {'path': '../foo-2.0'},
+ },
+ }),
]).create();
await ctx.runExecutablesTest();
diff --git a/test/deps_test.dart b/test/deps_test.dart
index b10ceb2..bc36085 100644
--- a/test/deps_test.dart
+++ b/test/deps_test.dart
@@ -38,11 +38,11 @@
'dependencies': {
'normal': 'any',
'overridden': '1.0.0',
- 'from_path': {'path': '../from_path'}
+ 'from_path': {'path': '../from_path'},
},
'dev_dependencies': {'unittest': 'any'},
- 'dependency_overrides': {'overridden': '2.0.0', 'override_only': 'any'}
- })
+ 'dependency_overrides': {'overridden': '2.0.0', 'override_only': 'any'},
+ }),
]).create();
});
diff --git a/test/descriptor.dart b/test/descriptor.dart
index 38f9161..bcca9a1 100644
--- a/test/descriptor.dart
+++ b/test/descriptor.dart
@@ -40,7 +40,7 @@
file('LICENSE', 'Eh, do what you want.'),
file('README.md', "This package isn't real."),
file('CHANGELOG.md', '# $version\nFirst version\n'),
- dir('lib', [file('test_pkg.dart', 'int i = 1;')])
+ dir('lib', [file('test_pkg.dart', 'int i = 1;')]),
]);
/// Returns a descriptor of a snapshot that can't be run by the current VM.
@@ -214,7 +214,7 @@
dir(
'hosted-hashes',
[dir('localhost%58${port ?? globalServer.port}', contents)],
- )
+ ),
]);
}
diff --git a/test/descriptor/git.dart b/test/descriptor/git.dart
index d092d99..7fe646b 100644
--- a/test/descriptor/git.dart
+++ b/test/descriptor/git.dart
@@ -25,7 +25,7 @@
'',
],
['add', '.'],
- ['commit', '-m', 'initial commit', '--allow-empty']
+ ['commit', '-m', 'initial commit', '--allow-empty'],
]);
}
@@ -37,7 +37,7 @@
await super.create(parent);
await _runGitCommands(parent, [
['add', '.'],
- ['commit', '-m', 'update']
+ ['commit', '-m', 'update'],
]);
}
diff --git a/test/dev_dependency_test.dart b/test/dev_dependency_test.dart
index 25bdaa8..3d19911 100644
--- a/test/dev_dependency_test.dart
+++ b/test/dev_dependency_test.dart
@@ -21,8 +21,8 @@
'dev_dependencies': {
'foo': {'path': '../foo'},
'bar': {'path': '../bar'},
- }
- })
+ },
+ }),
]).create();
await pubGet();
@@ -40,9 +40,9 @@
'foo',
'0.0.1',
deps: {
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
- )
+ ),
]).create();
await d
@@ -52,9 +52,9 @@
d.pubspec({
'name': 'myapp',
'dev_dependencies': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).create();
await pubGet();
@@ -72,9 +72,9 @@
'name': 'foo',
'version': '0.0.1',
'dev_dependencies': {
- 'bar': {'path': '../bar'}
- }
- })
+ 'bar': {'path': '../bar'},
+ },
+ }),
]).create();
await d
@@ -83,9 +83,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await pubGet();
diff --git a/test/directory_option_test.dart b/test/directory_option_test.dart
index d585f0c..da0505e 100644
--- a/test/directory_option_test.dart
+++ b/test/directory_option_test.dart
@@ -24,7 +24,7 @@
(request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Good job!'}
+ 'success': {'message': 'Good job!'},
}),
headers: {'content-type': 'application/json'},
);
@@ -36,23 +36,23 @@
dir('bin', [
file('app.dart', '''
main() => print('Hi');
-''')
+'''),
]),
dir('example', [
pubspec({
'name': 'example',
'dependencies': {
- 'test_pkg': {'path': '../'}
- }
- })
+ 'test_pkg': {'path': '../'},
+ },
+ }),
]),
dir('example2', [
pubspec({
'name': 'example',
'dependencies': {
- 'myapp': {'path': '../'} // Wrong name of dependency
- }
- })
+ 'myapp': {'path': '../'}, // Wrong name of dependency
+ },
+ }),
]),
]).create();
diff --git a/test/downgrade/doesnt_change_git_dependencies_test.dart b/test/downgrade/doesnt_change_git_dependencies_test.dart
index cb77483..33ab4ed 100644
--- a/test/downgrade/doesnt_change_git_dependencies_test.dart
+++ b/test/downgrade/doesnt_change_git_dependencies_test.dart
@@ -18,7 +18,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
diff --git a/test/downgrade/dry_run_does_not_apply_changes_test.dart b/test/downgrade/dry_run_does_not_apply_changes_test.dart
index 5693a78..a52dc17 100644
--- a/test/downgrade/dry_run_does_not_apply_changes_test.dart
+++ b/test/downgrade/dry_run_does_not_apply_changes_test.dart
@@ -38,7 +38,7 @@
// The lockfile should be unmodified.
d.file('pubspec.lock', contains('2.0.0')),
// The "packages" directory should not have been regenerated.
- d.nothing('packages')
+ d.nothing('packages'),
]).validate();
});
}
diff --git a/test/embedding/embedding_test.dart b/test/embedding/embedding_test.dart
index 6ab32ad..11df2d4 100644
--- a/test/embedding/embedding_test.dart
+++ b/test/embedding/embedding_test.dart
@@ -106,7 +106,7 @@
'flutter_gen',
'1.0.0',
contents: [
- d.dir('bin', [d.file('flutter_gen.dart', 'main() {print("hi");}')])
+ d.dir('bin', [d.file('flutter_gen.dart', 'main() {print("hi");}')]),
],
);
@@ -136,7 +136,7 @@
print('Hi');
exit(123);
}
-''')
+'''),
]),
]).create();
await ctx.runEmbedding(
@@ -198,17 +198,17 @@
await d.dir('dep', [
d.pubspec({
'name': 'dep',
- 'environment': {'sdk': '^3.0.0'}
- })
+ 'environment': {'sdk': '^3.0.0'},
+ }),
]).create();
final app = d.dir(appPath, [
d.appPubspec(
dependencies: {
'foo': '1.0.0',
// The path dependency should not go to analytics.
- 'dep': {'path': '../dep'}
+ 'dep': {'path': '../dep'},
},
- )
+ ),
]);
await app.create();
@@ -235,7 +235,7 @@
'value': 1,
'cd1': 'direct',
'ni': '1',
- }
+ },
},
{
'hitType': 'event',
@@ -246,7 +246,7 @@
'value': 1,
'cd1': 'transitive',
'ni': '1',
- }
+ },
},
{
'hitType': 'timing',
@@ -254,8 +254,8 @@
'variableName': 'resolution',
'time': isA<int>(),
'category': 'pub-get',
- 'label': null
- }
+ 'label': null,
+ },
},
});
// Don't write the logs to file on a normal run.
@@ -299,11 +299,11 @@
d.pubspec({
'name': 'myapp',
'environment': {'sdk': '^2.18.0'},
- 'dependencies': {'foo': '^1.0.0'}
+ 'dependencies': {'foo': '^1.0.0'},
}),
d.dir('bin', [
d.file('myapp.dart', 'main() {print(42);}'),
- ])
+ ]),
]).create();
final server = await servePackages();
@@ -311,7 +311,7 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '^2.18.0'}
+ 'environment': {'sdk': '^2.18.0'},
},
);
@@ -324,7 +324,7 @@
'foo',
'1.0.1',
pubspec: {
- 'environment': {'sdk': '^2.18.0'}
+ 'environment': {'sdk': '^2.18.0'},
},
);
@@ -368,11 +368,11 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependencies': {'foo': '^1.0.0'}
+ 'dependencies': {'foo': '^1.0.0'},
}),
d.dir('bin', [
d.file('myapp.dart', 'main() {print(42);}'),
- ])
+ ]),
]).create();
final server = await servePackages();
@@ -399,11 +399,11 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependencies': {'foo': '^1.0.0'}
+ 'dependencies': {'foo': '^1.0.0'},
}),
d.dir('bin', [
d.file('myapp.dart', 'main() {print(42);}'),
- ])
+ ]),
]).create();
final server = await servePackages();
diff --git a/test/embedding/ensure_pubspec_resolved.dart b/test/embedding/ensure_pubspec_resolved.dart
index fd30bb6..ba46efd 100644
--- a/test/embedding/ensure_pubspec_resolved.dart
+++ b/test/embedding/ensure_pubspec_resolved.dart
@@ -31,7 +31,7 @@
await d.dir(appPath, [
d.appPubspec(),
d.dir('web', []),
- d.dir('bin', [d.file('script.dart', "main() => print('hello!');")])
+ d.dir('bin', [d.file('script.dart', "main() => print('hello!');")]),
]).create();
await pubGet();
@@ -41,14 +41,14 @@
'does not require a pub get if a `flutter_gen` package is injected into package_config.json',
() async {
await d.dir('bar', [
- d.pubspec({'name': 'bar'})
+ d.pubspec({'name': 'bar'}),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
- )
+ ),
]).create();
await pubGet();
@@ -90,9 +90,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
// Ensure that the pubspec looks newer than the lockfile.
@@ -104,7 +104,7 @@
test('the lockfile has a dependency from the wrong source', () async {
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': '1.0.0'})
+ d.appPubspec(dependencies: {'foo': '1.0.0'}),
]).create();
await pubGet();
@@ -120,7 +120,7 @@
test('the lockfile has a dependency from an unknown source', () async {
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': '1.0.0'})
+ d.appPubspec(dependencies: {'foo': '1.0.0'}),
]).create();
await pubGet();
@@ -133,11 +133,11 @@
'foo': {
'description': 'foo',
'version': '1.0.0',
- 'source': 'sdk'
- }
- }
+ 'source': 'sdk',
+ },
+ },
}),
- )
+ ),
]).create();
// Ensure that the pubspec looks newer than the lockfile.
@@ -154,9 +154,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../bar'}
+ 'foo': {'path': '../bar'},
},
- )
+ ),
]).create();
await pubGet();
@@ -172,13 +172,13 @@
test('the pubspec has an incompatible version of a dependency', () async {
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': '1.0.0'})
+ d.appPubspec(dependencies: {'foo': '1.0.0'}),
]).create();
await pubGet();
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': '2.0.0'})
+ d.appPubspec(dependencies: {'foo': '2.0.0'}),
]).create();
// Ensure that the pubspec looks newer than the lockfile.
@@ -192,7 +192,7 @@
'the lockfile is pointing to an unavailable package with a newer '
'pubspec', () async {
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': '1.0.0'})
+ d.appPubspec(dependencies: {'foo': '1.0.0'}),
]).create();
await pubGet();
@@ -212,9 +212,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../bar'}
+ 'foo': {'path': '../bar'},
},
- )
+ ),
]).create();
await pubGet();
@@ -247,7 +247,7 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '>=3.0.0 <3.1.0'}
+ 'environment': {'sdk': '>=3.0.0 <3.1.0'},
},
);
@@ -265,7 +265,7 @@
'foo',
'1.0.1',
pubspec: {
- 'environment': {'sdk': '^3.0.0'}
+ 'environment': {'sdk': '^3.0.0'},
},
);
@@ -285,15 +285,15 @@
pubspec: {
'environment': {
'flutter': '>=1.0.0 <2.0.0',
- 'sdk': defaultSdkConstraint
- }
+ 'sdk': defaultSdkConstraint,
+ },
},
);
await d.dir('flutter', [d.file('version', '1.2.3')]).create();
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': '^3.0.0'})
+ d.appPubspec(dependencies: {'foo': '^3.0.0'}),
]).create();
await pubGet(
@@ -308,8 +308,8 @@
pubspec: {
'environment': {
'flutter': '>=0.1.0 <2.0.0',
- 'sdk': defaultSdkConstraint
- }
+ 'sdk': defaultSdkConstraint,
+ },
},
);
@@ -322,22 +322,22 @@
test("a path dependency's dependency doesn't match the lockfile",
() async {
await d.dir('bar', [
- d.libPubspec('bar', '1.0.0', deps: {'foo': '1.0.0'})
+ d.libPubspec('bar', '1.0.0', deps: {'foo': '1.0.0'}),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
- )
+ ),
]).create();
await pubGet();
// Update bar's pubspec without touching the app's.
await d.dir('bar', [
- d.libPubspec('bar', '1.0.0', deps: {'foo': '2.0.0'})
+ d.libPubspec('bar', '1.0.0', deps: {'foo': '2.0.0'}),
]).create();
await _implicitPubGet('../bar/pubspec.yaml has changed '
@@ -360,9 +360,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
- )
+ ),
]).create();
await pubGet();
@@ -388,7 +388,7 @@
'the pubspec is older than the lockfile which is older than the '
'package-config, even if the contents are wrong', () async {
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': '1.0.0'})
+ d.appPubspec(dependencies: {'foo': '1.0.0'}),
]).create();
// Ensure we get a new mtime (mtime is only reported with 1s precision)
await _touch('pubspec.yaml');
@@ -402,7 +402,7 @@
test("the pubspec is newer than the lockfile, but they're up-to-date",
() async {
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': '1.0.0'})
+ d.appPubspec(dependencies: {'foo': '1.0.0'}),
]).create();
await pubGet();
@@ -415,15 +415,15 @@
// Regression test for #1416
test('a path dependency has a dependency on the root package', () async {
await d.dir('foo', [
- d.libPubspec('foo', '1.0.0', deps: {'myapp': 'any'})
+ d.libPubspec('foo', '1.0.0', deps: {'myapp': 'any'}),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await pubGet();
@@ -437,7 +437,7 @@
"the lockfile is newer than package_config.json, but it's up-to-date",
() async {
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': '1.0.0'})
+ d.appPubspec(dependencies: {'foo': '1.0.0'}),
]).create();
await pubGet();
@@ -452,15 +452,15 @@
'bar',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '0.0.0-fake'}
+ 'environment': {'sdk': '0.0.0-fake'},
},
);
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependency_overrides': {'bar': '1.0.0'}
- })
+ 'dependency_overrides': {'bar': '1.0.0'},
+ }),
]).create();
await pubGet();
@@ -480,15 +480,15 @@
pubspec: {
'environment': {
'flutter': '>=1.0.0 <2.0.0',
- 'sdk': defaultSdkConstraint
- }
+ 'sdk': defaultSdkConstraint,
+ },
},
);
await d.dir('flutter', [d.file('version', '1.2.3')]).create();
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': '3.0.0'})
+ d.appPubspec(dependencies: {'foo': '3.0.0'}),
]).create();
await pubGet(
diff --git a/test/embedding/get_executable_for_command_test.dart b/test/embedding/get_executable_for_command_test.dart
index f56c57c..351b327 100644
--- a/test/embedding/get_executable_for_command_test.dart
+++ b/test/embedding/get_executable_for_command_test.dart
@@ -61,7 +61,7 @@
Future<void> main() async {
test('Finds a direct dart-file without pub get', () async {
await d.dir('foo', [
- d.dir('bar', [d.file('bar.dart', 'main() {print(42);}')])
+ d.dir('bar', [d.file('bar.dart', 'main() {print(42);}')]),
]).create();
final dir = d.path('foo');
@@ -86,7 +86,7 @@
test('Looks for file when no pubspec.yaml', () async {
await d.dir('foo', [
- d.dir('bar', [d.file('bar.dart', 'main() {print(42);}')])
+ d.dir('bar', [d.file('bar.dart', 'main() {print(42);}')]),
]).create();
final dir = d.path('foo');
@@ -143,11 +143,11 @@
d.pubspec({
'name': 'myapp',
'environment': {'sdk': '^$_currentVersion'},
- 'dependencies': {'foo': '^1.0.0'}
+ 'dependencies': {'foo': '^1.0.0'},
}),
d.dir('bin', [
d.file('myapp.dart', 'main() {print(42);}'),
- ])
+ ]),
]).create();
await servePackages();
@@ -184,7 +184,7 @@
}),
d.dir('bin', [
d.file('foo.dart', 'main() {'),
- ])
+ ]),
]).create();
await servePackages();
@@ -204,13 +204,13 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '^$_currentVersion'}
+ 'environment': {'sdk': '^$_currentVersion'},
},
contents: [
d.dir('bin', [
d.file('foo.dart', 'main() {print(42);}'),
- d.file('tool.dart', 'main() {print(42);}')
- ])
+ d.file('tool.dart', 'main() {print(42);}'),
+ ]),
],
);
@@ -230,8 +230,8 @@
}),
d.dir('bin', [
d.file('myapp.dart', 'main() {print(42);}'),
- d.file('tool.dart', 'main() {print(42);}')
- ])
+ d.file('tool.dart', 'main() {print(42);}'),
+ ]),
]).create();
final dir = d.path(appPath);
diff --git a/test/get/enforce_lockfile_test.dart b/test/get/enforce_lockfile_test.dart
index 136b8df..9cafa8e 100644
--- a/test/get/enforce_lockfile_test.dart
+++ b/test/get/enforce_lockfile_test.dart
@@ -57,10 +57,10 @@
'0.0.0',
deps: {
'bar': '1.0.0',
- 'myapp': {'path': '../'}
+ 'myapp': {'path': '../'},
},
- )
- ])
+ ),
+ ]),
]).create();
await pubGet(args: ['--example']);
diff --git a/test/get/flutter_constraint_upper_bound_ignored_test.dart b/test/get/flutter_constraint_upper_bound_ignored_test.dart
index bcfb527..089a5fd 100644
--- a/test/get/flutter_constraint_upper_bound_ignored_test.dart
+++ b/test/get/flutter_constraint_upper_bound_ignored_test.dart
@@ -16,7 +16,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'flutter': '>=0.5.0 <1.0.0'}
+ 'environment': {'flutter': '>=0.5.0 <1.0.0'},
}),
]).create();
diff --git a/test/get/gets_in_example_folder_test.dart b/test/get/gets_in_example_folder_test.dart
index f18daae..fa38100 100644
--- a/test/get/gets_in_example_folder_test.dart
+++ b/test/get/gets_in_example_folder_test.dart
@@ -25,10 +25,10 @@
d.pubspec({
'name': 'app_example',
'dependencies': {
- 'myapp': {'path': '..'}
- }
- })
- ])
+ 'myapp': {'path': '..'},
+ },
+ }),
+ ]),
]).create();
await pubCommand(command, args: ['--no-example']);
@@ -65,10 +65,10 @@
d.pubspec({
'name': 'broken name',
'dependencies': {
- 'myapp': {'path': '..'}
- }
- })
- ])
+ 'myapp': {'path': '..'},
+ },
+ }),
+ ]),
]).create();
await pubGet(
args: ['--example'],
diff --git a/test/get/git/check_out_and_upgrade_test.dart b/test/get/git/check_out_and_upgrade_test.dart
index 1de2aa6..c654e2b 100644
--- a/test/get/git/check_out_and_upgrade_test.dart
+++ b/test/get/git/check_out_and_upgrade_test.dart
@@ -18,7 +18,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -27,8 +27,8 @@
await d.dir(cachePath, [
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
- d.gitPackageRevisionCacheDir('foo')
- ])
+ d.gitPackageRevisionCacheDir('foo'),
+ ]),
]).validate();
await d.dir(cachePath, [
@@ -37,7 +37,7 @@
d.gitPackageRepoCacheDir('foo'),
]),
d.gitPackageRevisionCacheDir('foo'),
- ])
+ ]),
]).validate();
var originalFooSpec = packageSpec('foo');
@@ -55,8 +55,8 @@
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
d.gitPackageRevisionCacheDir('foo'),
- d.gitPackageRevisionCacheDir('foo', modifier: 2)
- ])
+ d.gitPackageRevisionCacheDir('foo', modifier: 2),
+ ]),
]).validate();
expect(packageSpec('foo'), isNot(originalFooSpec));
diff --git a/test/get/git/check_out_branch_test.dart b/test/get/git/check_out_branch_test.dart
index 7d181fe..62d5706 100644
--- a/test/get/git/check_out_branch_test.dart
+++ b/test/get/git/check_out_branch_test.dart
@@ -26,8 +26,8 @@
await d.appDir(
dependencies: {
'foo': {
- 'git': {'url': '../foo.git', 'ref': 'old'}
- }
+ 'git': {'url': '../foo.git', 'ref': 'old'},
+ },
},
).create();
@@ -39,7 +39,7 @@
d.gitPackageRepoCacheDir('foo'),
]),
d.gitPackageRevisionCacheDir('foo', modifier: 1),
- ])
+ ]),
]).validate();
});
}
diff --git a/test/get/git/check_out_revision_test.dart b/test/get/git/check_out_revision_test.dart
index 91d71f8..61646cd 100644
--- a/test/get/git/check_out_revision_test.dart
+++ b/test/get/git/check_out_revision_test.dart
@@ -26,8 +26,8 @@
await d.appDir(
dependencies: {
'foo': {
- 'git': {'url': '../foo.git', 'ref': commit}
- }
+ 'git': {'url': '../foo.git', 'ref': commit},
+ },
},
).create();
@@ -39,7 +39,7 @@
d.gitPackageRepoCacheDir('foo'),
]),
d.gitPackageRevisionCacheDir('foo', modifier: 1),
- ])
+ ]),
]).validate();
expect(packageSpec('foo')['rootUri'], contains(commit));
diff --git a/test/get/git/check_out_test.dart b/test/get/git/check_out_test.dart
index 09738a8..83844a4 100644
--- a/test/get/git/check_out_test.dart
+++ b/test/get/git/check_out_test.dart
@@ -25,7 +25,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -44,8 +44,8 @@
await d.dir(cachePath, [
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
- d.gitPackageRevisionCacheDir('foo')
- ])
+ d.gitPackageRevisionCacheDir('foo'),
+ ]),
]).validate();
expect(packageSpec('foo'), isNotNull);
@@ -65,7 +65,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -93,7 +93,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': 'http://localhost:${server.url.port}/$funkyName'}
+ 'foo': {'git': 'http://localhost:${server.url.port}/$funkyName'},
},
).create();
@@ -102,8 +102,8 @@
await d.dir(cachePath, [
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('____foo')]),
- d.gitPackageRevisionCacheDir('foo', repoName: '____foo')
- ])
+ d.gitPackageRevisionCacheDir('foo', repoName: '____foo'),
+ ]),
]).validate();
expect(packageSpec('foo'), isNotNull);
diff --git a/test/get/git/check_out_transitive_test.dart b/test/get/git/check_out_transitive_test.dart
index 5cd7ada..76833c6 100644
--- a/test/get/git/check_out_transitive_test.dart
+++ b/test/get/git/check_out_transitive_test.dart
@@ -20,11 +20,12 @@
'1.0.0',
deps: {
'bar': {
- 'git':
- p.toUri(p.absolute(d.sandbox, appPath, '../bar.git')).toString()
- }
+ 'git': p
+ .toUri(p.absolute(d.sandbox, appPath, '../bar.git'))
+ .toString(),
+ },
},
- )
+ ),
]).create();
await d.git(
@@ -36,8 +37,8 @@
dependencies: {
'foo': {
'git':
- p.toUri(p.absolute(d.sandbox, appPath, '../foo.git')).toString()
- }
+ p.toUri(p.absolute(d.sandbox, appPath, '../foo.git')).toString(),
+ },
},
).create();
@@ -50,8 +51,8 @@
[d.gitPackageRepoCacheDir('foo'), d.gitPackageRepoCacheDir('bar')],
),
d.gitPackageRevisionCacheDir('foo'),
- d.gitPackageRevisionCacheDir('bar')
- ])
+ d.gitPackageRevisionCacheDir('bar'),
+ ]),
]).validate();
expect(packageSpec('foo'), isNotNull);
@@ -67,9 +68,9 @@
'foo',
'1.0.0',
deps: {
- 'bar': {'git': '../bar.git'}
+ 'bar': {'git': '../bar.git'},
},
- )
+ ),
]).create();
await d.git(
@@ -81,8 +82,8 @@
dependencies: {
'foo': {
'git':
- p.toUri(p.absolute(d.sandbox, appPath, '../foo.git')).toString()
- }
+ p.toUri(p.absolute(d.sandbox, appPath, '../foo.git')).toString(),
+ },
},
).create();
@@ -104,9 +105,9 @@
'foo',
'1.0.0',
deps: {
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
- )
+ ),
]).create();
await d
@@ -116,8 +117,8 @@
dependencies: {
'foo': {
'git':
- p.toUri(p.absolute(d.sandbox, appPath, '../foo.git')).toString()
- }
+ p.toUri(p.absolute(d.sandbox, appPath, '../foo.git')).toString(),
+ },
},
).create();
diff --git a/test/get/git/check_out_twice_test.dart b/test/get/git/check_out_twice_test.dart
index 4bcc945..7b1a379 100644
--- a/test/get/git/check_out_twice_test.dart
+++ b/test/get/git/check_out_twice_test.dart
@@ -18,7 +18,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -27,8 +27,8 @@
await d.dir(cachePath, [
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
- d.gitPackageRevisionCacheDir('foo')
- ])
+ d.gitPackageRevisionCacheDir('foo'),
+ ]),
]).validate();
expect(packageSpec('foo'), isNotNull);
diff --git a/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart b/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart
index f18f5cd..7e56b86 100644
--- a/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart
+++ b/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart
@@ -26,7 +26,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -57,8 +57,8 @@
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
d.gitPackageRevisionCacheDir('foo'),
- d.gitPackageRevisionCacheDir('foo', modifier: 2)
- ])
+ d.gitPackageRevisionCacheDir('foo', modifier: 2),
+ ]),
]).validate();
expect(packageSpec('foo'), isNot(originalFooSpec));
diff --git a/test/get/git/check_out_with_trailing_slash_test.dart b/test/get/git/check_out_with_trailing_slash_test.dart
index 43f3d31..3828cf5 100644
--- a/test/get/git/check_out_with_trailing_slash_test.dart
+++ b/test/get/git/check_out_with_trailing_slash_test.dart
@@ -19,7 +19,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git/'}
+ 'foo': {'git': '../foo.git/'},
},
).create();
@@ -28,8 +28,8 @@
await d.dir(cachePath, [
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
- d.gitPackageRevisionCacheDir('foo')
- ])
+ d.gitPackageRevisionCacheDir('foo'),
+ ]),
]).validate();
await d.dir(cachePath, [
@@ -38,7 +38,7 @@
d.gitPackageRepoCacheDir('foo'),
]),
d.gitPackageRevisionCacheDir('foo'),
- ])
+ ]),
]).validate();
});
});
diff --git a/test/get/git/clean_invalid_git_repo_cache_test.dart b/test/get/git/clean_invalid_git_repo_cache_test.dart
index b91cd39..ae55981 100644
--- a/test/get/git/clean_invalid_git_repo_cache_test.dart
+++ b/test/get/git/clean_invalid_git_repo_cache_test.dart
@@ -34,7 +34,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -43,8 +43,8 @@
await d.dir(cachePath, [
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
- d.gitPackageRevisionCacheDir('foo')
- ])
+ d.gitPackageRevisionCacheDir('foo'),
+ ]),
]).validate();
_invalidateGitCache('foo');
@@ -63,8 +63,8 @@
await d.appDir(
dependencies: {
'foo': {
- 'git': {'url': '../foo.git', 'ref': 'old'}
- }
+ 'git': {'url': '../foo.git', 'ref': 'old'},
+ },
},
).create();
@@ -73,8 +73,8 @@
await d.dir(cachePath, [
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
- d.gitPackageRevisionCacheDir('foo')
- ])
+ d.gitPackageRevisionCacheDir('foo'),
+ ]),
]).validate();
_invalidateGitCache('foo');
@@ -93,8 +93,8 @@
await d.appDir(
dependencies: {
'foo': {
- 'git': {'url': '../foo.git', 'ref': commit}
- }
+ 'git': {'url': '../foo.git', 'ref': commit},
+ },
},
).create();
@@ -103,8 +103,8 @@
await d.dir(cachePath, [
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
- d.gitPackageRevisionCacheDir('foo')
- ])
+ d.gitPackageRevisionCacheDir('foo'),
+ ]),
]).validate();
_invalidateGitCache('foo');
diff --git a/test/get/git/dependency_name_match_pubspec_test.dart b/test/get/git/dependency_name_match_pubspec_test.dart
index 7d6fc57..2dcf169 100644
--- a/test/get/git/dependency_name_match_pubspec_test.dart
+++ b/test/get/git/dependency_name_match_pubspec_test.dart
@@ -22,9 +22,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'weirdname': {'git': '../foo.git'}
+ 'weirdname': {'git': '../foo.git'},
},
- )
+ ),
]).create();
await pubGet(
diff --git a/test/get/git/different_repo_name_test.dart b/test/get/git/different_repo_name_test.dart
index a2e0264..4398274 100644
--- a/test/get/git/different_repo_name_test.dart
+++ b/test/get/git/different_repo_name_test.dart
@@ -21,9 +21,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'weirdname': {'git': '../foo.git'}
+ 'weirdname': {'git': '../foo.git'},
},
- )
+ ),
]).create();
await pubGet();
diff --git a/test/get/git/doesnt_fetch_if_nothing_changes_test.dart b/test/get/git/doesnt_fetch_if_nothing_changes_test.dart
index 4530198..f2212e4 100644
--- a/test/get/git/doesnt_fetch_if_nothing_changes_test.dart
+++ b/test/get/git/doesnt_fetch_if_nothing_changes_test.dart
@@ -21,8 +21,8 @@
await d.appDir(
dependencies: {
'foo': {
- 'git': {'url': '../foo.git'}
- }
+ 'git': {'url': '../foo.git'},
+ },
},
).create();
diff --git a/test/get/git/get_test.dart b/test/get/git/get_test.dart
index 1807389..90868ec 100644
--- a/test/get/git/get_test.dart
+++ b/test/get/git/get_test.dart
@@ -20,8 +20,8 @@
await d.appDir(
dependencies: {
'foo': {
- 'git': {'url': '../foo.git', 'ref': '^BAD_REF'}
- }
+ 'git': {'url': '../foo.git', 'ref': '^BAD_REF'},
+ },
},
).create();
diff --git a/test/get/git/git_not_installed_test.dart b/test/get/git/git_not_installed_test.dart
index d2f2363..a6eed84 100644
--- a/test/get/git/git_not_installed_test.dart
+++ b/test/get/git/git_not_installed_test.dart
@@ -24,7 +24,7 @@
);
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -61,7 +61,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
diff --git a/test/get/git/lock_version_test.dart b/test/get/git/lock_version_test.dart
index 7185ed7..5242af4 100644
--- a/test/get/git/lock_version_test.dart
+++ b/test/get/git/lock_version_test.dart
@@ -20,7 +20,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -33,7 +33,7 @@
d.gitPackageRepoCacheDir('foo'),
]),
d.gitPackageRevisionCacheDir('foo'),
- ])
+ ]),
]).validate();
var originalFooSpec = packageSpec('foo');
diff --git a/test/get/git/locked_revision_without_repo_test.dart b/test/get/git/locked_revision_without_repo_test.dart
index e18e752..9fb8c22 100644
--- a/test/get/git/locked_revision_without_repo_test.dart
+++ b/test/get/git/locked_revision_without_repo_test.dart
@@ -22,7 +22,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -35,7 +35,7 @@
d.gitPackageRepoCacheDir('foo'),
]),
d.gitPackageRevisionCacheDir('foo'),
- ])
+ ]),
]).validate();
var originalFooSpec = packageSpec('foo');
diff --git a/test/get/git/path_test.dart b/test/get/git/path_test.dart
index bb36dd9..eae19ed 100644
--- a/test/get/git/path_test.dart
+++ b/test/get/git/path_test.dart
@@ -18,15 +18,15 @@
ensureGit();
var repo = d.git('foo.git', [
- d.dir('subdir', [d.libPubspec('sub', '1.0.0'), d.libDir('sub', '1.0.0')])
+ d.dir('subdir', [d.libPubspec('sub', '1.0.0'), d.libDir('sub', '1.0.0')]),
]);
await repo.create();
await d.appDir(
dependencies: {
'sub': {
- 'git': {'url': '../foo.git', 'path': 'subdir'}
- }
+ 'git': {'url': '../foo.git', 'path': 'subdir'},
+ },
},
).create();
@@ -36,9 +36,9 @@
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
d.hashDir('foo', [
- d.dir('subdir', [d.libDir('sub', '1.0.0')])
- ])
- ])
+ d.dir('subdir', [d.libDir('sub', '1.0.0')]),
+ ]),
+ ]),
]).validate();
await d.appPackageConfigFile([
@@ -54,16 +54,16 @@
var repo = d.git('foo.git', [
d.dir('sub', [
- d.dir('dir%', [d.libPubspec('sub', '1.0.0'), d.libDir('sub', '1.0.0')])
- ])
+ d.dir('dir%', [d.libPubspec('sub', '1.0.0'), d.libDir('sub', '1.0.0')]),
+ ]),
]);
await repo.create();
await d.appDir(
dependencies: {
'sub': {
- 'git': {'url': '../foo.git', 'path': 'sub/dir%25'}
- }
+ 'git': {'url': '../foo.git', 'path': 'sub/dir%25'},
+ },
},
).create();
@@ -74,10 +74,10 @@
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
d.hashDir('foo', [
d.dir('sub', [
- d.dir('dir%', [d.libDir('sub', '1.0.0')])
- ])
- ])
- ])
+ d.dir('dir%', [d.libDir('sub', '1.0.0')]),
+ ]),
+ ]),
+ ]),
]).validate();
await d.appPackageConfigFile([
@@ -105,8 +105,8 @@
await d.appDir(
dependencies: {
'sub': {
- 'git': {'url': '../foo.git', 'path': '/subdir'}
- }
+ 'git': {'url': '../foo.git', 'path': '/subdir'},
+ },
},
).create();
@@ -121,8 +121,8 @@
await d.appDir(
dependencies: {
'sub': {
- 'git': {'url': '../foo.git', 'path': 'https://subdir'}
- }
+ 'git': {'url': '../foo.git', 'path': 'https://subdir'},
+ },
},
).create();
@@ -137,8 +137,8 @@
await d.appDir(
dependencies: {
'sub': {
- 'git': {'url': '../foo.git', 'path': 'subdir/dir#fragment'}
- }
+ 'git': {'url': '../foo.git', 'path': 'subdir/dir#fragment'},
+ },
},
).create();
@@ -154,8 +154,8 @@
await d.appDir(
dependencies: {
'sub': {
- 'git': {'url': '../foo.git', 'path': 'subdir/dir?query'}
- }
+ 'git': {'url': '../foo.git', 'path': 'subdir/dir?query'},
+ },
},
).create();
@@ -173,9 +173,9 @@
'sub': {
'git': {
'url': '../foo.git',
- 'path': 'bob:pwd@somewhere.example.com/subdir'
- }
- }
+ 'path': 'bob:pwd@somewhere.example.com/subdir',
+ },
+ },
},
).create();
@@ -194,8 +194,8 @@
var repo = d.git('foo.git', [
d.dir('sub', [
- d.dir('dir%', [d.libPubspec('sub', '1.0.0'), d.libDir('sub', '1.0.0')])
- ])
+ d.dir('dir%', [d.libPubspec('sub', '1.0.0'), d.libDir('sub', '1.0.0')]),
+ ]),
]);
await repo.create();
@@ -204,9 +204,9 @@
'sub': {
'git': {
'url': p.toUri(p.join(d.sandbox, 'foo.git')).toString(),
- 'path': 'sub/dir%25'
- }
- }
+ 'path': 'sub/dir%25',
+ },
+ },
},
).create();
@@ -217,10 +217,10 @@
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
d.hashDir('foo', [
d.dir('sub', [
- d.dir('dir%', [d.libDir('sub', '1.0.0')])
- ])
- ])
- ])
+ d.dir('dir%', [d.libDir('sub', '1.0.0')]),
+ ]),
+ ]),
+ ]),
]).validate();
await d.appPackageConfigFile([
@@ -254,18 +254,18 @@
d.dir(
'subdir2',
[d.libPubspec('sub2', '1.0.0'), d.libDir('sub2', '1.0.0')],
- )
+ ),
]);
await repo.create();
await d.appDir(
dependencies: {
'sub1': {
- 'git': {'url': '../foo.git', 'path': 'subdir1'}
+ 'git': {'url': '../foo.git', 'path': 'subdir1'},
},
'sub2': {
- 'git': {'url': '../foo.git', 'path': 'subdir2'}
- }
+ 'git': {'url': '../foo.git', 'path': 'subdir2'},
+ },
},
).create();
@@ -276,9 +276,9 @@
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
d.hashDir('foo', [
d.dir('subdir1', [d.libDir('sub1', '1.0.0')]),
- d.dir('subdir2', [d.libDir('sub2', '1.0.0')])
- ])
- ])
+ d.dir('subdir2', [d.libDir('sub2', '1.0.0')]),
+ ]),
+ ]),
]).validate();
await d.appPackageConfigFile([
@@ -301,7 +301,7 @@
d.dir(
'subdir',
[d.libPubspec('sub1', '1.0.0'), d.libDir('sub1', '1.0.0')],
- )
+ ),
]);
await repo.create();
var oldRevision = await repo.revParse('HEAD');
@@ -312,18 +312,18 @@
d.dir(
'subdir',
[d.libPubspec('sub2', '1.0.0'), d.libDir('sub2', '1.0.0')],
- )
+ ),
]).commit();
var newRevision = await repo.revParse('HEAD');
await d.appDir(
dependencies: {
'sub1': {
- 'git': {'url': '../foo.git', 'path': 'subdir', 'ref': oldRevision}
+ 'git': {'url': '../foo.git', 'path': 'subdir', 'ref': oldRevision},
},
'sub2': {
- 'git': {'url': '../foo.git', 'path': 'subdir'}
- }
+ 'git': {'url': '../foo.git', 'path': 'subdir'},
+ },
},
).create();
@@ -333,12 +333,12 @@
d.dir('git', [
d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
d.dir('foo-$oldRevision', [
- d.dir('subdir', [d.libDir('sub1', '1.0.0')])
+ d.dir('subdir', [d.libDir('sub1', '1.0.0')]),
]),
d.dir('foo-$newRevision', [
- d.dir('subdir', [d.libDir('sub2', '1.0.0')])
- ])
- ])
+ d.dir('subdir', [d.libDir('sub2', '1.0.0')]),
+ ]),
+ ]),
]).validate();
await d.appPackageConfigFile([
diff --git a/test/get/git/require_pubspec_name_test.dart b/test/get/git/require_pubspec_name_test.dart
index 1ae543f..59625c8 100644
--- a/test/get/git/require_pubspec_name_test.dart
+++ b/test/get/git/require_pubspec_name_test.dart
@@ -18,7 +18,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
diff --git a/test/get/git/require_pubspec_test.dart b/test/get/git/require_pubspec_test.dart
index e4d2a7c..36af134 100644
--- a/test/get/git/require_pubspec_test.dart
+++ b/test/get/git/require_pubspec_test.dart
@@ -15,7 +15,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
diff --git a/test/get/git/stay_locked_if_compatible_test.dart b/test/get/git/stay_locked_if_compatible_test.dart
index bc2adb0..3f52179 100644
--- a/test/get/git/stay_locked_if_compatible_test.dart
+++ b/test/get/git/stay_locked_if_compatible_test.dart
@@ -20,7 +20,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -35,7 +35,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git', 'version': '>=1.0.0'}
+ 'foo': {'git': '../foo.git', 'version': '>=1.0.0'},
},
).create();
diff --git a/test/get/git/unlock_if_incompatible_test.dart b/test/get/git/unlock_if_incompatible_test.dart
index 4ef9ecb..56a779c 100644
--- a/test/get/git/unlock_if_incompatible_test.dart
+++ b/test/get/git/unlock_if_incompatible_test.dart
@@ -20,7 +20,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -32,7 +32,7 @@
d.gitPackageRepoCacheDir('foo'),
]),
d.gitPackageRevisionCacheDir('foo'),
- ])
+ ]),
]).validate();
var originalFooSpec = packageSpec('foo');
@@ -44,7 +44,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git', 'version': '>=1.0.0'}
+ 'foo': {'git': '../foo.git', 'version': '>=1.0.0'},
},
).create();
@@ -53,7 +53,7 @@
await d.dir(cachePath, [
d.dir('git', [
d.gitPackageRevisionCacheDir('foo', modifier: 2),
- ])
+ ]),
]).validate();
expect(packageSpec('foo'), isNot(originalFooSpec));
diff --git a/test/get/hosted/avoid_network_requests_test.dart b/test/get/hosted/avoid_network_requests_test.dart
index 58d4a09..0f2bd0c 100644
--- a/test/get/hosted/avoid_network_requests_test.dart
+++ b/test/get/hosted/avoid_network_requests_test.dart
@@ -44,7 +44,7 @@
// Bar should be requested because it's new, but not foo.
'api/packages/bar',
// Need to download it.
- 'packages/bar/versions/1.2.0.tar.gz'
+ 'packages/bar/versions/1.2.0.tar.gz',
]),
);
});
diff --git a/test/get/hosted/get_stress_test.dart b/test/get/hosted/get_stress_test.dart
index 108c540..a8b89e5 100644
--- a/test/get/hosted/get_stress_test.dart
+++ b/test/get/hosted/get_stress_test.dart
@@ -31,7 +31,7 @@
await d.appPackageConfigFile([
d.packageConfigEntry(name: 'foo', version: '1.2.3'),
for (var i = 0; i < 20; i++)
- d.packageConfigEntry(name: 'pkg$i', version: '1.$i.0')
+ d.packageConfigEntry(name: 'pkg$i', version: '1.$i.0'),
]).validate();
});
}
diff --git a/test/get/hosted/get_test.dart b/test/get/hosted/get_test.dart
index 5e90f9f..60d7e24 100644
--- a/test/get/hosted/get_test.dart
+++ b/test/get/hosted/get_test.dart
@@ -42,14 +42,14 @@
'bar',
'1.2.3',
headers: {
- 'x-goog-hash': ['']
+ 'x-goog-hash': [''],
},
)
..serve(
'baz',
'1.2.3',
headers: {
- 'x-goog-hash': ['md5=loremipsum']
+ 'x-goog-hash': ['md5=loremipsum'],
},
);
});
@@ -109,8 +109,8 @@
dependencies: {
'foo': {
'version': '1.2.3',
- 'hosted': {'name': 'foo', 'url': 'http://localhost:${server.port}'}
- }
+ 'hosted': {'name': 'foo', 'url': 'http://localhost:${server.port}'},
+ },
},
).create();
@@ -130,7 +130,7 @@
'foo',
'1.2.3',
headers: {
- 'x-goog-hash': PackageServer.composeChecksumHeader(crc32c: 3381945770)
+ 'x-goog-hash': PackageServer.composeChecksumHeader(crc32c: 3381945770),
},
);
@@ -138,8 +138,8 @@
dependencies: {
'foo': {
'version': '1.2.3',
- 'hosted': {'name': 'foo', 'url': 'http://localhost:${server.port}'}
- }
+ 'hosted': {'name': 'foo', 'url': 'http://localhost:${server.port}'},
+ },
},
).create();
@@ -165,21 +165,21 @@
'foo',
'1.2.3',
headers: {
- 'x-goog-hash': ['crc32c=,md5=']
+ 'x-goog-hash': ['crc32c=,md5='],
},
)
..serve(
'bar',
'1.2.3',
headers: {
- 'x-goog-hash': ['crc32c=loremipsum,md5=loremipsum']
+ 'x-goog-hash': ['crc32c=loremipsum,md5=loremipsum'],
},
)
..serve(
'baz',
'1.2.3',
headers: {
- 'x-goog-hash': ['crc32c=MTIzNDU=,md5=NTQzMjE=']
+ 'x-goog-hash': ['crc32c=MTIzNDU=,md5=NTQzMjE='],
},
);
});
@@ -189,8 +189,8 @@
dependencies: {
'foo': {
'version': '1.2.3',
- 'hosted': {'name': 'foo', 'url': 'http://localhost:${server.port}'}
- }
+ 'hosted': {'name': 'foo', 'url': 'http://localhost:${server.port}'},
+ },
},
).create();
@@ -211,8 +211,8 @@
dependencies: {
'bar': {
'version': '1.2.3',
- 'hosted': {'name': 'bar', 'url': 'http://localhost:${server.port}'}
- }
+ 'hosted': {'name': 'bar', 'url': 'http://localhost:${server.port}'},
+ },
},
).create();
@@ -233,8 +233,8 @@
dependencies: {
'baz': {
'version': '1.2.3',
- 'hosted': {'name': 'baz', 'url': 'http://localhost:${server.port}'}
- }
+ 'hosted': {'name': 'baz', 'url': 'http://localhost:${server.port}'},
+ },
},
).create();
@@ -306,8 +306,8 @@
'name': 'myapp',
'dependencies': {'foo': 'any'},
'dev_dependencies': {'baz': 'any'},
- 'dependency_overrides': {'zip': 'any'}
- })
+ 'dependency_overrides': {'zip': 'any'},
+ }),
]).create();
await pubGet();
@@ -347,8 +347,8 @@
'name': 'myapp',
'dependencies': {'foo': 'any'},
'dev_dependencies': {'baz': 'any'},
- 'dependency_overrides': {'foo': 'any', 'baz': 'any'}
- })
+ 'dependency_overrides': {'foo': 'any', 'baz': 'any'},
+ }),
]).create();
await pubGet();
@@ -381,7 +381,7 @@
'foo',
'1.0.0',
contents: [
- d.dir('blah', [d.file('myduplicatefile'), d.file('myduplicatefile')])
+ d.dir('blah', [d.file('myduplicatefile'), d.file('myduplicatefile')]),
],
);
await d.appDir(dependencies: {'foo': 'any'}).create();
diff --git a/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart b/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart
index 9916bab..d1b90e6 100644
--- a/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart
+++ b/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart
@@ -18,8 +18,8 @@
'1.2.3',
pubspec: {
'dev_dependencies': {
- 'busted': {'not a real source': null}
- }
+ 'busted': {'not a real source': null},
+ },
},
);
diff --git a/test/get/hosted/resolve_with_retracted_package_versions_test.dart b/test/get/hosted/resolve_with_retracted_package_versions_test.dart
index 9e1e227..b6a907e 100644
--- a/test/get/hosted/resolve_with_retracted_package_versions_test.dart
+++ b/test/get/hosted/resolve_with_retracted_package_versions_test.dart
@@ -93,14 +93,14 @@
await populateCache(
{
'foo': ['1.0.0'],
- 'bar': ['1.0.0', '1.1.0']
+ 'bar': ['1.0.0', '1.1.0'],
},
server,
);
await d.cacheDir({
'foo': '1.0.0',
- 'bar': ['1.0.0', '1.1.0']
+ 'bar': ['1.0.0', '1.1.0'],
}).validate();
final barVersionsCache =
@@ -148,8 +148,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': '<3.0.0'},
- 'dependency_overrides': {'foo': '2.0.0'}
- })
+ 'dependency_overrides': {'foo': '2.0.0'},
+ }),
]).create();
server.retractPackageVersion('foo', '2.0.0');
@@ -182,8 +182,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': '<=3.0.0'},
- 'dependency_overrides': {'foo': '2.0.0'}
- })
+ 'dependency_overrides': {'foo': '2.0.0'},
+ }),
]).create();
await pubUpgrade();
diff --git a/test/get/hosted/warn_about_discontinued_test.dart b/test/get/hosted/warn_about_discontinued_test.dart
index 6dfc2fa..17899fc 100644
--- a/test/get/hosted/warn_about_discontinued_test.dart
+++ b/test/get/hosted/warn_about_discontinued_test.dart
@@ -110,7 +110,7 @@
foo: 1.2.3
environment:
sdk: '$defaultSdkConstraint'
-''')
+'''),
]).create();
await pubGet();
diff --git a/test/get/package_name_test.dart b/test/get/package_name_test.dart
index 194324e..a56a3f2 100644
--- a/test/get/package_name_test.dart
+++ b/test/get/package_name_test.dart
@@ -11,7 +11,7 @@
void main() {
test('pub get fails with a non-identifier name', () async {
await d.dir(appPath, [
- d.pubspec({'name': 'invalid package name', 'version': '1.0.0'})
+ d.pubspec({'name': 'invalid package name', 'version': '1.0.0'}),
]).create();
await pubGet(
@@ -31,7 +31,7 @@
test('pub get fails with a reserved word name', () async {
await d.dir(appPath, [
- d.pubspec({'name': 'return', 'version': '1.0.0'})
+ d.pubspec({'name': 'return', 'version': '1.0.0'}),
]).create();
await pubGet(
@@ -52,7 +52,7 @@
test('pub get allows a name with dotted identifiers', () async {
await d.dir(appPath, [
d.pubspec({'name': 'foo.bar.baz', 'version': '1.0.0'}),
- d.libDir('foo.bar.baz', 'foo.bar.baz 1.0.0')
+ d.libDir('foo.bar.baz', 'foo.bar.baz 1.0.0'),
]).create();
await pubGet();
@@ -60,7 +60,7 @@
await d.dir(appPath, [
d.packageConfigFile(
[d.packageConfigEntry(name: 'foo.bar.baz', path: '.')],
- )
+ ),
]).validate();
});
}
diff --git a/test/get/path/absolute_path_test.dart b/test/get/path/absolute_path_test.dart
index 1fa9ddb..e0b0ad4 100644
--- a/test/get/path/absolute_path_test.dart
+++ b/test/get/path/absolute_path_test.dart
@@ -16,9 +16,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': path.join(d.sandbox, 'foo')}
+ 'foo': {'path': path.join(d.sandbox, 'foo')},
},
- )
+ ),
]).create();
await pubGet();
diff --git a/test/get/path/absolute_symlink_test.dart b/test/get/path/absolute_symlink_test.dart
index c0680b7..89f7fe8 100644
--- a/test/get/path/absolute_symlink_test.dart
+++ b/test/get/path/absolute_symlink_test.dart
@@ -19,9 +19,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': fooPath}
+ 'foo': {'path': fooPath},
},
- )
+ ),
]).create();
await pubGet();
diff --git a/test/get/path/empty_pubspec_test.dart b/test/get/path/empty_pubspec_test.dart
index 9ff471d..e984a9a 100644
--- a/test/get/path/empty_pubspec_test.dart
+++ b/test/get/path/empty_pubspec_test.dart
@@ -17,9 +17,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await pubGet(
diff --git a/test/get/path/no_pubspec_test.dart b/test/get/path/no_pubspec_test.dart
index 5962ff9..570017c 100644
--- a/test/get/path/no_pubspec_test.dart
+++ b/test/get/path/no_pubspec_test.dart
@@ -18,9 +18,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': fooPath}
+ 'foo': {'path': fooPath},
},
- )
+ ),
]).create();
await pubGet(
diff --git a/test/get/path/nonexistent_dir_test.dart b/test/get/path/nonexistent_dir_test.dart
index d914dfd..dd6ba59 100644
--- a/test/get/path/nonexistent_dir_test.dart
+++ b/test/get/path/nonexistent_dir_test.dart
@@ -16,9 +16,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': badPath}
+ 'foo': {'path': badPath},
},
- )
+ ),
]).create();
await pubGet(
diff --git a/test/get/path/path_is_file_test.dart b/test/get/path/path_is_file_test.dart
index 9853648..0727902 100644
--- a/test/get/path/path_is_file_test.dart
+++ b/test/get/path/path_is_file_test.dart
@@ -20,9 +20,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': dummyPath}
+ 'foo': {'path': dummyPath},
},
- )
+ ),
]).create();
await pubGet(
diff --git a/test/get/path/relative_path_test.dart b/test/get/path/relative_path_test.dart
index 2ffe3bc..0f6856a 100644
--- a/test/get/path/relative_path_test.dart
+++ b/test/get/path/relative_path_test.dart
@@ -22,9 +22,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await pubGet();
@@ -42,19 +42,19 @@
'foo',
'0.0.1',
deps: {
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
- )
+ ),
]),
- d.dir('bar', [d.libDir('bar'), d.libPubspec('bar', '0.0.1')])
+ d.dir('bar', [d.libDir('bar'), d.libPubspec('bar', '0.0.1')]),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../relative/foo'}
+ 'foo': {'path': '../relative/foo'},
},
- )
+ ),
]).create();
await pubGet();
@@ -74,19 +74,19 @@
'foo',
'0.0.1',
deps: {
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
- )
+ ),
]),
- d.dir('bar', [d.libDir('bar'), d.libPubspec('bar', '0.0.1')])
+ d.dir('bar', [d.libDir('bar'), d.libPubspec('bar', '0.0.1')]),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../relative/foo'}
+ 'foo': {'path': '../relative/foo'},
},
- )
+ ),
]).create();
await pubGet(
@@ -108,9 +108,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await pubGet();
diff --git a/test/get/path/relative_symlink_test.dart b/test/get/path/relative_symlink_test.dart
index e9ec91e..1266bff 100644
--- a/test/get/path/relative_symlink_test.dart
+++ b/test/get/path/relative_symlink_test.dart
@@ -23,9 +23,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await pubGet();
@@ -45,7 +45,7 @@
await d.dir('moved', [
d.appPackageConfigFile([
d.packageConfigEntry(name: 'foo', path: '../foo'),
- ])
+ ]),
]).validate();
});
}
diff --git a/test/get/path/shared_dependency_symlink_test.dart b/test/get/path/shared_dependency_symlink_test.dart
index 9a61bf9..69249b4 100644
--- a/test/get/path/shared_dependency_symlink_test.dart
+++ b/test/get/path/shared_dependency_symlink_test.dart
@@ -22,9 +22,9 @@
'foo',
'0.0.1',
deps: {
- 'shared': {'path': '../shared'}
+ 'shared': {'path': '../shared'},
},
- )
+ ),
]).create();
await d.dir('bar', [
@@ -33,9 +33,9 @@
'bar',
'0.0.1',
deps: {
- 'shared': {'path': '../link/shared'}
+ 'shared': {'path': '../link/shared'},
},
- )
+ ),
]).create();
await d.dir(appPath, [
@@ -44,7 +44,7 @@
'bar': {'path': '../bar'},
'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await d.dir('link').create();
diff --git a/test/get/path/shared_dependency_test.dart b/test/get/path/shared_dependency_test.dart
index 016f092..3a3ce8d 100644
--- a/test/get/path/shared_dependency_test.dart
+++ b/test/get/path/shared_dependency_test.dart
@@ -20,9 +20,9 @@
'foo',
'0.0.1',
deps: {
- 'shared': {'path': '../shared'}
+ 'shared': {'path': '../shared'},
},
- )
+ ),
]).create();
await d.dir('bar', [
@@ -31,18 +31,18 @@
'bar',
'0.0.1',
deps: {
- 'shared': {'path': '../shared'}
+ 'shared': {'path': '../shared'},
},
- )
+ ),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
'foo': {'path': '../foo'},
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
- )
+ ),
]).create();
await pubGet();
@@ -66,9 +66,9 @@
'foo',
'0.0.1',
deps: {
- 'shared': {'path': '../shared'}
+ 'shared': {'path': '../shared'},
},
- )
+ ),
]).create();
await d.dir('bar', [
@@ -77,18 +77,18 @@
'bar',
'0.0.1',
deps: {
- 'shared': {'path': '../././shared'}
+ 'shared': {'path': '../././shared'},
},
- )
+ ),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
'foo': {'path': '../foo'},
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
- )
+ ),
]).create();
await pubGet();
diff --git a/test/get/sdk_constraint_required_test.dart b/test/get/sdk_constraint_required_test.dart
index c897033..96b13a7 100644
--- a/test/get/sdk_constraint_required_test.dart
+++ b/test/get/sdk_constraint_required_test.dart
@@ -40,7 +40,7 @@
d.rawPubspec(
{
'name': 'myapp',
- 'environment': {'sdk': '>=2.9.0 <4.0.0'}
+ 'environment': {'sdk': '>=2.9.0 <4.0.0'},
},
),
]).create();
diff --git a/test/get/switch_source_test.dart b/test/get/switch_source_test.dart
index 08bf686..2cf8432 100644
--- a/test/get/switch_source_test.dart
+++ b/test/get/switch_source_test.dart
@@ -19,7 +19,7 @@
await d.appDir(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
).create();
diff --git a/test/get/unknown_sdk_test.dart b/test/get/unknown_sdk_test.dart
index 8d61a2c..c13db54 100644
--- a/test/get/unknown_sdk_test.dart
+++ b/test/get/unknown_sdk_test.dart
@@ -12,8 +12,8 @@
test('pub get barks at unknown sdk', () async {
await d.dir(appPath, [
d.pubspec({
- 'environment': {'foo': '>=1.2.4 <2.0.0'}
- })
+ 'environment': {'foo': '>=1.2.4 <2.0.0'},
+ }),
]).create();
await pubGet(
diff --git a/test/global/activate/activate_git_after_hosted_test.dart b/test/global/activate/activate_git_after_hosted_test.dart
index dbb7be4..602a8ab 100644
--- a/test/global/activate/activate_git_after_hosted_test.dart
+++ b/test/global/activate/activate_git_after_hosted_test.dart
@@ -17,13 +17,13 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")])
+ d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")]),
],
);
await d.git('foo.git', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('git');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('git');")]),
]).create();
await runPub(args: ['global', 'activate', 'foo']);
diff --git a/test/global/activate/activate_hosted_after_git_test.dart b/test/global/activate/activate_hosted_after_git_test.dart
index 83b3c06..ea71b68 100644
--- a/test/global/activate/activate_hosted_after_git_test.dart
+++ b/test/global/activate/activate_hosted_after_git_test.dart
@@ -15,13 +15,13 @@
'foo',
'2.0.0',
contents: [
- d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")])
+ d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")]),
],
);
await d.git('foo.git', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('git');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('git');")]),
]).create();
await runPub(args: ['global', 'activate', '-sgit', '../foo.git']);
@@ -33,7 +33,7 @@
'Package foo is currently active from Git repository "..${separator}foo.git".',
),
contains('* foo 2.0.0 (was 1.0.0 from git ..${separator}foo.git at'),
- contains('Activated foo 2.0.0.')
+ contains('Activated foo 2.0.0.'),
]),
);
diff --git a/test/global/activate/activate_hosted_after_path_test.dart b/test/global/activate/activate_hosted_after_path_test.dart
index 68ac256..deda220 100644
--- a/test/global/activate/activate_hosted_after_path_test.dart
+++ b/test/global/activate/activate_hosted_after_path_test.dart
@@ -16,13 +16,13 @@
'foo',
'2.0.0',
contents: [
- d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")])
+ d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")]),
],
);
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('path');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('path');")]),
]).create();
await runPub(args: ['global', 'activate', '-spath', '../foo']);
diff --git a/test/global/activate/activate_hosted_twice_test.dart b/test/global/activate/activate_hosted_twice_test.dart
index 5c56b95..9890ba6 100644
--- a/test/global/activate/activate_hosted_twice_test.dart
+++ b/test/global/activate/activate_hosted_twice_test.dart
@@ -19,15 +19,15 @@
d.dir('bin', [
d.file('foo.dart', r'''
import 'package:bar/bar.dart';
-main(args) => print('bar $version');''')
- ])
+main(args) => print('bar $version');'''),
+ ]),
],
)
..serve(
'bar',
'1.0.0',
contents: [
- d.dir('lib', [d.file('bar.dart', 'final version = "1.0.0";')])
+ d.dir('lib', [d.file('bar.dart', 'final version = "1.0.0";')]),
],
);
@@ -53,7 +53,7 @@
'bar',
'2.0.0',
contents: [
- d.dir('lib', [d.file('bar.dart', 'final version = "2.0.0";')])
+ d.dir('lib', [d.file('bar.dart', 'final version = "2.0.0";')]),
],
);
diff --git a/test/global/activate/activate_path_after_hosted_test.dart b/test/global/activate/activate_path_after_hosted_test.dart
index ccdb3da..b6d95ca 100644
--- a/test/global/activate/activate_path_after_hosted_test.dart
+++ b/test/global/activate/activate_path_after_hosted_test.dart
@@ -16,13 +16,13 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")])
+ d.dir('bin', [d.file('foo.dart', "main(args) => print('hosted');")]),
],
);
await d.dir('foo', [
d.libPubspec('foo', '2.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('path');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('path');")]),
]).create();
await runPub(args: ['global', 'activate', 'foo']);
@@ -32,7 +32,7 @@
args: ['global', 'activate', '-spath', '../foo'],
output: allOf([
contains('Package foo is currently active at version 1.0.0.'),
- contains('Activated foo 2.0.0 at path "$path".')
+ contains('Activated foo 2.0.0 at path "$path".'),
]),
);
diff --git a/test/global/activate/cached_package_test.dart b/test/global/activate/cached_package_test.dart
index f558d09..9c788a3 100644
--- a/test/global/activate/cached_package_test.dart
+++ b/test/global/activate/cached_package_test.dart
@@ -14,7 +14,7 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('foo.dart', 'main() => print("hi"); ')])
+ d.dir('bin', [d.file('foo.dart', 'main() => print("hi"); ')]),
],
);
@@ -33,8 +33,8 @@
// Should be in global package cache.
await d.dir(cachePath, [
d.dir('global_packages', [
- d.dir('foo', [d.file('pubspec.lock', contains('1.0.0'))])
- ])
+ d.dir('foo', [d.file('pubspec.lock', contains('1.0.0'))]),
+ ]),
]).validate();
});
}
diff --git a/test/global/activate/constraint_test.dart b/test/global/activate/constraint_test.dart
index 23386c0..782ef92 100644
--- a/test/global/activate/constraint_test.dart
+++ b/test/global/activate/constraint_test.dart
@@ -19,8 +19,8 @@
await d.dir(cachePath, [
d.dir('global_packages', [
- d.dir('foo', [d.file('pubspec.lock', contains('1.0.1'))])
- ])
+ d.dir('foo', [d.file('pubspec.lock', contains('1.0.1'))]),
+ ]),
]).validate();
});
}
diff --git a/test/global/activate/different_version_test.dart b/test/global/activate/different_version_test.dart
index fcabe8a..b806a08 100644
--- a/test/global/activate/different_version_test.dart
+++ b/test/global/activate/different_version_test.dart
@@ -16,14 +16,14 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('foo.dart', 'main() => print("hi");')])
+ d.dir('bin', [d.file('foo.dart', 'main() => print("hi");')]),
],
)
..serve(
'foo',
'2.0.0',
contents: [
- d.dir('bin', [d.file('foo.dart', 'main() => print("hi2");')])
+ d.dir('bin', [d.file('foo.dart', 'main() => print("hi2");')]),
],
);
diff --git a/test/global/activate/doesnt_snapshot_path_executables_test.dart b/test/global/activate/doesnt_snapshot_path_executables_test.dart
index 3ba3e65..dbc4e25 100644
--- a/test/global/activate/doesnt_snapshot_path_executables_test.dart
+++ b/test/global/activate/doesnt_snapshot_path_executables_test.dart
@@ -11,7 +11,7 @@
test("doesn't snapshots the executables for a path package", () async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('hello.dart', "void main() => print('hello!');")])
+ d.dir('bin', [d.file('hello.dart', "void main() => print('hello!');")]),
]).create();
await runPub(
@@ -24,8 +24,8 @@
d.dir(
'foo',
[d.file('pubspec.lock', contains('1.0.0')), d.nothing('bin')],
- )
- ])
+ ),
+ ]),
]).validate();
});
}
diff --git a/test/global/activate/feature_test.dart b/test/global/activate/feature_test.dart
index 36d9aee..6f54ca3 100644
--- a/test/global/activate/feature_test.dart
+++ b/test/global/activate/feature_test.dart
@@ -17,13 +17,13 @@
pubspec: {
'features': {
'stuff': {
- 'dependencies': {'bar': '1.0.0'}
+ 'dependencies': {'bar': '1.0.0'},
},
'things': {
'default': false,
- 'dependencies': {'baz': '1.0.0'}
- }
- }
+ 'dependencies': {'baz': '1.0.0'},
+ },
+ },
},
)
..serve('bar', '1.0.0')
@@ -47,13 +47,13 @@
pubspec: {
'features': {
'stuff': {
- 'dependencies': {'bar': '1.0.0'}
+ 'dependencies': {'bar': '1.0.0'},
},
'things': {
'default': false,
- 'dependencies': {'baz': '1.0.0'}
- }
- }
+ 'dependencies': {'baz': '1.0.0'},
+ },
+ },
},
)
..serve('bar', '1.0.0')
@@ -78,13 +78,13 @@
pubspec: {
'features': {
'stuff': {
- 'dependencies': {'bar': '1.0.0'}
+ 'dependencies': {'bar': '1.0.0'},
},
'things': {
'default': false,
- 'dependencies': {'baz': '1.0.0'}
- }
- }
+ 'dependencies': {'baz': '1.0.0'},
+ },
+ },
},
)
..serve('bar', '1.0.0')
@@ -108,13 +108,13 @@
'features': {
'stuff': {
'default': false,
- 'dependencies': {'bar': '1.0.0'}
+ 'dependencies': {'bar': '1.0.0'},
},
'things': {
'default': false,
- 'dependencies': {'baz': '1.0.0'}
- }
- }
+ 'dependencies': {'baz': '1.0.0'},
+ },
+ },
},
)
..serve('bar', '1.0.0')
@@ -139,13 +139,13 @@
pubspec: {
'features': {
'stuff': {
- 'dependencies': {'bar': '1.0.0'}
+ 'dependencies': {'bar': '1.0.0'},
},
'things': {
'default': false,
- 'dependencies': {'baz': '1.0.0'}
- }
- }
+ 'dependencies': {'baz': '1.0.0'},
+ },
+ },
},
)
..serve('bar', '1.0.0')
@@ -159,7 +159,7 @@
'--features',
'things',
'--omit-features',
- 'stuff'
+ 'stuff',
],
output: contains('''
Resolving dependencies...
diff --git a/test/global/activate/git_package_test.dart b/test/global/activate/git_package_test.dart
index 245819f..d40ca92 100644
--- a/test/global/activate/git_package_test.dart
+++ b/test/global/activate/git_package_test.dart
@@ -14,7 +14,7 @@
await d.git('foo.git', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await runPub(
@@ -40,7 +40,7 @@
'sub',
[
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('sub.dart', "main() => print('1');")])
+ d.dir('bin', [d.file('sub.dart', "main() => print('1');")]),
],
),
]).create();
@@ -49,7 +49,7 @@
'sub',
[
d.libPubspec('sub', '2.0.0'),
- d.dir('bin', [d.file('sub.dart', "main() => print('2');")])
+ d.dir('bin', [d.file('sub.dart', "main() => print('2');")]),
],
),
]).commit();
@@ -58,7 +58,7 @@
'sub',
[
d.libPubspec('sub', '3.0.0'),
- d.dir('bin', [d.file('sub.dart', "main() => print('3');")])
+ d.dir('bin', [d.file('sub.dart', "main() => print('3');")]),
],
),
]).commit();
diff --git a/test/global/activate/ignores_active_version_test.dart b/test/global/activate/ignores_active_version_test.dart
index 72d8888..1cd2506 100644
--- a/test/global/activate/ignores_active_version_test.dart
+++ b/test/global/activate/ignores_active_version_test.dart
@@ -18,7 +18,7 @@
'foo',
'1.3.0',
contents: [
- d.dir('bin', [d.file('foo.dart', 'main() => print("hi"); ')])
+ d.dir('bin', [d.file('foo.dart', 'main() => print("hi"); ')]),
],
);
diff --git a/test/global/activate/installs_dependencies_for_git_test.dart b/test/global/activate/installs_dependencies_for_git_test.dart
index a778ec7..22a7ffa 100644
--- a/test/global/activate/installs_dependencies_for_git_test.dart
+++ b/test/global/activate/installs_dependencies_for_git_test.dart
@@ -15,14 +15,14 @@
await d.git('foo.git', [
d.libPubspec('foo', '1.0.0', deps: {'bar': 'any'}),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await runPub(
args: ['global', 'activate', '-sgit', '../foo.git'],
silent: allOf([
contains('Downloading bar 1.0.0...'),
- contains('Downloading baz 1.0.0...')
+ contains('Downloading baz 1.0.0...'),
]),
);
});
diff --git a/test/global/activate/installs_dependencies_for_path_test.dart b/test/global/activate/installs_dependencies_for_path_test.dart
index 4783bfd..ff85808 100644
--- a/test/global/activate/installs_dependencies_for_path_test.dart
+++ b/test/global/activate/installs_dependencies_for_path_test.dart
@@ -15,7 +15,7 @@
await d.dir('foo', [
d.libPubspec('foo', '0.0.0', deps: {'bar': 'any'}),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
var pub = await startPub(args: ['global', 'activate', '-spath', '../foo']);
@@ -31,9 +31,9 @@
contains('bar'),
contains('1.0.0'),
contains('baz'),
- contains('2.0.0')
+ contains('2.0.0'),
]),
- )
+ ),
]).validate();
});
}
diff --git a/test/global/activate/installs_dependencies_test.dart b/test/global/activate/installs_dependencies_test.dart
index 1cd0043..2fdf300 100644
--- a/test/global/activate/installs_dependencies_test.dart
+++ b/test/global/activate/installs_dependencies_test.dart
@@ -17,7 +17,7 @@
args: ['global', 'activate', 'foo'],
silent: allOf([
contains('Downloading bar 1.0.0...'),
- contains('Downloading baz 1.0.0...')
+ contains('Downloading baz 1.0.0...'),
]),
);
});
diff --git a/test/global/activate/outdated_binstub_test.dart b/test/global/activate/outdated_binstub_test.dart
index f2d9609..0b8c6ba 100644
--- a/test/global/activate/outdated_binstub_test.dart
+++ b/test/global/activate/outdated_binstub_test.dart
@@ -24,20 +24,20 @@
'foo',
'1.0.0',
pubspec: {
- 'executables': {'foo-script': 'script'}
+ 'executables': {'foo-script': 'script'},
},
contents: [
d.dir(
'bin',
[d.file('script.dart', "main(args) => print('ok \$args');")],
- )
+ ),
],
);
await runPub(args: ['global', 'activate', 'foo']);
await d.dir(cachePath, [
- d.dir('bin', [d.file(binStubName('foo-script'), _outdatedBinstub)])
+ d.dir('bin', [d.file(binStubName('foo-script'), _outdatedBinstub)]),
]).create();
await runPub(args: ['global', 'activate', 'foo']);
@@ -48,8 +48,8 @@
d.file(
binStubName('foo-script'),
contains('This file was created by pub v3.1.2+3.'),
- )
- ])
+ ),
+ ]),
]).validate();
});
}
diff --git a/test/global/activate/path_package_test.dart b/test/global/activate/path_package_test.dart
index 66b4a42..0ec71d0 100644
--- a/test/global/activate/path_package_test.dart
+++ b/test/global/activate/path_package_test.dart
@@ -13,7 +13,7 @@
test('activates a package at a local path', () async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
var path = canonicalize(p.join(d.sandbox, 'foo'));
@@ -31,7 +31,7 @@
'foo',
'1.0.0',
deps: {
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
),
d.dir('bin', [
@@ -39,13 +39,13 @@
import 'package:bar/bar.dart';
main() => print(value);
- """)
- ])
+ """),
+ ]),
]).create();
await d.dir('bar', [
d.libPubspec('bar', '1.0.0'),
- d.dir('lib', [d.file('bar.dart', "final value = 'ok';")])
+ d.dir('lib', [d.file('bar.dart', "final value = 'ok';")]),
]).create();
var path = canonicalize(p.join(d.sandbox, 'foo'));
@@ -67,13 +67,13 @@
'bar',
'1.0.0',
contents: [
- d.dir('bin', [d.file('bar.dart', "main() => print('bar');")])
+ d.dir('bin', [d.file('bar.dart', "main() => print('bar');")]),
],
);
await d.dir('foo', [
d.libPubspec('foo', '1.0.0', deps: {'bar': '^1.0.0'}),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await runPub(
diff --git a/test/global/activate/reactivating_git_upgrades_test.dart b/test/global/activate/reactivating_git_upgrades_test.dart
index e2d7bdd..7e5975b 100644
--- a/test/global/activate/reactivating_git_upgrades_test.dart
+++ b/test/global/activate/reactivating_git_upgrades_test.dart
@@ -14,7 +14,7 @@
await d.git('foo.git', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', 'main() => print("hi"); ')])
+ d.dir('bin', [d.file('foo.dart', 'main() => print("hi"); ')]),
]).create();
await runPub(
diff --git a/test/global/activate/snapshots_git_executables_test.dart b/test/global/activate/snapshots_git_executables_test.dart
index 16a3cd2..0f2bf5f 100644
--- a/test/global/activate/snapshots_git_executables_test.dart
+++ b/test/global/activate/snapshots_git_executables_test.dart
@@ -17,8 +17,8 @@
d.file('hello.dart', "void main() => print('hello!');"),
d.file('goodbye.dart', "void main() => print('goodbye!');"),
d.file('shell.sh', 'echo shell'),
- d.dir('subdir', [d.file('sub.dart', "void main() => print('sub!');")])
- ])
+ d.dir('subdir', [d.file('sub.dart', "void main() => print('sub!');")]),
+ ]),
]).create();
await runPub(
@@ -39,10 +39,10 @@
contains('goodbye!'),
),
d.nothing('shell.sh-$versionSuffix.snapshot'),
- d.nothing('subdir')
- ])
- ])
- ])
+ d.nothing('subdir'),
+ ]),
+ ]),
+ ]),
]).validate();
});
}
diff --git a/test/global/activate/snapshots_hosted_executables_test.dart b/test/global/activate/snapshots_hosted_executables_test.dart
index 8bf935f..e8783f1 100644
--- a/test/global/activate/snapshots_hosted_executables_test.dart
+++ b/test/global/activate/snapshots_hosted_executables_test.dart
@@ -18,8 +18,11 @@
d.file('hello.dart', "void main() => print('hello!');"),
d.file('goodbye.dart', "void main() => print('goodbye!');"),
d.file('shell.sh', 'echo shell'),
- d.dir('subdir', [d.file('sub.dart', "void main() => print('sub!');")])
- ])
+ d.dir(
+ 'subdir',
+ [d.file('sub.dart', "void main() => print('sub!');")],
+ ),
+ ]),
],
);
@@ -41,10 +44,10 @@
contains('goodbye!'),
),
d.nothing('shell.sh-$versionSuffix.snapshot'),
- d.nothing('subdir')
- ])
- ])
- ])
+ d.nothing('subdir'),
+ ]),
+ ]),
+ ]),
]).validate();
});
}
diff --git a/test/global/activate/supports_version_solver_backtracking_test.dart b/test/global/activate/supports_version_solver_backtracking_test.dart
index b583743..4b97af6 100644
--- a/test/global/activate/supports_version_solver_backtracking_test.dart
+++ b/test/global/activate/supports_version_solver_backtracking_test.dart
@@ -14,14 +14,14 @@
'foo',
'1.1.0',
pubspec: {
- 'environment': {'sdk': defaultSdkConstraint}
+ 'environment': {'sdk': defaultSdkConstraint},
},
)
..serve(
'foo',
'1.2.0',
pubspec: {
- 'environment': {'sdk': '^3.1.3'}
+ 'environment': {'sdk': '^3.1.3'},
},
);
@@ -31,8 +31,8 @@
// dummy SDK version 3.1.2+3.
await d.dir(cachePath, [
d.dir('global_packages', [
- d.dir('foo', [d.file('pubspec.lock', contains('1.1.0'))])
- ])
+ d.dir('foo', [d.file('pubspec.lock', contains('1.1.0'))]),
+ ]),
]).validate();
});
}
diff --git a/test/global/activate/uncached_package_test.dart b/test/global/activate/uncached_package_test.dart
index 666eb63..c953a63 100644
--- a/test/global/activate/uncached_package_test.dart
+++ b/test/global/activate/uncached_package_test.dart
@@ -14,21 +14,21 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('foo.dart', 'main() => print("hi");')])
+ d.dir('bin', [d.file('foo.dart', 'main() => print("hi");')]),
],
)
..serve(
'foo',
'1.2.3',
contents: [
- d.dir('bin', [d.file('foo.dart', 'main() => print("hi 1.2.3");')])
+ d.dir('bin', [d.file('foo.dart', 'main() => print("hi 1.2.3");')]),
],
)
..serve(
'foo',
'2.0.0-wildly.unstable',
contents: [
- d.dir('bin', [d.file('foo.dart', 'main() => print("hi unstable");')])
+ d.dir('bin', [d.file('foo.dart', 'main() => print("hi unstable");')]),
],
);
@@ -45,8 +45,8 @@
// Should be in global package cache.
await d.dir(cachePath, [
d.dir('global_packages', [
- d.dir('foo', [d.file('pubspec.lock', contains('1.2.3'))])
- ])
+ d.dir('foo', [d.file('pubspec.lock', contains('1.2.3'))]),
+ ]),
]).validate();
});
}
diff --git a/test/global/activate/unknown_package_test.dart b/test/global/activate/unknown_package_test.dart
index 2242c55..59ae919 100644
--- a/test/global/activate/unknown_package_test.dart
+++ b/test/global/activate/unknown_package_test.dart
@@ -16,7 +16,7 @@
error: allOf([
contains("Because pub global activate depends on foo any which doesn't "
'exist (could not find package foo at http://localhost:'),
- contains('), version solving failed.')
+ contains('), version solving failed.'),
]),
exitCode: exit_codes.UNAVAILABLE,
);
diff --git a/test/global/binstubs/binstub_runs_executable_test.dart b/test/global/binstubs/binstub_runs_executable_test.dart
index 3b03105..3e0fc91 100644
--- a/test/global/binstubs/binstub_runs_executable_test.dart
+++ b/test/global/binstubs/binstub_runs_executable_test.dart
@@ -17,13 +17,13 @@
'foo',
'1.0.0',
pubspec: {
- 'executables': {'foo-script': 'script'}
+ 'executables': {'foo-script': 'script'},
},
contents: [
d.dir(
'bin',
[d.file('script.dart', "main(args) => print('ok \$args');")],
- )
+ ),
],
);
@@ -44,9 +44,12 @@
await d.dir('foo', [
d.pubspec({
'name': 'foo',
- 'executables': {'foo-script': 'script'}
+ 'executables': {'foo-script': 'script'},
}),
- d.dir('bin', [d.file('script.dart', "main(args) => print('ok \$args');")])
+ d.dir(
+ 'bin',
+ [d.file('script.dart', "main(args) => print('ok \$args');")],
+ ),
]).create();
await runPub(args: ['global', 'activate', '-spath', '../foo']);
diff --git a/test/global/binstubs/binstub_runs_global_run_if_no_snapshot_test.dart b/test/global/binstubs/binstub_runs_global_run_if_no_snapshot_test.dart
index d22d8c2..1d6f54e 100644
--- a/test/global/binstubs/binstub_runs_global_run_if_no_snapshot_test.dart
+++ b/test/global/binstubs/binstub_runs_global_run_if_no_snapshot_test.dart
@@ -12,9 +12,9 @@
await d.dir('foo', [
d.pubspec({
'name': 'foo',
- 'executables': {'foo-script': 'script'}
+ 'executables': {'foo-script': 'script'},
}),
- d.dir('bin', [d.file('script.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('script.dart', "main() => print('ok');")]),
]).create();
// Path packages are mutable, so no snapshot is created.
@@ -25,8 +25,11 @@
await d.dir(cachePath, [
d.dir('bin', [
- d.file(binStubName('foo-script'), contains('pub global run foo:script'))
- ])
+ d.file(
+ binStubName('foo-script'),
+ contains('pub global run foo:script'),
+ ),
+ ]),
]).validate();
});
}
diff --git a/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart b/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart
index fd335bb..4d9b044 100644
--- a/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart
+++ b/test/global/binstubs/binstub_runs_precompiled_snapshot_test.dart
@@ -14,10 +14,10 @@
'foo',
'1.0.0',
pubspec: {
- 'executables': {'foo-script': 'script'}
+ 'executables': {'foo-script': 'script'},
},
contents: [
- d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
+ d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")]),
],
);
@@ -28,8 +28,8 @@
d.file(
binStubName('foo-script'),
contains('script.dart-$versionSuffix.snapshot'),
- )
- ])
+ ),
+ ]),
]).validate();
});
}
diff --git a/test/global/binstubs/creates_executables_in_pubspec_test.dart b/test/global/binstubs/creates_executables_in_pubspec_test.dart
index 5d4a721..df27c88 100644
--- a/test/global/binstubs/creates_executables_in_pubspec_test.dart
+++ b/test/global/binstubs/creates_executables_in_pubspec_test.dart
@@ -14,14 +14,14 @@
'foo',
'1.0.0',
pubspec: {
- 'executables': {'one': null, 'two-renamed': 'second'}
+ 'executables': {'one': null, 'two-renamed': 'second'},
},
contents: [
d.dir('bin', [
d.file('one.dart', "main(args) => print('one');"),
d.file('second.dart', "main(args) => print('two');"),
- d.file('nope.dart', "main(args) => print('nope');")
- ])
+ d.file('nope.dart', "main(args) => print('nope');"),
+ ]),
],
);
@@ -35,8 +35,8 @@
d.file(binStubName('one'), contains('one')),
d.file(binStubName('two-renamed'), contains('second')),
d.nothing(binStubName('two')),
- d.nothing(binStubName('nope'))
- ])
+ d.nothing(binStubName('nope')),
+ ]),
]).validate();
});
}
diff --git a/test/global/binstubs/does_not_warn_if_no_executables_test.dart b/test/global/binstubs/does_not_warn_if_no_executables_test.dart
index 344e399..869a4d8 100644
--- a/test/global/binstubs/does_not_warn_if_no_executables_test.dart
+++ b/test/global/binstubs/does_not_warn_if_no_executables_test.dart
@@ -17,7 +17,7 @@
d.dir(
'bin',
[d.file('script.dart', "main(args) => print('ok \$args');")],
- )
+ ),
],
);
diff --git a/test/global/binstubs/does_not_warn_if_on_path_test.dart b/test/global/binstubs/does_not_warn_if_on_path_test.dart
index d2d25ec..f3575c3 100644
--- a/test/global/binstubs/does_not_warn_if_on_path_test.dart
+++ b/test/global/binstubs/does_not_warn_if_on_path_test.dart
@@ -17,13 +17,13 @@
'foo',
'1.0.0',
pubspec: {
- 'executables': {'script': null}
+ 'executables': {'script': null},
},
contents: [
d.dir(
'bin',
[d.file('script.dart', "main(args) => print('ok \$args');")],
- )
+ ),
],
);
diff --git a/test/global/binstubs/explicit_and_no_executables_options_test.dart b/test/global/binstubs/explicit_and_no_executables_options_test.dart
index bc34ce6..9955c91 100644
--- a/test/global/binstubs/explicit_and_no_executables_options_test.dart
+++ b/test/global/binstubs/explicit_and_no_executables_options_test.dart
@@ -21,7 +21,7 @@
'../foo',
'-x',
'anything',
- '--no-executables'
+ '--no-executables',
],
error: contains('Cannot pass both --no-executables and --executable.'),
exitCode: exit_codes.USAGE,
diff --git a/test/global/binstubs/explicit_executables_test.dart b/test/global/binstubs/explicit_executables_test.dart
index 293ffef..de899b1 100644
--- a/test/global/binstubs/explicit_executables_test.dart
+++ b/test/global/binstubs/explicit_executables_test.dart
@@ -12,9 +12,9 @@
await d.dir('foo', [
d.pubspec({
'name': 'foo',
- 'executables': {'one': 'script', 'two': 'script', 'three': 'script'}
+ 'executables': {'one': 'script', 'two': 'script', 'three': 'script'},
}),
- d.dir('bin', [d.file('script.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('script.dart', "main() => print('ok');")]),
]).create();
await runPub(
@@ -27,7 +27,7 @@
'-x',
'one',
'--executable',
- 'three'
+ 'three',
],
output: contains('Installed executables one and three.'),
);
@@ -36,8 +36,8 @@
d.dir('bin', [
d.file(binStubName('one'), contains('pub global run foo:script')),
d.nothing(binStubName('two')),
- d.file(binStubName('three'), contains('pub global run foo:script'))
- ])
+ d.file(binStubName('three'), contains('pub global run foo:script')),
+ ]),
]).validate();
});
}
diff --git a/test/global/binstubs/missing_script_test.dart b/test/global/binstubs/missing_script_test.dart
index 3a15cc3..9dfd978 100644
--- a/test/global/binstubs/missing_script_test.dart
+++ b/test/global/binstubs/missing_script_test.dart
@@ -13,8 +13,8 @@
await d.dir('foo', [
d.pubspec({
'name': 'foo',
- 'executables': {'missing': 'not_here', 'nope': null}
- })
+ 'executables': {'missing': 'not_here', 'nope': null},
+ }),
]).create();
var pub = await startPub(args: ['global', 'activate', '-spath', '../foo']);
diff --git a/test/global/binstubs/name_collision_test.dart b/test/global/binstubs/name_collision_test.dart
index f6b63b5..1f811a7 100644
--- a/test/global/binstubs/name_collision_test.dart
+++ b/test/global/binstubs/name_collision_test.dart
@@ -12,17 +12,17 @@
await d.dir('foo', [
d.pubspec({
'name': 'foo',
- 'executables': {'foo': 'foo', 'collide1': 'foo', 'collide2': 'foo'}
+ 'executables': {'foo': 'foo', 'collide1': 'foo', 'collide2': 'foo'},
}),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await d.dir('bar', [
d.pubspec({
'name': 'bar',
- 'executables': {'bar': 'bar', 'collide1': 'bar', 'collide2': 'bar'}
+ 'executables': {'bar': 'bar', 'collide1': 'bar', 'collide2': 'bar'},
}),
- d.dir('bin', [d.file('bar.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('bar.dart', "main() => print('ok');")]),
]).create();
await runPub(args: ['global', 'activate', '-spath', '../foo']);
@@ -49,8 +49,8 @@
d.file(binStubName('foo'), contains('foo:foo')),
d.file(binStubName('bar'), contains('bar:bar')),
d.file(binStubName('collide1'), contains('foo:foo')),
- d.file(binStubName('collide2'), contains('foo:foo'))
- ])
+ d.file(binStubName('collide2'), contains('foo:foo')),
+ ]),
]).validate();
});
}
diff --git a/test/global/binstubs/name_collision_with_overwrite_test.dart b/test/global/binstubs/name_collision_with_overwrite_test.dart
index 025b679..491256c 100644
--- a/test/global/binstubs/name_collision_with_overwrite_test.dart
+++ b/test/global/binstubs/name_collision_with_overwrite_test.dart
@@ -12,17 +12,17 @@
await d.dir('foo', [
d.pubspec({
'name': 'foo',
- 'executables': {'foo': 'foo', 'collide1': 'foo', 'collide2': 'foo'}
+ 'executables': {'foo': 'foo', 'collide1': 'foo', 'collide2': 'foo'},
}),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await d.dir('bar', [
d.pubspec({
'name': 'bar',
- 'executables': {'bar': 'bar', 'collide1': 'bar', 'collide2': 'bar'}
+ 'executables': {'bar': 'bar', 'collide1': 'bar', 'collide2': 'bar'},
}),
- d.dir('bin', [d.file('bar.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('bar.dart', "main() => print('ok');")]),
]).create();
await runPub(args: ['global', 'activate', '-spath', '../foo']);
@@ -49,8 +49,8 @@
d.file(binStubName('foo'), contains('foo:foo')),
d.file(binStubName('bar'), contains('bar:bar')),
d.file(binStubName('collide1'), contains('bar:bar')),
- d.file(binStubName('collide2'), contains('bar:bar'))
- ])
+ d.file(binStubName('collide2'), contains('bar:bar')),
+ ]),
]).validate();
});
}
diff --git a/test/global/binstubs/no_executables_flag_test.dart b/test/global/binstubs/no_executables_flag_test.dart
index be1c699..bf0f249 100644
--- a/test/global/binstubs/no_executables_flag_test.dart
+++ b/test/global/binstubs/no_executables_flag_test.dart
@@ -12,9 +12,9 @@
await d.dir('foo', [
d.pubspec({
'name': 'foo',
- 'executables': {'one': null}
+ 'executables': {'one': null},
}),
- d.dir('bin', [d.file('one.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('one.dart', "main() => print('ok');")]),
]).create();
await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
@@ -26,13 +26,13 @@
'--source',
'path',
'../foo',
- '--no-executables'
+ '--no-executables',
],
);
// Should still delete old one.
await d.dir(cachePath, [
- d.dir('bin', [d.nothing(binStubName('one'))])
+ d.dir('bin', [d.nothing(binStubName('one'))]),
]).validate();
});
}
diff --git a/test/global/binstubs/outdated_binstub_runs_pub_global_test.dart b/test/global/binstubs/outdated_binstub_runs_pub_global_test.dart
index 9884cbc..b86e42a 100644
--- a/test/global/binstubs/outdated_binstub_runs_pub_global_test.dart
+++ b/test/global/binstubs/outdated_binstub_runs_pub_global_test.dart
@@ -34,8 +34,8 @@
'foo-script2': 'script',
'foo-script-not-installed': 'script',
'foo-another-script': 'another-script',
- 'foo-another-script-not-installed': 'another-script'
- }
+ 'foo-another-script-not-installed': 'another-script',
+ },
},
contents: [
d.dir('bin', [
@@ -43,8 +43,8 @@
d.file(
'another-script.dart',
r"main(args) => print('not so good $args');",
- )
- ])
+ ),
+ ]),
],
);
@@ -90,9 +90,9 @@
d.dir(
'bin',
[d.outOfDateSnapshot('script.dart-3.0.0.snapshot')],
- )
- ])
- ])
+ ),
+ ]),
+ ]),
]).create();
var process = await TestProcess.start(
diff --git a/test/global/binstubs/outdated_snapshot_test.dart b/test/global/binstubs/outdated_snapshot_test.dart
index f55cb3c..a4471ac 100644
--- a/test/global/binstubs/outdated_snapshot_test.dart
+++ b/test/global/binstubs/outdated_snapshot_test.dart
@@ -18,13 +18,13 @@
'foo',
'1.0.0',
pubspec: {
- 'executables': {'foo-script': 'script'}
+ 'executables': {'foo-script': 'script'},
},
contents: [
d.dir(
'bin',
[d.file('script.dart', "main(args) => print('ok \$args');")],
- )
+ ),
],
);
@@ -36,9 +36,9 @@
d.dir(
'bin',
[d.outOfDateSnapshot('script.dart-$versionSuffix.snapshot-1')],
- )
- ])
- ])
+ ),
+ ]),
+ ]),
]).create();
deleteEntry(
diff --git a/test/global/binstubs/path_package_test.dart b/test/global/binstubs/path_package_test.dart
index 35b2acf..1b44351 100644
--- a/test/global/binstubs/path_package_test.dart
+++ b/test/global/binstubs/path_package_test.dart
@@ -12,9 +12,9 @@
await d.dir('foo', [
d.pubspec({
'name': 'foo',
- 'executables': {'foo': null}
+ 'executables': {'foo': null},
}),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await runPub(
@@ -26,7 +26,7 @@
d.dir(
'bin',
[d.file(binStubName('foo'), contains('pub global run foo:foo'))],
- )
+ ),
]).validate();
});
}
diff --git a/test/global/binstubs/reactivate_removes_old_executables_test.dart b/test/global/binstubs/reactivate_removes_old_executables_test.dart
index 80b50ff..f529c57 100644
--- a/test/global/binstubs/reactivate_removes_old_executables_test.dart
+++ b/test/global/binstubs/reactivate_removes_old_executables_test.dart
@@ -12,12 +12,12 @@
await d.dir('foo', [
d.pubspec({
'name': 'foo',
- 'executables': {'one': null, 'two': null}
+ 'executables': {'one': null, 'two': null},
}),
d.dir('bin', [
d.file('one.dart', "main() => print('ok');"),
- d.file('two.dart', "main() => print('ok');")
- ])
+ d.file('two.dart', "main() => print('ok');"),
+ ]),
]).create();
await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
@@ -27,8 +27,8 @@
'name': 'foo',
'executables': {
// Remove "one".
- 'two': null
- }
+ 'two': null,
+ },
}),
]).create();
@@ -37,8 +37,8 @@
await d.dir(cachePath, [
d.dir('bin', [
d.nothing(binStubName('one')),
- d.file(binStubName('two'), contains('two'))
- ])
+ d.file(binStubName('two'), contains('two')),
+ ]),
]).validate();
});
}
diff --git a/test/global/binstubs/removes_even_if_not_in_pubspec_test.dart b/test/global/binstubs/removes_even_if_not_in_pubspec_test.dart
index 4cd458e..a0c00f4 100644
--- a/test/global/binstubs/removes_even_if_not_in_pubspec_test.dart
+++ b/test/global/binstubs/removes_even_if_not_in_pubspec_test.dart
@@ -12,9 +12,9 @@
await d.dir('foo', [
d.pubspec({
'name': 'foo',
- 'executables': {'foo': null}
+ 'executables': {'foo': null},
}),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
// Create the binstub for foo.
@@ -22,7 +22,7 @@
// Remove it from the pubspec.
await d.dir('foo', [
- d.pubspec({'name': 'foo'})
+ d.pubspec({'name': 'foo'}),
]).create();
// Deactivate.
@@ -30,7 +30,7 @@
// It should still be deleted.
await d.dir(cachePath, [
- d.dir('bin', [d.nothing(binStubName('foo'))])
+ d.dir('bin', [d.nothing(binStubName('foo'))]),
]).validate();
});
}
diff --git a/test/global/binstubs/removes_when_deactivated_test.dart b/test/global/binstubs/removes_when_deactivated_test.dart
index 4bc73f2..664af05 100644
--- a/test/global/binstubs/removes_when_deactivated_test.dart
+++ b/test/global/binstubs/removes_when_deactivated_test.dart
@@ -14,13 +14,13 @@
'foo',
'1.0.0',
pubspec: {
- 'executables': {'one': null, 'two': null}
+ 'executables': {'one': null, 'two': null},
},
contents: [
d.dir('bin', [
d.file('one.dart', "main(args) => print('one');"),
- d.file('two.dart', "main(args) => print('two');")
- ])
+ d.file('two.dart', "main(args) => print('two');"),
+ ]),
],
);
@@ -31,7 +31,7 @@
d.dir(
'bin',
[d.nothing(binStubName('one')), d.nothing(binStubName('two'))],
- )
+ ),
]).validate();
});
}
diff --git a/test/global/binstubs/runs_once_even_when_dart_is_batch_test.dart b/test/global/binstubs/runs_once_even_when_dart_is_batch_test.dart
index b1640d6..79d57d2 100644
--- a/test/global/binstubs/runs_once_even_when_dart_is_batch_test.dart
+++ b/test/global/binstubs/runs_once_even_when_dart_is_batch_test.dart
@@ -44,7 +44,7 @@
environment: {
'PATH': [
p.join(d.sandbox, 'bin'),
- p.dirname(Platform.resolvedExecutable)
+ p.dirname(Platform.resolvedExecutable),
].join(';'),
...getPubTestEnvironment(),
},
diff --git a/test/global/binstubs/unknown_explicit_executable_test.dart b/test/global/binstubs/unknown_explicit_executable_test.dart
index b4ba8f5..8f47678 100644
--- a/test/global/binstubs/unknown_explicit_executable_test.dart
+++ b/test/global/binstubs/unknown_explicit_executable_test.dart
@@ -13,15 +13,15 @@
await d.dir('foo', [
d.pubspec({
'name': 'foo',
- 'executables': {'one': 'one'}
+ 'executables': {'one': 'one'},
}),
- d.dir('bin', [d.file('one.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('one.dart', "main() => print('ok');")]),
]).create();
var pub = await startPub(
args: [
'global', 'activate', '--source', 'path', '../foo', //
- '-x', 'who', '-x', 'one', '--executable', 'wat'
+ '-x', 'who', '-x', 'one', '--executable', 'wat',
],
);
diff --git a/test/global/binstubs/warns_if_not_on_path_test.dart b/test/global/binstubs/warns_if_not_on_path_test.dart
index ca3763a..d2cb042 100644
--- a/test/global/binstubs/warns_if_not_on_path_test.dart
+++ b/test/global/binstubs/warns_if_not_on_path_test.dart
@@ -14,13 +14,13 @@
'foo',
'1.0.0',
pubspec: {
- 'executables': {'some-dart-script': 'script'}
+ 'executables': {'some-dart-script': 'script'},
},
contents: [
d.dir(
'bin',
[d.file('script.dart', "main(args) => print('ok \$args');")],
- )
+ ),
],
);
diff --git a/test/global/deactivate/git_package_test.dart b/test/global/deactivate/git_package_test.dart
index 2cea80d..e49fa1c 100644
--- a/test/global/deactivate/git_package_test.dart
+++ b/test/global/deactivate/git_package_test.dart
@@ -14,7 +14,7 @@
await d.git('foo.git', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await runPub(args: ['global', 'activate', '-sgit', '../foo.git']);
diff --git a/test/global/deactivate/path_package_test.dart b/test/global/deactivate/path_package_test.dart
index 0a99274..655f2cd 100644
--- a/test/global/deactivate/path_package_test.dart
+++ b/test/global/deactivate/path_package_test.dart
@@ -13,7 +13,7 @@
test('deactivates an active path package', () async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
diff --git a/test/global/deactivate/removes_precompiled_snapshots_test.dart b/test/global/deactivate/removes_precompiled_snapshots_test.dart
index a885503..abd20af 100644
--- a/test/global/deactivate/removes_precompiled_snapshots_test.dart
+++ b/test/global/deactivate/removes_precompiled_snapshots_test.dart
@@ -20,7 +20,7 @@
);
await d.dir(cachePath, [
- d.dir('global_packages', [d.nothing('foo')])
+ d.dir('global_packages', [d.nothing('foo')]),
]).validate();
});
}
diff --git a/test/global/list_test.dart b/test/global/list_test.dart
index 65f3eff..6dca489 100644
--- a/test/global/list_test.dart
+++ b/test/global/list_test.dart
@@ -25,7 +25,7 @@
await d.git('foo.git', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', 'main() => print("ok");')])
+ d.dir('bin', [d.file('foo.dart', 'main() => print("ok");')]),
]).create();
await runPub(args: ['global', 'activate', '-sgit', '../foo.git']);
@@ -39,7 +39,7 @@
test('lists an activated Path package', () async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', 'main() => print("ok");')])
+ d.dir('bin', [d.file('foo.dart', 'main() => print("ok");')]),
]).create();
await runPub(args: ['global', 'activate', '-spath', '../foo']);
diff --git a/test/global/run/errors_if_outside_bin_test.dart b/test/global/run/errors_if_outside_bin_test.dart
index dcdc2aa..7026a54 100644
--- a/test/global/run/errors_if_outside_bin_test.dart
+++ b/test/global/run/errors_if_outside_bin_test.dart
@@ -15,7 +15,7 @@
'foo',
'1.0.0',
contents: [
- d.dir('example', [d.file('script.dart', "main(args) => print('ok');")])
+ d.dir('example', [d.file('script.dart', "main(args) => print('ok');")]),
],
);
diff --git a/test/global/run/fails_if_sdk_constraint_is_unmet_test.dart b/test/global/run/fails_if_sdk_constraint_is_unmet_test.dart
index ec2e8c6..dcda1d2 100644
--- a/test/global/run/fails_if_sdk_constraint_is_unmet_test.dart
+++ b/test/global/run/fails_if_sdk_constraint_is_unmet_test.dart
@@ -19,14 +19,14 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
+ d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")]),
],
);
await runPub(args: ['global', 'activate', 'foo']);
await d.hostedCache([
- d.dir('foo-1.0.0', [d.libPubspec('foo', '1.0.0', sdk: '0.5.6')])
+ d.dir('foo-1.0.0', [d.libPubspec('foo', '1.0.0', sdk: '0.5.6')]),
]).create();
// Make the snapshot out-of-date, too, so that we load the pubspec with the
@@ -36,9 +36,9 @@
await d.dir(cachePath, [
d.dir('global_packages', [
d.dir('foo', [
- d.dir('bin', [d.outOfDateSnapshot('script.dart.snapshot')])
- ])
- ])
+ d.dir('bin', [d.outOfDateSnapshot('script.dart.snapshot')]),
+ ]),
+ ]),
]).create();
await runPub(
@@ -55,7 +55,7 @@
'1.0.0',
sdk: '^3.0.1',
contents: [
- d.dir('bin', [d.file('script.dart', "main(args) => print('123-OK');")])
+ d.dir('bin', [d.file('script.dart', "main(args) => print('123-OK');")]),
],
);
@@ -69,7 +69,7 @@
await runPub(
environment: {
// Not compatible with [defaultSdkConstraint].
- '_PUB_TEST_SDK_VERSION': '3.0.0'
+ '_PUB_TEST_SDK_VERSION': '3.0.0',
},
args: ['global', 'run', 'foo:script'],
error: contains("foo 1.0.0 doesn't support Dart 3.0.0."),
@@ -90,7 +90,7 @@
d.dir(
'bin',
[d.file('script.dart', "main(args) => print('123-OK');")],
- )
+ ),
],
)
..serve(
@@ -134,7 +134,7 @@
d.dir(
'bin',
[d.file('script.dart', "main(args) => print('123-OK');")],
- )
+ ),
],
);
diff --git a/test/global/run/implicit_executable_name_test.dart b/test/global/run/implicit_executable_name_test.dart
index eec609c..3230016 100644
--- a/test/global/run/implicit_executable_name_test.dart
+++ b/test/global/run/implicit_executable_name_test.dart
@@ -14,7 +14,7 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('foo.dart', "main(args) => print('foo');")])
+ d.dir('bin', [d.file('foo.dart', "main(args) => print('foo');")]),
],
);
diff --git a/test/global/run/missing_path_package_test.dart b/test/global/run/missing_path_package_test.dart
index 4dcf3b1..dc98583 100644
--- a/test/global/run/missing_path_package_test.dart
+++ b/test/global/run/missing_path_package_test.dart
@@ -14,7 +14,7 @@
test('errors if the local package does not exist', () async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
diff --git a/test/global/run/nonexistent_script_test.dart b/test/global/run/nonexistent_script_test.dart
index c2bba81..515dbfb 100644
--- a/test/global/run/nonexistent_script_test.dart
+++ b/test/global/run/nonexistent_script_test.dart
@@ -15,7 +15,7 @@
'foo',
'1.0.0',
pubspec: {
- 'dev_dependencies': {'bar': '1.0.0'}
+ 'dev_dependencies': {'bar': '1.0.0'},
},
);
diff --git a/test/global/run/package_api_test.dart b/test/global/run/package_api_test.dart
index f73b1bd..2abb7f0 100644
--- a/test/global/run/package_api_test.dart
+++ b/test/global/run/package_api_test.dart
@@ -28,8 +28,8 @@
print(await Isolate.resolvePackageUri(
Uri.parse('package:bar/resource.txt')));
}
-""")
- ])
+"""),
+ ]),
],
);
@@ -61,7 +61,7 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
),
d.dir('bin', [
@@ -75,8 +75,8 @@
print(await Isolate.resolvePackageUri(
Uri.parse('package:foo/resource.txt')));
}
-""")
- ])
+"""),
+ ]),
]).create();
await runPub(args: ['global', 'activate', '-s', 'path', '.']);
diff --git a/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart b/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart
index 4c018b1..d71fb10 100644
--- a/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart
+++ b/test/global/run/recompiles_if_snapshot_is_out_of_date_test.dart
@@ -16,7 +16,7 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
+ d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")]),
],
);
@@ -27,9 +27,9 @@
d.dir('foo', [
d.dir('bin', [
d.outOfDateSnapshot('script.dart-$versionSuffix.snapshot-1'),
- ])
- ])
- ])
+ ]),
+ ]),
+ ]),
]).create();
deleteEntry(
@@ -54,9 +54,9 @@
d.dir(
'bin',
[d.file('script.dart-$versionSuffix.snapshot', contains('ok'))],
- )
- ])
- ])
+ ),
+ ]),
+ ]),
]).validate();
});
}
diff --git a/test/global/run/reflects_changes_to_local_package_test.dart b/test/global/run/reflects_changes_to_local_package_test.dart
index 864111b..0cc276a 100644
--- a/test/global/run/reflects_changes_to_local_package_test.dart
+++ b/test/global/run/reflects_changes_to_local_package_test.dart
@@ -11,7 +11,7 @@
test('changes in a path package are immediately reflected', () async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
diff --git a/test/global/run/runs_git_script_test.dart b/test/global/run/runs_git_script_test.dart
index 900b586..8bdfef7 100644
--- a/test/global/run/runs_git_script_test.dart
+++ b/test/global/run/runs_git_script_test.dart
@@ -13,7 +13,7 @@
await d.git('foo.git', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await runPub(args: ['global', 'activate', '-sgit', '../foo.git']);
diff --git a/test/global/run/runs_path_script_test.dart b/test/global/run/runs_path_script_test.dart
index 7cc90d4..29220f3 100644
--- a/test/global/run/runs_path_script_test.dart
+++ b/test/global/run/runs_path_script_test.dart
@@ -11,7 +11,7 @@
test('runs a script in a path package', () async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('ok');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('ok');")]),
]).create();
await runPub(args: ['global', 'activate', '--source', 'path', '../foo']);
diff --git a/test/global/run/runs_script_in_checked_mode_test.dart b/test/global/run/runs_script_in_checked_mode_test.dart
index 5fccfb7..10cb454 100644
--- a/test/global/run/runs_script_in_checked_mode_test.dart
+++ b/test/global/run/runs_script_in_checked_mode_test.dart
@@ -14,7 +14,7 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('script.dart', 'main() { assert(false); }')])
+ d.dir('bin', [d.file('script.dart', 'main() { assert(false); }')]),
],
);
diff --git a/test/global/run/runs_script_in_unchecked_mode_test.dart b/test/global/run/runs_script_in_unchecked_mode_test.dart
index e1018d9..0451a71 100644
--- a/test/global/run/runs_script_in_unchecked_mode_test.dart
+++ b/test/global/run/runs_script_in_unchecked_mode_test.dart
@@ -21,7 +21,7 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('script.dart', _script)])
+ d.dir('bin', [d.file('script.dart', _script)]),
],
);
diff --git a/test/global/run/runs_script_test.dart b/test/global/run/runs_script_test.dart
index decc65c..c8c8e37 100644
--- a/test/global/run/runs_script_test.dart
+++ b/test/global/run/runs_script_test.dart
@@ -14,7 +14,7 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")])
+ d.dir('bin', [d.file('script.dart', "main(args) => print('ok');")]),
],
);
diff --git a/test/hosted/fail_gracefully_on_bad_version_listing_response_test.dart b/test/hosted/fail_gracefully_on_bad_version_listing_response_test.dart
index eb933d1..67e13a3 100644
--- a/test/hosted/fail_gracefully_on_bad_version_listing_response_test.dart
+++ b/test/hosted/fail_gracefully_on_bad_version_listing_response_test.dart
@@ -26,7 +26,7 @@
return Response(
200,
body: jsonEncode({
- 'notTheRight': {'response': 'type'}
+ 'notTheRight': {'response': 'type'},
}),
);
}),
@@ -39,7 +39,7 @@
contains(
'Got badly formatted response trying to find package foo at http://localhost:',
),
- contains('), version solving failed.')
+ contains('), version solving failed.'),
]),
exitCode: exit_codes.DATA,
);
@@ -53,7 +53,7 @@
return Response(
200,
body: jsonEncode({
- 'notTheRight': {'response': 'type'}
+ 'notTheRight': {'response': 'type'},
}),
);
});
@@ -69,7 +69,7 @@
return Response(
403,
body: jsonEncode({
- 'notTheRight': {'response': 'type'}
+ 'notTheRight': {'response': 'type'},
}),
);
});
@@ -85,7 +85,7 @@
return Response(
401,
body: jsonEncode({
- 'notTheRight': {'response': 'type'}
+ 'notTheRight': {'response': 'type'},
}),
);
});
@@ -104,7 +104,7 @@
'www-authenticate': 'Bearer realm="pub", message="<message>"',
},
body: jsonEncode({
- 'notTheRight': {'response': 'type'}
+ 'notTheRight': {'response': 'type'},
}),
);
});
@@ -123,7 +123,7 @@
'www-authenticate': 'Bearer realm="pub", message="<message>"',
},
body: jsonEncode({
- 'notTheRight': {'response': 'type'}
+ 'notTheRight': {'response': 'type'},
}),
);
});
diff --git a/test/hosted/fail_gracefully_on_invalid_url_test.dart b/test/hosted/fail_gracefully_on_invalid_url_test.dart
index dbe6b99..11cbccd 100644
--- a/test/hosted/fail_gracefully_on_invalid_url_test.dart
+++ b/test/hosted/fail_gracefully_on_invalid_url_test.dart
@@ -15,10 +15,10 @@
d.appPubspec(
dependencies: {
'foo': {
- 'hosted': {'name': 'foo', 'url': 'not@url-com'}
- }
+ 'hosted': {'name': 'foo', 'url': 'not@url-com'},
+ },
},
- )
+ ),
]).create();
await pubCommand(
@@ -35,10 +35,10 @@
d.appPubspec(
dependencies: {
'foo': {
- 'hosted': {'name': 'foo', 'url': 'http://example.foo/?key=value'}
- }
+ 'hosted': {'name': 'foo', 'url': 'http://example.foo/?key=value'},
+ },
},
- )
+ ),
]).create();
await pubCommand(
@@ -56,10 +56,10 @@
d.appPubspec(
dependencies: {
'foo': {
- 'hosted': {'name': 'foo', 'url': 'http://example.foo/#hash'}
- }
+ 'hosted': {'name': 'foo', 'url': 'http://example.foo/#hash'},
+ },
},
- )
+ ),
]).create();
await pubCommand(
@@ -77,10 +77,10 @@
d.appPubspec(
dependencies: {
'foo': {
- 'hosted': {'name': 'foo', 'url': 'http://user:pwd@example.foo/'}
- }
+ 'hosted': {'name': 'foo', 'url': 'http://user:pwd@example.foo/'},
+ },
},
- )
+ ),
]).create();
await pubCommand(
@@ -98,10 +98,10 @@
d.appPubspec(
dependencies: {
'foo': {
- 'hosted': {'name': 'foo', 'url': 'http://user@example.foo/'}
- }
+ 'hosted': {'name': 'foo', 'url': 'http://user@example.foo/'},
+ },
},
- )
+ ),
]).create();
await pubCommand(
diff --git a/test/hosted/fail_gracefully_on_missing_package_test.dart b/test/hosted/fail_gracefully_on_missing_package_test.dart
index 4487a4d..5a6752a 100644
--- a/test/hosted/fail_gracefully_on_missing_package_test.dart
+++ b/test/hosted/fail_gracefully_on_missing_package_test.dart
@@ -21,7 +21,7 @@
contains(
"Because myapp depends on foo any which doesn't exist (could "
'not find package foo at http://localhost:'),
- contains('), version solving failed.')
+ contains('), version solving failed.'),
]),
exitCode: exit_codes.UNAVAILABLE,
);
diff --git a/test/hosted/fail_gracefully_on_url_resolve_test.dart b/test/hosted/fail_gracefully_on_url_resolve_test.dart
index b36fa7d..938cc01 100644
--- a/test/hosted/fail_gracefully_on_url_resolve_test.dart
+++ b/test/hosted/fail_gracefully_on_url_resolve_test.dart
@@ -15,10 +15,10 @@
d.appPubspec(
dependencies: {
'foo': {
- 'hosted': {'name': 'foo', 'url': 'https://invalid-url.foo'}
- }
+ 'hosted': {'name': 'foo', 'url': 'https://invalid-url.foo'},
+ },
},
- )
+ ),
]).create();
await pubCommand(
diff --git a/test/hosted/metadata_test.dart b/test/hosted/metadata_test.dart
index 1e70051..1bc3cc0 100644
--- a/test/hosted/metadata_test.dart
+++ b/test/hosted/metadata_test.dart
@@ -40,8 +40,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '1.0.0'}
- })
+ 'dev_dependencies': {'foo': '1.0.0'},
+ }),
]).create();
await pubCommand(
@@ -66,12 +66,12 @@
await d.appDir(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
).create();
await d.dir('foo', [
- d.libPubspec('foo', '1.0.0', deps: {'bar': '1.0.0'})
+ d.libPubspec('foo', '1.0.0', deps: {'bar': '1.0.0'}),
]).create();
await pubCommand(
@@ -94,8 +94,8 @@
dependencies: {
'foo': {
'version': '1.0.0',
- 'hosted': {'name': 'foo', 'url': 'http://localhost:${server.port}'}
- }
+ 'hosted': {'name': 'foo', 'url': 'http://localhost:${server.port}'},
+ },
},
).create();
diff --git a/test/hosted/offline_test.dart b/test/hosted/offline_test.dart
index da98d0c..90e2fd2 100644
--- a/test/hosted/offline_test.dart
+++ b/test/hosted/offline_test.dart
@@ -32,7 +32,7 @@
await populateCache(
{
'foo': ['1.2.2', '1.2.3'],
- 'bar': ['1.2.3']
+ 'bar': ['1.2.3'],
},
server,
);
@@ -59,7 +59,7 @@
final server = await servePackages();
await populateCache(
{
- 'foo': ['1.2.3-alpha.1']
+ 'foo': ['1.2.3-alpha.1'],
},
server,
);
@@ -105,7 +105,7 @@
final server = await servePackages();
await populateCache(
{
- 'foo': ['1.2.2', '1.2.3']
+ 'foo': ['1.2.2', '1.2.3'],
},
server,
);
@@ -153,7 +153,7 @@
await populateCache(
{
- 'foo': ['1.2.2', '1.2.3']
+ 'foo': ['1.2.2', '1.2.3'],
},
server,
);
@@ -176,7 +176,7 @@
await populateCache(
{
- 'foo': ['1.2.2', '1.2.3']
+ 'foo': ['1.2.2', '1.2.3'],
},
server,
);
@@ -202,7 +202,7 @@
await populateCache(
{
- 'foo': ['1.2.2', '1.2.3']
+ 'foo': ['1.2.2', '1.2.3'],
},
server,
);
@@ -210,7 +210,7 @@
server.serveErrors();
await d.hostedCache([
- d.dir('foo-1.2.3', [d.file('pubspec.yaml', '{')])
+ d.dir('foo-1.2.3', [d.file('pubspec.yaml', '{')]),
]).create();
await d.appDir(dependencies: {'foo': 'any'}).create();
diff --git a/test/hosted/short_syntax_test.dart b/test/hosted/short_syntax_test.dart
index eb1003f..28491bf 100644
--- a/test/hosted/short_syntax_test.dart
+++ b/test/hosted/short_syntax_test.dart
@@ -18,7 +18,7 @@
'foo',
'1.2.3',
pubspec: {
- 'environment': {'sdk': '^2.12.0'}
+ 'environment': {'sdk': '^2.12.0'},
},
);
});
@@ -49,7 +49,7 @@
'description': {
'name': 'foo',
'url': globalServer.url,
- 'sha256': matches(RegExp(r'[0-9a-f]{64}'))
+ 'sha256': matches(RegExp(r'[0-9a-f]{64}')),
},
'version': '1.2.3',
});
@@ -71,7 +71,7 @@
'app',
'1.0.0',
deps: {
- 'foo': {'hosted': 'foo', 'version': '^1.2.3'}
+ 'foo': {'hosted': 'foo', 'version': '^1.2.3'},
},
sdk: '^2.14.0',
),
diff --git a/test/hosted/version_negotiation_test.dart b/test/hosted/version_negotiation_test.dart
index b5c3c14..858f1a3 100644
--- a/test/hosted/version_negotiation_test.dart
+++ b/test/hosted/version_negotiation_test.dart
@@ -17,8 +17,8 @@
await d.appDir(
dependencies: {
'foo': {
- 'hosted': {'name': 'foo', 'url': globalServer.url}
- }
+ 'hosted': {'name': 'foo', 'url': globalServer.url},
+ },
},
).create();
@@ -43,8 +43,8 @@
await d.appDir(
dependencies: {
'foo': {
- 'hosted': {'name': 'foo', 'url': globalServer.url}
- }
+ 'hosted': {'name': 'foo', 'url': globalServer.url},
+ },
},
).create();
diff --git a/test/ignore_test.dart b/test/ignore_test.dart
index be14cda..dd09cd5 100644
--- a/test/ignore_test.dart
+++ b/test/ignore_test.dart
@@ -245,7 +245,7 @@
this.ignoreCase,
}) : name = '"${pattern.replaceAll('\n', '\\n')}"',
patterns = {
- '.': [pattern]
+ '.': [pattern],
};
}
@@ -255,7 +255,7 @@
'.': [
'/.git/',
'*.o',
- ]
+ ],
}, {
'.git/config': true,
'.git/': true,
@@ -265,7 +265,7 @@
}),
// Test empty lines
TestData('empty', {
- '.': ['']
+ '.': [''],
}, {
'README.md': false,
}),
@@ -279,7 +279,7 @@
'#comment\nLICENSE\t\n',
// Trailing comments not allowed
'#comment\nLICENSE # ignore license\n',
- ]
+ ],
}, {
'.git/config': true,
'.git/': true,
@@ -297,7 +297,7 @@
'#comment\r\nLICENSE\t\r\n',
// Trailing comments not allowed
'#comment\r\nLICENSE # ignore license\r\n',
- ]
+ ],
}, {
'.git/config': true,
'.git/': true,
@@ -341,7 +341,7 @@
TestData(
'negation',
{
- '.': ['f*', '!file.txt']
+ '.': ['f*', '!file.txt'],
},
{
'file.txt': false,
@@ -1003,7 +1003,7 @@
'folder/sub/c.txt': true,
}),
TestData('Cannot negate folders that were excluded', {
- '.': ['sub/', '!sub/foo.txt']
+ '.': ['sub/', '!sub/foo.txt'],
}, {
'sub/a.txt': true,
'sub/foo.txt': true,
@@ -1016,7 +1016,7 @@
}),
TestData('Can negate the exclusion of folders 2', {
'.': ['sub/', '*.txt'],
- 'folder': ['!sub/', '!foo.txt']
+ 'folder': ['!sub/', '!foo.txt'],
}, {
'folder/sub/a.txt': true,
'folder/sub/foo.txt': false,
@@ -1038,7 +1038,7 @@
'.': [
'/.git/',
'*.o',
- ]
+ ],
},
{
'.git/config': true,
@@ -1075,7 +1075,7 @@
'.': [
'/.git/',
'*.o',
- ]
+ ],
},
{
'.git/config': true,
diff --git a/test/io_test.dart b/test/io_test.dart
index aa5a694..d788e13 100644
--- a/test/io_test.dart
+++ b/test/io_test.dart
@@ -81,7 +81,7 @@
path.join(temp, 'file2.txt'),
path.join(temp, '.file3.txt'),
path.join(temp, '.subdir'),
- path.join(temp, '.subdir', 'file3.txt')
+ path.join(temp, '.subdir', 'file3.txt'),
]),
);
}),
@@ -103,7 +103,7 @@
unorderedEquals([
path.join(dir, 'file1.txt'),
path.join(dir, 'file2.txt'),
- path.join(dir, 'file3.txt')
+ path.join(dir, 'file3.txt'),
]),
);
}),
@@ -321,7 +321,7 @@
'H4sIAP2weF4AA+3S0QqCMBiG4V2KeAE1nfuF7maViNBqzDyQ6N4z6yCIogOtg97ncAz2wTvfuxCW'
'alZ6UFqttIiUYpXObWlzM57fqcyIkcxoU2ZKZyYvtErsvLNuuvboYpKotqm7uPUv74XYeBf7Oh66'
'8I1dX+LH/qFbt6HaLHrnd9O/cQ0sxZv++UP/Qob+1srQX08/5dmf9z+le+erdJWOHyE9/3oPAAAA'
- 'AAAAAAAAAAAAgM9dALkoaRMAKAAA')
+ 'AAAAAAAAAAAAgM9dALkoaRMAKAAA'),
],
),
tempDir,
@@ -346,7 +346,7 @@
'H4sICBKyeF4AA215YXBwLnRhcgDt0sEKgjAAh/GdewrxAWpzbkJvs0pEaDVmHiR699Q6BBJ00Dr0'
'/Y5jsD98850LYSMWJXuFkUJaITNTmEyPR09Caaut0lIXSkils1yKxCy76KFtLi4miWjqqo0H//Ze'
'iLV3saviuQ3f2PUlfkwf2l0Tyv26c/44/xtDYJsP6a0trJn2z1765/3/UMbYvr+cf8rUn/e/pifn'
- 'y3Sbjh8hvf16DwAAAAAAAAAAAAAAAIDPre4CU/3q/CcAAA==')
+ 'y3Sbjh8hvf16DwAAAAAAAAAAAAAAAIDPre4CU/3q/CcAAA=='),
],
),
tempDir,
@@ -362,7 +362,7 @@
() async => await extractTarGz(
Stream.fromIterable(
[
- [10, 20, 30] // Not a good gz stream.
+ [10, 20, 30], // Not a good gz stream.
],
),
tempDir,
diff --git a/test/lish/archives_and_uploads_a_package_test.dart b/test/lish/archives_and_uploads_a_package_test.dart
index 0e288e3..e06253a 100644
--- a/test/lish/archives_and_uploads_a_package_test.dart
+++ b/test/lish/archives_and_uploads_a_package_test.dart
@@ -28,7 +28,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
@@ -45,7 +45,7 @@
'version': 1,
'hosted': [
{'url': globalServer.url, 'token': 'access-token'},
- ]
+ ],
}).create();
var pub = await startPublish(globalServer);
@@ -56,7 +56,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
@@ -73,7 +73,7 @@
'version': 1,
'hosted': [
{'url': '${globalServer.url}/sub/folder', 'env': 'TOKEN'},
- ]
+ ],
}).create();
var pub = await startPublish(
globalServer,
@@ -89,7 +89,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
@@ -116,7 +116,7 @@
'add',
'--',
'../empty',
- 'empty'
+ 'empty',
]);
await repo.commit();
@@ -134,7 +134,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
diff --git a/test/lish/does_not_include_dot_file.dart b/test/lish/does_not_include_dot_file.dart
index 2699c81..7c9e6a4 100644
--- a/test/lish/does_not_include_dot_file.dart
+++ b/test/lish/does_not_include_dot_file.dart
@@ -22,7 +22,7 @@
td.file('LICENSE', 'Eh, do what you want.'),
td.file('README.md', "This package isn't real."),
td.file('CHANGELOG.md', '# 1.0.0\nFirst version\n'),
- td.dir('lib', [td.file('test_pkg.dart', 'int i = 1;')])
+ td.dir('lib', [td.file('test_pkg.dart', 'int i = 1;')]),
]);
void main() {
@@ -40,7 +40,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
diff --git a/test/lish/does_not_include_pubspec_overrides_file.dart b/test/lish/does_not_include_pubspec_overrides_file.dart
index 126eeb1..6d5c671 100644
--- a/test/lish/does_not_include_pubspec_overrides_file.dart
+++ b/test/lish/does_not_include_pubspec_overrides_file.dart
@@ -18,12 +18,12 @@
d.dir(appPath, [
d.libPubspec('test_pkg', '1.0.0', sdk: '>=1.8.0 <=2.0.0'),
d.pubspecOverrides({
- 'dependency_overrides': {'lib': '2.0.0'}
+ 'dependency_overrides': {'lib': '2.0.0'},
}),
td.file('LICENSE', 'Eh, do what you want.'),
td.file('README.md', "This package isn't real."),
td.file('CHANGELOG.md', '# 1.0.0\nFirst version\n'),
- td.dir('lib', [td.file('test_pkg.dart', 'int i = 1;')])
+ td.dir('lib', [td.file('test_pkg.dart', 'int i = 1;')]),
]);
void main() {
@@ -41,7 +41,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
diff --git a/test/lish/dot_folder_name_test.dart b/test/lish/dot_folder_name_test.dart
index b25ad80..a765584 100644
--- a/test/lish/dot_folder_name_test.dart
+++ b/test/lish/dot_folder_name_test.dart
@@ -14,7 +14,7 @@
await d.validPackage().create();
await d.dir(appPath, [
d.dir('.vscode', [d.file('a')]),
- d.file('.pubignore', '!.vscode/')
+ d.file('.pubignore', '!.vscode/'),
]).create();
await runPub(
args: ['lish', '--dry-run'],
diff --git a/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart b/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart
index 4a5ea09..cf05b23 100644
--- a/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart
+++ b/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart
@@ -25,7 +25,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
diff --git a/test/lish/force_publishes_if_there_are_warnings_test.dart b/test/lish/force_publishes_if_there_are_warnings_test.dart
index 124da67..ca423f9 100644
--- a/test/lish/force_publishes_if_there_are_warnings_test.dart
+++ b/test/lish/force_publishes_if_there_are_warnings_test.dart
@@ -36,7 +36,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
diff --git a/test/lish/many_files_test.dart b/test/lish/many_files_test.dart
index dd54737..2d99c81 100644
--- a/test/lish/many_files_test.dart
+++ b/test/lish/many_files_test.dart
@@ -49,7 +49,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
@@ -117,7 +117,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
diff --git a/test/lish/package_creation_provides_an_error_test.dart b/test/lish/package_creation_provides_an_error_test.dart
index b43670e..9fd5e48 100644
--- a/test/lish/package_creation_provides_an_error_test.dart
+++ b/test/lish/package_creation_provides_an_error_test.dart
@@ -25,7 +25,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.notFound(
jsonEncode({
- 'error': {'message': 'Your package was too boring.'}
+ 'error': {'message': 'Your package was too boring.'},
}),
);
});
diff --git a/test/lish/package_validation_has_a_warning_and_continues_test.dart b/test/lish/package_validation_has_a_warning_and_continues_test.dart
index 2e8498c..f1854d4 100644
--- a/test/lish/package_validation_has_a_warning_and_continues_test.dart
+++ b/test/lish/package_validation_has_a_warning_and_continues_test.dart
@@ -32,7 +32,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
diff --git a/test/lish/package_validation_has_an_error_test.dart b/test/lish/package_validation_has_an_error_test.dart
index 70e02df..1f47c68 100644
--- a/test/lish/package_validation_has_an_error_test.dart
+++ b/test/lish/package_validation_has_an_error_test.dart
@@ -15,7 +15,7 @@
'name': 'test_pkg',
'homepage': 'https://pub.dev',
'version': '1.0.0',
- 'environment': {'sdk': defaultSdkConstraint}
+ 'environment': {'sdk': defaultSdkConstraint},
}),
]).create();
diff --git a/test/lish/skip_validation_test.dart b/test/lish/skip_validation_test.dart
index 3757dbc..fa2e995 100644
--- a/test/lish/skip_validation_test.dart
+++ b/test/lish/skip_validation_test.dart
@@ -24,9 +24,9 @@
d.validPubspec(
extras: {
// Dependency cannot be resolved.
- 'dependencies': {'foo': 'any'}
+ 'dependencies': {'foo': 'any'},
},
- )
+ ),
]).create();
// It is an error to publish without a LICENSE file.
File(d.path(p.join(appPath, 'LICENSE'))).deleteSync();
@@ -41,7 +41,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
diff --git a/test/lish/unicode_file_names_test.dart b/test/lish/unicode_file_names_test.dart
index fc60633..64d9a09 100644
--- a/test/lish/unicode_file_names_test.dart
+++ b/test/lish/unicode_file_names_test.dart
@@ -28,7 +28,7 @@
globalServer.expect('GET', '/create', (request) {
return shelf.Response.ok(
jsonEncode({
- 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'}
+ 'success': {'message': 'Package test_pkg 1.0.0 uploaded!'},
}),
);
});
diff --git a/test/lish/upload_form_fields_has_a_non_string_value_test.dart b/test/lish/upload_form_fields_has_a_non_string_value_test.dart
index 5430fb3..e4c8bd5 100644
--- a/test/lish/upload_form_fields_has_a_non_string_value_test.dart
+++ b/test/lish/upload_form_fields_has_a_non_string_value_test.dart
@@ -21,7 +21,7 @@
var body = {
'url': 'http://example.com/upload',
- 'fields': {'field': 12}
+ 'fields': {'field': 12},
};
handleUploadForm(globalServer, body: body);
expect(pub.stderr, emits('Invalid server response:'));
diff --git a/test/lish/upload_form_is_missing_url_test.dart b/test/lish/upload_form_is_missing_url_test.dart
index 508452f..30364b4 100644
--- a/test/lish/upload_form_is_missing_url_test.dart
+++ b/test/lish/upload_form_is_missing_url_test.dart
@@ -20,7 +20,7 @@
await confirmPublish(pub);
var body = {
- 'fields': {'field1': 'value1', 'field2': 'value2'}
+ 'fields': {'field1': 'value1', 'field2': 'value2'},
};
handleUploadForm(globalServer, body: body);
diff --git a/test/lish/upload_form_provides_an_error_test.dart b/test/lish/upload_form_provides_an_error_test.dart
index 39051ef..fbbf129 100644
--- a/test/lish/upload_form_provides_an_error_test.dart
+++ b/test/lish/upload_form_provides_an_error_test.dart
@@ -22,7 +22,7 @@
globalServer.expect('GET', '/api/packages/versions/new', (request) async {
return shelf.Response.notFound(
jsonEncode({
- 'error': {'message': 'your request sucked'}
+ 'error': {'message': 'your request sucked'},
}),
);
});
diff --git a/test/lish/upload_form_url_is_not_a_string_test.dart b/test/lish/upload_form_url_is_not_a_string_test.dart
index b92e43d..9fb642c 100644
--- a/test/lish/upload_form_url_is_not_a_string_test.dart
+++ b/test/lish/upload_form_url_is_not_a_string_test.dart
@@ -21,7 +21,7 @@
var body = {
'url': 12,
- 'fields': {'field1': 'value1', 'field2': 'value2'}
+ 'fields': {'field1': 'value1', 'field2': 'value2'},
};
handleUploadForm(globalServer, body: body);
diff --git a/test/lish/utils.dart b/test/lish/utils.dart
index 10d21e5..eebdc37 100644
--- a/test/lish/utils.dart
+++ b/test/lish/utils.dart
@@ -18,7 +18,7 @@
body ??= {
'url': Uri.parse(server.url).resolve('/upload').toString(),
- 'fields': {'field1': 'value1', 'field2': 'value2'}
+ 'fields': {'field1': 'value1', 'field2': 'value2'},
};
return shelf.Response.ok(
diff --git a/test/lock_file_test.dart b/test/lock_file_test.dart
index 9fa7081..282a7c9 100644
--- a/test/lock_file_test.dart
+++ b/test/lock_file_test.dart
@@ -398,15 +398,15 @@
'version': '1.2.3',
'source': 'hosted',
'description': {'name': 'foo', 'url': 'https://foo.com'},
- 'dependency': 'transitive'
+ 'dependency': 'transitive',
},
'bar': {
'version': '3.2.1',
'source': 'hosted',
'description': {'name': 'bar', 'url': 'https://bar.com'},
- 'dependency': 'direct dev'
- }
- }
+ 'dependency': 'direct dev',
+ },
+ },
}),
);
});
diff --git a/test/no_packages_dir_test.dart b/test/no_packages_dir_test.dart
index 3a88bc5..f2dd710 100644
--- a/test/no_packages_dir_test.dart
+++ b/test/no_packages_dir_test.dart
@@ -15,7 +15,7 @@
d.dir('packages'),
d.dir('bin/packages'),
d.dir('bin/subdir/packages'),
- d.dir('lib/packages')
+ d.dir('lib/packages'),
]).create();
await pubCommand(command);
@@ -24,7 +24,7 @@
d.dir('packages'),
d.dir('bin/packages'),
d.dir('bin/subdir/packages'),
- d.dir('lib/packages')
+ d.dir('lib/packages'),
]).validate();
});
});
diff --git a/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart b/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart
index ecb6ed5..4b85a04 100644
--- a/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart
+++ b/test/oauth2/with_server_rejected_credentials_authenticates_again_test.dart
@@ -25,11 +25,11 @@
return shelf.Response(
401,
body: jsonEncode({
- 'error': {'message': 'your token sucks'}
+ 'error': {'message': 'your token sucks'},
}),
headers: {
'www-authenticate': 'Bearer error="invalid_token",'
- ' error_description="your token sucks"'
+ ' error_description="your token sucks"',
},
);
});
diff --git a/test/outdated/outdated_test.dart b/test/outdated/outdated_test.dart
index 0757d0a..2572387 100644
--- a/test/outdated/outdated_test.dart
+++ b/test/outdated/outdated_test.dart
@@ -76,7 +76,7 @@
await d.dir('local_package', [
d.libDir('local_package'),
- d.libPubspec('local_package', '0.0.1')
+ d.libPubspec('local_package', '0.0.1'),
]).create();
await d.dir(appPath, [
@@ -89,7 +89,7 @@
'retracted': '^1.0.0',
},
'dev_dependencies': {'builder': '^1.0.0'},
- })
+ }),
]).create();
await pubGet();
builder
@@ -107,7 +107,7 @@
deps: {
'transitive': '^1.0.0',
'transitive3': '^1.0.0',
- 'dev_trans': '^1.0.0'
+ 'dev_trans': '^1.0.0',
},
)
..serve('builder', '3.0.0-alpha', deps: {'transitive': '^1.0.0'})
@@ -138,7 +138,7 @@
'bar': '^1.0.0',
'baz': '^1.0.0',
},
- })
+ }),
]).create();
await pubGet();
builder.discontinue('foo');
@@ -157,7 +157,7 @@
'dependencies': {
'foo': '^1.0.0',
},
- })
+ }),
]).create();
await pubGet();
@@ -175,7 +175,7 @@
'foo': '^1.0.0',
'bar': '^1.0.0',
},
- })
+ }),
]).create();
await servePackages()
@@ -217,12 +217,12 @@
},
'dependency_overrides': {
'foo': {
- 'git': {'url': '../foo.git'}
+ 'git': {'url': '../foo.git'},
},
'bar': {'path': '../bar'},
- 'baz': '2.0.0'
+ 'baz': '2.0.0',
},
- })
+ }),
]).create();
await pubGet();
@@ -250,7 +250,7 @@
'foo': '1.0.0',
'bar': '1.0.0',
},
- })
+ }),
]).create();
await pubGet();
@@ -278,9 +278,9 @@
'dependencies': {
'foo': '1.0.0-dev.1',
'bar': '^0.9.0',
- 'mop': '0.10.0-dev'
+ 'mop': '0.10.0-dev',
},
- })
+ }),
]).create();
await pubGet();
@@ -294,21 +294,21 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '>=2.10.0 <3.0.0'}
+ 'environment': {'sdk': '>=2.10.0 <3.0.0'},
},
)
..serve(
'foo',
'1.1.0',
pubspec: {
- 'environment': {'sdk': '>=2.10.0 <3.0.0'}
+ 'environment': {'sdk': '>=2.10.0 <3.0.0'},
},
)
..serve(
'foo',
'2.0.0',
pubspec: {
- 'environment': {'sdk': '>=2.12.0 <3.0.0'}
+ 'environment': {'sdk': '>=2.12.0 <3.0.0'},
},
);
@@ -341,13 +341,13 @@
'sdk': 'flutter',
},
},
- })
+ }),
]).create();
await pubGet(
environment: {
'FLUTTER_ROOT': d.path('flutter-root'),
- '_PUB_TEST_SDK_VERSION': '2.13.0'
+ '_PUB_TEST_SDK_VERSION': '2.13.0',
},
);
diff --git a/test/package_config_file_test.dart b/test/package_config_file_test.dart
index d94d7fc..d5d052b 100644
--- a/test/package_config_file_test.dart
+++ b/test/package_config_file_test.dart
@@ -29,7 +29,7 @@
await d.dir(appPath, [
d.appPubspec(dependencies: {'foo': '1.2.3'}),
- d.dir('lib')
+ d.dir('lib'),
]).create();
await pubCommand(command);
@@ -78,7 +78,7 @@
await d.dir(appPath, [
d.appPubspec(dependencies: {'foo': '1.2.3'}),
- d.dir('lib')
+ d.dir('lib'),
]).create();
var oldFile = d.dir(appPath, [
@@ -124,7 +124,7 @@
test('package_config.json file is not created if pub fails', () async {
await d.dir(appPath, [
d.appPubspec(dependencies: {'foo': '1.2.3'}),
- d.dir('lib')
+ d.dir('lib'),
]).create();
await pubCommand(
@@ -172,9 +172,9 @@
},
'dependency_overrides': {
'baz': {'path': '../local_baz'},
- }
+ },
}),
- d.dir('lib')
+ d.dir('lib'),
]).create();
await pubCommand(command);
@@ -223,7 +223,7 @@
'sdk': '>=3.1.0 <=3.2.2+2', // tests runs with '3.1.2+3'
},
}),
- d.dir('lib')
+ d.dir('lib'),
]).create();
await pubCommand(command);
@@ -265,7 +265,7 @@
'foo': '^1.2.3',
},
}),
- d.dir('lib')
+ d.dir('lib'),
]).create();
await pubCommand(command);
diff --git a/test/package_list_files_test.dart b/test/package_list_files_test.dart
index 773059d..7285b21 100644
--- a/test/package_list_files_test.dart
+++ b/test/package_list_files_test.dart
@@ -24,7 +24,7 @@
d.file('file2.txt', 'contents'),
d.dir('subdir', [
d.file('subfile1.txt', 'subcontents'),
- d.file('subfile2.txt', 'subcontents')
+ d.file('subfile2.txt', 'subcontents'),
]),
d.dir(Uri.encodeComponent('\\/%+-='), [
d.file(Uri.encodeComponent('\\/%+-=')),
@@ -64,7 +64,7 @@
d.file('file1.txt', 'contents'),
d.file('file2.txt', 'contents'),
d.dir('subdir', [
- d.dir('a', [d.file('file')])
+ d.dir('a', [d.file('file')]),
]),
]).create();
createDirectorySymlink(
@@ -94,7 +94,7 @@
d.file('file1.txt', 'contents'),
d.file('file2.txt', 'contents'),
d.dir('subdir', [
- d.dir('a', [d.file('file')])
+ d.dir('a', [d.file('file')]),
]),
]).create();
@@ -120,7 +120,7 @@
d.file('file1.txt', 'contents'),
d.file('file2.txt', 'contents'),
d.dir('subdir', [
- d.dir('a', [d.file('file')])
+ d.dir('a', [d.file('file')]),
]),
]).create();
Link(p.join(d.sandbox, appPath, 'subdir', 'symlink'))
@@ -148,7 +148,7 @@
d.file('file1.txt', 'contents'),
d.file('file2.txt', 'contents'),
d.dir('subdir', [
- d.dir('a', [d.file('file')])
+ d.dir('a', [d.file('file')]),
]),
]).create();
Link(p.join(d.sandbox, appPath, 'subdir', 'symlink1'))
@@ -197,8 +197,8 @@
d.file('file2.txt', 'contents'),
d.dir('subdir', [
d.file('subfile1.txt', 'subcontents'),
- d.file('subfile2.txt', 'subcontents')
- ])
+ d.file('subfile2.txt', 'subcontents'),
+ ]),
]).create();
expect(entrypoint!.root.listFiles(), {
@@ -206,7 +206,7 @@
p.join(root, 'file1.txt'),
p.join(root, 'file2.txt'),
p.join(root, 'subdir', 'subfile1.txt'),
- p.join(root, 'subdir', 'subfile2.txt')
+ p.join(root, 'subdir', 'subfile2.txt'),
});
});
@@ -217,14 +217,14 @@
d.file('file2.text', 'contents'),
d.dir('subdir', [
d.file('subfile1.txt', 'subcontents'),
- d.file('subfile2.text', 'subcontents')
- ])
+ d.file('subfile2.text', 'subcontents'),
+ ]),
]).create();
expect(entrypoint!.root.listFiles(), {
p.join(root, 'pubspec.yaml'),
p.join(root, 'file2.text'),
- p.join(root, 'subdir', 'subfile2.text')
+ p.join(root, 'subdir', 'subfile2.text'),
});
});
@@ -247,9 +247,9 @@
d.dir('subdir', [
d.file('subfile1.txt', 'subcontents'),
d.file('subfile2.text', 'subcontents'),
- ])
+ ]),
]),
- ])
+ ]),
]).create();
createEntrypoint(p.join(appPath, 'rep', 'sub'));
@@ -258,7 +258,7 @@
p.join(root, 'pubspec.yaml'),
p.join(root, 'file2.text'),
p.join(root, 'file4.gak'),
- p.join(root, 'subdir', 'subfile2.text')
+ p.join(root, 'subdir', 'subfile2.text'),
});
});
@@ -266,7 +266,7 @@
setUp(() async {
await d.git('submodule', [
d.file('.gitignore', '*.txt'),
- d.file('file2.text', 'contents')
+ d.file('file2.text', 'contents'),
]).create();
await repo.runGit([
@@ -275,7 +275,7 @@
'protocol.file.allow=always',
'submodule',
'add',
- '../submodule'
+ '../submodule',
]);
await d.file('$appPath/submodule/file1.txt', 'contents').create();
@@ -294,7 +294,7 @@
test('ignores pubspec.lock files', () async {
await d.dir(appPath, [
d.file('pubspec.lock'),
- d.dir('subdir', [d.file('pubspec.lock')])
+ d.dir('subdir', [d.file('pubspec.lock')]),
]).create();
expect(entrypoint!.root.listFiles(), {p.join(root, 'pubspec.yaml')});
@@ -304,12 +304,12 @@
await d.dir(appPath, [
d.dir('pubspec.lock', [
d.file('file.txt', 'contents'),
- ])
+ ]),
]).create();
expect(entrypoint!.root.listFiles(), {
p.join(root, 'pubspec.yaml'),
- p.join(root, 'pubspec.lock', 'file.txt')
+ p.join(root, 'pubspec.lock', 'file.txt'),
});
});
@@ -324,15 +324,15 @@
d.dir('subsubdir', [
d.file('subsubfile1.txt', 'subsubcontents'),
d.file('subsubfile2.txt', 'subsubcontents'),
- ])
- ])
+ ]),
+ ]),
]).create();
expect(entrypoint!.root.listFiles(beneath: 'subdir'), {
p.join(root, 'subdir', 'subfile1.txt'),
p.join(root, 'subdir', 'subfile2.txt'),
p.join(root, 'subdir', 'subsubdir', 'subsubfile1.txt'),
- p.join(root, 'subdir', 'subsubdir', 'subsubfile2.txt')
+ p.join(root, 'subdir', 'subsubdir', 'subsubfile2.txt'),
});
});
});
diff --git a/test/package_server.dart b/test/package_server.dart
index b5d07ba..db37705 100644
--- a/test/package_server.dart
+++ b/test/package_server.dart
@@ -105,15 +105,15 @@
'archive_sha256': version.sha256 ??
hexEncode(
(await sha256.bind(version.contents()).first).bytes,
- )
- }
+ ),
+ },
],
if (package.isDiscontinued) 'isDiscontinued': true,
if (package.discontinuedReplacementText != null)
'replacedBy': package.discontinuedReplacementText,
}),
headers: {
- HttpHeaders.contentTypeHeader: 'application/vnd.pub.v2+json'
+ HttpHeaders.contentTypeHeader: 'application/vnd.pub.v2+json',
},
);
},
@@ -140,7 +140,7 @@
if (packageVersion.version == version) {
final headers = packageVersion.headers ?? {};
headers[HttpHeaders.contentTypeHeader] ??= [
- 'application/octet-stream'
+ 'application/octet-stream',
];
// This gate enables tests to validate the CRC32C parser by
@@ -247,7 +247,7 @@
var pubspecFields = <String, dynamic>{
'name': name,
'version': version,
- 'environment': {'sdk': sdk ?? '^3.0.0'}
+ 'environment': {'sdk': sdk ?? '^3.0.0'},
};
if (pubspec != null) pubspecFields.addAll(pubspec);
if (deps != null) pubspecFields['dependencies'] = deps;
diff --git a/test/pinned_dependency_hint_test.dart b/test/pinned_dependency_hint_test.dart
index f1f4247..5e7efa5 100644
--- a/test/pinned_dependency_hint_test.dart
+++ b/test/pinned_dependency_hint_test.dart
@@ -16,11 +16,11 @@
d.dir(
'flutter_foo',
[
- d.libPubspec('flutter_foo', '0.0.1', deps: {'tool': '1.0.0'})
+ d.libPubspec('flutter_foo', '0.0.1', deps: {'tool': '1.0.0'}),
],
- )
+ ),
]),
- d.file('version', '1.2.3')
+ d.file('version', '1.2.3'),
]).create();
await servePackages()
..serve('bar', '1.0.0', deps: {'tool': '^2.0.0'})
@@ -30,7 +30,7 @@
await d.appDir(
dependencies: {
'bar': 'any',
- 'flutter_foo': {'sdk': 'flutter'}
+ 'flutter_foo': {'sdk': 'flutter'},
},
).create();
await pubGet(
@@ -48,11 +48,11 @@
d.dir(
'flutter_foo',
[
- d.libPubspec('flutter_foo', '0.0.1', deps: {'tool': '1.0.0'})
+ d.libPubspec('flutter_foo', '0.0.1', deps: {'tool': '1.0.0'}),
],
- )
+ ),
]),
- d.file('version', '1.2.3')
+ d.file('version', '1.2.3'),
]).create();
await servePackages()
..serve('tool', '1.0.0', deps: {'bar': '^2.0.0'})
@@ -61,7 +61,7 @@
await d.appDir(
dependencies: {
'bar': 'any',
- 'flutter_foo': {'sdk': 'flutter'}
+ 'flutter_foo': {'sdk': 'flutter'},
},
).create();
await pubGet(
diff --git a/test/pub_get_and_upgrade_test.dart b/test/pub_get_and_upgrade_test.dart
index 83b06b1..0d2602b 100644
--- a/test/pub_get_and_upgrade_test.dart
+++ b/test/pub_get_and_upgrade_test.dart
@@ -26,8 +26,8 @@
test('a pubspec with a "name" key', () async {
await d.dir(appPath, [
d.pubspec({
- 'dependencies': {'foo': null}
- })
+ 'dependencies': {'foo': null},
+ }),
]).create();
await pubCommand(
@@ -43,7 +43,7 @@
// directory.
await d.dir(appPath, [
d.pubspec({'name': 'myapp_name'}),
- d.libDir('myapp_name')
+ d.libDir('myapp_name'),
]).create();
await pubCommand(command);
@@ -63,29 +63,29 @@
d.pubspec({
'name': 'foo',
'dependencies': {
- 'baz': {'path': '../baz1'}
- }
- })
+ 'baz': {'path': '../baz1'},
+ },
+ }),
]),
d.dir('bar', [
d.pubspec({
'name': 'bar',
'dependencies': {
- 'baz': {'path': '../baz2'}
- }
- })
+ 'baz': {'path': '../baz2'},
+ },
+ }),
]),
d.dir('baz1', [d.libPubspec('baz', '0.0.0')]),
- d.dir('baz2', [d.libPubspec('baz', '0.0.0')])
+ d.dir('baz2', [d.libPubspec('baz', '0.0.0')]),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
'foo': {'path': '../deps/foo'},
- 'bar': {'path': '../deps/bar'}
+ 'bar': {'path': '../deps/bar'},
},
- )
+ ),
]).create();
await pubCommand(
@@ -98,9 +98,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'myapp': {'path': '.'}
+ 'myapp': {'path': '.'},
},
- )
+ ),
]).create();
await pubCommand(
@@ -115,9 +115,9 @@
d.pubspec({
'name': 'myapp',
'dev_dependencies': {
- 'myapp': {'path': '.'}
- }
- })
+ 'myapp': {'path': '.'},
+ },
+ }),
]).create();
await pubCommand(
diff --git a/test/pubspec_overrides_test.dart b/test/pubspec_overrides_test.dart
index 5d71c3a..69c216a 100644
--- a/test/pubspec_overrides_test.dart
+++ b/test/pubspec_overrides_test.dart
@@ -19,7 +19,7 @@
d.appPubspec(dependencies: {'lib': '1.0.0'}),
d.dir('lib'),
d.pubspecOverrides({
- 'dependency_overrides': {'lib': '2.0.0'}
+ 'dependency_overrides': {'lib': '2.0.0'},
}),
]).create();
@@ -43,7 +43,7 @@
path: '.',
languageVersion: '3.0',
),
- ])
+ ]),
]).validate();
});
});
@@ -60,13 +60,13 @@
d.appPubspec(
dependencies: {'lib': '1.0.0', 'foo': '1.0.0'},
extras: {
- 'dependency_overrides': {'lib': '2.0.0', 'foo': '2.0.0'}
+ 'dependency_overrides': {'lib': '2.0.0', 'foo': '2.0.0'},
},
),
d.dir('lib'),
// empty overrides file:
d.pubspecOverrides({
- 'dependency_overrides': {'lib': '3.0.0'}
+ 'dependency_overrides': {'lib': '3.0.0'},
}),
]).create();
@@ -91,7 +91,7 @@
'lib': '1.0.0',
},
extras: {
- 'dependency_overrides': {'lib': '2.0.0'}
+ 'dependency_overrides': {'lib': '2.0.0'},
},
),
d.dir('lib'),
diff --git a/test/remove/remove_test.dart b/test/remove/remove_test.dart
index 9abdfc6..c2787f0 100644
--- a/test/remove/remove_test.dart
+++ b/test/remove/remove_test.dart
@@ -43,7 +43,7 @@
environment:
sdk: '$defaultSdkConstraint'
-''')
+'''),
]).create();
await pubRemove(args: ['foo']);
@@ -56,8 +56,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'bar': '2.0.0'}
- })
+ 'dev_dependencies': {'bar': '2.0.0'},
+ }),
]).validate();
});
@@ -72,7 +72,7 @@
args: ['foo', '--dry-run'],
output: allOf([
contains('These packages are no longer being depended on:'),
- contains('- foo 1.2.3')
+ contains('- foo 1.2.3'),
]),
);
@@ -91,7 +91,7 @@
test('prints a warning if the dependencies map does not exist', () async {
await d.dir(appPath, [
- d.pubspec({'name': 'myapp'})
+ d.pubspec({'name': 'myapp'}),
]).create();
await pubRemove(
args: ['foo'],
@@ -99,7 +99,7 @@
);
await d.dir(appPath, [
- d.pubspec({'name': 'myapp'})
+ d.pubspec({'name': 'myapp'}),
]).validate();
});
@@ -110,8 +110,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '1.2.3'}
- })
+ 'dev_dependencies': {'foo': '1.2.3'},
+ }),
]).create();
await pubGet();
@@ -121,7 +121,7 @@
await d.appPackageConfigFile([]).validate();
await d.dir(appPath, [
- d.pubspec({'name': 'myapp'})
+ d.pubspec({'name': 'myapp'}),
]).validate();
});
@@ -137,8 +137,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'bar': '>=2.3.4', 'jfj': '0.2.1'},
- 'dev_dependencies': {'foo': '^1.2.3', 'baz': '3.2.1'}
- })
+ 'dev_dependencies': {'foo': '^1.2.3', 'baz': '3.2.1'},
+ }),
]).create();
await pubGet();
@@ -154,7 +154,7 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'jfj': '0.2.1'},
- })
+ }),
]).validate();
});
@@ -164,16 +164,16 @@
ensureGit();
final repo = d.git('foo.git', [
- d.dir('subdir', [d.libPubspec('foo', '1.0.0'), d.libDir('foo', '1.0.0')])
+ d.dir('subdir', [d.libPubspec('foo', '1.0.0'), d.libDir('foo', '1.0.0')]),
]);
await repo.create();
await d.appDir(
dependencies: {
'foo': {
- 'git': {'url': '../foo.git', 'path': 'subdir'}
+ 'git': {'url': '../foo.git', 'path': 'subdir'},
},
- 'bar': '1.2.3'
+ 'bar': '1.2.3',
},
).create();
@@ -196,7 +196,7 @@
await d.appDir(
dependencies: {
'foo': {'path': '../foo'},
- 'bar': '1.2.3'
+ 'bar': '1.2.3',
},
).create();
@@ -220,9 +220,9 @@
dependencies: {
'foo': {
'version': '1.2.3',
- 'hosted': {'name': 'foo', 'url': 'http://localhost:${custom.port}'}
+ 'hosted': {'name': 'foo', 'url': 'http://localhost:${custom.port}'},
},
- 'bar': '2.0.1'
+ 'bar': '2.0.1',
},
).create();
@@ -246,8 +246,8 @@
'name': 'myapp',
'dependencies': {'foo': '^1.0.0'},
'dev_dependencies': {'bar': '^2.0.0'},
- 'dependency_overrides': {'bar': '1.0.0'}
- })
+ 'dependency_overrides': {'bar': '1.0.0'},
+ }),
]).create();
await pubGet();
@@ -298,7 +298,7 @@
contains('# comment B'),
contains('# comment C'),
contains('# comment D'),
- contains('# comment E')
+ contains('# comment E'),
]),
);
});
@@ -311,8 +311,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'bar': '>=2.3.4'},
- 'dev_dependencies': {'foo': '^1.2.3'}
- })
+ 'dev_dependencies': {'foo': '^1.2.3'},
+ }),
]).create();
await pubGet();
@@ -323,7 +323,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- })
+ }),
]).validate();
});
}
diff --git a/test/run/allows_dart_extension_test.dart b/test/run/allows_dart_extension_test.dart
index 962270f..62475bc 100644
--- a/test/run/allows_dart_extension_test.dart
+++ b/test/run/allows_dart_extension_test.dart
@@ -21,7 +21,7 @@
test('allows a ".dart" extension on the argument', () async {
await d.dir(appPath, [
d.appPubspec(),
- d.dir('bin', [d.file('script.dart', _script)])
+ d.dir('bin', [d.file('script.dart', _script)]),
]).create();
await pubGet();
diff --git a/test/run/app_can_read_from_stdin_test.dart b/test/run/app_can_read_from_stdin_test.dart
index 20f9b32..646e7e5 100644
--- a/test/run/app_can_read_from_stdin_test.dart
+++ b/test/run/app_can_read_from_stdin_test.dart
@@ -23,8 +23,8 @@
print(line1);
print(line2);
}
- """)
- ])
+ """),
+ ]),
]).create();
await pubGet();
@@ -50,8 +50,8 @@
print("started");
stdin.listen(stdout.add);
}
- """)
- ])
+ """),
+ ]),
]).create();
await pubGet();
diff --git a/test/run/errors_if_only_transitive_dependency_test.dart b/test/run/errors_if_only_transitive_dependency_test.dart
index b93c4a6..1ba780e 100644
--- a/test/run/errors_if_only_transitive_dependency_test.dart
+++ b/test/run/errors_if_only_transitive_dependency_test.dart
@@ -12,7 +12,7 @@
test('Errors if the script is in a non-immediate dependency.', () async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")])
+ d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")]),
]).create();
await d.dir('bar', [
@@ -20,17 +20,17 @@
'bar',
'1.0.0',
deps: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'bar': {'path': '../bar'}
+ 'bar': {'path': '../bar'},
},
- )
+ ),
]).create();
await pubGet();
diff --git a/test/run/errors_if_path_in_dependency_test.dart b/test/run/errors_if_path_in_dependency_test.dart
index ec5a2ee..6fdfae0 100644
--- a/test/run/errors_if_path_in_dependency_test.dart
+++ b/test/run/errors_if_path_in_dependency_test.dart
@@ -17,9 +17,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await runPub(
diff --git a/test/run/forwards_signal_posix_test.dart b/test/run/forwards_signal_posix_test.dart
index 4300fc1..3a1299f 100644
--- a/test/run/forwards_signal_posix_test.dart
+++ b/test/run/forwards_signal_posix_test.dart
@@ -41,7 +41,7 @@
test('forwards signals to the inner script', () async {
await d.dir(appPath, [
d.appPubspec(),
- d.dir('bin', [d.file('script.dart', _script)])
+ d.dir('bin', [d.file('script.dart', _script)]),
]).create();
await pubGet();
diff --git a/test/run/includes_parent_directories_of_entrypoint_test.dart b/test/run/includes_parent_directories_of_entrypoint_test.dart
index 6bc4e27..43aa93f 100644
--- a/test/run/includes_parent_directories_of_entrypoint_test.dart
+++ b/test/run/includes_parent_directories_of_entrypoint_test.dart
@@ -26,9 +26,9 @@
d.file('a.dart', "var a = 'a';"),
d.dir('a', [
d.file('b.dart', "var b = 'b';"),
- d.dir('b', [d.file('app.dart', _script)])
- ])
- ])
+ d.dir('b', [d.file('app.dart', _script)]),
+ ]),
+ ]),
]).create();
await pubGet();
diff --git a/test/run/loads_package_imports_in_a_dependency_test.dart b/test/run/loads_package_imports_in_a_dependency_test.dart
index 10fad43..192cdbf 100644
--- a/test/run/loads_package_imports_in_a_dependency_test.dart
+++ b/test/run/loads_package_imports_in_a_dependency_test.dart
@@ -17,16 +17,16 @@
import "package:foo/foo.dart";
main() => print(value);
-''')
- ])
+'''),
+ ]),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await pubGet();
diff --git a/test/run/nonexistent_script_in_dependency_test.dart b/test/run/nonexistent_script_in_dependency_test.dart
index a5e208a..3179e0c 100644
--- a/test/run/nonexistent_script_in_dependency_test.dart
+++ b/test/run/nonexistent_script_in_dependency_test.dart
@@ -16,9 +16,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await pubGet();
diff --git a/test/run/package_api_test.dart b/test/run/package_api_test.dart
index d055a53..4be659c 100644
--- a/test/run/package_api_test.dart
+++ b/test/run/package_api_test.dart
@@ -27,10 +27,10 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
),
- d.dir('bin', [d.file('script.dart', _script)])
+ d.dir('bin', [d.file('script.dart', _script)]),
]).create();
await pubGet();
@@ -61,12 +61,12 @@
'foo',
'1.0.0',
contents: [
- d.dir('bin', [d.file('script.dart', _script)])
+ d.dir('bin', [d.file('script.dart', _script)]),
],
);
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': 'any'})
+ d.appPubspec(dependencies: {'foo': 'any'}),
]).create();
await pubGet();
diff --git a/test/run/passes_along_arguments_test.dart b/test/run/passes_along_arguments_test.dart
index 624d9f2..4f372c2 100644
--- a/test/run/passes_along_arguments_test.dart
+++ b/test/run/passes_along_arguments_test.dart
@@ -17,7 +17,7 @@
test('passes arguments to the spawned script', () async {
await d.dir(appPath, [
d.appPubspec(),
- d.dir('bin', [d.file('args.dart', _script)])
+ d.dir('bin', [d.file('args.dart', _script)]),
]).create();
await pubGet();
diff --git a/test/run/precompile_test.dart b/test/run/precompile_test.dart
index 6505b0b..263edde 100644
--- a/test/run/precompile_test.dart
+++ b/test/run/precompile_test.dart
@@ -29,7 +29,7 @@
d.dir(
'bin',
[d.file('test.dart', 'main(List<String> args) => print("hello");')],
- )
+ ),
],
);
@@ -68,7 +68,7 @@
'test',
'1.0.0',
contents: [
- d.dir('bin', [d.file('test.dart', _script)])
+ d.dir('bin', [d.file('test.dart', _script)]),
],
);
@@ -97,7 +97,7 @@
'test',
'1.0.0',
contents: [
- d.dir('bin', [d.file('test.dart', _script)])
+ d.dir('bin', [d.file('test.dart', _script)]),
],
);
@@ -126,7 +126,7 @@
'test',
'1.0.0',
contents: [
- d.dir('bin', [d.file('test.dart', _script)])
+ d.dir('bin', [d.file('test.dart', _script)]),
],
);
diff --git a/test/run/runs_app_in_directory_in_entrypoint_test.dart b/test/run/runs_app_in_directory_in_entrypoint_test.dart
index ac8af0d..c686a12 100644
--- a/test/run/runs_app_in_directory_in_entrypoint_test.dart
+++ b/test/run/runs_app_in_directory_in_entrypoint_test.dart
@@ -14,8 +14,8 @@
d.appPubspec(),
d.dir('tool', [
d.file('app.dart', "main() => print('tool');"),
- d.dir('sub', [d.file('app.dart', "main() => print('sub');")])
- ])
+ d.dir('sub', [d.file('app.dart', "main() => print('sub');")]),
+ ]),
]).create();
await pubGet();
diff --git a/test/run/runs_app_in_entrypoint_test.dart b/test/run/runs_app_in_entrypoint_test.dart
index 6cb932a..6e47168 100644
--- a/test/run/runs_app_in_entrypoint_test.dart
+++ b/test/run/runs_app_in_entrypoint_test.dart
@@ -21,7 +21,7 @@
test('runs a Dart application in the entrypoint package', () async {
await d.dir(appPath, [
d.appPubspec(),
- d.dir('bin', [d.file('script.dart', _script)])
+ d.dir('bin', [d.file('script.dart', _script)]),
]).create();
await pubGet();
diff --git a/test/run/runs_from_a_dependency_override_after_dependency_test.dart b/test/run/runs_from_a_dependency_override_after_dependency_test.dart
index 519b9c1..95bd0ce 100644
--- a/test/run/runs_from_a_dependency_override_after_dependency_test.dart
+++ b/test/run/runs_from_a_dependency_override_after_dependency_test.dart
@@ -16,12 +16,12 @@
'1.0.0',
pubspec: {'name': 'foo', 'version': '1.0.0'},
contents: [
- d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")])
+ d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")]),
],
);
await d.dir(appPath, [
- d.appPubspec(dependencies: {'foo': null})
+ d.appPubspec(dependencies: {'foo': null}),
]).create();
await pubGet(args: ['--precompile']);
@@ -32,16 +32,16 @@
await d.dir('foo', [
d.libPubspec('foo', '2.0.0'),
- d.dir('bin', [d.file('bar.dart', "main() => print('different');")])
+ d.dir('bin', [d.file('bar.dart', "main() => print('different');")]),
]).create();
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
'dependencies': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).create();
await pubGet();
diff --git a/test/run/runs_named_app_in_dependency_test.dart b/test/run/runs_named_app_in_dependency_test.dart
index 0c6fca7..25774cf 100644
--- a/test/run/runs_named_app_in_dependency_test.dart
+++ b/test/run/runs_named_app_in_dependency_test.dart
@@ -11,15 +11,15 @@
test('runs a named Dart application in a dependency', () async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")])
+ d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")]),
]).create();
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
await pubGet();
diff --git a/test/run/runs_named_app_in_dev_dependency_test.dart b/test/run/runs_named_app_in_dev_dependency_test.dart
index 287f05b..b382399 100644
--- a/test/run/runs_named_app_in_dev_dependency_test.dart
+++ b/test/run/runs_named_app_in_dev_dependency_test.dart
@@ -11,16 +11,16 @@
test('runs a named Dart application in a dev dependency', () async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")])
+ d.dir('bin', [d.file('bar.dart', "main() => print('foobar');")]),
]).create();
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
'dev_dependencies': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).create();
await pubGet();
diff --git a/test/run/runs_shorthand_app_in_dependency_test.dart b/test/run/runs_shorthand_app_in_dependency_test.dart
index 455e049..86002dc 100644
--- a/test/run/runs_shorthand_app_in_dependency_test.dart
+++ b/test/run/runs_shorthand_app_in_dependency_test.dart
@@ -11,16 +11,16 @@
test('runs a shorthand Dart application in a dependency', () async {
await d.dir('foo', [
d.libPubspec('foo', '1.0.0'),
- d.dir('bin', [d.file('foo.dart', "main() => print('foo');")])
+ d.dir('bin', [d.file('foo.dart', "main() => print('foo');")]),
]).create();
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
'dependencies': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).create();
await pubGet();
diff --git a/test/run/runs_the_script_in_checked_mode_test.dart b/test/run/runs_the_script_in_checked_mode_test.dart
index ef2d27e..3fb73a2 100644
--- a/test/run/runs_the_script_in_checked_mode_test.dart
+++ b/test/run/runs_the_script_in_checked_mode_test.dart
@@ -11,7 +11,7 @@
test('runs the script with assertions enabled', () async {
await d.dir(appPath, [
d.appPubspec(),
- d.dir('bin', [d.file('script.dart', 'main() { assert(false); }')])
+ d.dir('bin', [d.file('script.dart', 'main() { assert(false); }')]),
]).create();
await pubGet();
diff --git a/test/run/runs_the_script_in_unchecked_mode_test.dart b/test/run/runs_the_script_in_unchecked_mode_test.dart
index 026a748..502cb6f 100644
--- a/test/run/runs_the_script_in_unchecked_mode_test.dart
+++ b/test/run/runs_the_script_in_unchecked_mode_test.dart
@@ -18,7 +18,7 @@
test('runs the script without assertions by default', () async {
await d.dir(appPath, [
d.appPubspec(),
- d.dir('bin', [d.file('script.dart', _script)])
+ d.dir('bin', [d.file('script.dart', _script)]),
]).create();
await pubGet();
diff --git a/test/sdk_test.dart b/test/sdk_test.dart
index f409bc7..adcbf9c 100644
--- a/test/sdk_test.dart
+++ b/test/sdk_test.dart
@@ -20,23 +20,23 @@
d.dir('packages', [
d.dir('foo', [
d.libDir('foo', 'foo 0.0.1'),
- d.libPubspec('foo', '0.0.1', deps: {'bar': 'any'})
- ])
+ d.libPubspec('foo', '0.0.1', deps: {'bar': 'any'}),
+ ]),
]),
d.dir('bin/cache/pkg', [
d.dir(
'baz',
[d.libDir('baz', 'foo 0.0.1'), d.libPubspec('baz', '0.0.1')],
- )
+ ),
]),
- d.file('version', '1.2.3')
+ d.file('version', '1.2.3'),
]).create();
});
test("gets an SDK dependency's dependencies", () async {
await d.appDir(
dependencies: {
- 'foo': {'sdk': 'flutter'}
+ 'foo': {'sdk': 'flutter'},
},
).create();
await pubCommand(
@@ -55,7 +55,7 @@
test('gets an SDK dependency from bin/cache/pkg', () async {
await d.appDir(
dependencies: {
- 'baz': {'sdk': 'flutter'}
+ 'baz': {'sdk': 'flutter'},
},
).create();
await pubCommand(
@@ -74,7 +74,7 @@
test('unlocks an SDK dependency when the version changes', () async {
await d.appDir(
dependencies: {
- 'foo': {'sdk': 'flutter'}
+ 'foo': {'sdk': 'flutter'},
},
).create();
await pubCommand(
@@ -121,7 +121,7 @@
test("the version constraint doesn't match", () async {
await d.appDir(
dependencies: {
- 'foo': {'sdk': 'flutter', 'version': '^1.0.0'}
+ 'foo': {'sdk': 'flutter', 'version': '^1.0.0'},
},
).create();
await pubCommand(
@@ -135,7 +135,7 @@
test('the SDK is unknown', () async {
await d.appDir(
dependencies: {
- 'foo': {'sdk': 'unknown'}
+ 'foo': {'sdk': 'unknown'},
},
).create();
await pubCommand(
@@ -149,7 +149,7 @@
test('the SDK is unavailable', () async {
await d.appDir(
dependencies: {
- 'foo': {'sdk': 'flutter'}
+ 'foo': {'sdk': 'flutter'},
},
).create();
await pubCommand(
@@ -168,7 +168,7 @@
test("the SDK doesn't contain the package", () async {
await d.appDir(
dependencies: {
- 'bar': {'sdk': 'flutter'}
+ 'bar': {'sdk': 'flutter'},
},
).create();
await pubCommand(
@@ -186,7 +186,7 @@
test("the Dart SDK doesn't contain the package", () async {
await d.appDir(
dependencies: {
- 'bar': {'sdk': 'dart'}
+ 'bar': {'sdk': 'dart'},
},
).create();
await pubCommand(
@@ -206,7 +206,7 @@
await d.appDir(
dependencies: {
- 'foo': {'sdk': 'fuchsia'}
+ 'foo': {'sdk': 'fuchsia'},
},
).create();
await pubCommand(
diff --git a/test/snapshot_test.dart b/test/snapshot_test.dart
index 6fe8d43..1d515ef 100644
--- a/test/snapshot_test.dart
+++ b/test/snapshot_test.dart
@@ -23,8 +23,8 @@
d.dir(
'subdir',
[d.file('sub.dart', "void main() => print('sub!');")],
- )
- ])
+ ),
+ ]),
],
);
@@ -42,8 +42,8 @@
d.file('hello.dart-$versionSuffix.snapshot', contains('hello!')),
d.file('goodbye.dart-$versionSuffix.snapshot', contains('goodbye!')),
d.nothing('shell.sh-$versionSuffix.snapshot'),
- d.nothing('subdir')
- ])
+ d.nothing('subdir'),
+ ]),
]).validate();
var process = await pubRun(args: ['foo:hello']);
@@ -68,8 +68,8 @@
d.dir(
'subdir',
[d.file('sub.dart', "void main() => print('sub!');")],
- )
- ])
+ ),
+ ]),
],
)
..serve('bar', '1.2.3', deps: {'foo': '1.2.3'});
@@ -88,8 +88,8 @@
d.file('hello.dart-$versionSuffix.snapshot', contains('hello!')),
d.file('goodbye.dart-$versionSuffix.snapshot', contains('goodbye!')),
d.nothing('shell.sh-$versionSuffix.snapshot'),
- d.nothing('subdir')
- ])
+ d.nothing('subdir'),
+ ]),
]).validate();
var process = await pubRun(args: ['foo:hello']);
@@ -111,7 +111,7 @@
d.dir(
'bin',
[d.file('hello.dart', "void main() => print('hello!');")],
- )
+ ),
],
);
@@ -123,7 +123,7 @@
);
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
- d.file('hello.dart-$versionSuffix.snapshot', contains('hello!'))
+ d.file('hello.dart-$versionSuffix.snapshot', contains('hello!')),
]).validate();
server.serve(
@@ -133,7 +133,7 @@
d.dir(
'bin',
[d.file('hello.dart', "void main() => print('hello 2!');")],
- )
+ ),
],
);
@@ -143,7 +143,7 @@
);
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
- d.file('hello.dart-$versionSuffix.snapshot', contains('hello 2!'))
+ d.file('hello.dart-$versionSuffix.snapshot', contains('hello 2!')),
]).validate();
var process = await pubRun(args: ['foo:hello']);
@@ -158,7 +158,7 @@
'foo',
'1.2.3',
pubspec: {
- 'dependencies': {'bar': 'any'}
+ 'dependencies': {'bar': 'any'},
},
contents: [
d.dir('bin', [
@@ -166,15 +166,15 @@
import 'package:bar/bar.dart';
void main() => print(message);
- """)
- ])
+ """),
+ ]),
],
);
server.serve(
'bar',
'1.2.3',
contents: [
- d.dir('lib', [d.file('bar.dart', "final message = 'hello!';")])
+ d.dir('lib', [d.file('bar.dart', "final message = 'hello!';")]),
],
);
@@ -186,7 +186,7 @@
);
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
- d.file('hello.dart-$versionSuffix.snapshot', contains('hello!'))
+ d.file('hello.dart-$versionSuffix.snapshot', contains('hello!')),
]).validate();
server.serve(
@@ -203,7 +203,7 @@
);
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
- d.file('hello.dart-$versionSuffix.snapshot', contains('hello 2!'))
+ d.file('hello.dart-$versionSuffix.snapshot', contains('hello 2!')),
]).validate();
var process = await pubRun(args: ['foo:hello']);
@@ -219,12 +219,12 @@
d.dir(
'bin',
[d.file('hello.dart', "void main() => print('Hello!');")],
- )
+ ),
]).create();
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -234,14 +234,14 @@
);
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
- d.file('hello.dart-$versionSuffix.snapshot', contains('Hello!'))
+ d.file('hello.dart-$versionSuffix.snapshot', contains('Hello!')),
]).validate();
await d.git('foo.git', [
d.dir(
'bin',
[d.file('hello.dart', "void main() => print('Goodbye!');")],
- )
+ ),
]).commit();
await pubUpgrade(
@@ -250,7 +250,7 @@
);
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin', 'foo'), [
- d.file('hello.dart-$versionSuffix.snapshot', contains('Goodbye!'))
+ d.file('hello.dart-$versionSuffix.snapshot', contains('Goodbye!')),
]).validate();
var process = await pubRun(args: ['foo:hello']);
@@ -267,7 +267,7 @@
d.dir(
'bin',
[d.file('hello.dart', "void main() => print('hello!');")],
- )
+ ),
],
);
@@ -279,7 +279,7 @@
d.dir(
'foo',
[d.outOfDateSnapshot('hello.dart-$versionSuffix.snapshot')],
- )
+ ),
]).create();
var process = await pubRun(args: ['foo:hello']);
@@ -292,8 +292,8 @@
await d.dir(p.join(appPath, '.dart_tool', 'pub', 'bin'), [
d.dir('foo', [
- d.file('hello.dart-$versionSuffix.snapshot', contains('hello!'))
- ])
+ d.file('hello.dart-$versionSuffix.snapshot', contains('hello!')),
+ ]),
]).validate();
});
});
diff --git a/test/solve_suggestions_test.dart b/test/solve_suggestions_test.dart
index a419243..ce23f09 100644
--- a/test/solve_suggestions_test.dart
+++ b/test/solve_suggestions_test.dart
@@ -18,7 +18,7 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'flutter': '>=3.3.0', 'sdk': '^2.17.0'}
+ 'environment': {'flutter': '>=3.3.0', 'sdk': '^2.17.0'},
},
);
server.handle(
@@ -26,7 +26,7 @@
(request) => Response.ok(releasesMockResponse),
);
await d.dir(appPath, [
- d.libPubspec('myApp', '1.0.0', deps: {'foo': 'any'}, sdk: '^2.17.0')
+ d.libPubspec('myApp', '1.0.0', deps: {'foo': 'any'}, sdk: '^2.17.0'),
]).create();
await pubGet(
error: contains('* Try using the Flutter SDK version: 3.3.2.'),
@@ -45,7 +45,7 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '>=2.18.0 <2.18.1'}
+ 'environment': {'sdk': '>=2.18.0 <2.18.1'},
},
);
server.handle(
@@ -53,7 +53,7 @@
(request) => Response.ok(releasesMockResponse),
);
await d.dir(appPath, [
- d.libPubspec('myApp', '1.0.0', deps: {'foo': 'any'}, sdk: '^2.17.0')
+ d.libPubspec('myApp', '1.0.0', deps: {'foo': 'any'}, sdk: '^2.17.0'),
]).create();
await pubGet(
error: contains('* Try using the Dart SDK version: 2.18.0'),
@@ -78,7 +78,7 @@
'1.0.0',
deps: {'foo': '^1.0.0'},
devDeps: {'bar': '^1.0.0'},
- )
+ ),
]).create();
await pubGet(
error: allOf(
@@ -103,7 +103,7 @@
'myApp',
'1.0.0',
deps: {'foo': '>1.0.0 <=0.0.0'},
- )
+ ),
]).create();
await pubGet(
error: allOf(
@@ -129,7 +129,7 @@
'1.0.0',
deps: {'foo': '1.0.0'},
devDeps: {'bar': '1.0.0'},
- )
+ ),
]).create();
await pubGet(
error: contains(
@@ -166,7 +166,7 @@
'foo2': '1.0.0',
'bar2': '1.0.0',
},
- )
+ ),
]).create();
await pubGet(
error: contains(
@@ -182,7 +182,7 @@
'foo',
'1.0.0',
deps: {
- 'bar': {'version': '2.0.0', 'hosted': server2.url}
+ 'bar': {'version': '2.0.0', 'hosted': server2.url},
},
);
@@ -197,7 +197,7 @@
'foo': '^1.0.0',
'bar': {'version': '^1.0.0', 'hosted': server2.url},
},
- )
+ ),
]).create();
await pubGet(
error: contains(
@@ -216,7 +216,7 @@
'foo': '^1.0.0',
'bar': {'version': '^2.0.0', 'hosted': server2.url},
},
- )
+ ),
]).validate();
});
}
diff --git a/test/test_pub.dart b/test/test_pub.dart
index f79ac4b..cc5f795 100644
--- a/test/test_pub.dart
+++ b/test/test_pub.dart
@@ -460,7 +460,7 @@
'_PUB_TEST_SDK_VERSION': testVersion,
if (tokenEndpoint != null) '_PUB_TEST_TOKEN_ENDPOINT': tokenEndpoint,
if (_globalServer?.port != null)
- 'PUB_HOSTED_URL': 'http://localhost:${_globalServer?.port}'
+ 'PUB_HOSTED_URL': 'http://localhost:${_globalServer?.port}',
};
/// The path to the root of pub's sources in the pub repo.
@@ -522,7 +522,7 @@
if (systemRoot != null) 'SYSTEMROOT': systemRoot,
if (tmp != null) 'TMP': tmp,
},
- ...getPubTestEnvironment(tokenEndpoint)
+ ...getPubTestEnvironment(tokenEndpoint),
};
for (final e in (environment ?? {}).entries) {
var value = e.value;
@@ -554,7 +554,7 @@
return StreamSplitter(
StreamGroup.merge([
_outputToLog(super.stdoutStream(), log.Level.message),
- _outputToLog(super.stderrStream(), log.Level.error)
+ _outputToLog(super.stderrStream(), log.Level.error),
]),
);
}
@@ -614,7 +614,7 @@
log.Level.message,
log.Level.io,
log.Level.solver,
- log.Level.fine
+ log.Level.fine,
].fold({}, (levels, level) {
levels[level.name] = level;
return levels;
@@ -694,7 +694,7 @@
d.file(
'pubspec.lock',
lockFile.serialize(p.join(d.sandbox, package), cache),
- )
+ ),
]).create();
}
@@ -740,7 +740,7 @@
sha256: null,
),
),
- )
+ ),
];
return LockFile(packages);
@@ -771,7 +771,7 @@
'name': name,
'version': version,
'homepage': 'https://pub.dev',
- 'description': 'A package, I guess.'
+ 'description': 'A package, I guess.',
};
if (dependencies != null) package['dependencies'] = dependencies;
diff --git a/test/token/add_token_test.dart b/test/token/add_token_test.dart
index 80b9223..4fea8ab 100644
--- a/test/token/add_token_test.dart
+++ b/test/token/add_token_test.dart
@@ -15,7 +15,7 @@
'version': 1,
'hosted': [
{'url': 'https://example.com', 'token': 'abc'},
- ]
+ ],
}).create();
await runPub(
@@ -27,8 +27,8 @@
'version': 1,
'hosted': [
{'url': 'https://example.com', 'token': 'abc'},
- {'url': 'https://server.demo', 'token': 'auth-token'}
- ]
+ {'url': 'https://server.demo', 'token': 'auth-token'},
+ ],
}).validate();
});
@@ -39,7 +39,7 @@
'version': 1,
'hosted': [
{'url': 'https://example.com', 'token': 'abc'},
- ]
+ ],
}).create();
await runPub(
@@ -51,7 +51,7 @@
'version': 1,
'hosted': [
{'url': 'https://example.com', 'env': 'TOKEN'},
- ]
+ ],
}).validate();
});
@@ -60,7 +60,7 @@
'version': 1,
'hosted': [
{'url': 'https://example.com', 'token': 'abc'},
- ]
+ ],
}).create();
await runPub(
@@ -73,7 +73,7 @@
'version': 1,
'hosted': [
{'url': 'https://example.com', 'env': 'TOKEN'},
- ]
+ ],
}).validate();
});
});
@@ -92,7 +92,7 @@
},
],
}
- ]
+ ],
}).create();
await runPub(
@@ -113,8 +113,8 @@
},
],
},
- {'url': 'https://server.demo', 'token': 'auth-token'}
- ]
+ {'url': 'https://server.demo', 'token': 'auth-token'},
+ ],
}).validate();
});
@@ -166,8 +166,8 @@
await d.tokensFile({
'version': 1,
'hosted': [
- {'url': 'http://localhost', 'token': 'auth-token'}
- ]
+ {'url': 'http://localhost', 'token': 'auth-token'},
+ ],
}).validate();
});
@@ -194,8 +194,8 @@
await d.tokensFile({
'version': 1,
'hosted': [
- {'url': 'https://pub.dev', 'token': 'auth-token'}
- ]
+ {'url': 'https://pub.dev', 'token': 'auth-token'},
+ ],
}).validate();
});
}
diff --git a/test/token/error_message_test.dart b/test/token/error_message_test.dart
index b1b4793..26daa4d 100644
--- a/test/token/error_message_test.dart
+++ b/test/token/error_message_test.dart
@@ -35,7 +35,7 @@
'version': 1,
'hosted': [
{'url': globalServer.url, 'token': 'access-token'},
- ]
+ ],
}).create();
});
diff --git a/test/token/remove_token_test.dart b/test/token/remove_token_test.dart
index 06ec38e..dd4f4c4 100644
--- a/test/token/remove_token_test.dart
+++ b/test/token/remove_token_test.dart
@@ -13,8 +13,8 @@
await d.tokensFile({
'version': 1,
'hosted': [
- {'url': 'https://server.demo', 'token': 'auth-token'}
- ]
+ {'url': 'https://server.demo', 'token': 'auth-token'},
+ ],
}).create();
await runPub(args: ['token', 'remove', 'https://server.demo']);
@@ -26,8 +26,8 @@
await d.tokensFile({
'version': 1,
'hosted': [
- {'url': 'https://server.demo', 'token': 'auth-token'}
- ]
+ {'url': 'https://server.demo', 'token': 'auth-token'},
+ ],
}).create();
await runPub(
@@ -41,8 +41,8 @@
await d.tokensFile({
'version': 1,
'hosted': [
- {'url': 'https://server.demo', 'token': 'auth-token'}
- ]
+ {'url': 'https://server.demo', 'token': 'auth-token'},
+ ],
}).validate();
});
@@ -51,8 +51,8 @@
'version': 1,
'hosted': [
{'url': 'https://server.dev', 'token': 'auth-token'},
- {'url': 'https://server2.com', 'token': 'auth-token'}
- ]
+ {'url': 'https://server2.com', 'token': 'auth-token'},
+ ],
}).create();
await runPub(args: ['token', 'remove', '--all']);
diff --git a/test/token/token_authentication_test.dart b/test/token/token_authentication_test.dart
index 6ef22c0..803e893 100644
--- a/test/token/token_authentication_test.dart
+++ b/test/token/token_authentication_test.dart
@@ -17,7 +17,7 @@
'version': 1,
'hosted': [
{'url': globalServer.url, 'env': 'TOKEN'},
- ]
+ ],
}).create();
var pub = await startPublish(
globalServer,
@@ -38,12 +38,12 @@
'version': 1,
'hosted': [
{'url': globalServer.url, 'env': 'TOKEN'},
- ]
+ ],
}).create();
await runPub(
args: ['publish'],
environment: {
- 'TOKEN': 'access-token@' // '@' is not allowed in bearer tokens
+ 'TOKEN': 'access-token@', // '@' is not allowed in bearer tokens
},
error: contains(
'Credential token for ${globalServer.url} is not a valid Bearer token.',
@@ -64,12 +64,12 @@
'url': globalServer.url,
'token': 'access-token@', // '@' is not allowed in bearer tokens
},
- ]
+ ],
}).create();
await runPub(
args: ['publish'],
environment: {
- 'TOKEN': 'access-token@' // '@' is not allowed in bearer tokens
+ 'TOKEN': 'access-token@', // '@' is not allowed in bearer tokens
},
error: contains(
'Credential token for ${globalServer.url} is not a valid Bearer token.',
@@ -85,7 +85,7 @@
'version': 1,
'hosted': [
{'url': globalServer.url, 'token': 'access-token'},
- ]
+ ],
}).create();
var pub = await startPublish(
globalServer,
diff --git a/test/token/when_receives_401_removes_token_test.dart b/test/token/when_receives_401_removes_token_test.dart
index cc6560f..13816cc 100644
--- a/test/token/when_receives_401_removes_token_test.dart
+++ b/test/token/when_receives_401_removes_token_test.dart
@@ -16,7 +16,7 @@
'version': 1,
'hosted': [
{'url': server.url, 'token': 'access-token'},
- ]
+ ],
}).create();
var pub = await startPublish(server, overrideDefaultHostedServer: false);
await confirmPublish(pub);
diff --git a/test/token/when_receives_403_persists_saved_token_test.dart b/test/token/when_receives_403_persists_saved_token_test.dart
index cfcddb7..6030855 100644
--- a/test/token/when_receives_403_persists_saved_token_test.dart
+++ b/test/token/when_receives_403_persists_saved_token_test.dart
@@ -16,7 +16,7 @@
'version': 1,
'hosted': [
{'url': server.url, 'token': 'access-token'},
- ]
+ ],
}).create();
var pub = await startPublish(server, overrideDefaultHostedServer: false);
await confirmPublish(pub);
@@ -31,7 +31,7 @@
'version': 1,
'hosted': [
{'url': server.url, 'token': 'access-token'},
- ]
+ ],
}).validate();
});
}
diff --git a/test/unknown_source_test.dart b/test/unknown_source_test.dart
index c22b956..a3e4485 100644
--- a/test/unknown_source_test.dart
+++ b/test/unknown_source_test.dart
@@ -14,7 +14,7 @@
test('fails gracefully on a dependency from an unknown source', () async {
await d.appDir(
dependencies: {
- 'foo': {'bad': 'foo'}
+ 'foo': {'bad': 'foo'},
},
).create();
@@ -36,14 +36,14 @@
'foo',
'0.0.1',
deps: {
- 'bar': {'bad': 'bar'}
+ 'bar': {'bad': 'bar'},
},
- )
+ ),
]).create();
await d.appDir(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
).create();
@@ -65,9 +65,9 @@
await d.dir(appPath, [
d.appPubspec(
dependencies: {
- 'foo': {'path': '../foo'}
+ 'foo': {'path': '../foo'},
},
- )
+ ),
]).create();
// But lock it to a bad one.
@@ -79,11 +79,11 @@
'foo': {
'version': '0.0.0',
'source': 'bad',
- 'description': {'name': 'foo'}
- }
- }
+ 'description': {'name': 'foo'},
+ },
+ },
}),
- )
+ ),
]).create();
await pubCommand(command);
diff --git a/test/upgrade/dry_run_does_not_apply_changes_test.dart b/test/upgrade/dry_run_does_not_apply_changes_test.dart
index ff3659c..137bbb5 100644
--- a/test/upgrade/dry_run_does_not_apply_changes_test.dart
+++ b/test/upgrade/dry_run_does_not_apply_changes_test.dart
@@ -44,7 +44,7 @@
// The lockfile should be unmodified.
d.file('pubspec.lock', contains('1.0.0')),
// The ".dart_tool" directory should not have been regenerated.
- d.nothing('.dart_tool')
+ d.nothing('.dart_tool'),
]).validate();
});
@@ -84,7 +84,7 @@
// The lockfile should not be modified.
d.file('pubspec.lock', contains('1.0.0')),
// The ".dart_tool" directory should not have been regenerated.
- d.nothing('.dart_tool')
+ d.nothing('.dart_tool'),
]).validate();
// Try without --dry-run
@@ -102,7 +102,7 @@
await d.dir(appPath, [
d.appPubspec(dependencies: {'foo': '^2.0.0'}),
d.file('pubspec.lock', contains('2.0.0')),
- d.dir('.dart_tool')
+ d.dir('.dart_tool'),
]).validate();
});
}
diff --git a/test/upgrade/example_warns_about_major_versions_test.dart b/test/upgrade/example_warns_about_major_versions_test.dart
index 7c38dee..9a487b6 100644
--- a/test/upgrade/example_warns_about_major_versions_test.dart
+++ b/test/upgrade/example_warns_about_major_versions_test.dart
@@ -18,7 +18,7 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'bar': '^1.0.0'}
+ 'dev_dependencies': {'bar': '^1.0.0'},
}),
d.dir('example', [
d.pubspec({
@@ -26,10 +26,10 @@
'dependencies': {
'bar': 'any',
'foo': '^1.0.0',
- 'myapp': {'path': '..'}
- }
- })
- ])
+ 'myapp': {'path': '..'},
+ },
+ }),
+ ]),
]).create();
await ctx.run(['upgrade', '--major-versions', '--example']);
@@ -82,10 +82,10 @@
'foo': '^1.0.0',
// This will make the implicit upgrade of the example folder fail:
'bar': '^1.0.0',
- 'myapp': {'path': '..'}
- }
- })
- ])
+ 'myapp': {'path': '..'},
+ },
+ }),
+ ]),
]).create();
await ctx.run(
diff --git a/test/upgrade/git/do_not_upgrade_if_unneeded_test.dart b/test/upgrade/git/do_not_upgrade_if_unneeded_test.dart
index be55dea..ad5f20f 100644
--- a/test/upgrade/git/do_not_upgrade_if_unneeded_test.dart
+++ b/test/upgrade/git/do_not_upgrade_if_unneeded_test.dart
@@ -23,10 +23,10 @@
'foo_dep': {
'git': p
.toUri(p.absolute(d.sandbox, appPath, '../foo_dep.git'))
- .toString()
- }
+ .toString(),
+ },
},
- )
+ ),
]).create();
await d.git(
@@ -36,7 +36,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -46,11 +46,11 @@
d.dir('git', [
d.dir('cache', [
d.gitPackageRepoCacheDir('foo'),
- d.gitPackageRepoCacheDir('foo_dep')
+ d.gitPackageRepoCacheDir('foo_dep'),
]),
d.gitPackageRevisionCacheDir('foo'),
d.gitPackageRevisionCacheDir('foo_dep'),
- ])
+ ]),
]).validate();
var originalFooDepSpec = packageSpec('foo_dep');
@@ -64,15 +64,15 @@
'foo_dep': {
'git': p
.toUri(p.absolute(d.sandbox, appPath, '../foo_dep.git'))
- .toString()
- }
+ .toString(),
+ },
},
- )
+ ),
]).create();
await d.git('foo_dep.git', [
d.libDir('foo_dep', 'foo_dep 2'),
- d.libPubspec('foo_dep', '1.0.0')
+ d.libPubspec('foo_dep', '1.0.0'),
]).commit();
await pubUpgrade(args: ['foo']);
@@ -80,7 +80,7 @@
await d.dir(cachePath, [
d.dir('git', [
d.gitPackageRevisionCacheDir('foo', modifier: 2),
- ])
+ ]),
]).validate();
expect(packageSpec('foo_dep'), originalFooDepSpec);
diff --git a/test/upgrade/git/upgrade_locked_test.dart b/test/upgrade/git/upgrade_locked_test.dart
index 5a1755e..a12a5a6 100644
--- a/test/upgrade/git/upgrade_locked_test.dart
+++ b/test/upgrade/git/upgrade_locked_test.dart
@@ -24,7 +24,7 @@
await d.appDir(
dependencies: {
'foo': {'git': '../foo.git'},
- 'bar': {'git': '../bar.git'}
+ 'bar': {'git': '../bar.git'},
},
).create();
@@ -38,7 +38,7 @@
),
d.gitPackageRevisionCacheDir('foo'),
d.gitPackageRevisionCacheDir('bar'),
- ])
+ ]),
]).validate();
var originalFooSpec = packageSpec('foo');
@@ -60,7 +60,7 @@
d.dir('git', [
d.gitPackageRevisionCacheDir('foo', modifier: 2),
d.gitPackageRevisionCacheDir('bar', modifier: 2),
- ])
+ ]),
]).validate();
expect(packageSpec('foo'), isNot(originalFooSpec));
diff --git a/test/upgrade/git/upgrade_one_locked_test.dart b/test/upgrade/git/upgrade_one_locked_test.dart
index 3326000..eef7db2 100644
--- a/test/upgrade/git/upgrade_one_locked_test.dart
+++ b/test/upgrade/git/upgrade_one_locked_test.dart
@@ -24,7 +24,7 @@
await d.appDir(
dependencies: {
'foo': {'git': '../foo.git'},
- 'bar': {'git': '../bar.git'}
+ 'bar': {'git': '../bar.git'},
},
).create();
@@ -38,7 +38,7 @@
),
d.gitPackageRevisionCacheDir('foo'),
d.gitPackageRevisionCacheDir('bar'),
- ])
+ ]),
]).validate();
var originalBarSpec = packageSpec('bar');
@@ -58,7 +58,7 @@
await d.dir(cachePath, [
d.dir('git', [
d.gitPackageRevisionCacheDir('foo', modifier: 2),
- ])
+ ]),
]).validate();
expect(packageSpec('bar'), originalBarSpec);
diff --git a/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart b/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart
index d8c5fdc..b45a56f 100644
--- a/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart
+++ b/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart
@@ -19,7 +19,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
@@ -31,7 +31,7 @@
d.gitPackageRepoCacheDir('foo'),
]),
d.gitPackageRevisionCacheDir('foo'),
- ])
+ ]),
]).validate();
var originalFooSpec = packageSpec('foo');
diff --git a/test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart b/test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart
index 3a40233..9d95e0b 100644
--- a/test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart
+++ b/test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart
@@ -17,7 +17,7 @@
await d.appDir(
dependencies: {
- 'foo': {'git': '../foo.git'}
+ 'foo': {'git': '../foo.git'},
},
).create();
diff --git a/test/upgrade/hosted/warn_about_discontinued_test.dart b/test/upgrade/hosted/warn_about_discontinued_test.dart
index 29f72d1..01ddaf0 100644
--- a/test/upgrade/hosted/warn_about_discontinued_test.dart
+++ b/test/upgrade/hosted/warn_about_discontinued_test.dart
@@ -55,7 +55,7 @@
foo: 1.2.3
environment:
sdk: '^3.1.2'
-''')
+'''),
]).create();
await pubGet();
diff --git a/test/upgrade/renamed_package_circular_dependency.dart b/test/upgrade/renamed_package_circular_dependency.dart
index ec10b82..26eb3dd 100644
--- a/test/upgrade/renamed_package_circular_dependency.dart
+++ b/test/upgrade/renamed_package_circular_dependency.dart
@@ -17,7 +17,7 @@
'name': 'myappx',
'version': '1.0.0',
'dependencies': {'foo': 'any'},
- })
+ }),
]).create();
await pubGet();
@@ -28,7 +28,7 @@
'name': 'myapp',
'version': '1.0.1',
'dependencies': {'foo': 'any'},
- })
+ }),
]).create();
await pubUpgrade();
});
diff --git a/test/upgrade/report/describes_change_test.dart b/test/upgrade/report/describes_change_test.dart
index dbc480c..cedf299 100644
--- a/test/upgrade/report/describes_change_test.dart
+++ b/test/upgrade/report/describes_change_test.dart
@@ -48,17 +48,17 @@
await d.dir('source_changed', [
d.libDir('source_changed'),
- d.libPubspec('source_changed', '2.0.0')
+ d.libPubspec('source_changed', '2.0.0'),
]).create();
await d.dir('description_changed_1', [
d.libDir('description_changed'),
- d.libPubspec('description_changed', '1.0.0')
+ d.libPubspec('description_changed', '1.0.0'),
]).create();
await d.dir('description_changed_2', [
d.libDir('description_changed'),
- d.libPubspec('description_changed', '1.0.0')
+ d.libPubspec('description_changed', '1.0.0'),
]).create();
// Create the first lockfile.
@@ -70,7 +70,7 @@
'version_downgraded': '2.0.0',
'source_changed': 'any',
'package_removed': 'any',
- 'description_changed': {'path': '../description_changed_1'}
+ 'description_changed': {'path': '../description_changed_1'},
},
).create();
diff --git a/test/upgrade/report/highlights_overrides_test.dart b/test/upgrade/report/highlights_overrides_test.dart
index 03ae4fd..270c4e1 100644
--- a/test/upgrade/report/highlights_overrides_test.dart
+++ b/test/upgrade/report/highlights_overrides_test.dart
@@ -15,8 +15,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependency_overrides': {'overridden': 'any'}
- })
+ 'dependency_overrides': {'overridden': 'any'},
+ }),
]).create();
// Upgrade everything.
diff --git a/test/upgrade/report/leading_character_shows_change_test.dart b/test/upgrade/report/leading_character_shows_change_test.dart
index 132f3b6..3b98c63 100644
--- a/test/upgrade/report/leading_character_shows_change_test.dart
+++ b/test/upgrade/report/leading_character_shows_change_test.dart
@@ -22,17 +22,17 @@
await d.dir('description_changed_1', [
d.libDir('description_changed'),
- d.libPubspec('description_changed', '1.0.0')
+ d.libPubspec('description_changed', '1.0.0'),
]).create();
await d.dir('description_changed_2', [
d.libDir('description_changed'),
- d.libPubspec('description_changed', '1.0.0')
+ d.libPubspec('description_changed', '1.0.0'),
]).create();
await d.dir('source_changed', [
d.libDir('source_changed'),
- d.libPubspec('source_changed', '1.0.0')
+ d.libPubspec('source_changed', '1.0.0'),
]).create();
// Create the first lockfile.
@@ -45,10 +45,10 @@
'removed': 'any',
'source_changed': 'any',
'unchanged': 'any',
- 'upgraded': '1.0.0'
+ 'upgraded': '1.0.0',
},
- 'dependency_overrides': {'overridden': 'any'}
- })
+ 'dependency_overrides': {'overridden': 'any'},
+ }),
]).create();
await pubGet();
@@ -63,10 +63,10 @@
'downgraded': '1.0.0',
'source_changed': {'path': '../source_changed'},
'unchanged': 'any',
- 'upgraded': '2.0.0'
+ 'upgraded': '2.0.0',
},
- 'dependency_overrides': {'overridden': 'any'}
- })
+ 'dependency_overrides': {'overridden': 'any'},
+ }),
]).create();
// Upgrade everything.
diff --git a/test/upgrade/report/shows_newer_available_versions_test.dart b/test/upgrade/report/shows_newer_available_versions_test.dart
index 1e55795..a71fec4 100644
--- a/test/upgrade/report/shows_newer_available_versions_test.dart
+++ b/test/upgrade/report/shows_newer_available_versions_test.dart
@@ -40,7 +40,7 @@
'no_newer': '1.0.0',
'one_newer_unstable': '1.0.0',
'one_newer_unstable2': '1.0.1-unstable.1',
- 'one_newer_stable': '1.0.0'
+ 'one_newer_stable': '1.0.0',
},
).create();
diff --git a/test/upgrade/report/shows_pub_outdated_test.dart b/test/upgrade/report/shows_pub_outdated_test.dart
index 40b0a29..cddcda2 100644
--- a/test/upgrade/report/shows_pub_outdated_test.dart
+++ b/test/upgrade/report/shows_pub_outdated_test.dart
@@ -35,7 +35,7 @@
'multiple_newer_unstable': '1.0.0',
'no_newer': '1.0.0',
'one_newer_unstable': '1.0.0',
- 'one_newer_stable': '1.0.0'
+ 'one_newer_stable': '1.0.0',
},
).create();
@@ -68,7 +68,7 @@
'multiple_newer_unstable': '1.0.0',
'no_newer': '1.0.0',
'one_newer_unstable': '1.0.0',
- 'one_newer_stable': '1.0.0'
+ 'one_newer_stable': '1.0.0',
},
).create();
@@ -90,7 +90,7 @@
'multiple_newer_unstable': '1.0.0',
'no_newer': '1.0.0',
'one_newer_unstable': '1.0.0',
- 'one_newer_stable': '1.0.0'
+ 'one_newer_stable': '1.0.0',
},
).create();
@@ -112,7 +112,7 @@
'multiple_newer_unstable': '1.0.1-unstable.2',
'no_newer': '1.0.0',
'one_newer_unstable': '1.0.1-unstable.1',
- 'one_newer_stable': '1.0.0'
+ 'one_newer_stable': '1.0.0',
},
).create();
diff --git a/test/upgrade/upgrade_major_versions_test.dart b/test/upgrade/upgrade_major_versions_test.dart
index 51d7263..c876c43 100644
--- a/test/upgrade/upgrade_major_versions_test.dart
+++ b/test/upgrade/upgrade_major_versions_test.dart
@@ -68,7 +68,7 @@
'foo': '^1.0.0',
'bar': '^0.1.0',
'baz': '^1.0.0',
- }
+ },
}),
]).create();
@@ -91,7 +91,7 @@
'foo': '^2.0.0', // bumped
'bar': '^0.2.0', // bumped
'baz': '^1.0.0',
- }
+ },
}),
]).validate();
@@ -163,10 +163,10 @@
// The pubspec file should be modified.
d.pubspec({
'name': 'myapp',
- 'dependencies': {'foo': '^3.0.0'}
+ 'dependencies': {'foo': '^3.0.0'},
}),
// The lockfile should be modified.
- d.file('pubspec.lock', contains('3.0.0'))
+ d.file('pubspec.lock', contains('3.0.0')),
]).validate();
await d.appPackageConfigFile([
@@ -193,7 +193,7 @@
'foo': '1.0.0',
'bar': '1.0.0',
},
- })
+ }),
]).create();
await pubGet();
@@ -220,7 +220,7 @@
'foo': '1.0.0',
'bar': '1.0.0',
},
- })
+ }),
]).validate();
await d.appPackageConfigFile([
@@ -239,7 +239,7 @@
'foo',
'2.0.0',
pubspec: {
- 'dependencies': {'bar': '1.0.0'}
+ 'dependencies': {'bar': '1.0.0'},
},
)
..serve('bar', '1.0.0')
@@ -292,9 +292,9 @@
await d.dir(appPath, [
d.pubspecOverrides({
'dependency_overrides': {
- 'bar': {'path': '../bar'}
- }
- })
+ 'bar': {'path': '../bar'},
+ },
+ }),
]).create();
await pubGet();
diff --git a/test/utils_test.dart b/test/utils_test.dart
index 62d5576..173041d 100644
--- a/test/utils_test.dart
+++ b/test/utils_test.dart
@@ -43,7 +43,7 @@
expect(
yamlToString({
'a': {'b': 1, 'c': 2},
- 'd': 3
+ 'd': 3,
}),
equals('''
a:
diff --git a/test/validator/analyze_test.dart b/test/validator/analyze_test.dart
index 55c9779..4690346 100644
--- a/test/validator/analyze_test.dart
+++ b/test/validator/analyze_test.dart
@@ -17,7 +17,7 @@
d.file('LICENSE', 'Eh, do what you want.'),
d.file('README.md', "This package isn't real."),
d.file('CHANGELOG.md', '# 1.0.0\nFirst version\n'),
- d.dir('lib', [d.file('test_pkg.dart', 'int i = 1;')])
+ d.dir('lib', [d.file('test_pkg.dart', 'int i = 1;')]),
]).create();
await expectValidation();
});
@@ -50,7 +50,7 @@
linter:
rules:
- secure_pubspec_urls
-''')
+'''),
]).create();
await expectValidation();
@@ -76,7 +76,7 @@
analyzer:
errors:
secure_pubspec_urls: warning
-''')
+'''),
]).create();
await expectValidation(
@@ -104,8 +104,8 @@
void main() {
final a = 10; // Unused.
}
-''')
- ])
+'''),
+ ]),
]).create();
await expectValidation();
@@ -124,8 +124,8 @@
d.file('test_pkg.dart', '''
void main() {
// Missing }
-''')
- ])
+'''),
+ ]),
]).create();
await expectValidation(
@@ -134,7 +134,7 @@
contains('Analyzing lib, bin, pubspec.yaml...'),
contains('error -'),
contains("Expected to find '}'."),
- contains('Package has 1 warning.')
+ contains('Package has 1 warning.'),
]),
exitCode: DATA,
extraArgs: ['--directory', appPath],
@@ -154,7 +154,7 @@
void main() {
final a = 10; // Unused.
}
-''')
+'''),
]),
]).create();
@@ -164,7 +164,7 @@
contains('Analyzing lib, test, pubspec.yaml...'),
contains('warning -'),
contains("The value of the local variable 'a' isn't used"),
- contains('Package has 1 warning.')
+ contains('Package has 1 warning.'),
]),
exitCode: DATA,
);
diff --git a/test/validator/compiled_dartdoc_test.dart b/test/validator/compiled_dartdoc_test.dart
index 75de195..d41c2d4 100644
--- a/test/validator/compiled_dartdoc_test.dart
+++ b/test/validator/compiled_dartdoc_test.dart
@@ -24,8 +24,8 @@
d.file('nav.json', ''),
d.file('index.html', ''),
d.file('styles.css', ''),
- d.file('dart-logo-small.png', '')
- ])
+ d.file('dart-logo-small.png', ''),
+ ]),
]).create();
await expectValidationDeprecated(compiledDartdoc);
});
@@ -39,8 +39,8 @@
d.file('index.html', ''),
d.file('styles.css', ''),
d.file('dart-logo-small.png', ''),
- d.file('client-live-nav.js', '')
- ])
+ d.file('client-live-nav.js', ''),
+ ]),
]).create();
await expectValidationDeprecated(compiledDartdoc);
});
@@ -54,9 +54,9 @@
d.file('index.html', ''),
d.file('styles.css', ''),
d.file('dart-logo-small.png', ''),
- d.file('client-live-nav.js', '')
+ d.file('client-live-nav.js', ''),
]),
- d.file('.gitignore', '/doc-out')
+ d.file('.gitignore', '/doc-out'),
]).create();
await expectValidationDeprecated(compiledDartdoc);
});
@@ -70,8 +70,8 @@
d.file('index.html', ''),
d.file('styles.css', ''),
d.file('dart-logo-small.png', ''),
- d.file('client-live-nav.js', '')
- ])
+ d.file('client-live-nav.js', ''),
+ ]),
]).create();
await expectValidationDeprecated(compiledDartdoc, warnings: isNotEmpty);
diff --git a/test/validator/dependency_override_test.dart b/test/validator/dependency_override_test.dart
index 308140a..817a8fb 100644
--- a/test/validator/dependency_override_test.dart
+++ b/test/validator/dependency_override_test.dart
@@ -20,9 +20,9 @@
d.validPubspec(
extras: {
'dev_dependencies': {'foo': '^1.0.0'},
- 'dependency_overrides': {'foo': '^3.0.0'}
+ 'dependency_overrides': {'foo': '^3.0.0'},
},
- )
+ ),
]).create();
await expectValidation();
@@ -38,9 +38,9 @@
d.validPubspec(
extras: {
'dependencies': {'foo': '^1.0.0'},
- 'dependency_overrides': {'foo': '^3.0.0'}
+ 'dependency_overrides': {'foo': '^3.0.0'},
},
- )
+ ),
]).create();
await expectValidationHint(
@@ -59,7 +59,7 @@
},
),
d.pubspecOverrides({
- 'dependency_overrides': {'foo': '3.0.0'}
+ 'dependency_overrides': {'foo': '3.0.0'},
}),
]).create();
@@ -81,9 +81,9 @@
'dependency_overrides': {
'foo': '^3.0.0',
'bar': '^3.0.0',
- }
+ },
},
- )
+ ),
]).create();
await expectValidationHint(
diff --git a/test/validator/dependency_test.dart b/test/validator/dependency_test.dart
index dead156..ac70583 100644
--- a/test/validator/dependency_test.dart
+++ b/test/validator/dependency_test.dart
@@ -28,7 +28,7 @@
d.file('LICENSE', 'Eh, do what you want.'),
d.file('README.md', "This package isn't real."),
d.file('CHANGELOG.md', '# $version\nFirst version\n'),
- d.dir('lib', [d.file('test_pkg.dart', 'int i = 1;')])
+ d.dir('lib', [d.file('test_pkg.dart', 'int i = 1;')]),
]);
}
@@ -66,7 +66,7 @@
await expectValidation(
error: allOf([
contains(text),
- contains('Package validation found the following error:')
+ contains('Package validation found the following error:'),
]),
exitCode: DATA,
environment: environment,
@@ -108,8 +108,8 @@
await package(
deps: {
'foo': {
- 'git': {'url': '../foo', 'path': 'subdir'}
- }
+ 'git': {'url': '../foo', 'path': 'subdir'},
+ },
},
).create();
@@ -128,7 +128,7 @@
await flutterPackage('flutter').create();
await package(
deps: {
- 'flutter': {'sdk': 'flutter'}
+ 'flutter': {'sdk': 'flutter'},
},
).create();
@@ -163,7 +163,7 @@
await fuschiaPackage('foo', sdk: '^3.0.0').create();
await package(
deps: {
- 'foo': {'sdk': 'fuchsia', 'version': '>=1.2.3 <2.0.0'}
+ 'foo': {'sdk': 'fuchsia', 'version': '>=1.2.3 <2.0.0'},
},
).create();
@@ -231,7 +231,7 @@
]).create();
await setUpDependency({
'path': path.join(d.sandbox, 'foo'),
- 'version': '>=1.0.0 <2.0.0'
+ 'version': '>=1.0.0 <2.0.0',
});
await expectValidationError(
' foo: ">=1.0.0 <2.0.0"',
@@ -280,11 +280,11 @@
'foo': {
'version': '0.1.2',
'source': 'hosted',
- 'description': {'name': 'foo', 'url': 'https://pub.dev'}
- }
- }
+ 'description': {'name': 'foo', 'url': 'https://pub.dev'},
+ },
+ },
}),
- )
+ ),
]).create();
await expectValidationWarning(' foo: ^0.1.2');
@@ -300,7 +300,7 @@
'test_pkg',
'1.0.0',
deps: {'foo': '^1.2.3-dev'},
- )
+ ),
]).create();
await expectValidationWarning(
@@ -312,7 +312,7 @@
'constraint based on the version', () async {
(await servePackages()).serve('foo', '1.2.3');
await d.dir(appPath, [
- d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '1.2.3'})
+ d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '1.2.3'}),
]).create();
await expectValidationWarning(' foo: ^1.2.3');
@@ -328,7 +328,7 @@
d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '<3.0.0'}),
d.file(
'pubspec.lock',
- )
+ ),
]).create();
await expectValidationWarning(' foo: ">=1.2.3 <3.0.0"');
@@ -345,11 +345,11 @@
'foo': {
'version': '1.2.3',
'source': 'hosted',
- 'description': {'name': 'foo', 'url': 'https://pub.dev'}
- }
- }
+ 'description': {'name': 'foo', 'url': 'https://pub.dev'},
+ },
+ },
}),
- )
+ ),
]).create();
await expectValidationWarning(' foo: ">=1.2.3 <=3.0.0"');
@@ -369,11 +369,11 @@
'foo': {
'version': '1.2.3',
'source': 'hosted',
- 'description': {'name': 'foo', 'url': 'https://pub.dev'}
- }
- }
+ 'description': {'name': 'foo', 'url': 'https://pub.dev'},
+ },
+ },
}),
- )
+ ),
]).create();
await expectValidationWarning(' foo: ^1.2.3');
@@ -385,7 +385,7 @@
() async {
(await servePackages()).serve('foo', '1.2.3');
await d.dir(appPath, [
- d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '>=1.2.3'})
+ d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '>=1.2.3'}),
]).create();
await expectValidationWarning(' foo: ^1.2.3');
@@ -394,7 +394,7 @@
test('and it should preserve the lower-bound operator', () async {
(await servePackages()).serve('foo', '1.2.4');
await d.dir(appPath, [
- d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '>1.2.3'})
+ d.libPubspec('test_pkg', '1.0.0', deps: {'foo': '>1.2.3'}),
]).create();
await expectValidationWarning(' foo: ">1.2.3 <2.0.0"');
diff --git a/test/validator/deprecated_fields_test.dart b/test/validator/deprecated_fields_test.dart
index 7ff752a..2d60626 100644
--- a/test/validator/deprecated_fields_test.dart
+++ b/test/validator/deprecated_fields_test.dart
@@ -23,8 +23,8 @@
test('should warn if pubspec has a transformers section', () async {
await d.dir(appPath, [
d.pubspec({
- 'transformers': ['some_transformer']
- })
+ 'transformers': ['some_transformer'],
+ }),
]).create();
await expectValidationDeprecated(deprecatedFields, warnings: isNotEmpty);
@@ -33,8 +33,8 @@
test('should warn if pubspec has a web section', () async {
await d.dir(appPath, [
d.pubspec({
- 'web': {'compiler': 'dartdevc'}
- })
+ 'web': {'compiler': 'dartdevc'},
+ }),
]).create();
await expectValidationDeprecated(deprecatedFields, warnings: isNotEmpty);
@@ -42,7 +42,7 @@
test('should warn if pubspec has an author', () async {
await d.dir(appPath, [
- d.pubspec({'author': 'Ronald <ronald@example.com>'})
+ d.pubspec({'author': 'Ronald <ronald@example.com>'}),
]).create();
await expectValidationDeprecated(deprecatedFields, warnings: isNotEmpty);
@@ -51,8 +51,8 @@
test('should warn if pubspec has a list of authors', () async {
await d.dir(appPath, [
d.pubspec({
- 'authors': ['Ronald <ronald@example.com>', 'Joe <joe@example.com>']
- })
+ 'authors': ['Ronald <ronald@example.com>', 'Joe <joe@example.com>'],
+ }),
]).create();
await expectValidationDeprecated(deprecatedFields, warnings: isNotEmpty);
diff --git a/test/validator/directory_test.dart b/test/validator/directory_test.dart
index c8362c8..47fe822 100644
--- a/test/validator/directory_test.dart
+++ b/test/validator/directory_test.dart
@@ -21,8 +21,8 @@
test('has a nested directory named "tools"', () async {
await d.dir(appPath, [
d.dir('foo', [
- d.dir('tools', [d.file('empty')])
- ])
+ d.dir('tools', [d.file('empty')]),
+ ]),
]).create();
await expectValidationDeprecated(directory);
});
@@ -31,8 +31,8 @@
await d.dir(appPath, [
d.file('.pubignore', 'tools/\n'),
d.dir('foo', [
- d.dir('tools', [d.file('empty')])
- ])
+ d.dir('tools', [d.file('empty')]),
+ ]),
]).create();
await expectValidationDeprecated(directory);
});
@@ -50,13 +50,13 @@
'sample',
'samples',
'tests',
- 'tools'
+ 'tools',
];
for (var name in names) {
test('"$name"', () async {
await d.dir(appPath, [
- d.dir(name, [d.file('empty')])
+ d.dir(name, [d.file('empty')]),
]).create();
await expectValidationDeprecated(directory, warnings: isNotEmpty);
});
diff --git a/test/validator/executable_test.dart b/test/validator/executable_test.dart
index 76e69c6..cf7d78d 100644
--- a/test/validator/executable_test.dart
+++ b/test/validator/executable_test.dart
@@ -21,12 +21,12 @@
d.pubspec({
'name': 'test_pkg',
'version': '1.0.0',
- 'executables': {'one': 'one_script', 'two': null}
+ 'executables': {'one': 'one_script', 'two': null},
}),
d.dir('bin', [
d.file('one_script.dart', "main() => print('ok');"),
- d.file('two.dart', "main() => print('ok');")
- ])
+ d.file('two.dart', "main() => print('ok');"),
+ ]),
]).create();
await expectValidationDeprecated(executable);
});
@@ -38,8 +38,8 @@
d.pubspec({
'name': 'test_pkg',
'version': '1.0.0',
- 'executables': {'nope': 'not_there', 'nada': null}
- })
+ 'executables': {'nope': 'not_there', 'nada': null},
+ }),
]).create();
await expectValidationDeprecated(executable, warnings: isNotEmpty);
});
@@ -49,13 +49,13 @@
d.pubspec({
'name': 'test_pkg',
'version': '1.0.0',
- 'executables': {'one': 'one_script', 'two': null}
+ 'executables': {'one': 'one_script', 'two': null},
}),
d.dir('bin', [
d.file('one_script.dart', "main() => print('ok');"),
- d.file('two.dart', "main() => print('ok');")
+ d.file('two.dart', "main() => print('ok');"),
]),
- d.file('.gitignore', 'bin')
+ d.file('.gitignore', 'bin'),
]).create();
await expectValidationDeprecated(executable, warnings: isNotEmpty);
});
diff --git a/test/validator/file_case_test.dart b/test/validator/file_case_test.dart
index 4142000..47da241 100644
--- a/test/validator/file_case_test.dart
+++ b/test/validator/file_case_test.dart
@@ -5,7 +5,7 @@
// These tests only work on case-sensitive file systems (ie. only on linux).
@OnPlatform({
'windows': Skip('Windows file system is case-insensitive'),
- 'mac-os': Skip('MacOS file system is case-insensitive')
+ 'mac-os': Skip('MacOS file system is case-insensitive'),
})
import 'package:pub/src/exit_codes.dart';
diff --git a/test/validator/flutter_constraint_test.dart b/test/validator/flutter_constraint_test.dart
index d3a9eaa..42ddbf4 100644
--- a/test/validator/flutter_constraint_test.dart
+++ b/test/validator/flutter_constraint_test.dart
@@ -36,7 +36,7 @@
'version': '1.0.0',
'environment': {
'sdk': '^3.0.0',
- if (flutterConstraint != null) 'flutter': flutterConstraint
+ if (flutterConstraint != null) 'flutter': flutterConstraint,
},
}),
]).create();
diff --git a/test/validator/language_version_test.dart b/test/validator/language_version_test.dart
index c1e5f75..83e6cd7 100644
--- a/test/validator/language_version_test.dart
+++ b/test/validator/language_version_test.dart
@@ -26,7 +26,7 @@
d.dir('lib', [
if (libraryLanguageVersion != null)
d.file('library.dart', '// @dart = $libraryLanguageVersion\n'),
- ])
+ ]),
]).create();
}
diff --git a/test/validator/leak_detection_test.dart b/test/validator/leak_detection_test.dart
index cf8876f..81a00d9 100644
--- a/test/validator/leak_detection_test.dart
+++ b/test/validator/leak_detection_test.dart
@@ -23,7 +23,7 @@
d.file('test_pkg.dart', '''
void main() => print('nothing secret here');
'''),
- ])
+ ]),
]).create();
await expectValidationDeprecated(leakDetection);
});
@@ -41,7 +41,7 @@
d.file('test_pkg.dart', '''
void main() => print('Revoked AWS key: AKIAVBOGPFGGW6HQOSMY');
'''),
- ])
+ ]),
]).create();
await expectValidationDeprecated(leakDetection, errors: isEmpty);
});
@@ -55,7 +55,7 @@
d.file('test_pkg.dart', '''
void main() => print('Revoked AWS key: AKIAVBOGPFGGW6HQOSMY');
'''),
- ])
+ ]),
]).create();
await expectValidationDeprecated(leakDetection, errors: isNotEmpty);
});
@@ -80,7 +80,7 @@
'AIzaSyAazCCPl4tWkSuDt9XBWRTpHxroViYhSxg',
];
'''),
- ])
+ ]),
]).create();
await expectValidationDeprecated(
leakDetection,
@@ -115,7 +115,7 @@
'AIzaSyAazCCPl4tWkSuDt9XBWRTpHxroViYhSxg',
];
'''),
- ])
+ ]),
]).create();
await expectValidationDeprecated(
leakDetection,
diff --git a/test/validator/name_test.dart b/test/validator/name_test.dart
index 667947a..b26cf62 100644
--- a/test/validator/name_test.dart
+++ b/test/validator/name_test.dart
@@ -25,8 +25,8 @@
d.libPubspec('test_pkg', '1.0.0'),
d.dir('lib', [
d.file('test_pkg.dart', 'int i = 1;'),
- d.file('test_pkg.g.dart', 'int j = 2;')
- ])
+ d.file('test_pkg.g.dart', 'int j = 2;'),
+ ]),
]).create();
await expectValidationDeprecated(name);
});
@@ -34,7 +34,7 @@
test('has a name that starts with an underscore', () async {
await d.dir(appPath, [
d.libPubspec('_test_pkg', '1.0.0'),
- d.dir('lib', [d.file('_test_pkg.dart', 'int i = 1;')])
+ d.dir('lib', [d.file('_test_pkg.dart', 'int i = 1;')]),
]).create();
await expectValidationDeprecated(name);
});
@@ -51,7 +51,7 @@
test('has a single library named differently than the package', () async {
deleteEntry(path.join(d.sandbox, appPath, 'lib', 'test_pkg.dart'));
await d.dir(appPath, [
- d.dir('lib', [d.file('best_pkg.dart', 'int i = 0;')])
+ d.dir('lib', [d.file('best_pkg.dart', 'int i = 0;')]),
]).create();
await expectValidationDeprecated(name, warnings: isNotEmpty);
});
diff --git a/test/validator/pubspec_typo_test.dart b/test/validator/pubspec_typo_test.dart
index 8af133e..d5bb654 100644
--- a/test/validator/pubspec_typo_test.dart
+++ b/test/validator/pubspec_typo_test.dart
@@ -34,8 +34,8 @@
'environment': {},
'executables': '',
'publish_to': '',
- 'flutter': {}
- })
+ 'flutter': {},
+ }),
]).create();
await expectValidationDeprecated(pubspecTypo);
@@ -48,8 +48,8 @@
'version': '1.0.0',
'email': 'my@email.com',
'maintainer': 'Garett Tok',
- 'assets': '../relative/path'
- })
+ 'assets': '../relative/path',
+ }),
]).create();
await expectValidationDeprecated(pubspecTypo);
@@ -64,7 +64,7 @@
d.pubspec({
'name': 'myapp',
'dependecies': {},
- })
+ }),
]).create();
await expectValidationDeprecated(pubspecTypo, warnings: isNotEmpty);
@@ -78,8 +78,8 @@
'avthor': 'Garett Tok',
'descripton': 'This is a package',
'homepagd': 'https://pub.dev/packages/myapp',
- 'documentat1on': 'here'
- })
+ 'documentat1on': 'here',
+ }),
]).create();
await expectValidationDeprecated(
diff --git a/test/validator/readme_test.dart b/test/validator/readme_test.dart
index 02a29d9..90df3a1 100644
--- a/test/validator/readme_test.dart
+++ b/test/validator/readme_test.dart
@@ -24,7 +24,7 @@
test('has a non-primary readme with invalid utf-8', () async {
await d.validPackage().create();
await d.dir(appPath, [
- d.file('README.x.y.z', [192])
+ d.file('README.x.y.z', [192]),
]).create();
await expectValidationDeprecated(readme);
});
@@ -33,7 +33,7 @@
await d.validPackage().create();
var repo = d.git(appPath, [
d.file('README', [192]),
- d.file('.gitignore', 'README')
+ d.file('.gitignore', 'README'),
]);
await repo.create();
await expectValidationDeprecated(readme);
@@ -57,7 +57,7 @@
test('has a primary README with invalid utf-8', () async {
await d.validPackage().create();
await d.dir(appPath, [
- d.file('README', [192])
+ d.file('README', [192]),
]).create();
await expectValidationDeprecated(readme, warnings: isNotEmpty);
});
diff --git a/test/validator/relative_version_numbering_test.dart b/test/validator/relative_version_numbering_test.dart
index a1638b3..ddc36a3 100644
--- a/test/validator/relative_version_numbering_test.dart
+++ b/test/validator/relative_version_numbering_test.dart
@@ -151,7 +151,7 @@
'test_pkg',
'0.0.1',
pubspec: {
- 'environment': {'sdk': '>=2.12.0<3.0.0'}
+ 'environment': {'sdk': '>=2.12.0<3.0.0'},
},
);
@@ -167,7 +167,7 @@
'test_pkg',
'0.0.1',
pubspec: {
- 'environment': {'sdk': '>=2.12.0<3.0.0'}
+ 'environment': {'sdk': '>=2.12.0<3.0.0'},
},
);
@@ -183,14 +183,14 @@
'test_pkg',
'0.0.1',
pubspec: {
- 'environment': {'sdk': '>=2.12.0<3.0.0'}
+ 'environment': {'sdk': '>=2.12.0<3.0.0'},
},
)
..serve(
'test_pkg',
'2.0.1',
pubspec: {
- 'environment': {'sdk': '>=2.9.0<3.0.0'}
+ 'environment': {'sdk': '>=2.9.0<3.0.0'},
},
);
@@ -220,14 +220,14 @@
'test_pkg',
'0.0.1',
pubspec: {
- 'environment': {'sdk': '>=2.9.0<3.0.0'}
+ 'environment': {'sdk': '>=2.9.0<3.0.0'},
},
)
..serve(
'test_pkg',
'0.0.2-dev',
pubspec: {
- 'environment': {'sdk': '>=2.12.0<3.0.0'}
+ 'environment': {'sdk': '>=2.12.0<3.0.0'},
},
);
@@ -244,7 +244,7 @@
'test_pkg',
'0.0.1',
pubspec: {
- 'environment': {'sdk': '>=2.9.0<3.0.0'}
+ 'environment': {'sdk': '>=2.9.0<3.0.0'},
},
);
@@ -268,14 +268,14 @@
'test_pkg',
'0.0.1',
pubspec: {
- 'environment': {'sdk': '>=2.9.0<3.0.0'}
+ 'environment': {'sdk': '>=2.9.0<3.0.0'},
},
)
..serve(
'test_pkg',
'2.0.0',
pubspec: {
- 'environment': {'sdk': '>=2.12.0<3.0.0'}
+ 'environment': {'sdk': '>=2.12.0<3.0.0'},
},
);
@@ -302,14 +302,14 @@
'test_pkg',
'0.0.1',
pubspec: {
- 'environment': {'sdk': '>=2.12.0<3.0.0'}
+ 'environment': {'sdk': '>=2.12.0<3.0.0'},
},
)
..serve(
'test_pkg',
'0.0.2-dev',
pubspec: {
- 'environment': {'sdk': '>=2.9.0<3.0.0'}
+ 'environment': {'sdk': '>=2.9.0<3.0.0'},
},
);
@@ -334,7 +334,7 @@
'test_pkg',
'0.0.2-dev',
pubspec: {
- 'environment': {'sdk': '>=2.9.0<3.0.0'}
+ 'environment': {'sdk': '>=2.9.0<3.0.0'},
},
);
await expectValidationDeprecated(
diff --git a/test/validator/sdk_constraint_test.dart b/test/validator/sdk_constraint_test.dart
index ff2cdee..1dbe3e8 100644
--- a/test/validator/sdk_constraint_test.dart
+++ b/test/validator/sdk_constraint_test.dart
@@ -37,7 +37,7 @@
test('depends on a pre-release Dart SDK from a pre-release', () async {
await d.dir(appPath, [
- d.libPubspec('test_pkg', '1.0.0-dev.1', sdk: '>=1.8.0-dev.1 <2.0.0')
+ d.libPubspec('test_pkg', '1.0.0-dev.1', sdk: '>=1.8.0-dev.1 <2.0.0'),
]).create();
await expectValidationDeprecated(sdkConstraint);
});
@@ -49,8 +49,8 @@
d.pubspec({
'name': 'test_pkg',
'version': '1.0.0',
- 'environment': {'sdk': '>=1.19.0 <2.0.0', 'flutter': '^1.2.3'}
- })
+ 'environment': {'sdk': '>=1.19.0 <2.0.0', 'flutter': '^1.2.3'},
+ }),
]).create();
await expectValidationDeprecated(sdkConstraint);
});
@@ -62,8 +62,11 @@
d.pubspec({
'name': 'test_pkg',
'version': '1.0.0-dev.1',
- 'environment': {'sdk': '>=2.0.0-dev.51.0 <2.0.0', 'fuchsia': '^1.2.3'}
- })
+ 'environment': {
+ 'sdk': '>=2.0.0-dev.51.0 <2.0.0',
+ 'fuchsia': '^1.2.3',
+ },
+ }),
]).create();
await expectValidationDeprecated(sdkConstraint);
});
@@ -96,7 +99,7 @@
test('depends on a pre-release sdk from a non-pre-release', () async {
await d.dir(appPath, [
- d.libPubspec('test_pkg', '1.0.0', sdk: '>=1.8.0-dev.1 <2.0.0')
+ d.libPubspec('test_pkg', '1.0.0', sdk: '>=1.8.0-dev.1 <2.0.0'),
]).create();
await expectValidationDeprecated(
sdkConstraint,
@@ -115,8 +118,8 @@
d.rawPubspec({
'name': 'test_pkg',
'version': '1.0.0',
- 'environment': {'sdk': '^2.19.0'}
- })
+ 'environment': {'sdk': '^2.19.0'},
+ }),
]).create();
await expectValidationDeprecated(
sdkConstraint,
diff --git a/test/validator/strict_dependencies_test.dart b/test/validator/strict_dependencies_test.dart
index 798cad1..386658d 100644
--- a/test/validator/strict_dependencies_test.dart
+++ b/test/validator/strict_dependencies_test.dart
@@ -258,7 +258,7 @@
await expectValidationDeprecated(
strictDeps,
errors: [
- matches('does not have silly_monkey in the `dependencies` section')
+ matches('does not have silly_monkey in the `dependencies` section'),
],
);
});
@@ -271,7 +271,7 @@
await expectValidationDeprecated(
strictDeps,
errors: [
- matches('does not have silly_monkey in the `dependencies` section')
+ matches('does not have silly_monkey in the `dependencies` section'),
],
);
});
@@ -324,7 +324,7 @@
warnings: [
matches(
'does not have silly_monkey in the `dependencies` or `dev_dependencies` section',
- )
+ ),
],
);
});
diff --git a/test/validator/utils.dart b/test/validator/utils.dart
index 2262a55..4304382 100644
--- a/test/validator/utils.dart
+++ b/test/validator/utils.dart
@@ -75,7 +75,7 @@
await expectValidation(
error: allOf([
contains(text),
- contains('Package validation found the following error:')
+ contains('Package validation found the following error:'),
]),
exitCode: DATA,
environment: environment,
diff --git a/test/version_solver_test.dart b/test/version_solver_test.dart
index c5b89a5..3ae4f28 100644
--- a/test/version_solver_test.dart
+++ b/test/version_solver_test.dart
@@ -54,7 +54,7 @@
'ab': '1.0.0',
'b': '1.0.0',
'ba': '1.0.0',
- 'bb': '1.0.0'
+ 'bb': '1.0.0',
},
);
});
@@ -192,7 +192,7 @@
'bar': '2.0.0',
'baz': '2.0.0',
'qux': '1.0.0',
- 'newdep': '2.0.0'
+ 'newdep': '2.0.0',
},
tries: 2,
);
@@ -235,7 +235,7 @@
'bar',
'1.0.0',
deps: {
- 'myapp': {'git': 'http://nowhere.com/'}
+ 'myapp': {'git': 'http://nowhere.com/'},
},
);
@@ -267,8 +267,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '1.0.0', 'bar': '1.0.0'}
- })
+ 'dev_dependencies': {'foo': '1.0.0', 'bar': '1.0.0'},
+ }),
]).create();
await expectResolves(result: {'foo': '1.0.0', 'bar': '1.0.0'});
@@ -282,8 +282,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dev_dependencies': {'foo': '1.0.0'}
- })
+ 'dev_dependencies': {'foo': '1.0.0'},
+ }),
]).create();
await expectResolves(result: {'foo': '1.0.0', 'bar': '1.0.0'});
@@ -295,7 +295,7 @@
'foo',
'1.0.0',
pubspec: {
- 'dev_dependencies': {'bar': '1.0.0'}
+ 'dev_dependencies': {'bar': '1.0.0'},
},
);
@@ -314,8 +314,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': '>=1.0.0 <3.0.0'},
- 'dev_dependencies': {'foo': '>=2.0.0 <4.0.0'}
- })
+ 'dev_dependencies': {'foo': '>=2.0.0 <4.0.0'},
+ }),
]).create();
await expectResolves(result: {'foo': '2.0.0'});
@@ -329,8 +329,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': '>=1.0.0 <3.0.0'},
- 'dev_dependencies': {'foo': '>=2.0.0 <4.0.0'}
- })
+ 'dev_dependencies': {'foo': '>=2.0.0 <4.0.0'},
+ }),
]).create();
await expectResolves(
@@ -348,8 +348,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': '>=1.0.0 <3.0.0'},
- 'dev_dependencies': {'foo': '>=2.0.0 <4.0.0'}
- })
+ 'dev_dependencies': {'foo': '>=2.0.0 <4.0.0'},
+ }),
]).create();
await expectResolves(
@@ -367,8 +367,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': '>=1.0.0 <2.0.0'},
- 'dev_dependencies': {'foo': '>=2.0.0 <3.0.0'}
- })
+ 'dev_dependencies': {'foo': '>=2.0.0 <3.0.0'},
+ }),
]).create();
await expectResolves(
@@ -387,9 +387,9 @@
'name': 'myapp',
'dependencies': {'foo': '>=1.0.0 <2.0.0'},
'dev_dependencies': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).create();
await expectResolves(
@@ -408,12 +408,12 @@
d.pubspec({
'name': 'myapp',
'dependencies': {
- 'foo': {'path': 'foo'}
+ 'foo': {'path': 'foo'},
},
'dev_dependencies': {
- 'foo': {'path': '../foo'}
- }
- })
+ 'foo': {'path': '../foo'},
+ },
+ }),
]).create();
await expectResolves(
@@ -490,8 +490,8 @@
deps: {
'shared': {
'hosted': {'name': 'shared', 'url': otherServer.url},
- 'version': '1.0.0'
- }
+ 'version': '1.0.0',
+ },
},
)
..serve('shared', '1.0.0');
@@ -507,7 +507,7 @@
'http://localhost:'),
contains(', bar is incompatible with foo.'),
contains('So, because myapp depends on both foo 1.0.0 and bar 1.0.0, '
- 'version solving failed.')
+ 'version solving failed.'),
]),
);
});
@@ -521,7 +521,7 @@
'bar',
'1.0.0',
deps: {
- 'shared': {'path': p.join(d.sandbox, 'shared')}
+ 'shared': {'path': p.join(d.sandbox, 'shared')},
},
)
..serve('shared', '1.0.0');
@@ -614,7 +614,7 @@
test('fail if the root package has a bad source in dep', () async {
await d.appDir(
dependencies: {
- 'foo': {'bad': 'any'}
+ 'foo': {'bad': 'any'},
},
).create();
await expectResolves(
@@ -630,9 +630,9 @@
d.pubspec({
'name': 'myapp',
'dev_dependencies': {
- 'foo': {'bad': 'any'}
- }
- })
+ 'foo': {'bad': 'any'},
+ },
+ }),
]).create();
await expectResolves(
@@ -649,21 +649,21 @@
'foo',
'1.0.0',
deps: {
- 'bar': {'bad': 'any'}
+ 'bar': {'bad': 'any'},
},
)
..serve(
'foo',
'1.0.1',
deps: {
- 'baz': {'bad': 'any'}
+ 'baz': {'bad': 'any'},
},
)
..serve(
'foo',
'1.0.2',
deps: {
- 'bang': {'bad': 'any'}
+ 'bang': {'bad': 'any'},
},
);
@@ -690,14 +690,14 @@
'foo',
'1.0.1',
deps: {
- 'bar': {'bad': 'any'}
+ 'bar': {'bad': 'any'},
},
)
..serve(
'foo',
'1.0.2',
deps: {
- 'bar': {'bad': 'any'}
+ 'bar': {'bad': 'any'},
},
)
..serve('bar', '1.0.0');
@@ -717,7 +717,7 @@
await d.appDir(
dependencies: {
'foo': 'any',
- 'baz': {'path': '../baz'}
+ 'baz': {'path': '../baz'},
},
).create();
await expectResolves(
@@ -887,7 +887,7 @@
'b',
'2.0.0',
deps: {
- 'a': {'path': p.join(d.sandbox, 'a')}
+ 'a': {'path': p.join(d.sandbox, 'a')},
},
)
..serve('c', '1.0.0')
@@ -913,8 +913,8 @@
'2.0.0',
deps: {
'a': {
- 'hosted': {'name': 'a', 'url': otherServer.url}
- }
+ 'hosted': {'name': 'a', 'url': otherServer.url},
+ },
},
)
..serve('c', '1.0.0')
@@ -938,7 +938,7 @@
'b',
'1.0.0',
deps: {
- 'a': {'path': p.join(d.sandbox, 'shared')}
+ 'a': {'path': p.join(d.sandbox, 'shared')},
},
)
..serve('c', '1.0.0')
@@ -968,8 +968,8 @@
'1.0.0',
deps: {
'a': {
- 'hosted': {'name': 'a', 'url': otherServer.url}
- }
+ 'hosted': {'name': 'a', 'url': otherServer.url},
+ },
},
)
..serve('c', '1.0.0')
@@ -985,7 +985,7 @@
'http://localhost:'),
contains(' and myapp depends on a from hosted on http://localhost:'),
contains(', b is forbidden.'),
- contains('So, because myapp depends on b any, version solving failed.')
+ contains('So, because myapp depends on b any, version solving failed.'),
]),
);
});
@@ -1044,14 +1044,14 @@
'a',
'1.0.0',
deps: {
- 'foo': 'any' // ok
+ 'foo': 'any', // ok
},
)
..serve(
'a',
'2.0.0',
deps: {
- 'foo': '<1.0.0' // disjoint with myapp's constraint on foo
+ 'foo': '<1.0.0', // disjoint with myapp's constraint on foo
},
)
..serve('foo', '2.0.0')
@@ -1089,8 +1089,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '3.1.2+3'}
- })
+ 'environment': {'sdk': '3.1.2+3'},
+ }),
]).create();
await expectResolves(result: {});
@@ -1100,8 +1100,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '2.12.0'}
- })
+ 'environment': {'sdk': '2.12.0'},
+ }),
]).create();
await expectResolves(
@@ -1118,7 +1118,7 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '2.12.0'}
+ 'environment': {'sdk': '2.12.0'},
},
);
@@ -1140,7 +1140,7 @@
'bar',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '2.12.0'}
+ 'environment': {'sdk': '2.12.0'},
},
);
@@ -1162,28 +1162,28 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '3.1.2+3'}
+ 'environment': {'sdk': '3.1.2+3'},
},
)
..serve(
'foo',
'2.0.0',
pubspec: {
- 'environment': {'sdk': '3.1.2+3'}
+ 'environment': {'sdk': '3.1.2+3'},
},
)
..serve(
'foo',
'3.0.0',
pubspec: {
- 'environment': {'sdk': '0.0.0'}
+ 'environment': {'sdk': '0.0.0'},
},
)
..serve(
'foo',
'4.0.0',
pubspec: {
- 'environment': {'sdk': '0.0.0'}
+ 'environment': {'sdk': '0.0.0'},
},
);
@@ -1198,28 +1198,28 @@
'bar',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '3.1.2+3'}
+ 'environment': {'sdk': '3.1.2+3'},
},
)
..serve(
'bar',
'2.0.0',
pubspec: {
- 'environment': {'sdk': '3.1.2+3'}
+ 'environment': {'sdk': '3.1.2+3'},
},
)
..serve(
'bar',
'3.0.0',
pubspec: {
- 'environment': {'sdk': '0.0.0'}
+ 'environment': {'sdk': '0.0.0'},
},
)
..serve(
'bar',
'4.0.0',
pubspec: {
- 'environment': {'sdk': '0.0.0'}
+ 'environment': {'sdk': '0.0.0'},
},
);
@@ -1239,28 +1239,28 @@
'bar',
'1.0.0',
pubspec: {
- 'environment': {'sdk': '3.1.2+3'}
+ 'environment': {'sdk': '3.1.2+3'},
},
)
..serve(
'bar',
'2.0.0',
pubspec: {
- 'environment': {'sdk': '3.1.2+3'}
+ 'environment': {'sdk': '3.1.2+3'},
},
)
..serve(
'bar',
'3.0.0',
pubspec: {
- 'environment': {'sdk': '0.0.0'}
+ 'environment': {'sdk': '0.0.0'},
},
)
..serve(
'bar',
'4.0.0',
pubspec: {
- 'environment': {'sdk': '0.0.0'}
+ 'environment': {'sdk': '0.0.0'},
},
);
@@ -1275,8 +1275,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'flutter': '1.2.3'}
- })
+ 'environment': {'flutter': '1.2.3'},
+ }),
]).create();
await expectResolves(
@@ -1294,7 +1294,7 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'flutter': 'any', 'sdk': defaultSdkConstraint}
+ 'environment': {'flutter': 'any', 'sdk': defaultSdkConstraint},
},
);
@@ -1317,7 +1317,7 @@
'foo',
'3.0.0',
pubspec: {
- 'environment': {'flutter': '0.0.0'}
+ 'environment': {'flutter': '0.0.0'},
},
);
@@ -1329,8 +1329,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '3.1.2+3', 'flutter': '1.2.3'}
- })
+ 'environment': {'sdk': '3.1.2+3', 'flutter': '1.2.3'},
+ }),
]).create();
await expectResolves(
@@ -1347,8 +1347,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'fuchsia': '1.2.3'}
- })
+ 'environment': {'fuchsia': '1.2.3'},
+ }),
]).create();
await expectResolves(
@@ -1370,8 +1370,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'flutter': 'any'}
- })
+ 'environment': {'flutter': 'any'},
+ }),
]).create();
await expectResolves(
@@ -1384,8 +1384,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'flutter': '>1.2.3'}
- })
+ 'environment': {'flutter': '>1.2.3'},
+ }),
]).create();
await expectResolves(
@@ -1403,8 +1403,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '3.1.2+3', 'flutter': '1.2.3'}
- })
+ 'environment': {'sdk': '3.1.2+3', 'flutter': '1.2.3'},
+ }),
]).create();
await expectResolves(
@@ -1417,8 +1417,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'environment': {'sdk': '3.1.2+3', 'flutter': '>1.2.3'}
- })
+ 'environment': {'sdk': '3.1.2+3', 'flutter': '>1.2.3'},
+ }),
]).create();
await expectResolves(
@@ -1460,21 +1460,21 @@
'foo',
'1.0.0',
pubspec: {
- 'environment': {'flutter': '^0.0.0', 'sdk': defaultSdkConstraint}
+ 'environment': {'flutter': '^0.0.0', 'sdk': defaultSdkConstraint},
},
)
..serve(
'foo',
'2.0.0',
pubspec: {
- 'environment': {'flutter': '^1.0.0', 'sdk': defaultSdkConstraint}
+ 'environment': {'flutter': '^1.0.0', 'sdk': defaultSdkConstraint},
},
)
..serve(
'foo',
'3.0.0',
pubspec: {
- 'environment': {'flutter': '^2.0.0', 'sdk': defaultSdkConstraint}
+ 'environment': {'flutter': '^2.0.0', 'sdk': defaultSdkConstraint},
},
);
@@ -1669,8 +1669,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'a': 'any'},
- 'dependency_overrides': {'a': '<3.0.0'}
- })
+ 'dependency_overrides': {'a': '<3.0.0'},
+ }),
]).create();
await expectResolves(result: {'a': '2.0.0'});
@@ -1685,8 +1685,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependency_overrides': {'a': '<3.0.0'}
- })
+ 'dependency_overrides': {'a': '<3.0.0'},
+ }),
]).create();
await expectResolves(result: {'a': '2.0.0'});
@@ -1704,8 +1704,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'b': 'any', 'c': 'any'},
- 'dependency_overrides': {'a': '2.0.0'}
- })
+ 'dependency_overrides': {'a': '2.0.0'},
+ }),
]).create();
await expectResolves(result: {'a': '2.0.0', 'b': '1.0.0', 'c': '1.0.0'});
@@ -1722,8 +1722,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'shared': '2.0.0'},
- 'dependency_overrides': {'a': '<3.0.0'}
- })
+ 'dependency_overrides': {'a': '<3.0.0'},
+ }),
]).create();
await expectResolves(result: {'a': '1.0.0', 'shared': '2.0.0'});
@@ -1744,8 +1744,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependency_overrides': {'foo': '<1.0.2'}
- })
+ 'dependency_overrides': {'foo': '<1.0.2'},
+ }),
]).create();
await expectResolves(result: {'foo': '1.0.1', 'bar': '1.0.1'});
@@ -1766,8 +1766,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependency_overrides': {'foo': '>1.0.1'}
- })
+ 'dependency_overrides': {'foo': '>1.0.1'},
+ }),
]).create();
await expectResolves(result: {'foo': '1.0.2', 'bar': '1.0.2'});
@@ -1781,8 +1781,8 @@
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependency_overrides': {'foo': '>=1.0.0 <2.0.0'}
- })
+ 'dependency_overrides': {'foo': '>=1.0.0 <2.0.0'},
+ }),
]).create();
await expectResolves(
@@ -1801,10 +1801,10 @@
d.pubspec({
'name': 'myapp',
'dependencies': {
- 'foo': {'bad': 'any'}
+ 'foo': {'bad': 'any'},
},
- 'dependency_overrides': {'foo': 'any'}
- })
+ 'dependency_overrides': {'foo': 'any'},
+ }),
]).create();
await expectResolves(result: {'foo': '0.0.0'});
@@ -1816,15 +1816,15 @@
'foo',
'0.0.0',
pubspec: {
- 'environment': {'sdk': '0.0.0'}
+ 'environment': {'sdk': '0.0.0'},
},
);
await d.dir(appPath, [
d.pubspec({
'name': 'myapp',
- 'dependency_overrides': {'foo': 'any'}
- })
+ 'dependency_overrides': {'foo': 'any'},
+ }),
]).create();
await expectResolves(result: {'foo': '0.0.0'});
@@ -1838,8 +1838,8 @@
d.pubspec({
'name': 'myapp',
'version': '2.0.0',
- 'dependency_overrides': {'foo': 'any'}
- })
+ 'dependency_overrides': {'foo': 'any'},
+ }),
]).create();
await expectResolves(result: {'foo': '0.0.0'});
@@ -1860,8 +1860,8 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'foo': 'any'},
- 'dependency_overrides': {'bar': '0.0.1'}
- })
+ 'dependency_overrides': {'bar': '0.0.1'},
+ }),
]).create();
await expectResolves(result: {'foo': '1.2.3', 'bar': '0.0.1'});
@@ -1878,7 +1878,7 @@
'dependencies': {'a': '1.0.0'},
}),
d.pubspecOverrides({
- 'dependency_overrides': {'a': '2.0.0'}
+ 'dependency_overrides': {'a': '2.0.0'},
}),
]).create();
@@ -1895,10 +1895,10 @@
d.pubspec({
'name': 'myapp',
'dependencies': {'a': '1.0.0'},
- 'dependency_overrides': {'a': '2.0.0'}
+ 'dependency_overrides': {'a': '2.0.0'},
}),
d.pubspecOverrides({
- 'dependency_overrides': {'a': '3.0.0'}
+ 'dependency_overrides': {'a': '3.0.0'},
}),
]).create();
@@ -2032,23 +2032,23 @@
d.dir(
'baz',
[d.libDir('baz', 'foo 0.0.1'), d.libPubspec('baz', '0.0.1')],
- )
+ ),
]),
- d.file('version', '1.2.3')
+ d.file('version', '1.2.3'),
]).create();
await servePackages()
..serve(
'foo',
'1.0.0',
deps: {
- 'baz': {'sdk': 'flutter'}
+ 'baz': {'sdk': 'flutter'},
},
)
..serve(
'bar',
'1.0.0',
deps: {
- 'baz': {'sdk': 'flutter'}
+ 'baz': {'sdk': 'flutter'},
},
);
await d.appDir(dependencies: {'foo': 'any', 'bar': 'any'}).create();
diff --git a/tool/test-bin/pub_command_runner.dart b/tool/test-bin/pub_command_runner.dart
index 36094d8..a1d4675 100644
--- a/tool/test-bin/pub_command_runner.dart
+++ b/tool/test-bin/pub_command_runner.dart
@@ -68,7 +68,7 @@
[
if (packageConfig != null) '--packages=$packageConfig',
executable.executable,
- ...argResults!.rest.skip(1)
+ ...argResults!.rest.skip(1),
],
mode: ProcessStartMode.inheritStdio,
);
@@ -171,7 +171,7 @@
'variableName': variableName,
'time': time,
'category': category,
- 'label': label
+ 'label': label,
});
}