diff --git a/dwds/test/readers/frontend_server_asset_reader_test.dart b/dwds/test/readers/frontend_server_asset_reader_test.dart index d1139769c..3447886f1 100644 --- a/dwds/test/readers/frontend_server_asset_reader_test.dart +++ b/dwds/test/readers/frontend_server_asset_reader_test.dart @@ -11,7 +11,8 @@ import 'package:dwds/dwds.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; -final _batExt = Platform.isWindows ? '.bat' : ''; +import '../fixtures/utilities.dart'; + final packagesDir = p.relative('../fixtures/_test', from: p.current); void main() { @@ -31,7 +32,7 @@ void main() { } setUpAll(() async { - await Process.run('pub$_batExt', ['upgrade'], + await Process.run(dartPath, ['pub', 'upgrade'], workingDirectory: packagesDir); }); diff --git a/webdev/CHANGELOG.md b/webdev/CHANGELOG.md index e1ed1b375..09a08d221 100644 --- a/webdev/CHANGELOG.md +++ b/webdev/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.7.6-dev +## 2.7.6 - Update SDK constraint to `>=2.14.0 <3.0.0` diff --git a/webdev/lib/src/pubspec.dart b/webdev/lib/src/pubspec.dart index d9bc29d6f..dc67a400e 100644 --- a/webdev/lib/src/pubspec.dart +++ b/webdev/lib/src/pubspec.dart @@ -34,11 +34,11 @@ class PackageExceptionDetails { {this.description, bool missingDependency}) : _missingDependency = missingDependency ?? false; - static const noPubspecLock = PackageExceptionDetails._( - '`pubspec.lock` does not exist.', - description: - 'Run `$appName` in a Dart package directory. Run `pub get` first.', - missingDependency: true); + static const noPubspecLock = + PackageExceptionDetails._('`pubspec.lock` does not exist.', + description: 'Run `$appName` in a Dart package directory. ' + 'Run `dart pub get` first.', + missingDependency: true); static PackageExceptionDetails missingDep( String pkgName, VersionConstraint constraint) => diff --git a/webdev/lib/src/version.dart b/webdev/lib/src/version.dart index bae2c45be..1c3d91612 100644 --- a/webdev/lib/src/version.dart +++ b/webdev/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '2.7.6-dev'; +const packageVersion = '2.7.6'; diff --git a/webdev/pubspec.yaml b/webdev/pubspec.yaml index d63b20c5b..341bc6d0f 100644 --- a/webdev/pubspec.yaml +++ b/webdev/pubspec.yaml @@ -1,6 +1,6 @@ name: webdev # Every time this changes you need to run `pub run build_runner build`. -version: 2.7.6-dev +version: 2.7.6 # We should not depend on a dev SDK before publishing. # publish_to: none homepage: https://github.com/dart-lang/webdev @@ -18,7 +18,7 @@ dependencies: browser_launcher: ^1.0.0 crypto: ^3.0.0 dds: ^2.0.0 - dwds: ^11.2.3 + dwds: ^11.3.0 http: ^0.13.0 http_multi_server: ^3.0.0 io: ^1.0.0 @@ -50,9 +50,5 @@ dev_dependencies: test_process: ^2.0.2 webdriver: ^3.0.0 -dependency_overrides: - dwds: - path: ../dwds - executables: webdev: diff --git a/webdev/test/integration_test.dart b/webdev/test/integration_test.dart index f0b101fb6..259ed60f8 100644 --- a/webdev/test/integration_test.dart +++ b/webdev/test/integration_test.dart @@ -5,13 +5,21 @@ // @dart = 2.9 import 'dart:async'; +import 'dart:io'; +import 'package:pub_semver/pub_semver.dart'; import 'package:test/test.dart'; import 'package:test_descriptor/test_descriptor.dart' as d; import 'test_utils.dart'; void main() { + var sdkVersion = Version.parse(Platform.version.split(' ')[0]); + var firstSdkVersionWithoutPub = Version(2, 15, 0, pre: '0'); + + var pubCommand = + sdkVersion.compareTo(firstSdkVersionWithoutPub) < 0 ? 'pub' : 'dart pub'; + test('non-existant commands create errors', () async { var process = await runWebDev(['monkey']); @@ -224,7 +232,7 @@ name: sample await checkProcessStdout(process, [ 'webdev could not run for this project.', - 'No pubspec.lock file found, please run "pub get" first.' + 'No pubspec.lock file found, please run "$pubCommand get" first.' ]); await process.shouldExit(78); }); @@ -251,7 +259,7 @@ dependencies: // See https://github.com/dart-lang/linter/issues/965 // ignore: prefer_adjacent_string_concatenation 'The pubspec.yaml file has changed since the pubspec.lock file ' + - 'was generated, please run "pub get" again.' + 'was generated, please run "$pubCommand get" again.' ]); await process.shouldExit(78); });