Fable

F# to JavaScript, TypeScript, Python, Rust and Dart Compiler

MIT License

Downloads
6.4K
Stars
2.8K
Committers
164

Bot releases are hidden (Show)

Fable - 4.16.0 Latest Release

Published by MangelMaxime 7 months ago

Added

  • [JS/TS] Add ConditionalWeakTable (by @chkn)
Fable - 4.15.0

Published by MangelMaxime 7 months ago

Fixed

  • [JS/TS] Fixed DateTime.Add for DateTimeKind.Unspecified (by @ncave)
  • [Rust] Fixed deprecated NaiveDateTime usage in DateTime (by @ncave)
  • [Rust] Fixed generic interface implementation types (by @ncave)
  • [Rust] Fixed Dictionary constructor from IEnumerable (by @ncave)
  • [Rust] Fixed Seq.cast support for arrays and lists (by @ncave)
  • [JS/TS] Boolean.tryParse should not crash on null string (@goswinr)

Added

  • [Rust] Added some boxing support (by @ncave)
Fable - 4.14.0

Published by MangelMaxime 8 months ago

Changed

  • GH-3772 [JS/TS] Split replacement for DateTime and DateTimeOffset (by @MangelMaxime)

Fixed

  • GH-3769 [All] Local plugin build does not run indefinably. (by @nojaf)
  • GH-3769 [JS/TS] Types hidden by signature files should not be exported. (by @nojaf)
  • GH-3772 [JS/TS] Re-implement DateTime.ToString custom format handling (by @MangelMaxime)
    It now supports all custom format specifiers, and behave as if CultureInfo.InvariantCulture was used (Fable does not support Globalization).
  • GH-3772 [JS/TS] Make compilation fails if calling DateTime constructor with microseconds (by @MangelMaxime)
    JavaScript Date does not support microseconds, we need to wait for Temporal to be widely supported before reconsidering this.
  • GH-3773 [Python] Fix DateTime custom format fffffff and FFFFFFF (by @MangelMaxime)
Fable - 4.13.0

Published by MangelMaxime 8 months ago

Added

JavaScript

  • GH-3759 Add StringBuilder.Chars (by @MangelMaxime)
  • Added range overload for String.ToCharArray (by @ncave)

Rust

  • GH-3761 Added StringBuilder.Chars, StringBuilder.Remove and tests. (by @ncave)

Dart

  • GH-3761 Added StringBuilder support and tests. (by @ncave)

Changed

JavaScript

  • GH-3761 Updated StringBuilder to remove allocations where possible. (by @ncave)

Python

  • GH-3761 Updated StringBuilder to remove allocations where possible. (by @ncave)

Fixed

JavaScript

  • GH-3748 Accessing an array out of bounds should emit an exception (by @MangelMaxime)
  • GH-3748 Setting an array out of bounds should emit an exception (by @MangelMaxime)
  • GH-3761 Fixed incorrect StringBuilder.Remove implementation. (by @ncave)

Python

  • GH-3761 Fixed incorrect StringBuilder.Remove implementation. (by @ncave)
Fable - 4.12.2

Published by MangelMaxime 8 months ago

Changed

  • Update to Fable.AST 4.4.0
Fable - 4.12.1

Published by MangelMaxime 8 months ago

Fixed

JavaScript

  • Embed fable-library-js in Fable DLL (by @MangelMaxime)
Fable - 4.12.0

Published by MangelMaxime 8 months ago

Added

All

  • GH-3733 GH-3727 Add support for more Result API (by @zprobinson)
    • Result.isOk
    • Result.isError
    • Result.Contains
    • Result.Count
    • Result.DefaultValue
    • Result.DefaultWith
    • Result.Exists
    • Result.Fold
    • Result.FoldBack
    • Result.ForAll
    • Result.Iterate
    • Result.ToArray
    • Result.ToList
    • Result.ToOption
  • GH-3721 Add --test:MSBuildCracker flag allowing to use the experimental MSBuildCracker (by @nojaf)

JavaScript

  • GH-3745 Add support for ListCollector (by @nojaf)
    • instance.Add
    • instance.AddMany
    • instance.AddManyAndClose
    • instance.Close

Changed

JavaScript

  • GH-3749 Rename fable-library to fable-library-js (by @MangelMaxime)

Removed

JavaScript

  • Remove Choice.d.ts from source code of fable-library (by @MangelMaxime)

TypeScript

  • Remove Choice.d.ts from source code of fable-library (by @MangelMaxime)

Fixed

Python

  • GH-3717 Nested type with Custom Equality gives false negative equality (by @dbrattli)
  • Generate assert statements for assert expressions in debug mode (by @dbrattli)

All

  • GH-3744 Fix behaviour when passing --verbose to be consistent with behaviour before changing the logging library (by @nojaf)
Fable - 4.11.0

