make process.dart publishable (#48)
Remove language overrides and bump version to have a null-safety flag
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 59dbf53..bf487ee 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-#### 4.0.0-dev
+#### 4.0.0-nullsafety.1
* Migrate to null-safety.
* Remove record/replay functionality.
diff --git a/dev/travis.sh b/dev/travis.sh
index 192b2e8..866b361 100755
--- a/dev/travis.sh
+++ b/dev/travis.sh
@@ -27,4 +27,4 @@
set -e
# Run the tests.
-pub run --enable-experiment=non-nullable test
+pub run test
diff --git a/lib/process.dart b/lib/process.dart
index a407c48..dfeb1d0 100644
--- a/lib/process.dart
+++ b/lib/process.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
export 'src/interface/local_process_manager.dart';
export 'src/interface/process_manager.dart';
export 'src/interface/process_wrapper.dart';
diff --git a/lib/src/interface/common.dart b/lib/src/interface/common.dart
index f2db1c3..a3aed86 100644
--- a/lib/src/interface/common.dart
+++ b/lib/src/interface/common.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'package:file/file.dart';
import 'package:file/local.dart';
import 'package:path/path.dart' show Context;
diff --git a/lib/src/interface/local_process_manager.dart b/lib/src/interface/local_process_manager.dart
index 648540a..1c8b999 100644
--- a/lib/src/interface/local_process_manager.dart
+++ b/lib/src/interface/local_process_manager.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'dart:convert';
import 'dart:io'
diff --git a/lib/src/interface/process_manager.dart b/lib/src/interface/process_manager.dart
index 8c0e5b7..67fd079 100644
--- a/lib/src/interface/process_manager.dart
+++ b/lib/src/interface/process_manager.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'dart:convert';
import 'dart:io'
diff --git a/lib/src/interface/process_wrapper.dart b/lib/src/interface/process_wrapper.dart
index 9c275f5..8a58cf3 100644
--- a/lib/src/interface/process_wrapper.dart
+++ b/lib/src/interface/process_wrapper.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart=2.10
import 'dart:async';
import 'dart:io' as io;
diff --git a/pubspec.yaml b/pubspec.yaml
index b25b238..538f3ad 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,15 +1,15 @@
name: process
-version: 4.0.0-dev
+version: 4.0.0-nullsafety.1
description: A pluggable, mockable process invocation abstraction for Dart.
homepage: https://github.com/google/process.dart
+environment:
+ sdk: '>=2.10.0-4.0.dev <2.10.0'
+
dependencies:
- file: '^5.0.0'
- path: ^1.5.1
- platform: '>=1.0.1'
+ file: '^6.0.0-nullsafety.1'
+ path: ^1.8.0-nullsafety
+ platform: '^3.0.0-nullsafety.1'
dev_dependencies:
- test: ^1.0.0
-
-environment:
- sdk: '>=2.9.0 <3.0.0'
+ test: ^1.16.0-nullsafety.1
diff --git a/test/data/replay/001.sing.100.stderr b/test/data/replay/001.sing.100.stderr
deleted file mode 100644
index 0a88ce5..0000000
--- a/test/data/replay/001.sing.100.stderr
+++ /dev/null
@@ -1 +0,0 @@
-Uh, pineapple pen
diff --git a/test/data/replay/001.sing.100.stdout b/test/data/replay/001.sing.100.stdout
deleted file mode 100644
index 94f9c4e..0000000
--- a/test/data/replay/001.sing.100.stdout
+++ /dev/null
@@ -1,2 +0,0 @@
-I have a pen
-I have a pineapple
diff --git a/test/data/replay/002.dance.101.stderr b/test/data/replay/002.dance.101.stderr
deleted file mode 100644
index b89d878..0000000
--- a/test/data/replay/002.dance.101.stderr
+++ /dev/null
@@ -1 +0,0 @@
-No one can dance like Psy
diff --git a/test/data/replay/002.dance.101.stdout b/test/data/replay/002.dance.101.stdout
deleted file mode 100644
index e69de29..0000000
--- a/test/data/replay/002.dance.101.stdout
+++ /dev/null
diff --git a/test/data/replay/MANIFEST.txt b/test/data/replay/MANIFEST.txt
deleted file mode 100644
index ef5eaba..0000000
--- a/test/data/replay/MANIFEST.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-[
- {
- "type": "run",
- "body": {
- "pid": 100,
- "basename": "001.sing.100",
- "command": [
- "sing",
- "ppap"
- ],
- "mode": "normal",
- "exitCode": 0
- }
- },
- {
- "type": "run",
- "body": {
- "pid": 101,
- "basename": "002.dance.101",
- "command": [
- "dance",
- "gangnam-style"
- ],
- "stdoutEncoding": "system",
- "stderrEncoding": "system",
- "exitCode": 2
- }
- },
- {
- "type": "can_run",
- "body": {
- "executable": "marathon",
- "result": true
- }
- }
-]
diff --git a/test/src/interface/common_test.dart b/test/src/interface/common_test.dart
index b04e42d..6a3e2df 100644
--- a/test/src/interface/common_test.dart
+++ b/test/src/interface/common_test.dart
@@ -10,8 +10,8 @@
void main() {
group('getExecutablePath', () {
- FileSystem fs;
- Directory workingDir, dir1, dir2, dir3;
+ late FileSystem fs;
+ late Directory workingDir, dir1, dir2, dir3;
void initialize(FileSystemStyle style) {
setUp(() {
@@ -29,7 +29,7 @@
});
group('on windows', () {
- Platform platform;
+ late Platform platform;
initialize(FileSystemStyle.windows);
@@ -48,7 +48,7 @@
String expectedPath = command;
fs.file(command).createSync();
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
workingDir.path,
platform: platform,
@@ -71,7 +71,7 @@
String expectedPath = fs.path.join(dir2.path, command);
fs.file(expectedPath).createSync();
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
workingDir.path,
platform: platform,
@@ -96,7 +96,7 @@
fs.file(expectedPath).createSync();
fs.file(wrongPath).createSync();
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
workingDir.path,
platform: platform,
@@ -119,7 +119,7 @@
String expectedPath = fs.path.join(workingDir.path, command);
fs.file(expectedPath).createSync(recursive: true);
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
workingDir.path,
platform: platform,
@@ -144,7 +144,7 @@
fs.file(expectedPath).createSync();
fs.file(wrongPath).createSync();
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
workingDir.path,
platform: platform,
@@ -171,7 +171,7 @@
fs.file(wrongPath1).createSync();
fs.file(wrongPath2).createSync();
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
workingDir.path,
platform: platform,
@@ -183,7 +183,7 @@
test('not found', () {
String command = 'foo.exe';
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
workingDir.path,
platform: platform,
@@ -220,7 +220,7 @@
String expectedPath = command;
fs.file(command).createSync();
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
null,
platform: platform,
@@ -233,7 +233,7 @@
FileSystem fsNoCwd = MemoryFileSystemNoCwd(fs);
String command = fs.path.join('.', 'bla.exe');
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
null,
platform: platform,
@@ -244,7 +244,7 @@
});
group('on Linux', () {
- Platform platform;
+ late Platform platform;
initialize(FileSystemStyle.posix);
@@ -261,7 +261,7 @@
fs.file(command).createSync();
fs.file(wrongPath).createSync();
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
workingDir.path,
platform: platform,
@@ -277,7 +277,7 @@
fs.file(expectedPath).createSync();
fs.file(wrongPath).createSync();
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
workingDir.path,
platform: platform,
@@ -289,7 +289,7 @@
test('not found', () {
String command = 'foo';
- String executablePath = getExecutablePath(
+ String? executablePath = getExecutablePath(
command,
workingDir.path,
platform: platform,
@@ -308,9 +308,9 @@
});
}
-void _expectSamePath(String actual, String expected) {
+void _expectSamePath(String? actual, String? expected) {
expect(actual, isNotNull);
- expect(actual.toLowerCase(), expected.toLowerCase());
+ expect(actual!.toLowerCase(), expected!.toLowerCase());
}
class MemoryFileSystemNoCwd extends ForwardingFileSystem {
diff --git a/test/src/interface/process_wrapper_test.dart b/test/src/interface/process_wrapper_test.dart
index 04f2cb1..25a3f3b 100644
--- a/test/src/interface/process_wrapper_test.dart
+++ b/test/src/interface/process_wrapper_test.dart
@@ -11,8 +11,8 @@
void main() {
group('ProcessWrapper', () {
- TestProcess delegate;
- ProcessWrapper process;
+ late TestProcess delegate;
+ late ProcessWrapper process;
setUp(() {
delegate = TestProcess();
@@ -20,7 +20,7 @@
});
group('done', () {
- bool done;
+ late bool done;
setUp(() {
done = false;