From 13a9f4e81a905b33432db39043b861d3f89c7ee3 Mon Sep 17 00:00:00 2001 From: Alfonso Garcia-Caro Date: Wed, 13 Mar 2019 10:13:20 +0100 Subject: [PATCH] Publish 2.2.0-beta-018 --- src/Fable.Cli/Util.fs | 2 +- src/Fable.Core/Fable.Core.Types.fs | 6 ++---- src/Fable.Core/Fable.Core.Util.fs | 1 + src/Fable.Core/Fable.Core.fsproj | 2 +- src/Fable.Core/RELEASE_NOTES.md | 4 ++++ src/fable-compiler/RELEASE_NOTES.md | 11 ++++++++++- src/fable-compiler/package-lock.json | 2 +- src/fable-compiler/package.json | 2 +- tests/Main/ArithmeticTests.fs | 11 ++++++++--- tests/Main/JsInteropTests.fs | 1 + 10 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/Fable.Cli/Util.fs b/src/Fable.Cli/Util.fs index 2b52b9ca0f..e49078ca9d 100644 --- a/src/Fable.Cli/Util.fs +++ b/src/Fable.Cli/Util.fs @@ -2,7 +2,7 @@ namespace Fable.Cli module Literals = - let [] VERSION = "2.2.0-beta-017" + let [] VERSION = "2.2.0-beta-018" let [] CORE_VERSION = "2.1.0" let [] DEFAULT_PORT = 61225 let [] FORCE = "force:" diff --git a/src/Fable.Core/Fable.Core.Types.fs b/src/Fable.Core/Fable.Core.Types.fs index 76e56d04e6..15f9af6915 100644 --- a/src/Fable.Core/Fable.Core.Types.fs +++ b/src/Fable.Core/Fable.Core.Types.fs @@ -2,10 +2,6 @@ namespace Fable.Core open System -/// Not used in Fable 2 but added temporarily to avoid errors when using dotnet CLI -/// to build projects with dependencies referencing Fable.Core 1.x -type Applicable = obj->obj - type CaseRules = | None = 0 | LowerFirst = 1 @@ -96,6 +92,8 @@ type ReplacesAttribute(replacedTypeFullName: string) = type OverloadSuffixAttribute(value: string) = inherit Attribute() +/// Can be used in an optional argument decorated with Inject attribute +/// to automatically pass generic information without inlining the method type ITypeResolver<'T> = abstract ResolveType: unit -> Type diff --git a/src/Fable.Core/Fable.Core.Util.fs b/src/Fable.Core/Fable.Core.Util.fs index 116e1afe5a..1e28f480ee 100644 --- a/src/Fable.Core/Fable.Core.Util.fs +++ b/src/Fable.Core/Fable.Core.Util.fs @@ -9,6 +9,7 @@ module Util = try failwith "JS only" // try/catch is just for padding so it doesn't get optimized with ex -> raise ex +module Experimental = /// Reads the name of an identifier, a property or a type let nameof(expr: 'a): string = jsNative diff --git a/src/Fable.Core/Fable.Core.fsproj b/src/Fable.Core/Fable.Core.fsproj index f574e70036..17029b3c4d 100644 --- a/src/Fable.Core/Fable.Core.fsproj +++ b/src/Fable.Core/Fable.Core.fsproj @@ -5,7 +5,7 @@ netstandard2.0 true 3.0.0 - 3.0.0-beta-004 + 3.0.0-beta-005 diff --git a/src/Fable.Core/RELEASE_NOTES.md b/src/Fable.Core/RELEASE_NOTES.md index b00547e765..e2b830d7f6 100644 --- a/src/Fable.Core/RELEASE_NOTES.md +++ b/src/Fable.Core/RELEASE_NOTES.md @@ -1,3 +1,7 @@ +### 3.0.0-beta-005 + +* Move `nameof` operators to Experimental module + ### 3.0.0-beta-004 * Move JS extensions to Fable.Core.Extensions file diff --git a/src/fable-compiler/RELEASE_NOTES.md b/src/fable-compiler/RELEASE_NOTES.md index 9241333bb7..a6e5495c41 100644 --- a/src/fable-compiler/RELEASE_NOTES.md +++ b/src/fable-compiler/RELEASE_NOTES.md @@ -1,4 +1,13 @@ -### 2.2.0-beta-017 +### 2.2.0-beta-018 + +* Fix #1784: Decimal.ToString @ncave +* Fix #1785 CancellationToken.Register +* Fix #1782: Map.count +* Fix #1779: Local function imports +* Remove duplicated sources +* Lock Console.Out when writing + +### 2.2.0-beta-016 * Fix #1769: Handle empty strings when parsing dates @Zaid-Ajaj * Raise type resolve error for non-inlined functions requiring Type.Name @Zaid-Ajaj diff --git a/src/fable-compiler/package-lock.json b/src/fable-compiler/package-lock.json index 61001608e3..2030d277aa 100644 --- a/src/fable-compiler/package-lock.json +++ b/src/fable-compiler/package-lock.json @@ -1,6 +1,6 @@ { "name": "fable-compiler", - "version": "2.2.0-beta-017", + "version": "2.2.0-beta-018", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/fable-compiler/package.json b/src/fable-compiler/package.json index b9f6d84239..8fa8023250 100644 --- a/src/fable-compiler/package.json +++ b/src/fable-compiler/package.json @@ -1,6 +1,6 @@ { "name": "fable-compiler", - "version": "2.2.0-beta-017", + "version": "2.2.0-beta-018", "main": "dist/index.js", "description": "Fable compiler", "keywords": [ diff --git a/tests/Main/ArithmeticTests.fs b/tests/Main/ArithmeticTests.fs index b69104bd4f..37f6d1e518 100644 --- a/tests/Main/ArithmeticTests.fs +++ b/tests/Main/ArithmeticTests.fs @@ -111,16 +111,21 @@ let tests = equal (string 0.00123M, "0.00123") equal (string 0.00012M, "0.00012") equal (string 0.00001M, "0.00001") - equal (string 0.00000M, "0.00000") equal (string 0.12300M, "0.12300") equal (string 0.0M, "0.0") equal (string 0M, "0") equal (string 1M, "1") equal (string -1M, "-1") - equal (string 00000000000000000000000000000.M, "0") - equal (string 0.0000000000000000000000000000M, "0.0000000000000000000000000000") equal (string 79228162514264337593543950335M, "79228162514264337593543950335") equal (string -79228162514264337593543950335M, "-79228162514264337593543950335") + // When compiling with fable-compiler-js, the non-significant zeroes are discarded + // equal (string 0.00000M, "0.00000") + // equal (string 00000000000000000000000000000.M, "0") + // equal (string 0.0000000000000000000000000000M, "0.0000000000000000000000000000") + let trim (x: string) = match x.IndexOf('.') with i when i > 0 -> x.[..i-1] | _ -> x + equal (string 0.00000M |> trim, "0") + equal (string 00000000000000000000000000000.M |> trim, "0") + equal (string 0.0000000000000000000000000000M |> trim, "0") testCase "Decimal precision is kept" <| fun () -> let items = [ 290.8M diff --git a/tests/Main/JsInteropTests.fs b/tests/Main/JsInteropTests.fs index 15a6133e7f..8e776ca040 100644 --- a/tests/Main/JsInteropTests.fs +++ b/tests/Main/JsInteropTests.fs @@ -6,6 +6,7 @@ open Util.Testing #if FABLE_COMPILER open Fable.Core open Fable.Core.JsInterop +open Fable.Core.Experimental [] module GlobalModule =