core

WebSharper - Full-stack, functional, reactive web apps and microservices in F# and C#

APACHE-2.0 License

Stars
581
Committers
27

Bot releases are hidden (Show)

core - WebSharper 6.1.5 Latest Release

Published by Jand42 about 1 year ago

This is a minor release of WebSharper 6. NuGet version 6.1.5.317.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.5.317

Fixes

  • #1345 Web project startup time got significantly faster by better deserialization of WebSharper's metadata.

Improvements

  • #1329 using FSharp.Compiler.Service 43.7.300, adding compatibility for new F# features like the --test:GraphBasedChecking compiler flag for faster compilation.
  • #1344 The WebSharper Booster background process for speeding up successive compilations now have an icon.
core - WebSharper 6.1.4

Published by Jand42 over 1 year ago

This is a minor release of WebSharper 6. NuGet version 6.1.4.277.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.4.277

Fixes

  • #1319 Links generated in HTML projects (also called Offline Sitelets) are now properly linking other .html files generated (fixing a break introduced in WebSharper 6.0).
  • #1320 WebSharper compilers now run with either .NET 6 or .NET 7 runtime (defaulting to highest available). All templates work out of the box if updated to net7.0.
core - WebSharper 6.1.3

Published by Jand42 over 1 year ago

This is a minor release of WebSharper 6. NuGet version 6.1.3.269.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.3.269

Fixes

  • #1317 WebSharper now supports overloading for all operators and trigonometric functions defined in FSharp.Core.Operators module. Same as in F#, define your operator or trigonometric function as a static method on your custom numeric type.
core - WebSharper 6.1.2

Published by Jooseppi12 almost 2 years ago

This is a minor release of WebSharper 6. NuGet version 6.1.2.265.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.2.265

Enhancements

  • #1305 Added decimal overload for MathJS.Math.Round
  • #1315 Add TryParse function for decimal

Fixes

  • #1287 Fixed translating F# recursive values that translate to lazy evaluation (let rec x = or let x = inside module rec that uses a function/type defined below it)
  • #1303 MathJS List.sumBy error with decimal
  • #1307 Fixed source map output for Offline Sitelets (HTML projects)
  • #1314 Make sure comparison operators treated properly on proxied types
core - WebSharper 6.1.1

Published by Jand42 almost 2 years ago

This is a minor release of WebSharper 6. NuGet version 6.1.1.252.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.1.252

Enhancements

  • #1301 Added new InternalProxy attribute. Works exactly like Proxy (enables a stand-in JS type for a .NET type), but is applied only inside current project. This can be used to proxy helper .NET classes that are used only internally in a project, without conflicts if any other WebSharper libraries also want to use it similarly. If a proper proxy exists in any dependencies, then the InternalProxy is ignored, with a compilation-time warning.
core - WebSharper 6.1

Published by Jand42 almost 2 years ago

This is a major release of WebSharper 6. NuGet version 6.1.0.249.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.1.0.249

This release adds support for FSharp.Core 7.0, while being compatible with referencing any FSharp.Core 6.0+.

Templates are still using .NET 6 (LTS) by default.

The compiler needs a .NET 6 runtime, but supports targeting .NET 7. If you update an F# WebSharper project to net7.0, you will also need to set <ProduceReferenceAssembly>false</ProduceReferenceAssembly> on your project.

Enhancements

  • #1289 Support for new FSharp.Core 7.0 functions in Result and Map modules.
  • #1298 for Proxy projects, "UseJavaScriptSymbol": true is the default, so you can use #if JAVASCRIPT in original code to separate WebSharper proxy related code.
  • #1281 Added missing shadow DOM related bindings to WebSharper.JavaScript.
  • #1275 WIG (WebSharper.InterfaceGenerator) allows using WithWarning on constructors and properties.
  • #1276 Added Media Capture and Streams API bindings to WebSharper.JavaScript.
  • #1277 Added Geometry API bindings to WebSharper.JavaScript.
  • #1270 Updates for File API bindings in WebSharper.JavaScript.
  • #1274 Updated Canvas API bindings in WebSharper.JavaScript.

Fixes

  • #1285 Fix typo in MutationRecord.Type binding.
  • #1283 F# generic arithmethics now use custom get_Zero member if defined for a custom numeric type.
  • #1284 F# Seq.sum/sumBy/average/averageBy functions (and List/Array equivalents) are working as in .NET for custom numeric types, using their get_Zero, op_Addition and for averaging, DivideByInt members, same as in .NET F#.

