sidekick_core 0.15.0
sidekick_core: ^0.15.0 copied to clipboard
Reusable code pieces for sidekick CLIs. Provides a project and useful helper methods when working with files
Changelog #
0.15.0 (2023-1-18) #
Changes to your sidekick CLI #
<cli> <command>Sidekick CLIs now automatically check for updates after executing a command. Disable withexport SIDEKICK_ENABLE_UPDATE_CHECK=false#177 #171<cli> sidekick updatenow updates to the latest stable Dart SDK #167- Automatic
pub upgradewhen CLI compilation fails (due to Dart SDK upgrade) #166
New APIs #
-
New:
BashCommandto simplify converting bash scripts to commands in dart #168BashCommand( name: 'codegen', description: 'Runs build runner', workingDirectory: runner.mainProject?.root, script: () => ''' ${systemFlutterSdkPath()}/bin/flutter pub run build_runner build --delete-conflicting-outputs ''', ),
Bugfixes and improvements #
DepsCommandnow ignores sidekick packages, which pull deps automatically with embedded Dart SDK #184- Fix:
DepsCommand.excludeGlobnow starts matching at repo root, not CWD #183 sidekick updatenow handlespathandgitdependencies when updatingsidekick_core#180DartPackage.fromDirectory()Simplify detection of Flutter packages #182
0.14.0 (2023-1-6) #
Template Changes #
- CLI template now does not generate a
<cli>_project.dartfile. You can continue to use yours but we found most people didn't need it. (#156) - UsageException is now correctly printed (#157) (with
<cli> sidekick updatemigration) - Calling the CLI with zero arguments now also checks for sidekick updates (#157) (with
<cli> sidekick updatemigration) - Fix unnecessary CLI recompilation in
run.sh(#152)
API Changes #
0.13.1 #
- Fix
sidekick plugins installfor git and local sources #144
0.13.0 #
- New
sidekick updatecommand for updating your sidekick CLI (#111) - Add
excludeGlobparameter toDepsCommand(#125) - Add
--versionflag tosidekickcommand - Support
FLUTTER_ROOTenvironment variable for local Flutter SDK (#123) - Update templates (#132, #126)
- Installing sidekick plugins from git is now possible (#126)
- Experimental: Automatic sidekick update check when setting
SIDEKICK_ENABLE_UPDATE_CHECKenvironment variable totrue
0.12.0 #
- New:
versiongetter mirroring thesidekick_coreversion inpubspec.yaml - Analyzer now ignores the
buildfolder. Previously, the embedded dart sdk was accidentally analyzed #107 - Reduce stdout noise when installing a plugin from pub (
sidekick plugin install) #109 - Reduce stdout when compiling the cli (not showing
dart pub getstdout) #109 - Allow cli names to include underscores (sidekick init) #112
DepsCommandnow accounts for theexcludeparameter, not loading dependencies for those packages #118
0.11.1 #
- New:
<FileSystemEntity>.makeExecutable()extension method - Update repository URL in pubspec.yaml
- Move cli template into
sidekick_core
0.11.0 #
- New:
addFlutterSdkInitilizermethod to allow plugins downloading the Flutter SDK beforeflutteris called #99 - Widen
dcliversion range
0.10.1 #
- Fix
install-globalcommand which crashed in some cases (#94)
0.10.0 #
- Template shared-command and shared-code now use the
librarykeyword #87 findAllPackagesworks now outside of theSidekickCommandRunner- New
OutOfCommandRunnerScopeExceptionwhen accessingcliNameand friends outside of aCommand#88 - Allow execution of
PluginCommandfrom oursidekickcli using the system dart sdk #91 - New
SidekickCommandthat bundles nowplugins,recompileandinstall-global#89
0.9.0 #
- Fix: Setting
flutterSdkPathanddartSdkPathininitializeSidekicknow works with relative paths from anywhere as well.
Relative paths are resolved relative to the project root. - New: The
plugins createcommand now also generates aREADME.md,.gitignore, andanalysis_options.yaml - New:
DepsCommand(previously was insidekick) - New:
RecompileCommand(previously was insidekick) - New: Functions returning system Dart/Flutter SDKs (
systemDartSdk,systemDartSdkPath,systemFlutterSdk,systemFlutterSdkPath)
0.8.0 #
DartCommandandFlutterCommandnow require the SDKs to be set ininitializeSidekick(flutterSdkPath: ..., dartSdkPath: ...).). This is a non-breaking change, falling back toflutter_wrapper`.- Breaking: Plugins now use a zero argument main function. All information during install is injected via env, accessible with
PluginContext#72 - New:
DartPackagedoesn't require alibdirectory anymore #63 - Add:
SidekickPackage.cliMainFilelocation where plugins are registered
0.7.1 #
- New:
plugins createnow generates plugins from templates - Fix:
plugins installnow uses a temp working directory instead of manipulating the pub cache during install - New:
isValidPubPackageName(String name)returnstruewhen the name is a valid pub package name according to https://dart.cn/tools/pub/pubspec#name
0.7.0 #
- New:
PluginsCommandto automatically install plugins to easily extend sidekick CLIs - New:
SidekickDartRuntime sidekickDartRuntimethat points to the dart sdk bundled with the CLI - New:
Repository.sidekickPackagewhich returnsRepository.cliPackageDirasSidekickPackageobject.
0.6.0 #
- Breaking
initializeSidekick()now returns aSidekickCommandRunnerinstance (wasvoid). You have to use this runner to access the global sidekick variablescliName,mainProject,repository - Regenerate your cli with
sidekick: 0.6.0to migrate
0.5.2 #
- constrain
dcli, new versions are not compatible with Dart 2.15 and below
0.5.1 #
- Print script + stderr when execution of an inline script (
writeAndRunShellScript(script)) fails
0.5.0 #
Breaking This update requires the sidekick project to be initialized again with sidekick: 0.4.0
- New
InstallGlobalCommand(links binaries in$HOME/.sidekick/bin) - Simplified repository detection (breaking)
errornow support errorCode
0.4.1 #
- Require Dart 2.14
0.4.0 #
flutterw()is now windows compatibledart()is now windows compatible- DartPackage detection prints a warning for packages without a
lib/dir
0.3.3 #
- Update
dclito1.15.0due to breaking change
0.3.2 #
- Update
dcli - Widen
dartxversion range
0.3.1 #
AnalyzeCommandnow fails with correct exit code
0.3.0 #
- Include
ForwardCommandand addflutterw,dartandanalyzesubcommands
0.2.0 #
- Add
initializeSidekick() - Add
repository,cliNameandmainProject - Add util files