Skip to content

Commit a48d4bf

Browse files
Merge branch 'master' into quotations
2 parents d5227d6 + 5fd5c47 commit a48d4bf

File tree

137 files changed

+3313
-2108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+3313
-2108
lines changed

.docker/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
FROM gitpod/workspace-full:latest
22

3-
USER root
4-
5-
# Add here the instruction who needs root user
6-
7-
83
USER gitpod
94

10-
# Install dotnet core
11-
ENV PATH=$HOME/.dotnet:$PATH
12-
RUN wget https://dotnetwebsite.azurewebsites.net/download/dotnet-core/scripts/v1/dotnet-install.sh && \
13-
bash dotnet-install.sh -v 3.1.201 && \
14-
rm -rf dotnet-install.sh;
5+
# Install .NET Core 3.1 SDK binaries on Ubuntu 20.04
6+
# Configuration adapted from: https://github.com/gitpod-io/workspace-images/blob/197b9ad25ed4b4af2b07facb62518f52d7715a07/dotnet/Dockerfile
7+
# In order to get the download link:
8+
# 1. Go to: https://dotnet.microsoft.com/download/dotnet-core
9+
# 2. Select the version you want to download
10+
# 3. Choose "Binaries" x64
11+
# 4. In the new tab close the popup window
12+
# 5. Copy the "Direct link" shown on the page and replace the URL in this file
13+
RUN mkdir -p /home/gitpod/dotnet && curl -fsSL https://download.visualstudio.microsoft.com/download/pr/0c795076-b679-457e-8267-f9dd20a8ca28/02446ea777b6f5a5478cd3244d8ed65b/dotnet-sdk-3.1.300-linux-x64.tar.gz | tar xz -C /home/gitpod/dotnet
14+
ENV DOTNET_ROOT=/home/gitpod/dotnet
15+
ENV PATH=$PATH:/home/gitpod/dotnet

.vscode/launch.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"name": ".NET Core Launch (console)",
99
"type": "coreclr",
1010
"request": "launch",
11-
"preLaunchTask": "build",
12-
"program": "${workspaceRoot}/src/dotnet/Fable.Compiler/bin/Debug/netcoreapp2.1/dotnet-fable.dll",
11+
"program": "${workspaceRoot}/src/Fable.Cli/bin/Debug/netcoreapp2.1/Fable.Cli.dll",
1312
"args": ["fable-splitter", "--args", "-c tests/splitter.config.js"],
1413
"cwd": "${workspaceRoot}",
1514
"stopAtEntry": false,
@@ -51,7 +50,7 @@
5150
"name": "bench-compile (Node)",
5251
"program": "${workspaceRoot}/src/fable-standalone/test/bench-compiler/out-node/app.js",
5352
// "args": ["${workspaceRoot}/tests/Main/Fable.Tests.fsproj", "out-tests", "--commonjs"],
54-
"args": ["${workspaceRoot}/../fable-test/fable-test.fsproj", "out-test", "--commonjs", "--optimize-fcs"],
53+
"args": ["${workspaceRoot}/../fable-test/fable-test.fsproj", "out-test", "--typescript"],
5554
"cwd": "${workspaceRoot}/src/fable-standalone/test/bench-compiler"
5655
},
5756
{
@@ -60,7 +59,7 @@
6059
"name": "bench-compile (.NET)",
6160
"program": "${workspaceFolder}/src/fable-standalone/test/bench-compiler/bin/Debug/netcoreapp2.1/bench-compiler.dll",
6261
// "args": ["${workspaceRoot}/tests/Main/Fable.Tests.fsproj", "out-tests", "--commonjs"],
63-
"args": ["${workspaceRoot}/../fable-test/fable-test.fsproj", "out-test", "--commonjs", "--optimize-fcs"],
62+
"args": ["${workspaceRoot}/../fable-test/fable-test.fsproj", "out-test", "--typescript"],
6463
"cwd": "${workspaceFolder}/src/fable-standalone/test/bench-compiler"
6564
},
6665
{

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "3.1.201"
3+
"version": "3.1.300"
44
}
55
}

package-lock.json