Breaking changes

  • #1274 Canvas API bindings have some renames on enumeration types: TextDirection, LineJoin, TextAlign, TextBaseLine has been renamed to CanvasTextDirection, CanvasLineJoin, CanvasTextAlign, CanvasTextBaseLine.
  • #1284 Any function using sum/sumBy/average/averageBy must use it with resolved generics or be marked with [<Inline>] so that WebSharper compiler can resolve these functions specific to the type used.
core - WebSharper 6.0.4

Published by Jand42 about 2 years ago

This is a minor enhancement release of WebSharper 6. NuGet version 6.0.4.240.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.0.4.240

Fixes

  • #1269 Fixing null exception compile failure when using F# anonymous records inside Proxy projects.
core - WebSharper 6.0.3

Published by Jand42 about 2 years ago

This is a minor enhancement release of WebSharper 6. NuGet version 6.0.3.237.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.0.3.237

Enhancements

  • #1267 The JavaScript attribute now can be used on constructor parameters with type FSharp.Quotations.Expr<_> to auto-transpile expression passed in. Previously this feature was available only on methods. (For example this is used internally by Doc.ClientSide helper of WebSharper.UI`)
  • #1266 The ClientSide function defined in WebSharper.Web.dll is now marked obsolete. Use new WebSharper.Web.InlineControl(expr) directly if needed, or when using WebSharper.UI, the Doc.ClientSide function. (It is recommended to use Doc.ClientSide instead of client, the former supports auto-quoting its expression argument, so you don't need to wrap it in <@ ... @>.
core - WebSharper 6.0.2

Published by Jand42 about 2 years ago

This is a minor bugfix release of WebSharper 6. NuGet version 6.0.2.235.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.0.2.235

Fixes

  • #1264 Fixed WS metadata name for F# anonymous records to match IL name, this fixes using anon records across multiple projects and for remoting.
core - WebSharper 6.0.1

Published by Jand42 about 2 years ago

This is a minor enhancement release of WebSharper 6. NuGet version 6.0.1.233.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.0.1.233

Enhancements

  • #1262 Whenever a method with JavaScript-enabled parameter also needs value of expression passed, like Doc.Hydrate, a warning is given if you use explicit <@ @> F# quotation instead of an auto-quoted parameter. This ensures the intended use of Doc.Hydrate to generate a server-side DOM too for SEO but it's still non-breaking if value cannot be found.
  • #1263 Compiler prints errors happening during offline Sitelet generation with all their inner exception info.
core - WebSharper 6.0

Published by Jand42 over 2 years ago

This is first stable release of WebSharper 6. NuGet version 6.0.0.228.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::6.0.0.228

The .vsix installer has been retired, install dotnet templates as above to have them available within Visual Studio 2022 New Project wizard.

Features

  • #1225 Support for .NET 6.0. .NET Standard 2.0+, and .NET Core 2.1+ are also still supported.
  • #1218 Using FSharp.Compiler.Service 41.0.3 for F# 6.0 language features. Added support for:
    • task computation expression builder
    • new List/Array/Seq module functions: insertAt/removeAt/updateAt/insertManyAt/removeManyAt
    • F# Map properties: Keys/Values
    • printf %B binary printing support
    • F# 6 syntax enhancements: expr[idx] indexing, as patterns, implicit conversions
  • #1219 Support for most new C# 10 features:
    • Extended property patters Prop1.Prop2: value
    • global using directives
    • File-scoped namespace declarations
    • Lambda expression improvements
    • Constant interpolated strings
    • Record types can seal ToString
  • #1117 Support for more C# 9 features:
    • Covariant return types
  • #1049 Support for more C# 8 features:
    • #1224 Default implementations of interface members
    • Recursive patterns