Published by MangelMaxime 9 months ago

Changed

All

  • GH-3719 Restore dependencies against the .fsproj after evaluating the fable-temp.csproj file (Improves IDE supports) (by @MangelMaxime)
  • Don't delete fable_modules when re-evaluating the project file after a changes has been detected (Improves HMR experience) (by @MangelMaxime)

Fixed

All

  • GH-3723 Fix logger initialisation to allow --version to work (by @MangelMaxime)

JavaScript

  • GH-3716 System.Array.Resize: also handle the case where the array is null (by @chkn)
Fable - 4.10.0

Published by MangelMaxime 9 months ago

Added

Python

  • GH-3663 Complete rewrite of DateTime supports (by @MangelMaxime)
    Special thanks to @dbrattli and @ncave for their help

    • Constructors
      • From (year, month, day) up to (year, month, day, hour, minute, second, millisecond, microsecond) (with and without DateTimeKind)
      • From ticks (with and without DateTimeKind)
    • Instance methods:
      • dt.Year
      • dt.Month
      • dt.Day
      • dt.Hour
      • dt.Minute
      • dt.Second
      • dt.Millisecond
      • dt.Microsecond
      • dt.ToUniversalTime
      • dt.DayOfWeek
      • dt.DayOfYear
      • dt.ToShortDateString
      • dt.ToShortTimeString
      • dt.ToLongDateString
      • dt.ToLongTimeString
      • dt.ToString
      • dt.ToLocalTime
      • dt.Date
      • dt.AddYears
      • dt.AddMonths
      • dt.AddDays
      • dt.AddHours
      • dt.AddMinutes
      • dt.AddSeconds
      • dt.AddMilliseconds
      • dt.AddMicroseconds
      • dt.Kind
    • Static methods:
      • DateTime.Today
      • DateTime.Now
      • DateTime.Now
      • DateTime.UtcNow
      • DateTime.MinValue
      • DateTime.MaxValue
      • DateTime.Parse
      • DateTime.TryParse
      • DateTime.SpecifyKind

JavaScript

  • GH-3715 Add support for System.Array.Resize (by @chkn)

Changed

All

  • GH-3671 Use Microsoft.Extensions.Logging (by @nojaf)
  • GH-3634 Suffix temporary csproj with .fable-temp.csproj and include a comment in the file (by @MangelMaxime)

Dart

  • Fix DateTime.DayOfWeek (by @MangelMaxime)

Fixed

All

  • Fixed function composition types (by @ncave)
  • GH-3668 Normalize fable-library argument (by @nojaf)
  • GH-3682 Support some custom unary math operors (Acos, Asin, Atan, Atan2, Cos, Cosh, Exp, Log, Log2, Log10, Sin, Sinh, Sqrt, Tan, Tanh) (by @PierreYvesR)
  • GH-3603 Port back fixes for missing .gitignore file in the generated fable_modules/ folder (by @MangelMaxime)
  • GH-3684 Re-compile files from fable_modules after changing the project file in watch mode (by @OrfeasZ)

Javascript

  • Fixed 'System.Collections.Generic.Queue' bug (by @PierreYvesR)
  • Fixed instance calls for generic comparers (by @ncave)

Python

  • Fixed nested type with custom hashcode (by @dbrattli)
  • Add 'Double.IsPositiveInfinity' (by @PierreYvesR)
  • GH-3666 Fix for DateTime and TimeSpan addition (by @dbrattli)
  • GH-3663 Fix DateTime.Parse and DateTime.TryParse (by @MangelMaxime)

JavaScript

  • Fix DateTime.Parse when providing a 1 digit hour for PM times (3:5:34 PM) (by @MangelMaxime)

Rust

  • Fixed unary negation for signed integer MinValue (by @ncave)
  • Fixed excluding signature files from imports (by @ncave)
  • Fixed generic try_catch closure trait (by @ncave)
  • Fixed self arg capture in methods (by @ncave)
  • Fixed 'System.Collections.Generic.Queue' bug (by @PierreYvesR)
  • Added support for generic comparers (by @ncave)
Fable - 4.9.0

Published by MangelMaxime 10 months ago

Fixed

Python

  • GH-3655 Fix for Python output file names (by @dbrattli)
  • GH-3660 Fix for decimal to string with culture (by @dbrattli)
Fable - 4.8.1

Published by MangelMaxime 10 months ago

Fixed

All

  • Fix the version reported by Fable (@MangelMaxime)
Fable - 4.8.0

Published by MangelMaxime 10 months ago

Added

Python

  • GH-3645 Add TimeSpan.Parse and TimeSpan.TryParse support to Python (by @MangelMaxime)
  • GH-3649 Fixes for List.sortBy (by @dbrattli)
  • GH-3638 Fixes for Array.sort and Array.sortDescending (by @dbrattli)