Lines changed: 933 additions & 1082 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212
},
1313
"dependencies": {
1414
"@babel/cli": "^7.8.4",
15-
"@babel/core": "^7.9.0",
16-
"@babel/plugin-transform-modules-commonjs": "^7.9.0",
17-
"@babel/preset-env": "^7.9.0",
15+
"@babel/core": "^7.9.6",
16+
"@babel/plugin-transform-modules-commonjs": "^7.9.6",
17+
"@babel/preset-env": "^7.9.6",
1818
"@babel/register": "^7.9.0",
19-
"@types/node": "^13.11.1",
19+
"@types/node": "^14.0.5",
2020
"babel-loader": "^8.1.0",
2121
"concurrently": "^5.1.0",
2222
"download-cli": "^1.1.1",
2323
"fable-babel-plugins": "^2.3.0",
24-
"fable-compiler": "^2.5.1",
24+
"fable-compiler": "^2.9.0",
2525
"fable-compiler-js": "^1.3.1",
2626
"fable-loader": "^2.1.9",
2727
"fable-splitter": "^2.1.13",
2828
"ghreleases": "^3.0.2",
2929
"mocha": "^7.1.1",
3030
"nodemon": "^2.0.2",
31-
"rollup": "^2.6.1",
32-
"terser": "^4.6.11",
33-
"tslint": "^6.1.1",
34-
"typescript": "^3.8.3",
35-
"webpack": "^4.42.1",
31+
"rollup": "^2.10.8",
32+
"terser": "^4.7.0",
33+
"tslint": "^6.1.2",
34+
"typescript": "^3.9.3",
35+
"webpack": "^4.43.0",
3636
"webpack-cli": "^3.3.11"
3737
},
3838
"devDependencies": {

src/Fable.Cli/Fable.Cli.fsproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<Reference Include="../../lib/fcs/FSharp.Compiler.Service.dll" />
2727
</ItemGroup>
2828
<ItemGroup>
29-
<PackageReference Include="Dotnet.ProjInfo" Version="0.36.0" />
30-
<PackageReference Include="FSharp.Core" Version="4.7.1" />
31-
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
29+
<PackageReference Include="Dotnet.ProjInfo" Version="0.39.1" />
30+
<PackageReference Include="FSharp.Core" Version="4.7.2" />
31+
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
3232
</ItemGroup>
3333
</Project>

src/Fable.Cli/Parser.fs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ type Message =
1111
define: string[]
1212
typedArrays: bool
1313
clampByteArrays: bool
14+
classTypes: bool
15+
typescript: bool
1416
extra: IDictionary<string,string> }
1517

1618
let private parseStringArray (def: string[]) (key: string) (o: JObject) =
@@ -53,6 +55,8 @@ let private parseDic (key: string) (o: JObject): IDictionary<string,string> =
5355
let toCompilerOptions (msg: Message): CompilerOptions =
5456
{ typedArrays = msg.typedArrays
5557
clampByteArrays = msg.clampByteArrays
58+
classTypes = msg.classTypes
59+
typescript = msg.typescript
5660
debugMode = Array.contains "DEBUG" msg.define
5761
verbosity = GlobalParams.Singleton.Verbosity
5862
outputPublicInlinedFunctions = Array.contains "FABLE_REPL_LIB" msg.define
@@ -74,4 +78,6 @@ let parse (msg: string) =
7478
|> Array.distinct
7579
typedArrays = parseBoolean true "typedArrays" json
7680
clampByteArrays = parseBoolean false "clampByteArrays" json
81+
classTypes = parseBoolean false "classTypes" json
82+
typescript = parseBoolean false "typescript" json
7783
extra = parseDic "extra" json }

src/Fable.Cli/ProjectCracker.fs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,10 @@ let fullCrack (projFile: string): CrackedFsproj =
268268
projRefs |> List.choose (fun projRef ->
269269
// Remove dllRefs corresponding to project references
270270
let projName = Path.GetFileNameWithoutExtension(projRef)
271-
if projName = "Fable.Core" then None
272-
else
273-
let removed = dllRefs.Remove(projName)
274-
if not removed then
275-
Log.always("Couldn't remove project reference " + projName + " from dll references")
276-
Path.normalizeFullPath projRef |> Some)
271+
let removed = dllRefs.Remove(projName)
272+
if not removed then
273+
Log.always("Couldn't remove project reference " + projName + " from dll references")
274+
Path.normalizeFullPath projRef |> Some)
277275
let fablePkgs =
278276
let dllRefs' = dllRefs |> Seq.map (fun (KeyValue(k,v)) -> k,v) |> Seq.toArray
279277
dllRefs' |> Seq.choose (fun (dllName, dllPath) ->

src/Fable.Cli/Util.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace Fable.Cli
22

33
module Literals =
44

5-
let [<Literal>] VERSION = "2.8.1"
5+
let [<Literal>] VERSION = "2.10.0"
66
let [<Literal>] CORE_VERSION = "2.1.0"
77
let [<Literal>] DEFAULT_PORT = 61225
88
let [<Literal>] FORCE = "force:"

src/Fable.Core/Fable.Core.JsInterop.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ let importSideEffects (path: string): unit = jsNative
8282
let importDynamic<'T> (path: string): JS.Promise<'T> = jsNative
8383

8484
/// Imports a reference from an external file dynamically at runtime
85-
/// ATENTION: Needs fable-compiler 2.3, pass the reference directly in argument position (avoid pipes)
85+
/// ATTENTION: Needs fable-compiler 2.3, pass the reference directly in argument position (avoid pipes)
8686
let importValueDynamic (x: 'T): JS.Promise<'T> = jsNative
8787

8888
/// Used when you need to send an F# record to a JS library accepting only plain JS objects (POJOs)

0 commit comments

Comments
 (0)