Skip to content

Commit

Permalink
Updated dependencies (#3880)
Browse files Browse the repository at this point in the history
* Updated dependencies

* Updated Dart and tools dependencies

* Updated Fantomas formatting

* Updated Build dependencies
  • Loading branch information
ncave authored Aug 19, 2024
1 parent 0df9b83 commit 291c69f
Show file tree
Hide file tree
Showing 35 changed files with 778 additions and 703 deletions.
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"isRoot": true,
"tools": {
"fantomas": {
"version": "6.2.3",
"version": "6.3.11",
"commands": [
"fantomas"
]
},
"husky": {
"version": "0.6.4",
"version": "0.7.1",
"commands": [
"husky"
]
},
"fsharp-analyzers": {
"version": "0.24.0",
"version": "0.27.0",
"commands": [
"fsharp-analyzers"
]
Expand Down
868 changes: 543 additions & 325 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
"posttest-ts": "mocha build/tests/TypeScriptCompiled/build/tests/TypeScript -reporter dot -t 10000"
},
"dependencies": {
"@types/node": "^20.12.4",
"@types/node": "^22.4.0",
"concurrently": "^8.2.2",
"ghreleases": "^3.0.2",
"mocha": "^10.4.0",
"nodemon": "^3.1.0",
"rollup": "^4.14.0",
"terser": "^5.30.3",
"typescript": "^5.4.4"
"mocha": "^10.7.3",
"nodemon": "^3.1.4",
"rollup": "^4.21.0",
"terser": "^5.31.6",
"typescript": "^5.5.4"
},
"devDependencies": {
"markdownlint-cli": "^0.38.0"
"markdownlint-cli": "^0.41.0"
}
}
4 changes: 2 additions & 2 deletions src/Fable.Analyzers/Fable.Analyzers.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="8.0.100"/>
<PackageReference Include="FSharp.Analyzers.SDK" Version="0.24.0"/>
<PackageReference Update="FSharp.Core" Version="8.0.400"/>
<PackageReference Include="FSharp.Analyzers.SDK" Version="0.27.0"/>
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions src/Fable.Build/Fable.Build.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
<Compile Include="Main.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="8.0.100" />
<PackageReference Update="FSharp.Core" Version="8.0.400" />
<PackageReference Include="BlackFox.CommandLine" Version="1.0.0" />
<PackageReference Include="EluciusFTW.SpectreCoff" Version="0.47.28" />
<PackageReference Include="Fake.IO.FileSystem" Version="6.0.0" />
<PackageReference Include="SimpleExec" Version="11.0.0" />
<PackageReference Include="Fake.IO.FileSystem" Version="6.1.0" />
<PackageReference Include="SimpleExec" Version="12.0.0" />
<PackageReference Include="Spectre.Console" Version="0.47.0" />
<PackageReference Include="Thoth.Json.Net" Version="11.0.0" />
<PackageReference Include="Thoth.Json.Net" Version="12.0.0" />
<PackageReference Include="Octokit" Version="8.0.0" />
<PackageReference Include="Semver" Version="2.3.0" />
</ItemGroup>
Expand Down
6 changes: 1 addition & 5 deletions src/Fable.Cli/CustomLogging.fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ type CustomFormatter(options: IOptionsMonitor<CustomOptions>) as this =
member private _.ReloadLoggerOptions(opts: CustomOptions) = formatterOptions <- opts

override this.Write<'TState>
(
logEntry: inref<LogEntry<'TState>>,
_scopeProvider: IExternalScopeProvider,
textWriter: TextWriter
)
(logEntry: inref<LogEntry<'TState>>, _scopeProvider: IExternalScopeProvider, textWriter: TextWriter)
=
let message = logEntry.Formatter.Invoke(logEntry.State, logEntry.Exception)

Expand Down
41 changes: 22 additions & 19 deletions src/Fable.Cli/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -409,16 +409,19 @@ OUTPUT TYPE: {result.OutputType}
ProjectCracked(cliArgs, result, sourceFiles)

type FableCompileResult =
Result<{|
File: string
OutPath: string
Logs: LogEntry[]
InlineExprs: (string * InlineExpr)[]
WatchDependencies: string[]
|}, {|
File: string
Exception: exn
|}>
Result<
{|
File: string
OutPath: string
Logs: LogEntry[]
InlineExprs: (string * InlineExpr)[]
WatchDependencies: string[]
|},
{|
File: string
Exception: exn
|}
>

type ReplyChannel = AsyncReplyChannel<Result< (* fsharpLogs *) LogEntry[] * FableCompileResult list, exn>>

Expand Down Expand Up @@ -454,14 +457,7 @@ type FableCompilerState =
}

static member Create
(
fableProj,
filesToCompile: string[],
?pathResolver,
?isSilent,
?triggeredByDependency,
?replyChannel
)
(fableProj, filesToCompile: string[], ?pathResolver, ?isSilent, ?triggeredByDependency, ?replyChannel)
=
{
FableProj = fableProj
Expand Down Expand Up @@ -1000,7 +996,14 @@ let private compilationCycle (state: State) (changes: ISet<string>) =
let projCracked, fableCompiler, filesToCompile =
match state.ProjectCrackedAndFableCompiler with
| None ->
let projCracked = ProjectCracked.Init(cliArgs, state.UseMSBuildForCracking)
// #if DEBUG
// let evaluateOnly = true
// #else
let evaluateOnly = false
// #endif
let projCracked =
ProjectCracked.Init(cliArgs, state.UseMSBuildForCracking, evaluateOnly)

projCracked, None, projCracked.SourceFilePaths

| Some(projCracked, fableCompiler) ->
Expand Down
16 changes: 9 additions & 7 deletions src/Fable.Compiler/ProjectCracker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,16 @@ let makeProjectOptions (opts: CrackerOptions) otherOptions sources : FSharpProje
let tryGetFablePackage (opts: CrackerOptions) (dllPath: string) =
let tryFileWithPattern dir pattern =
try
let files = IO.Directory.GetFiles(dir, pattern)

match files.Length with
| 0 -> None
| 1 -> Some files[0]
| _ ->
Log.always ("More than one file found in " + dir + " with pattern " + pattern)
if IO.Directory.Exists dir then
let files = IO.Directory.GetFiles(dir, pattern)

match files.Length with
| 0 -> None
| 1 -> Some files[0]
| _ ->
Log.always ("More than one file found in " + dir + " with pattern " + pattern)
None
else
None
with _ ->
None
Expand Down
4 changes: 1 addition & 3 deletions src/Fable.Compiler/Util.fs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ type CliArgs =

[ "NODE_ENV", nodeEnv ]

type private TypeInThisAssembly =
class
end
type private TypeInThisAssembly = class end

type Agent<'T> private (mbox: MailboxProcessor<'T>, cts: CancellationTokenSource) =
static member Start(f: 'T -> unit) =
Expand Down
8 changes: 2 additions & 6 deletions src/Fable.Core/Fable.Core.Dart.fs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ module DartNullable =
let ofNullable (value: 'T Nullable) : DartNullable<'T> = nativeOnly

[<ImportMember "dart:async">]
type Future<'T> =
interface
end
type Future<'T> = interface end

[<ImportMember "dart:async">]
type Stream<'T> =
interface
end
type Stream<'T> = interface end

// [<ImportMember "dart:core">]
[<Global>]
Expand Down
8 changes: 2 additions & 6 deletions src/Fable.Core/Fable.Core.JS.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ module JSX =
/// The actual representation of JSX elements depend on the framework used.
/// E.g. if using React, JSX.Element will be the same as ReactElement
[<AllowNullLiteral>]
type Element =
class
end
type Element = class end

/// Instantiates a JSX Element with F# code. The `props` argument must be a list literal
/// that can be resolved at compile-time.
Expand Down Expand Up @@ -377,9 +375,7 @@ module JS =
[<Emit("new $0($1...)")>]
abstract Create: ?iterable: seq<'T> -> WeakSet<'T>

and [<AllowNullLiteral>] AsyncIterable =
interface
end
and [<AllowNullLiteral>] AsyncIterable = interface end

and [<AllowNullLiteral>] AsyncIterable<'T> =
inherit AsyncIterable
Expand Down
4 changes: 1 addition & 3 deletions src/Fable.PublishUtils/PublishUtils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ module Platform =

open System.Diagnostics

type private TypeInThisAssembly =
class
end
type private TypeInThisAssembly = class end

let private startProcess workingDir exePath args =
let args = String.concat " " args
Expand Down
24 changes: 3 additions & 21 deletions src/Fable.Transforms/BabelPrinter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ module PrinterExtensions =
type Printer with

member printer.PrintBlock
(
nodes: 'a array,
printNode: Printer -> 'a -> unit,
printSeparator: Printer -> unit,
?skipNewLineAtEnd
)
(nodes: 'a array, printNode: Printer -> 'a -> unit, printSeparator: Printer -> unit, ?skipNewLineAtEnd)
=
let skipNewLineAtEnd = defaultArg skipNewLineAtEnd false
printer.Print("{")
Expand Down Expand Up @@ -420,11 +415,7 @@ module PrinterExtensions =
printer.Print(Array.last parts |> escape)

member printer.PrintJsxElement
(
componentOrTag: Expression,
props: (string * Expression) list,
children: Expression list
)
(componentOrTag: Expression, props: (string * Expression) list, children: Expression list)
=
let printTag =
function
Expand Down Expand Up @@ -1366,16 +1357,7 @@ module PrinterExtensions =
| Some Readonly -> printer.Print("readonly ")

member printer.PrintClassProperty
(
key,
value,
isComputed,
isStatic,
isOptional,
typeAnnotation,
accessModifier,
loc
)
(key, value, isComputed, isStatic, isOptional, typeAnnotation, accessModifier, loc)
=
printer.AddLocation(loc)

Expand Down
27 changes: 3 additions & 24 deletions src/Fable.Transforms/Dart/Dart.fs
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,7 @@ type Statement =
)

static member functionDeclaration
(
name: string,
args: FunctionArg list,
body: Statement list,
returnType: Type,
?genParams: GenericParam list
)
(name: string, args: FunctionArg list, body: Statement list, returnType: Type, ?genParams: GenericParam list)
=
LocalFunctionDeclaration
{
Expand Down Expand Up @@ -425,13 +419,7 @@ type Declaration =
static member variableDeclaration(ident, kind, value) = VariableDeclaration(ident, kind, value)

static member functionDeclaration
(
name: string,
args: FunctionArg list,
body: Statement list,
returnType: Type,
?genParams: GenericParam list
)
(name: string, args: FunctionArg list, body: Statement list, returnType: Type, ?genParams: GenericParam list)
=
FunctionDeclaration
{
Expand All @@ -443,16 +431,7 @@ type Declaration =
}

static member classDeclaration
(
name,
?genParams,
?isAbstract,
?constructor,
?extends,
?implements,
?variables,
?methods
)
(name, ?genParams, ?isAbstract, ?constructor, ?extends, ?implements, ?variables, ?methods)
=
Class(
name,
Expand Down
31 changes: 4 additions & 27 deletions src/Fable.Transforms/Dart/DartPrinter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ module PrinterExtensions =
this.AddLog(msg, Severity.Warning, ?range = range)

member printer.PrintBlock
(
nodes: 'a list,
printNode: Printer -> 'a -> unit,
?printSeparator: Printer -> unit,
?skipNewLineAtEnd
)
(nodes: 'a list, printNode: Printer -> 'a -> unit, ?printSeparator: Printer -> unit, ?skipNewLineAtEnd)
=
let printSeparator = defaultArg printSeparator (fun _ -> ())
let skipNewLineAtEnd = defaultArg skipNewLineAtEnd false
Expand Down Expand Up @@ -164,13 +159,7 @@ module PrinterExtensions =
printSegment printer value 0 value.Length

member printer.PrintList
(
left: string,
right: string,
items: 'a list,
printItemAndSeparator: ListPos -> 'a -> unit,
?skipIfEmpty
)
(left: string, right: string, items: 'a list, printItemAndSeparator: ListPos -> 'a -> unit, ?skipIfEmpty)
=
let skipIfEmpty = defaultArg skipIfEmpty false

Expand Down Expand Up @@ -203,14 +192,7 @@ module PrinterExtensions =
printer.Print(right)

member printer.PrintList
(
left: string,
separator: string,
right: string,
items: 'a list,
printItem: 'a -> unit,
?skipIfEmpty
)
(left: string, separator: string, right: string, items: 'a list, printItem: 'a -> unit, ?skipIfEmpty)
=
let printItem pos item =
printItem item
Expand Down Expand Up @@ -1047,12 +1029,7 @@ module PrinterExtensions =
printer.PrintFunctionBody(?body = body, ?isModuleOrClassMember = isModuleOrClassMember)

member printer.PrintVariableDeclaration
(
ident: Ident,
kind: VariableDeclarationKind,
?value: Expression,
?isLate
)
(ident: Ident, kind: VariableDeclarationKind, ?value: Expression, ?isLate)
=
let value =
match value with
Expand Down
Loading

0 comments on commit 291c69f

Please sign in to comment.