Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.0 #2800

Merged
merged 34 commits into from
Mar 27, 2023
Merged

v6.0 #2800

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ea60b22
Extend logging and verbosity options (#2693)
dawedawe Jan 15, 2023
e1c0926
Sunset MultilineBlockBracketsOnSameColumn & ExperimentalStroustrupSty…
dawedawe Jan 20, 2023
240b135
Move FormatConfig into Fantomas.Core namespace. (#2736)
nojaf Jan 20, 2023
43d47fc
Let the icons (green, orange, ...) in the explanation be rendered. (#…
dawedawe Jan 23, 2023
bfaf6af
Initial cursor (#2739)
nojaf Jan 24, 2023
05263a0
Update output for copy-and-update expression for Stroustrup (#2748)
josh-degraw Jan 31, 2023
3bc97eb
Refactor IsStroustrupStyleExpr and isStroustrupStyleType into Context…
josh-degraw Feb 1, 2023
9b2e32c
Drop `Experimental` prefix from `ExperimentalStroustrup`. (#2755)
josh-degraw Feb 1, 2023
43c5e0b
Expose SyntaxOak API (#2758)
edgarfgp Feb 1, 2023
ac3b8ac
Extract setting for preference of newline placement for computation e…
josh-degraw Feb 2, 2023
c83a7d1
Remove F# option from public API. (#2759)
nojaf Feb 3, 2023
7bcd5a5
Adds naive parallel formatting implementation.
TheAngryByrd Feb 4, 2023
e528cc6
Add separate CodeFormatter.FormatDocumentAsync overloads with cursor …
DedSec256 Feb 4, 2023
9681ea5
Add release notes for 6.0.0-alpha-003.
nojaf Feb 4, 2023
ea8af47
Consolidate and share logic for Records and AnonymousRecords (#2750)
josh-degraw Feb 8, 2023
77ca940
Add Spectr.Console (#2765)
nojaf Feb 10, 2023
691100c
Consolidate records part two (#2766)
nojaf Feb 11, 2023
73fa7d7
Upgrade guide (#2767)
nojaf Feb 12, 2023
770e361
Update GeneratingCode.fsx to use the Oak model. (#2769)
nojaf Feb 14, 2023
78b4c8b
Always process folder recursive. (#2775)
nojaf Feb 18, 2023
82ffbaf
Move profile logic to Format.fs and use Spectre (#2770)
dawedawe Feb 20, 2023
91253aa
Don't hook up SerilogTraceListener in FantomasDaemon. (#2777)
nojaf Feb 22, 2023
0a84d82
Add release notes for 6.0.0-alpha-004.
nojaf Feb 22, 2023
5ea3fdb
Fix record type generation for stroustrup types with members (#2773)
josh-degraw Feb 23, 2023
0c73517
Fix handling of AppExpr with a single stroustrup record (#2747)
josh-degraw Feb 23, 2023
d96f018
Manually deserialize FormatDocumentResponse. (#2780)
nojaf Feb 24, 2023
392f8db
Add release notes for 6.0.0-alpha-005.
nojaf Feb 24, 2023
118a666
Extract Stroustrup for final list argument into a separate setting. (…
nojaf Mar 6, 2023
5a020e3
Fix Stroustrup record member declaration indent issue (#2788)
josh-degraw Mar 7, 2023
76be1b9
EndsWithSingleListApp & EndsWithDualListApp are enable by IsStroustru…
nojaf Mar 17, 2023
e8106b1
Add release notes for 6.0.0-alpha-006.
nojaf Mar 17, 2023
1aba34c
Remove strict mode (#2798)
nojaf Mar 18, 2023
17deecc
Cursor with defines (#2774)
nojaf Mar 19, 2023
21b11d3
Return string from FormatASTAsync api. (#2799)
nojaf Mar 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
]
},
"fantomas": {
"version": "5.2.0",
"version": "5.2.1",
"commands": [
"fantomas"
]
},
"fsdocs-tool": {
"version": "17.0.0",
"version": "17.2.2",
"commands": [
"fsdocs"
]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:

jobs:
build:

continue-on-error: true
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
Expand Down
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
# Changelog

## [6.0.0-alpha-007] - 2023-03-27

### Changed

* `CodeFormatter.FormatASTAsync` returns a string. [#2799](https://github.com/fsprojects/fantomas/pull/2799)
* Cursor with defines. [#2774](https://github.com/fsprojects/fantomas/pull/2774)

### Removed

* Strict mode. [#2798](https://github.com/fsprojects/fantomas/pull/2798)

## [6.0.0-alpha-006] - 2023-03-17

### Fixed
* Record member declarations can break with Stroustrup enabled. [#2787](https://github.com/fsprojects/fantomas/issues/2787)

### Changed
* Add `fsharp_experimental_elmish` setting. [#2795](https://github.com/fsprojects/fantomas/pull/2795)

## [6.0.0-alpha-005] - 2023-02-24

### Changed
* Fix handling of AppExpr with a single stroustrup record. [#2747](https://github.com/fsprojects/fantomas/pull/2747)
* Inconsistent styling when using Stroustrup with or without member attach to record creation. [#2652](https://github.com/fsprojects/fantomas/issues/2652)

## [6.0.0-alpha-004] - 2023-02-22

### Changed
* Always process folder recursive. [#2768](https://github.com/fsprojects/fantomas/issues/2768)
* Revisit --profile flag. [#2751](https://github.com/fsprojects/fantomas/issues/2751)

### Fixed
* Don't hook up SerilogTraceListener in FantomasDaemon. [#2777](https://github.com/fsprojects/fantomas/pull/2777)

## [6.0.0-alpha-003] - 2023-02-04

### Changed
* Splitting ExperimentalStroustrupStyle to separate settings. [#2276](https://github.com/fsprojects/fantomas/issues/2276)
* Remove F# option from public API. [#2759](https://github.com/fsprojects/fantomas/pull/2759)
* Naive parallel formatting implementation. [#2717](https://github.com/fsprojects/fantomas/pull/2717)
* Add separate CodeFormatter.FormatDocumentAsync overloads with cursor and config. [#2763](https://github.com/fsprojects/fantomas/pull/2763)

## [6.0.0-alpha-002] - 2023-02-01

### Changed
* Update output for copy-and-update expression for Stroustrup. [#2748](https://github.com/fsprojects/fantomas/pull/2748)
* Drop Experimental prefix from ExperimentalStroustrup. [#2755](https://github.com/fsprojects/fantomas/pull/2755)
* Expose initial Oak API. [#2758](https://github.com/fsprojects/fantomas/pull/2758)

## [6.0.0-alpha-001] - 2023-01-24

### Changed
* Add `--verbosity` flag. [#2693](https://github.com/fsprojects/fantomas/pull/2693)
* Sunset MultilineBlockBracketsOnSameColumn & ExperimentalStroustrupStyle. [#2710](https://github.com/fsprojects/fantomas/issues/2710)
* Move FormatConfig into Fantomas.Core namespace. [#2736](https://github.com/fsprojects/fantomas/pull/2736)
* Initial cursor API. [#2739](https://github.com/fsprojects/fantomas/pull/2739)

## [5.2.4] - 2023-03-17

### Fixed
Expand Down
18 changes: 9 additions & 9 deletions build.fsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#r "nuget: Fun.Build, 0.1.8"
#r "nuget: Fun.Build, 0.3.1"
#r "nuget: CliWrap, 3.5.0"
#r "nuget: FSharp.Data, 5.0.2"

Expand Down Expand Up @@ -57,14 +57,14 @@ pipeline "Build" {
run (
cleanFolders
[| "bin"
"src/Fantomas.FCS/bin"
"src/Fantomas.FCS/obj"
"src/Fantomas.Core/bin"
"src/Fantomas.Core/obj"
"src/Fantomas/bin"
"src/Fantomas/obj"
"src/Fantomas.Client/bin"
"src/Fantomas.Client/obj" |]
"src/Fantomas.FCS/bin/Release"
"src/Fantomas.FCS/obj/Release"
"src/Fantomas.Core/bin/Release"
"src/Fantomas.Core/obj/Release"
"src/Fantomas/bin/Release"
"src/Fantomas/obj/Release"
"src/Fantomas.Client/bin/Release"
"src/Fantomas.Client/obj/Release" |]
)
}
stage "CheckFormat" { run "dotnet fantomas src docs build.fsx --recurse --check" }
Expand Down
28 changes: 18 additions & 10 deletions docs/content/webcomponents.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {html} from 'https://cdn.skypack.dev/lit';
import {component} from 'https://cdn.skypack.dev/haunted';

function FantomasSettingIcon({type}) {
function FantomasSettingIconCore(type) {
let settingType
switch (type) {
case 'green':
Expand All @@ -20,9 +20,7 @@ function FantomasSettingIcon({type}) {
break;
case 'red':
settingType = {
icon: "bi-x-circle-fill",
color: "red-recommendation",
tooltip: "You shouldn't use this setting."
icon: "bi-x-circle-fill", color: "red-recommendation", tooltip: "You shouldn't use this setting."
}
break;
case 'gr':
Expand All @@ -35,7 +33,7 @@ function FantomasSettingIcon({type}) {
data-bs-title="${tooltip}"
src="${root}/images/gresearch.svg" alt="G-Research logo"/>`;
default:
throw `The "type" can only be "green", "orange", "red" or "gr". Found "${type}"`;
throw "The \"type\" can only be \"green\", \"orange\", \"red\" or \"gr\"";
}
return html`<i class="bi ${settingType.icon} ${settingType.color} me-2"
data-bs-toggle="tooltip" data-bs-custom-class="${type}-tooltip"
Expand All @@ -56,19 +54,29 @@ function Navigation({next, previous}) {
function FantomasSetting({name, green, orange, red, gr}) {
return html`
<div class="d-flex align-items-center my-2">
${green && FantomasSettingIcon({type: "green"})}
${orange && FantomasSettingIcon({type: "orange"})}
${red && FantomasSettingIcon({type: "red"})}
${gr && FantomasSettingIcon({type: "gr"})}
${green && FantomasSettingIconCore('green')}
${orange && FantomasSettingIconCore('orange')}
${red && FantomasSettingIconCore('red')}
${gr && FantomasSettingIconCore('gr')}
<h4 id="${name}" class="m-0">
<a href="#${name}">${name}</a>
</h4>
</div>`
}

function FantomasSettingIcon({green, orange, red, gr}) {
return html`
${green && FantomasSettingIconCore('green')}
${orange && FantomasSettingIconCore('orange')}
${red && FantomasSettingIconCore('red')}
${gr && FantomasSettingIconCore('gr')}
`
}

customElements.define('fantomas-setting-icon', component(FantomasSettingIcon, {
useShadowDOM: false, observedAttributes: ['type']
useShadowDOM: false, observedAttributes: ['green', 'orange', 'red', 'gr']
}));

customElements.define('fantomas-setting', component(FantomasSetting, {
useShadowDOM: false, observedAttributes: ['name', 'green', 'orange', 'red', 'gr']
}));
Expand Down
6 changes: 5 additions & 1 deletion docs/docs/contributors/Solution Structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ graph TD
B --> D[Fantomas.Benchmarks]
B --> E[Fantomas.Core.Tests]
C --> F[Fantomas.Tests]
G[Fantomas.Client]
G[Fantomas.Client] --> H[Fantomas.Client.Tests]
</div>

## Fantomas.FCS
Expand Down Expand Up @@ -57,4 +57,8 @@ A suite of unit tests that target the core formatting functionalities of `Fantom

A suite of end-to-end tests that run the actual `fantomas` command line application.

## Fantomas.Client.Tests

A suite of end-to-end tests that will verify the `Fantomas.Client` code against released versions of `fantomas`.

<fantomas-nav previous="./Getting%20Started.html" next="./Transforming.html"></fantomas-nav>
Loading