-
Notifications
You must be signed in to change notification settings - Fork 58
Add package:process #2097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add package:process #2097
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: package:process | ||
permissions: read-all | ||
|
||
on: | ||
schedule: | ||
# “At 00:00 (UTC) on Sunday.” | ||
- cron: '0 0 * * 0' | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/process.yaml' | ||
- 'pkgs/process/**' | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/process.yaml' | ||
- 'pkgs/process/**' | ||
|
||
defaults: | ||
run: | ||
working-directory: pkgs/process/ | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
sdk: [stable, dev] | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c | ||
|
||
- run: dart pub get | ||
- run: dart format --output=none --set-exit-if-changed . | ||
if: ${{ matrix.sdk == 'stable' }} | ||
- run: dart analyze --fatal-infos | ||
- run: dart test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Don’t commit the following directories created by pub. | ||
.dart_tool | ||
pubspec.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Below is a list of people and organizations that have contributed | ||
# to the Process project. Names should be added to the list like so: | ||
# | ||
# Name/Organization <email address> | ||
|
||
Google Inc. | ||
|
||
Bartek Pacia / @bartekpacia |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
## 5.0.4 | ||
|
||
* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. | ||
* Move the package into the `dart-lang/tools` repository. | ||
|
||
## 5.0.3 | ||
|
||
* Adds `missing_code_block_language_in_doc_comment` lint. | ||
* Updates minimum supported SDK version to Flutter 3.19/Dart 3.3. | ||
|
||
## 5.0.2 | ||
|
||
* Removes mention of the removed record/replay feature from README. | ||
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0. | ||
* Fixes new lint warnings. | ||
|
||
## 5.0.1 | ||
|
||
* Transfers the package source from https://github.com/google/process.dart to | ||
https://github.com/flutter/packages. | ||
|
||
## 5.0.0 | ||
|
||
* Remove the `covariant` keyword from `stderrEncoding` and `stdoutEncoding` | ||
parameters. | ||
* Update dependencies to work on Dart 3. | ||
* Bumped min SDK dependency to nearest non-prerelease version (2.14.0) | ||
|
||
## 4.2.4 | ||
|
||
* Mark `stderrEncoding` and `stdoutEncoding` parameters as nullable again, | ||
now that the upstream SDK issue has been fixed. | ||
|
||
## 4.2.3 | ||
|
||
* Rollback to version 4.2.1 (https://github.com/google/process.dart/issues/64) | ||
|
||
## 4.2.2 | ||
|
||
* Mark `stderrEncoding` and `stdoutEncoding` parameters as nullable. | ||
|
||
## 4.2.1 | ||
|
||
* Added custom exception types `ProcessPackageException` and | ||
`ProcessPackageExecutableNotFoundException` to provide extra | ||
information from exception conditions. | ||
|
||
## 4.2.0 | ||
|
||
* Fix the signature of `ProcessManager.canRun` to be consistent with | ||
`LocalProcessManager`. | ||
|
||
## 4.1.1 | ||
|
||
* Fixed `getExecutablePath()` to only return path items that are | ||
executable and readable to the user. | ||
|
||
## 4.1.0 | ||
|
||
* Fix the signatures of `ProcessManager.run`, `.runSync`, and `.start` to be | ||
consistent with `LocalProcessManager`'s. | ||
* Added more details to the `ArgumentError` thrown when a command cannot be resolved | ||
to an executable. | ||
|
||
## 4.0.0 | ||
|
||
* First stable null safe release. | ||
|
||
## 4.0.0-nullsafety.4 | ||
|
||
* Update supported SDK range. | ||
|
||
## 4.0.0-nullsafety.3 | ||
|
||
* Update supported SDK range. | ||
|
||
## 4.0.0-nullsafety.2 | ||
|
||
* Update supported SDK range. | ||
|
||
## 4.0.0-nullsafety.1 | ||
|
||
* Migrate to null-safety. | ||
* Remove record/replay functionality. | ||
* Remove implicit casts in preparation for null-safety. | ||
* Remove dependency on `package:intl` and `package:meta`. | ||
|
||
## 3.0.13 | ||
|
||
* Handle `currentDirectory` throwing an exception in `getExecutablePath()`. | ||
|
||
## 3.0.12 | ||
|
||
* Updated version constraint on intl. | ||
|
||
## 3.0.11 | ||
|
||
* Fix bug: don't add quotes if the file name already has quotes. | ||
|
||
## 3.0.10 | ||
|
||
* Added quoted strings to indicate where the command name ends and the arguments | ||
begin otherwise, the file name is ambiguous on Windows. | ||
|
||
## 3.0.9 | ||
|
||
* Fixed bug in `ProcessWrapper` | ||
|
||
## 3.0.8 | ||
|
||
* Fixed bug in `ProcessWrapper` | ||
|
||
## 3.0.7 | ||
|
||
* Renamed `Process` to `ProcessWrapper` | ||
|
||
## 3.0.6 | ||
|
||
* Added class `Process`, a simple wrapper around dart:io's `Process` class. | ||
|
||
## 3.0.5 | ||
|
||
* Fixes for missing_return analysis errors with 2.10.0-dev.1.0. | ||
|
||
## 3.0.4 | ||
|
||
* Fix unit tests | ||
* Update SDK constraint to 3. | ||
|
||
## 3.0.3 | ||
|
||
* Update dependency on `package:file` | ||
|
||
## 3.0.2 | ||
|
||
* Remove upper case constants. | ||
* Update SDK constraint to 2.0.0-dev.54.0. | ||
* Fix tests for Dart 2. | ||
|
||
## 3.0.1 | ||
|
||
* General cleanup | ||
|
||
## 3.0.0 | ||
|
||
* Cleanup getExecutablePath() to better respect the platform | ||
|
||
## 2.0.9 | ||
|
||
* Bumped `package:file` dependency | ||
|
||
### 2.0.8 | ||
|
||
* Fixed method getArguments to qualify the map method with the specific | ||
String type | ||
|
||
### 2.0.7 | ||
|
||
* Remove `set exitCode` instances | ||
|
||
### 2.0.6 | ||
|
||
* Fix SDK constraint. | ||
* rename .analysis_options file to analaysis_options.yaml. | ||
* Use covariant in place of @checked. | ||
* Update comment style generics. | ||
|
||
### 2.0.5 | ||
|
||
* Bumped maximum Dart SDK version to 2.0.0-dev.infinity | ||
|
||
### 2.0.4 | ||
|
||
* relax dependency requirement for `intl` | ||
|
||
### 2.0.3 | ||
|
||
* relax dependency requirement for `platform` | ||
|
||
## 2.0.2 | ||
|
||
* Fix a strong mode function expression return type inference bug with Dart | ||
1.23.0-dev.10.0. | ||
|
||
## 2.0.1 | ||
|
||
* Fixed bug in `ReplayProcessManager` whereby it could try to write to `stdout` | ||
or `stderr` after the streams were closed. | ||
|
||
## 2.0.0 | ||
|
||
* Bumped `package:file` dependency to 2.0.1 | ||
|
||
## 1.1.0 | ||
|
||
* Added support to transparently find the right executable under Windows. | ||
|
||
## 1.0.1 | ||
|
||
* The `executable` and `arguments` parameters have been merged into one | ||
`command` parameter in the `run`, `runSync`, and `start` methods of | ||
`ProcessManager`. | ||
* Added support for sanitization of command elements in | ||
`RecordingProcessManager` and `ReplayProcessManager` via the `CommandElement` | ||
class. | ||
|
||
## 1.0.0 | ||
|
||
* Initial version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Copyright 2013, the Dart project authors. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
* Neither the name of Google LLC nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[](https://pub.dev/packages/process) | ||
[](https://pub.dev/packages/process/publisher) | ||
|
||
A pluggable, mockable process invocation abstraction for Dart. | ||
|
||
## What's this? | ||
|
||
A generic process invocation abstraction for Dart. | ||
|
||
Like `dart:io`, `package:process` supplies a rich, Dart-idiomatic API for | ||
spawning OS processes. | ||
|
||
Unlike `dart:io`, `package:process` requires processes to be started with | ||
[ProcessManager], which allows for easy mocking and testing of code that | ||
spawns processes in a hermetic way. | ||
|
||
[ProcessManager]: https://pub.dev/documentation/process/latest/process/ProcessManager-class.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test_on: vm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | ||
// 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. | ||
|
||
export 'src/interface/exceptions.dart'; | ||
export 'src/interface/local_process_manager.dart'; | ||
export 'src/interface/process_manager.dart'; | ||
export 'src/interface/process_wrapper.dart'; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5.0.3 is the current published version