Enhancements

  • #1216 Serving minified/non-minified scripts is now controlled by the "UseMinifiedScripts" runtime setting. Added appsettings.json and appsettings.Development.json to all web templates so that existing behavior is kept, Debug builds use non-minified scripts.
  • #1088 All supported collection interface types can be cast to collection interfaces: ICollection, ICollection<T>, IList, IList<T>, IDictionary<K,V>, ISet<T> and calling methods on these interface types work as expected. As types are erased in WebSharper translation, there is no performance loss on this. (For example calling .Count would not enumerate whole collection, if the underlying collection object would not.)
  • #1229 Runtime settings are now have more standardized names. Existing names for settings still kept as fallback. The new names are:
    • StdlibUseCdn, StdlibCdnFormat and CdnFormat.* for controlling WebSharper CDN link generation. Now cdn.websharper.com is live for WebSharper 5+ public releases.
    • UseDownloadedResources - remote scripts are dowloaded at compile time (also needs similar wsconfig.json setting) and linking them from local server.
    • UseMinifiedScripts - if true, serves .min.js scripts. Default is true.
  • #1230 Added missing overloads for JavaScript EventTarget methods.
  • #1232 Runtime helper functions are now named as WebSharper.Runtime.* instead of IntelliFactory.Runtime.*. This should require no changes, unless you called any of these functions directly which is not their intended use.
  • #1241 The WebSharper core package does not depend on either System.Configuration.ConfigurationManager or Microsoft.AspNetCore.Mvc.Abstractions any more. The single MVC-related functionality of WebSharper.Sitelets.Content type implementing IActionResult has been used to WebSharper.AspNetCore package via a .ToIActionResult() extension method instead of direct implementation.
  • #1247 Logging initialization/request handling times now follows ASP.NET Core standards. The "WebSharper.AspNetCore.IWebSharperService" category currently has 2 levels of logging, Information writes the sitelet runtime initialization time and Debug writes routing+handling+writing subtimes for requests handled by WebSharper Sitelets.
  • #1254 Added extension methods for WebSharper.Sitelets.Content and their async forms (Async<Content> in F# and Task<Content> in C#) to help integrating WebSharper content into ASP.NET Core applications. Use .ToIActionResult() to return WebSharper Content from inside an MVC handler, or .HandleRequest as a handler in minimal ANC APIs. For the other direction, also added Content.MvcResult to convert any object allowed as a return type in MVC to a WebSharper Content value.
  • #1253 Added support for per-endpoint CORS for C# via the new SiteletBuilder.WithCors methods.
  • #1252 Standardized project type names. For each existing alias, only one is made standard. No breaking changes, other allowed project type aliases just give a warning, recommending to switch to standard name.
  • #1258 Improved logging for html projects (offline Sitelets), visible with MSBuild Verbosity=Detailed.
  • #1260 Html project generation now generates as much output as it can while collecting errors if any, and reporting errors for each failed page separately instead of a global failure.
  • #1257 Conflicting multiple proxies for the same type/member now always should give specific compilation errors with message ""Duplicate client-side representation found for ..." instead of a global compiler failure.

Breaking changes

  • #1220 Compilers now run on .NET 6, need a 6.x dotnet runtime installed.
  • #1141 Context.Request.BodyText property now has type Task<string>. This means that it cannot be used synchronously without explicitly waiting on result, resolving all hidden synchronous waits within WebSharper routing too that had some performance drawbacks.
  • #1227 Cleanup of ANC initialization methods. All obsolete IApplicationBuilder extensions removed. You do need to use .AddWebSharper() in services builder too when you have .UseWebSharper(), a runtime error pointing this out is given if missing. This fixed scenarios where WebSharper has ran its metadata loading step twice, improving startup performance.
  • #1226 The Actions property of WebSharper.Sitelets.IWebSite interface (used for describing pages to generate for offline sitelets) is now of type IEnumerable<'Action> instead of F# list: list<'Action>. As the type is widened, it would only break existing code in rare cases.
  • #1250 The "outputDir": "wwwroot" setting is now the default for website projects. Use new project type microservice if you need no .js output, only server-side WebSharper functionality like JSON endpoints or RPC.

Fixes

  • #1243 C# analyzer, providing WebSharper errors/warnings during code editing now works as expected on Visual Studio 2022.
  • #1217 F# compilation service for faster recompilations now supported on MacOS.
  • #1248 Fixed a bug in translating F# string interpolations where the accessing this can get scoped incorrectly, resulting in client side null error. Also includes optimizations for JS output for printf family and string interpolation, outputting cleaner and shorter code.
  • #1251 Fix printing errors reading wsconfig.json or console args by the WebSharper F# compiler (wsfsc.exe)
  • #1255 F# records/unions with private internals can be used for server-side inferred routing without runtime error.
core - WebSharper 5.0

Published by Jand42 almost 3 years ago

This is the first stable release of WebSharper 5.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::5.0.0.119
Templates for Visual Studio 2019/2022: WebSharper.5.0.0.119.vsix

