Skip to content

Commit 58b3ff2

Browse files
authored
Merge pull request #177 from mlabs-haskell/jared/typescript-testsuite
Typescript testsuite
2 parents d109a36 + 9b4d0f5 commit 58b3ff2

File tree

35 files changed

+3891
-48
lines changed

35 files changed

+3891
-48
lines changed

docs/typescript-plutus/api/lbf/build.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ _:
22
{
33
perSystem = { config, ... }:
44
let
5-
tsFlake =
5+
lbf-plutus-sample-project-typescript =
66
config.lbf-nix.lbfPlutusTypescript {
77
name = "lbf-plutus-sample-project";
88
src = ./.;
@@ -11,7 +11,7 @@ _:
1111
in
1212
{
1313
packages = {
14-
inherit (tsFlake.packages) lbf-plutus-sample-project-typescript lbf-plutus-sample-project-typescript-tgz;
14+
inherit lbf-plutus-sample-project-typescript;
1515
};
1616
};
1717
}

docs/typescript-plutus/build.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
src = ./.;
1111

1212
npmExtraDependencies = [
13-
config.packages.lbf-plutus-sample-project-typescript-tgz
13+
config.packages.lbf-plutus-sample-project-typescript
1414
];
1515

1616
devShellTools = config.settings.shell.tools;

docs/typescript-prelude/api/lbf/build.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ _:
22
{
33
perSystem = { config, ... }:
44
let
5-
tsFlake =
5+
lbf-prelude-sample-project-typescript =
66
config.lbf-nix.lbfPreludeTypescript {
77
name = "lbf-prelude-sample-project";
88
src = ./.;
@@ -11,7 +11,7 @@ _:
1111
in
1212
{
1313
packages = {
14-
inherit (tsFlake.packages) lbf-prelude-sample-project-typescript lbf-prelude-sample-project-typescript-tgz;
14+
inherit lbf-prelude-sample-project-typescript;
1515
};
1616
};
1717
}

docs/typescript-prelude/build.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
name = "prelude-sample-project";
1010
src = ./.;
1111
npmExtraDependencies = [
12-
config.packages.lbf-prelude-sample-project-typescript-tgz
12+
config.packages.lbf-prelude-sample-project-typescript
1313
];
1414

1515
devShellTools = config.settings.shell.tools;

extras/lbf-nix/lbf-typescript.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,4 @@ let
276276
});
277277
});
278278
in
279-
lbTypescriptFlake
279+
lbTypescriptFlake.packages."${name}-typescript-tgz"

flake.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@
8888
./testsuites/lbt-prelude/lbt-prelude-haskell/build.nix
8989
./testsuites/lbt-prelude/lbt-prelude-purescript/build.nix
9090
./testsuites/lbt-prelude/lbt-prelude-rust/build.nix
91+
./testsuites/lbt-prelude/lbt-prelude-typescript/build.nix
9192
./testsuites/lbt-plutus/api/build.nix
9293
./testsuites/lbt-plutus/golden/build.nix
9394
./testsuites/lbt-plutus/lbt-plutus-haskell/build.nix
9495
./testsuites/lbt-plutus/lbt-plutus-purescript/build.nix
96+
./testsuites/lbt-plutus/lbt-plutus-typescript/build.nix
9597
./testsuites/lbt-plutus/lbt-plutus-plutarch/build.nix
9698
./testsuites/lbt-plutus/lbt-plutus-rust/build.nix
9799
./experimental/build.nix

lambda-buffers-codegen/src/LambdaBuffers/Codegen/Typescript/Print/LamVal.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,8 @@ printCtorE ((_, tyN), (ctorN, _)) prodVals = do
450450
[ lbrace
451451
, indent 2 $
452452
vsep
453-
[ "name" <+> colon <+> pretty '\'' <> ctorNDoc <> pretty '\'' <> comma
454-
, "fields" <+> colon <+> singleDoc
453+
[ "fields" <+> colon <+> singleDoc <> comma
454+
, "name" <+> colon <+> pretty '\'' <> ctorNDoc <> pretty '\''
455455
]
456456
, rbrace
457457
]
@@ -461,8 +461,8 @@ printCtorE ((_, tyN), (ctorN, _)) prodVals = do
461461
[ lbrace
462462
, indent 2 $
463463
vsep
464-
[ "name" <+> colon <+> pretty '\'' <> ctorNDoc <> pretty '\'' <> comma
465-
, "fields" <+> colon <+> encloseSep lbracket rbracket comma prodDocs
464+
[ "fields" <+> colon <+> encloseSep lbracket rbracket comma prodDocs <> comma
465+
, "name" <+> colon <+> pretty '\'' <> ctorNDoc <> pretty '\''
466466
]
467467
, rbrace
468468
]

libs/build.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
configs = [ "${config.packages.codegen-configs}/purescript-prelude-base.json" ];
2929
};
3030

31-
lbf-prelude-typescript = (config.lbf-nix.lbfTypescript {
31+
lbf-prelude-typescript = config.lbf-nix.lbfTypescript {
3232
name = "lbf-prelude";
3333
src = ./lbf-prelude;
3434
files = [ "Prelude.lbf" ];
@@ -38,7 +38,7 @@
3838
[
3939
config.packages.lbr-prelude-typescript-tgz
4040
];
41-
}).packages.lbf-prelude-typescript-tgz;
41+
};
4242

4343
lbf-prelude-plutarch = config.lbf-nix.lbfPlutarch' {
4444
name = "lbf-prelude-plutarch";
@@ -108,7 +108,7 @@
108108
];
109109
};
110110

111-
lbf-plutus-typescript = (config.lbf-nix.lbfTypescript {
111+
lbf-plutus-typescript = config.lbf-nix.lbfTypescript {
112112
name = "lbf-plutus";
113113
src = ./lbf-plutus;
114114
files = [ "Plutus/V1.lbf" "Plutus/V2.lbf" ];
@@ -123,7 +123,7 @@
123123
config.packages.lbf-prelude-typescript
124124
config.packages.lbr-plutus-typescript-tgz
125125
];
126-
}).packages.lbf-plutus-typescript-tgz;
126+
};
127127

128128
lbf-plutus-rust = config.lbf-nix.lbfRust {
129129
name = "lbf-plutus";

runtimes/typescript/lbr-plutus/package-lock.json

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

runtimes/typescript/lbr-plutus/src/LambdaBuffers/PlutusData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ export interface IsPlutusDataInstances {
5454
dictA: PlutusLedgerApiPlutusData.IsPlutusData<A>,
5555
) => PlutusLedgerApiPlutusData.IsPlutusData<Prelude.List<A>>;
5656
}
57+
IsPlutusData[LbrPrelude.List] =
58+
PlutusLedgerApiPreludeInstances.isPlutusDataList;

0 commit comments

Comments
 (0)