Releases: dotnet-websharper/core
WebSharper 4.5.6
This is a bugfix release for WebSharper 4.5.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.5.6.290
Templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.5.6.290.vsix
Fixes
- #1039 Badly formatted Cookie header in request no longer causes server exception.
WebSharper 4.5.5
This is a bugfix release for WebSharper 4.5. See the associated WebSharper.UI release
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.5.5.283
Templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.5.5.283.vsix
Fixes
- #1034 Router: accept an empty final fragment if a route expects a string
WebSharper 4.5.4
This is a minor release for WebSharper 4.5. See the associated WebSharper.UI release
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.5.4.278
Templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.5.4.278.vsix
Breaking changes
- #1028 Simplified and unified class names in
WebSharper.JavaScript.Dom
, strippingDOM
prefix where there was one.
Features
- #999: Added
Content.Cors
, a helper for checking for Cross-Origin Resource Sharing headers. - #1025 Added
Router.FetchWith
andRouter.AjaxWith
that are taking aRequestOptions
to customize the request sent to an automatically routed WebSharper endpoint.
Fixes
- #1021 Fixed parsing FormData when using
Router.Infer
. - #1027 Added
classList
onDom.Element
. - #1030 Use invariant number format for floats in routing. Fixes failing to parse decimal point character in URLs created on the client when the server system settings use another character instead of point.
- #1031 Handle NoWarn+TreatWarningsAsErrors well for F# compilation.
- #1032 Fix skipping pre-translating some server-side quoted event handlers. In particular, this caused issues in server-side WebSharper.UI templates where one could not use both
ws-onxxx
and.OnYyy()
with the same template. - #1033 Fix inconsistent behavior of
HtmlTextWriter
between netfx and netstandard. Attributes written usingHtmlTextWriter.WriteAttribute
, which includes WebSharper.UI attributes, are now always automatically escaped.
WebSharper 4.5.3
This is a bugfix release for WebSharper 4.5. See the associated WebSharper.UI release
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.5.2.275
Templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.5.2.275.vsix
Fixes
-
#1019 Show a compile-time warning when an
Inline
orDirect
contains a$variable
that doesn't correspond to an argument. Additionally, add a propertyUseDollarVariables : string
on bothInlineAttribute
andDirectAttribute
to indicate that a given$variable
is not an argument typo and should not cause a warning.For example, the following warns that
$unexpected
doesn't correspond to an argument, but doesn't warn about$expected1
and$expected2
:[<Inline("$this.myMethod($theArg, $unexpected, $expected1, $expected2)", UseDollarVariables = "$expected1, $expected2")>] member this.MyMethod(theArg: int) = X<unit>
WebSharper 4.5.2
This is a minor release for WebSharper 4.5. See the associated WebSharper.UI release
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.5.2.275
Templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.5.2.275.vsix
Features
- #1020:
Sitelets.HttpModule
now throws an error if no Sitelet definition is found. - #1022: Update to FSharp.Compiler.Service 25.0.1
Fixes
- #1023: Fix HTML escaping in
HtmlTextWriter
. This affects functions such astext
andattr.*
in WebSharper.UI.
WebSharper 4.5.1
This is a minor release for WebSharper 4.5. See the associated WebSharper.UI release
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.5.1.266
Templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.5.1.266.vsix
Features
- #1005: Add
MouseEvent.Buttons
property. - #1006: WIG: Add the capability to declare abstract classes and abstract and virtual methods.
- #1016: Macros: Add
NeedsTranslatedArguments
property defaulting tofalse
. If overridden totrue
, the arguments to the macro are translated before being passed to the macro. - As a result of #1016: the
New
macro now compiles to a plain JS object in more cases. In particular, it recognizes a list of members declared using a function call that inlines into a literal (string, obj) pair. - #1018: Add support for argument-less
Nullable.GetValueOrDefault()
.
Bugfixes
WebSharper 4.5
This is a major release for WebSharper 4. See the associated WebSharper UI release.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.5.0.265
Templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.5.0.265.vsix
Features
- #1001: Strongly-name the .NET Standard core libraries.
- #1002: Added
--jsoutput
and--minjsoutput
command line options, as well asWebSharperJsOutput
andWebSharperMinJsOutput
project properties, as equivalents tojsOutput
andminJsOutput
wsconfig.json
options.
Fixes
- #1000: Compiling in
BundleOnly
mode correctly detects compile errors.
WebSharper 4.4.1
This is a bugfix release for WebSharper 4.4. See the associated WebSharper.UI release
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.4.1.261
Templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.4.1.261.vsix
Features
- #988 Add proxy for the JavaScript
fetch
API. - #988 Add
Router.Fetch
as a fetch-based equivalent toRouter.Ajax
.
Fixes
- #985 Fix reading C# tuple type signatures, this also fixes remoting with tuples in C#.
- #989 RPC signature verification works as intended: compiler attempts to create JSON de/serializers, if there is any unsupported types found, a compile-time error is given.
- #990 The
runngen.ps1
scripts in thetools
folder in bothWebSharper.FSharp
andWebSharper.CSharp
packages now correctly installs the compiler tools in thenet461
folder. Run this script in administrator mode to speed up WebSharper compilation. - #991 Fix regression in overriding implementation methods, there is no more incorrect
Instance member name conflict
errors. - #993 Fix scoping of "this" in function conversions. This notably fixes C# event handlers in WebSharper.UI.
- #994 Fix control flow for C# try/catch in asynchronous methods.
- #996 Don't use
jQuery.on('ready', ...)
for the web control activator. This removes the dependency on jQuery for many sitelets. - #997 Add proxy for
Printf.kprintf
- #998 Don't serialize System.UI.Web.Control's private fields. Since the Serializable attribute requirement was dropped in 4.4.0, web controls would output a number of null fields in the
<meta>
tag; this is now fixed.
WebSharper 4.4
This is a major release for WebSharper 4.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.4.0.255
Templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.4.0.255.vsix
Features
- #641, #970: Add support for Web Workers.
- Add the
Worker
API toWebSharper.JavaScript
. - Add a set of special constructors for
Worker
which takes a function as argument. The compiler automatically compiles this function into a minimal bundle script and compiles the constructor call to reference this script by URL. See the documentation for more details. - Add a new compiler setting
scriptBaseUrl
which determines the base URL under which the worker scripts are located. The full URL is<scriptBaseUrl>/<assemblyname>/<assemblyname>.<scriptname>.js
, where<scriptname>
isworker
unless specified in the constructor call.
- Add the
- #807: Merge the class
WebSharper.JavaScript.JS
from the assemblyWebSharper.JavaScript
with the module of the same name from the assemblyWebSharper.Main
. This mean that all uses ofJSModule
in C# must be replaced withJS
. - #939: Add JavaScript Promises support. This includes:
- Add a proxy for the
Promise<'T>
class. - Add a
Promise
module with functionsAsAysnc
,OfAsync
,AsTask
andOfTask
.
TheAs*
functions handle rejected promises as follows: if the rejection value is anError
, then it is used directly as the exception raised from the Async / Task. Otherwise, it is wrapped as theReason
property of aNonStandardPromiseRejectionException
. - Add the above functions as extension methods to their respective relevant classes.
- Add a
promise
computation expression.
- Add a proxy for the
- #975: Drop the
[Serializable]
requirement for classes used in JSON serialization (RPC, Sitelets,WebSharper.Json
). - #976: Allow Bundle projects to reference other Bundle projects that have an EntryPoint.
- #979: Change signature of
Router.Create
to parse to option. - #980: Sitelets: add
Content.FromContent(Content<obj>)
to convert an F# content into a C# content. - #981: Add
Sitelet.MapContent
.- For F#: module function
Sitelet.MapContent : (Async<Content<'T>> -> Async<Content<'T>>) -> Sitelet<'T> -> Sitelet<'T>
- For C#: extension method
Sitelet<obj> Sitelet<obj>.MapContent(Func<Task<Content>, Task<Content>>)
- For F#: module function
- #982: Make all exceptions inherit from the JavaScript
Error
type. This affects exceptions declared with the F# keywordexception
as well as classes inheriting fromSystem.Exception
. This makes it possible to perform runtime type tests (F#:?
, C#is
) againstSystem.Exception
.
Fixes
- #971: WIG: properly fail when trying to declare that a class implements a class, rather than inherits from it.
- #977: Give a better error if there is a conflict where two projects include a server-side compiled quotation from the exact same file and position.
- #978: Give a better error if a Bundle is missing a project reference.
- #983: Fix
dotnet build
on a C# project failing to find FSharp.Core. - WebSharper.Testing: reference QUnit via
https
. - #987: Change the assemblies
WebSharper.Compiler
,WebSharper.Compiler.CSharp
andWebSharper.Compiler.FSharp
to referenceFSharp.Core
4.4.1.0 rather than 4.5.0.0. This fixes assembly loading issues in the Roslyn analyzer.
As a consequence, we reduced the minimum dependency of the WebSharper.Compiler packages on FSharp.Core from >= 4.5.0 to >= 4.1.0.
WebSharper 4.3.1
This is a small feature release for WebSharper 4.3.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.3.1.249
Templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.3.1.249.vsix
Features
- #965: Add support for
==
and!=
operators for tuple types in C#.