Enhancements

  • #1209 various C# 8/9 features are now usable for JavaScript translation, including records, pattern matching, local functions.
  • #1210 C# records can be used with WebSharper's routing, remoting and JSON serialization.
  • #1207 Updated DOM API.
  • #1213 Added WebSharper.AspNetCore.Sitelets.HttpHandler and WebSharper.AspNetCore.Remoting.HttpHandler helpers to allow hosting WebSharper Sitelets in giraffe/Saturn pipelines. Add .AddWebSharper() in your ConfigureServices method to enable.
core - WebSharper 5.0.0.104-preview1

Published by Jand42 about 3 years ago

This is a small fix and enhancement release of WebSharper 5 Preview.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::5.0.0.104-preview1

Fixes

  • #1206 Web.Control subtypes defined without a namespace in F# (file header like module X) work as intended.

Enhancements

core - WebSharper 5.0.0.100-preview1

Published by mrtank about 3 years ago

This is a preview release of WebSharper 5.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::5.0.0.102-preview1

Features

  • #1116 Support for .NET 5.0. .NET Standard 2.0+, and .NET Core 2.1+ are also still supported.
  • #1112 Using FSharp.Compiler.Service 40.0 for F# 5.0 language features. Added support for:
    • String interpolation
    • nameof
    • Enhanced slicing
    • Applicative Computation Expressions
    • Default interface member consumption
    • Implicit interop with nullable value types
  • #1131 New build service for caching F# compiler instance and WebSharper metadata, allowing hot startup for rebuilds. Service's name is "WebSharper Booster <version number>" where the version number can be 5.0.0.100 (#1156). Running the service is automatically enabled. Disabling this feature can be done by
    • Use --standalone+ flag at compile.
    • Add WebSharperBuildService environment variable with "False" value.
    • Add <WebSharperStandalone>True</WebSharperStandalone> project property.
  • #1153 Unpacking resources compilation step time improved.
  • #664 For Sitelets web projects, the compiler now pre-calculates and save runtime metadata in the web project assembly, gaining significant startup time improvements.
    • #1197 Added .SiteletAssembly(asm) method on WebSharperBuilder (to be used inside .UseWebSharper call in Startup.Configure). Sets the assembly used for getting sitelets runtime metadata, this is not needed in web projects themselves (defaults to entry assembly), but can be used for testing, to select which assembly is the WS web project.
  • #1181 Any Sitelets.Content objects now can be returned from ASP MVC routed endpoints too.

Enhancements

  • #1148 Added support for Floor/Ceiling methods in MathJS and updated bindings to support 9.4.4 (#1154).
  • #1164 Add ability to Property and Member to depend on resources as well as Assembly, Resource, Class, Interface in WebSharper Interface Generator.
  • #1160 Move WebSharper.JQuery into its own nuget package (https://github.com/dotnet-websharper/jquery).
  • #1172 Substitute JQuery's AjaxWith with a similar XMLHttpRequest solution in Routing.
  • #1176 Added Application.Text overload for C#
  • #1195 Added bindings for EventSource.
  • #1143 FSharp.Core 5.0 Map/Set working correctly with RPCs.

Breaking changes

  • Compiler project drops support for Net4x. netstandard2.0, .NET Core 3.1 are still supported.

Fixes

  • #1123 Fix "FSC : WebSharper error FS9001: You must provide assembly output path."
  • #1165 Fix "WebSharper warning WS9002: Failed to load return type..." Warning for generic types.
  • #1173 Fix XMLHttpRequest.send() binding.
  • #1183 Fix "error MSB6006: "wsfsc.sh" exited with code 134" on linux (wsfsc fails to build projects). Fixing #1184 together with #1183, because the new build service interactions coupled when build fails on linux.
  • #1184 Fix "Impossible to load assemblies for SwaggerProvider.DesignTime.dll".
  • #1191 Fix "CodeModel.Interface should auto-cast members".
core - WebSharper 4.7.3

Published by btamas2000 about 3 years ago

This is a minor release for WebSharper 4.7.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.7.3.424

Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.7.3.424.vsix

Enhancements

  • #1109 Added Floor/Ceiling methods and comparison operators to the decimal proxy.
  • #1154 Updated MathJs binding to version 9.4.4
  • #984 System.Numerics.BigInteger (F# alias bigint) proxy now uses default EcmaScript 2020 BigInt. F# bigint literals like 99I are also supported.
core - WebSharper 4.7.2

Published by Jand42 over 3 years ago

This is a bugfix release for WebSharper 4.7.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.7.2.423

Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.7.2.423.vsix

