dcli_common
Common code used by multiple dcli packages.
10.0.0
60K downloads/mo
#1366 most downloaded on pub.dev
onepub-dev/dcli
What this package is like to depend on
Last release 3 days ago
21 Aug 2026
Release timing varies
gaps range from 2 weeks to 7 months
Nearly every release is documented
notes for 22 of 22 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
33 releases · first in 2024
10 releases in the last 12 months
see the full history below
Release timeline
33 releases · Feb 2024 to Aug 2026Releases
latest 33-
10.0.021 Aug 2026Release notes
Open source →- fixed completion test.
- fixed a time out in the compile test.
- fixed lints after upgrade lint_hard.
- we now restore the XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS env vars on linux when releasing sudo priviledges.
- Upraded dependencies: lint_hard, cixrcular_buffer. Modifed stacktrace to stackTrace in dcli exception dervived exceptions for consistency.
-
9.0.205 Aug 2026Release notes
Open source →- added the observe() method to NamedLock so you can see if a lock is being held and by who.
-
9.0.028 May 2026Release notes
Open source →- Removed deprecated public APIs and deprecated entry-point libraries.
- Raised Dart SDK lower bounds where required by dependency upgrades.
- Upgraded win32 to 6.0.1 and dart_console to 5.x.
- Removed the dcli_common publish_to override so packages publish to pub.dev.
-
8.4.228 Jan 2026Release notes
Open source →- preping the 8.4.2 release.
- removed the publish_to which was pushing it to onepub.
- excluded logs.
- unused.
- restored overrides paths to relative
- Fixed a bug in read that was mixing codecs.
- updated templates to use latest version of dcli.
- templates changed to use dcli rather than dart for #!
- reverted the test scripts using #! dcli as it affects the output that the tests rely on.
- replaced #! dart with dcli to take advantage of the faster startup.
-
8.4.127 Jan 2026Release notes
Open source →- Change the script runner to use the --resident flag to improve startup times for dart scripts (from 5sec down to 1).
- Fixed a bug where the -v flag wasn't actually enabling verbose logging.
- moved flag class into its own file, verbose and help as well.
-
8.4.027 Jan 2026Release notes
Open source →- no using the document_throws package to document all exceptions.
- document all exceptions.
- cleaned up some of the hand documented exceptions to fully utilise the @Throwing lints.
- fixed formatting.
- Added option includeParentEnvironment to start methods to resolve https://github.com/onepub-dev/dcli/issues/263.
-
8.3.001 Jan 2026Release notes
Open source →DCLi functions which execute process have assumed that data is ascii which is incorrect as most cli system utilise utf-8. This updates changes the default encoding to utf-8 and provides the ability to select the encoding. These changes should be backward compatible whilst fixing the output of programs that output mulit-byte utf-8 data. Functions like
start()now take an 'encoding' parameter which is used if no Progress is passed to the method. If you pass in a Progress then the encoding of that Progress is used.- Added encoding-aware Progress
-
8.0.017 Oct 2025Release notes
Open source →- retracted 7.2 as it had a breaking api change (setVerbose is no sync).
- This is a re-release of 7.2 with the correct version number reflecting that breaking change.
-
7.2.016 Oct 2025Release notes
Open source →- Fixes #260 - thanks to @passy for the suggested fix.
- moved exitCode read into a finally block to guarentee that we read the exit code as we have seen child processes go into a defunct state due the parent not reading the exit code.
- terminal is no longer a required arg, it sets to false by default.
- reverted the use of TokenEvaluation from win32 as not all 5.x version of win32 have the replacement TokenEvaluation.
- Fixed a bug in the RunnableProcess.run method which was failing to throw a RunException if the exit code was non-zero and nothrow was false.
- upgraded to lint_hard 6.x
-
7.1.026 Sep 2025Release notes
Open source →- upgraded to pubspec_manager 2.x, minor lint fixes.
- moved license to top level so github shows the license info.
- updated copy right message is source files to reflect MIT license.
-
7.0.205 Mar 2025Release notes
Open source →- updated to code to conform to the lates lint_hard lints. Work on the 'pack' command to ensure it generates code that conforms with the latest lint rules.
- changed the ask call to readlineSync to use the newer utf8 global var.
-
7.0.114 Feb 2025Release notes
Open source →- Merge pull request #255 from davidmartos96/archive_v4 - thanks for the patch
- Support archive v4
-
7.0.012 Feb 2025Release notes
Open source →- BREAKING: copyTree now copies empty directories and symlinks. To get the original behaviour pass in 'includeEmpty: false' and 'includeLinks: false'.
- deprecated symlink in favour of createSymLink
-
6.1.226 Jan 2025 -
6.1.126 Jan 2025Release notes
Open source →- Added new method withPrivilegesAsync
- forced native_synchronisation to 0.7.1
- Fixed bug on windows which resulted in the projectRootPath being /C:/
-
6.1.019 Oct 2024Release notes
Open source →- upgraded to archive 3.6.1 to overcome dart 3.5 compatibility issue. upgraded all packaages to scope 5.x
- upgraded to latest version of native_synchronization_temp to fixed named lock issues on macos and windows.
- lint fixes.
-
6.0.315 Aug 2024Release notes
Open source →- upgraded to archive 3.6.1 to overcome dart 3.5 compatibility issue. upgraded all packaages to scope 5.x upgraded all packages to lint_hard 5.x
- lint fix.
-
6.0.008 Aug 2024Release notes
Open source →-
Breaking The AskValidator now takes an additional argument 'customErrorMessage'. This will only affect users that have built custom ask validators. change
String validate(String line)toString validate(String line, {String? customErrorMessage})and then return the customErrorMessage rather than you usual error message if the customErrorMessage is not null. When outputing an error from you validator you should usecustomErrorMessage??'my original error'Thanks to Emad Beltaje for the contribution! -
modified the menu validate to confirm to the new validate signature for customErrorMessages.
-
migrated the customErrorMessage arg to the async version of ask.
-
Upgraded to win32 v5 to fix an issue with a deprecated api for dart 3.5.
-
-
5.0.031 Jul 2024Release notes
Open source →- Breaking -- Removed a number of the withXX sync functions in favour of withXXAsync as the sync versions were dangerous as it was too easy to make async calls within the callback and then the withXXX method would return before the callback completed.
We have left stub methods for the old withXXX form that are marked as deprecated and will throw an UnsupportedError if you call them.
-- withTempDir replaced by withTempDirAsync -- withTempFile replaced by withTempFileAsync -- withFileProtection replaced by withFileProtectionAsync
-
Removed a number of redundant methods from the dcli package that were just pass throughs to the dcli_core package. As the dcli barrel file now exports the dcli_core functions for these methods there should be no noticiable difference in the API.
-
Added new method PubCache::pathToGlobalPackage
-
Fixed a bug in NamedLock which was causing a dead lock if the an existing lock file was found but the owning process was no longer runnimg.
-
upgraded to settings_yaml 8.2.0
-
removed the DCLIFunction wrapper for a number of functions as it serves no purpose.
-
removed move_tree as it was just a wrapper for dcli_core method of the same name.
-
moved the move and moveDir wrapper functions and exposed the dcli_core versions.
-
replaced all occurances of withTempFile with withTempFileAsync
-
move to using native_sychronisation_temp until the official release.
-
4.0.303 Jul 2024Release notes
Open source →- fix ProgressMixin.firstLine throwing if there are no lines - contributed by @sstasi95
-
4.0.223 Jun 2024Release notes
Open source →- updated change log for 4.0.2
- removed overridden dep.
- Added a sync test for exitCode.
- temporary cleanup of the withLock methods until we get a real fix for the runtime lock package.
- update version.
- turned off debugging, cleaned old code.
- removed old startIsolate and renamed startIsoalte2 to startIsolate.
-
4.0.1-beta.413 Apr 2024 pre-releaseRelease notes
Open source →- added back in the missing nothrow arg to start method.
- Fixed running of detached processes. We were trying to get the exit code which would never work.
- Added some missing async statements when using named locks. Fixed a bug in dart_project when running in a unit test. It was getting the platformComfig which was a uri of the form file:// but then trying to process it as a simple path.
- moved message_response to its own file. Added a processor for exceptions as we were dumping exceptions generated in the isolate on the ground. Fixed a bug when we call start in with mode terminal. We were still trying to attach to the stdio stream when the don't actually exist. The same goes for detached. added json encoding to DCliException and RunException so we can pass them over the isolate boundary via a mailbox.
- changed namedLock to async until tsavoc has a chance to merge in his sync version. We may need a sync and async version to allow for async callbacks.
- still no action on async validation methods for 'ask'.
Most unit tests are now working and most of the common process execution paths appear to be working.
-
4.0.1-beta.313 Apr 2024 pre-release -
4.0.1-beta.207 Apr 2024 pre-releaseRelease notes
Open source →- upgraded to the latest version of dart_console.
- migrated back to dart_console as I'm now the maintainer.
- downgraded max win32 version to 5.3 to avoid deprecation notices.
- renabled support for terminal mode on the start command. Still needs more testing.
- minor code refactor.
- Reverted the use of win32 to constansts deprecated from 5.4.0 to improve our compatability window.
-
4.0.1-beta.105 Apr 2024 pre-releaseRelease notes
Open source →Breaking
- fetch/fetchMulti are now async.
Still a chunk more to do but the core 'good' paths seem to be mostly working when running processes. Optimistically this will get most people over the hump whilst we clean up the few remaining problems.
There are still some concerns around running a process in 'terminal' or 'detached' mode and I've not done any testing (and there is a path missing) of getting stdin attached to the process. This is probably the remaining 'big' issue but I think I can see a path through this.
Take it for a spin and let us know how you go. I will try to priorities the issues that are burning people the most.
-
4.0.1-alpha.1121 Mar 2024 pre-releaseRelease notes
Open source →- merged #234 from tsavo-at-pieces which provides windows support for synchronous process calls. Big thanks for the work on this Tsavo!!!
- migrated away from custom implementation of mailboxes to the native_synchronization package. Big thanks to @mraleph for his massive contributions and trial conversion of dcli to dart 3.x which most of my work is based off.
-
4.0.1-alpha.1021 Mar 2024 pre-releaseNothing published for this version
-
4.0.1-alpha.820 Feb 2024 pre-releaseRelease notes
Open source →- fixed the sdk range for dcli_common
- switch to activating dcli_sdk instead of dcli.
-
4.0.1-alpha.719 Feb 2024 pre-release -
4.0.1-alpha.619 Feb 2024 pre-release -
4.0.1-alpha.519 Feb 2024 pre-releaseRelease notes
Open source →- upgraded to latest version of pubspec_manager.
- removed conflict for Platform definition.
- Added support ot the Ask function to validate urls.
- Fixed a null check in the new inDocker method.
- updated the DockerShell to use /proc/1/cgroup to determine if we are in a docker container as the test for .dockerenv no longer
-
4.0.1-alpha.419 Feb 2024 pre-release -
4.0.014 May 2024Release notes
Open source →- Rewrote large chunks of the code to remove dependency on waitFor which is now deprecated.
- Split the code based up into 5 small packages to make it easier for users to uses just specific APIs without including the entire DCLI code base.
- fetch/fetchMulti are now async.
- Refactored NamedLock.withLock
- Update Full Template to not require flutter
- Remove awaits from DartProject.warmup()
- The | Pipe operator has been deprecated - look out for the up coming release of HalfPipe for a replacement.
- fixed a bug in the windows wmic line parser.
- fixed regGetExpandedString as it appears that we were passing the wrong flags for the data we were trying to get back.
- removed sink and process as we are replacing these with halfpipe.
- removed pipeTo as we are moving to use halfpipe.
- updated printerr to take an Object? as does print as it makes it more flexible.