Fixed

JavaScript

  • GH-3465 Fix string.IndexOfAny (by @pkese)

Python

  • GH-3465 Fix string.IndexOfAny (by @pkese)

Changed

All

Fable - 4.7.0

Published by MangelMaxime 11 months ago

Added

All

  • Overall performance improvements
    • GH-3620 Removed double-dictionary lookups (by @Thorium)
    • GH-3624 Add G-Research analyzers and fix reported issues (by @nojaf)

Fixed

All

  • GH-3603 Missing .gitignore file in the generated `fable_modules/`` folder (by @MangelMaxime)

Python

  • GH-3617: Fix comparaison between list option when one is None (by @mangelmaxime)
  • GH-3615: Fix remove from dictionary with tuple as key (by @dbrattli)
  • GH-3598: Using obj () now generated an empty dict instead of None (by @dbrattli)
  • GH-3597: Do not translate .toString methods to str (by @dbrattli)
  • GH-3610: Cleanup Python regex handling (by @dbrattli)
  • GH-3628: System.DateTime.Substract not correctly transpiled (by @dbrattli)
  • GH-3640: All union cases return the same hash code (by @dbrattli)
Fable - 4.6.0

Published by MangelMaxime 11 months ago

Added

All

  • Fix #3584: Unit type compiles to undeclared variable (by @ncave)

Python

  • Support DateTime(..., DateTimeKind.Utc).ToString("O") (by @MangelMaxime)

Rust

  • Added Guid.TryParse, Guid.ToByteArray (by @ncave)

Changed

All

  • Updated .NET metadata to 8.0.100 (by @ncave)

Fixed

Python

  • Fixed char to string type regression with binary operator (by @dbrattli)
  • Fix DateTime(..., DateTimeKind.Local).ToString("O") (by @MangelMaxime)
  • Fix calling value.ToString(CultureInfo.InvariantCulture) (by @MangelMaxime)
  • Fix #3605: Fix record equality comparison to works with optional fields (by @MangelMaxime and @dbrattli)
  • PR #3608: Rewrite time_span.py allowing for better precision by using a number representation intead of native timedelta. (by @MangelMaxime)
Fable - 4.5.0

Published by MangelMaxime 11 months ago

Changed

Python

  • Use Any type for all non-repeated generic arguments (by @dbrattli)
  • Don't generate unnecessary type type-vars if generic type is replaced by Any (by @dbrattli)
  • Generate new style _T | None instead of Optional[_T] (by @dbrattli)

Rust

  • Support multiple namespaces sharing a prefix in the same file (by @ncave)
  • Support imports with the same namespace across multiple files (by @ncave)

Fixed

JavaScript

  • Fix #3571: [<AttachMembers>] not compatible with f# member this.Item (by @ncave)
Fable - 4.4.1

Published by MangelMaxime 12 months ago

Changed

All

  • Fix #3567: Turn off FCS warning 3560 by default (by @vzarytovskii)

Fixed

Rust

  • Fixed recursive lambda captured idents cloning (by @ncave)
Fable - 4.4.0

Published by MangelMaxime 12 months ago

Changed

All

JavaScript

  • Support (un)curry up to 20 arguments (by @MangelMaxime)

Python

  • Remove support for Python 3.9. Add GH testing for Python 3.12 (by @dbrattli)
  • Support (un)curry up to 20 arguments (by @MangelMaxime)

Dart

  • Support (un)curry up to 20 arguments (by @MangelMaxime)
Fable - 4.3.0

Published by MangelMaxime almost 1 year ago

Added

Python

  • Added Async.StartChild (by @dbrattli)
  • Fix #3482: Revert removal of Py.python and Py.expr_python (by @dbrattli)

Changed

JavaScript

  • Improve error messages for Decimal.Parse, Double.Parse, Int32.Parse, Long.Parse (by @ncave)

Rust

  • Improve error messages for BigInt.Parse, DateOnly.Parse, DateTime.Parse, DateTimeOffset.Parse, Decimal.Parse, TimeOnly.Parse (by @ncave)

Python

  • Improve error messages for Double.Parse, Int32.Parse, Long.Parse (by @ncave)
  • Refactored async trampoline leveraging asyncio mainloop. (by @dbrattli)

Fixed

JavaScript

  • Fix #3541: Interface imported in generated javascript when DU has an interface type constraint (by @ncave)

Python

  • Fixed Async.Parallel (by @dbrattli)
Fable - 4.2.2

Published by MangelMaxime about 1 year ago

Fixed

  • [Python] Fix #3527: Fix error name '...' is not defined (by @dbrattli)
  • [Python] Fix #3496: Python target is confused with class taking a length: int argument (by @dbrattli)
Fable - 4.2.1

Published by MangelMaxime about 1 year ago

  • Fix package to include Fable libraries folders