ScriptCS v0.17.0 Release Notes

Release Date: 2017-02-12 // about 7 years ago
  • ๐Ÿ“ฆ Get it via svm, Chocolatey! or Homebrew.

    ๐Ÿš€ Special thanks to: @BlackFrog1, @gregoryyoung, @aarondandy, and @rickardp for their contributions to this release.

    ๐Ÿš€ This Release

    ๐Ÿš€ This is the first release in a while for scriptcs. It includes some great new features such as Pretty Printing, Support for NuGet credentials, enrichment to the execution environment and more!

    ๐Ÿ“ฆ For API users (hosting or other programmatic usage), there is one major change, the removal of members exposing Common.Logging types (#1189) from the public API. These were deprecated in version 0.15.0. As a result, the ScriptCs.Core NuGet package no longer takes a dependency on the Common.Logging package.

    ๐Ÿ’ฅ Breaking API Changes

    High impact : Common.Logging types have been removed from the scriptcs public API.

    Medium impact : The ScriptCs.Core NuGet package no longer takes a dependency on the Common.Logging package. If you are using Common.Logging for other purposes, after upgrading your project to ScriptCs.Core 0.17.0 you should check to see if NuGet has removed Common.Logging. If so, you will have to reinstall it yourself.

    Low impact :

    Affects hosters / module authors only

    • The IConsole interface has a new Width parameter.
    • ๐Ÿ–จ The IScriptEnvironment interface has new members AddCustomPrinter<T>), Print<T>(), ScriptPath, LoadedScripts, ScriptAssembly, and Initialize().
    • ๐Ÿ“œ The FileParserContext and FilePreProcessResult classes have a new member: ScriptPath

    Issue Details

    ๐Ÿ†• New Features

    • ๐ŸŒฒ Common Logging is gone! (#1190) - by @glennblock. Kudos to @adamralph for getting everything in place to allow the surgical removal.
    • ๐Ÿ–จ Pretty printing support has now been added to the REPL (#1156) - by @gregoryyoung

    ๐Ÿฑ [screen shot 2017-02-11 at 10 46 24 pm] (https://cloud.githubusercontent.com/assets/141124/22864844/8de41d34-f10d-11e6-9f9a-5091f5a42812.png)

    You can now access the main script and any loaded script paths using the new Env.ScriptPath and Env.LoadedScripts properties (#225) - by @glennblock

    You can access the compiled script assembly from within a script using the new Env.ScriptAssembly property. This alleviates having to use reflection or jump through hoops to get the script assembly (#244) - by @glennblock

    #load child.csxConsole.WriteLine("Main script:" + Env.ScriptPath); Console.WriteLine("Loaded scripts:");Console.WriteLine("\t" + String.Join(Environment.NewLine + "\t", Env.LoadedScripts.ToArray())); Console.WriteLine("Assembly:" + Env.ScriptAssembly);
    

    ๐Ÿฑ screen shot 2017-02-11 at 10 56 50 pm

    โž• Added a ScriptCs Nuget package which has all the binaries. This allows running scripts like on a CI server simply by installing the package from NuGet. Also makes it easy to include ScriptCs binaries in a project. (#1061) - by @glennblock

    โž• Added new -e and --eval options for allowing execution of code passed at the command line. (Currently does not work with svm due to a bug) (#1085) - by @glennblock

    ๐Ÿฑ screen shot 2017-02-12 at 10 22 12 am

    Global Credential provider can now be set for NuGet. (#1018) - by @aarondandy

    ๐Ÿ›  Fixes

    REPL command help displays formatted to the width of the terminal. (#1047) -by @BlackFrog1

    ๐Ÿฑ replformatting

    Char literals are properly handled if they have escape chars. (#1143) - by @rickardp

    Compilation into cache no longer throws a ScriptCompilationException (#1153) - by @filipw

    ๐Ÿ’… Stylecop removed from test projects, LibLog and Mono LineEditor (#1191) - by @glennblock

    ๐Ÿ”„ Changed errors to always show in Red as opposed to Dark Red to address readability (#1198) - by @glennblock

    ๐Ÿฑ errors

    Comments can now be before directives. (#1185) - by @glennblock

    Relative paths are now handled properly (#1193) - by @glennblock

    โšก๏ธ Updated to Nuget.core 2.14.0 fixes error with ScriptCs.OctopusClient script pack (#1208) - by @glennblock