Fixes

  • #1126 Fixed an optimizer bug around object expressions that could drop property sets
  • #1134 Added Context.WithSettings/Sitelets.WithSettings helpers that add new environment vars for a Http Context or Sitelet.
  • #1135 Offline Sitelets projects now respect the WebSharperDownloadResources setting (downloading all remote js/css resources during compile time and linking them from local output). Also, other resources can be redirected with the WithSettings helper within WebsiteEntryPoint definition like so:
    override this.Sitelet =
        MySitelet
        |> Sitelet.WithSettings [
            "WebSharper.JQuery.Resources.JQuery", "https://code.jquery.com/jquery-3.6.0.min.js" 
        ]
    
    Thanks to @btamas2000.
  • #1139 Synchronous http response writing hangup resolved in WebSharper.AspNetCore.

Known regression

  • #1141 Context.Request.BodyText now throws an error when accessed in an ASP.NET Core web application. Synchronous access to request body will be deprecated. Use asynchronous request read from Context.Request.Body instead:

    async {
        use stream = new StreamReader(ctx.Request.Body)
        let! data = stream.ReadToEndAsync() |> Async.AwaitTask
        // ... process data
    }
    
core - WebSharper 4.7.1

Published by Jand42 over 3 years ago

This is a bugfix release for WebSharper 4.7.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.7.1.409

Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.7.1.409.vsix

Fixes

  • #1123 Fix build error on new .NET5 SDK (Error: "You must provide assembly output path.")

  • #1125 Updated .NET Framework 4.x extension projects to use FSharp.Core 4.7.0 by default (FSharp.Core 5.0 is not yet supported for WIG)

core - WebSharper 4.7

Published by Jand42 almost 4 years ago

This is a minor release for WebSharper 4.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.7.0.395

Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.7.0.395.vsix

This release updates to a new version of FSharp.Compiler.Service. For optimal compilation speed of F# projects, run the packages\WebSharper.FSharp.4.7.0.423\tools\runngen.ps1 script in administrator mode once.

Features

  • #1114 Added JS.Import, JS.ImportDefault, JS.ImportAll, JS.ImportDynamic functions. Sample usage:

    [<Inline>]
    let importTestJsAll : obj = JS.ImportAll "/modules/test.js"
    // translates to: import * as test from "/modules/test.js"
    
    [<Inline>]
    let importTestJs : obj = JS.Import("testExport", "/modules/test.js")
    // translates to: import { testExport } from "/modules/test.js"
    
    [<Inline>]
    let importTestJsDefault : obj = JS.ImportDefault "/modules/test.js"
    // translates to: import def$test from "/modules/test.js"
    
    // this does not add an import statement on top of the file as the others, but uses JavaScript import function
    [<JavaScript>]
    let testImportDynamic : Promise = JS.ImportDynamic("/modules/test.js").Then(fun testModule => testModule?testExport())
    // translates to: import("/modules/test.js").then(function (testModule) { testModule.testExport(); })
    
  • #1070 The javascript import function can now be used within inlines, translates to JS correctly.

    [<Inline "import('/modules/my-module.js').then(function (module) { module.run(); })">]
    let runMyModule() = X<Promise>
    
  • #1120 Updated to FSharp.Compiler.Service 37.0. Building for net5.0 target framework and using FSharp.Core 5.0 is possible but no F# 5 language features are available yet.

Fixes

  • #1115 WebSharper.InterfaceGenerator helper function Pattern.OptionalFields uses the original target JS name, does not appends Opt incorrectly.
  • #1008 uint8 and uint16 array literals are now translated without compiler error.
core - WebSharper 4.6.7

Published by Jand42 over 4 years ago

This is an enhancement release for WebSharper 4.6.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.6.7.382

Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.6.7.382.vsix

Enhancements

  • #1108 Added WebSharperSharedMetadata=None setting option to disable metadata loading for Sitelet runtime when not needed (only server-side features of WebSharper are used). Warning: this breaks any site with client-side functionality or RPCs.

Fixes

  • Templates specify langversion:7.3 for C#, which currently has full WebSharper support (projects with newer versions may compile but some newer language fetaures are not supported yet). Thanks to @3dGrabber.
core - WebSharper 4.6.6

Published by Jand42 over 4 years ago

This is a bugfix release for WebSharper 4.6.

Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.6.6.380

Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.6.6.380.vsix

Fixes

  • #1107 Fix build failure on .NET Core C# projects (introduced recently with compiler runtime change to netcoreapp3.1)