Skip to content

Commit

Permalink
Update opam to 2.2 and server-reason-react 0.3.1 (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx authored Jul 23, 2024
1 parent 6a187f9 commit 21b4a4b
Show file tree
Hide file tree
Showing 64 changed files with 229 additions and 64 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- main

env:
OPAM_VERSION: 2.2.0
DUNE_PROFILE: release

permissions:
contents: write
pull-requests: write
Expand All @@ -34,9 +38,11 @@ jobs:
uses: actions/setup-node@v3

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
opam-disable-sandboxing: true

- name: Load opam cache when not Windows
if: runner.os != 'Windows'
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
(ppxlib (>= 0.27.0))
(sedlex (>= 3.2))
(melange (>= 3.0.0))
(server-reason-react (>= 0.3.0))
(server-reason-react (>= 0.3.1))
(reason-react (>= 0.14.0))
(alcotest :with-test)
(conf-npm :with-test)
Expand Down
3 changes: 2 additions & 1 deletion packages/ppx/test/css-support/animations.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If this test fail means that the module is not in sync with the ppx

$ dune build

$ dune describe pp ./input.re.ml | refmt --parse ml --print re
$ dune describe pp ./input.re
[@ocaml.ppx.context
{
tool_name: "ppx_driver",
Expand Down Expand Up @@ -43,6 +43,7 @@ If this test fail means that the module is not in sync with the ppx
(0, [|CSS.opacity(0.)|]),
(100, [|CSS.opacity(1.)|]),
|]);

CSS.animationName(CSS.Types.AnimationName.make({js|random|js}));
CSS.animationName(foo);
CSS.animationNames([|foo, bar|]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If this test fail means that the module is not in sync with the ppx

$ dune build

$ dune describe pp ./input.re.ml | refmt --parse ml --print re
$ dune describe pp ./input.re
[@ocaml.ppx.context
{
tool_name: "ppx_driver",
Expand All @@ -41,6 +41,7 @@ If this test fail means that the module is not in sync with the ppx
let elevation1 = `rgba((0, 0, 0, `num(0.03)));
};
};

CSS.backgroundRepeat(`space);
CSS.backgroundRepeat(`round);
CSS.backgroundRepeat(`hv((`repeat, `repeat)));
Expand All @@ -60,6 +61,7 @@ If this test fail means that the module is not in sync with the ppx
CSS.backgroundRepeat(`hv((`round, `noRepeat)));
CSS.backgroundRepeat(`hv((`noRepeat, `noRepeat)));
CSS.backgroundAttachment(`local);

CSS.backgroundClip(`borderBox);
CSS.backgroundClip(`paddingBox);
CSS.backgroundClip(`contentBox);
Expand All @@ -74,10 +76,12 @@ If this test fail means that the module is not in sync with the ppx
CSS.unsafe({js|backgroundSize|js}, {js|10px auto|js});
CSS.unsafe({js|backgroundSize|js}, {js|auto 10%|js});
CSS.backgroundSize(`size((`em(50.), `percent(50.))));

CSS.unsafe({js|background|js}, {js|top left / 50% 60%|js});
CSS.backgroundOrigin(`borderBox);
CSS.backgroundColor(CSS.blue);
CSS.backgroundColor(CSS.red);

CSS.backgroundClip(`paddingBox);
CSS.unsafe(
{js|background|js},
Expand All @@ -97,6 +101,7 @@ If this test fail means that the module is not in sync with the ppx
CSS.unsafe({js|borderBottomLeftRadius|js}, {js|250px 100px|js});
CSS.borderRadius(`pxFloat(10.));
CSS.borderRadius(`percent(50.));

CSS.borderImageSource(`none);
CSS.borderImageSource(`url({js|foo.png|js}));
CSS.unsafe({js|borderImageSlice|js}, {js|10|js});
Expand Down Expand Up @@ -196,6 +201,7 @@ If this test fail means that the module is not in sync with the ppx
{js|borderImage|js},
{js|url(foo.png) fill 10 / 10% / 10px space|js},
);

CSS.boxShadows([|
CSS.Shadow.box(
~x=`pxFloat(1.),
Expand Down Expand Up @@ -255,6 +261,7 @@ If this test fail means that the module is not in sync with the ppx
Color.Shadow.elevation1,
),
|]);

CSS.unsafe({js|backgroundPositionX|js}, {js|right|js});
CSS.unsafe({js|backgroundPositionX|js}, {js|center|js});
CSS.unsafe({js|backgroundPositionX|js}, {js|50%|js});
Expand Down Expand Up @@ -305,6 +312,7 @@ If this test fail means that the module is not in sync with the ppx
CSS.unsafe({js|backgroundPositionY|js}, {js|bottom -50px|js});
CSS.unsafe({js|backgroundPositionY|js}, {js|top -50px|js});
CSS.unsafe({js|backgroundPositionY|js}, {js|bottom 20px|js});

CSS.backgroundImage(
`linearGradient((
Some(`deg(45.)),
Expand Down Expand Up @@ -430,6 +438,7 @@ If this test fail means that the module is not in sync with the ppx
|]: CSS.Types.Gradient.color_stop_list,
)),
);

CSS.backgroundImages([|
`linearGradient((
Some(`deg(45.)),
Expand All @@ -454,6 +463,7 @@ If this test fail means that the module is not in sync with the ppx
[|(Some(CSS.blue), None), (Some(CSS.red), None)|]: CSS.Types.Gradient.color_stop_list,
)),
|]);

CSS.backgroundImage(
`radialGradient((
Some(`ellipse),
Expand Down Expand Up @@ -518,6 +528,7 @@ If this test fail means that the module is not in sync with the ppx
{js|backgroundImage|js},
{js|radial-gradient(60% 60%, white, black)|js},
);

CSS.listStyleImage(
`linearGradient((
None,
Expand Down Expand Up @@ -649,34 +660,42 @@ If this test fail means that the module is not in sync with the ppx
{js|listStyleImage|js},
{js|radial-gradient(60% 60%, white, black)|js},
);

CSS.imageRendering(`auto);
CSS.imageRendering(`smooth);
CSS.imageRendering(`highQuality);
CSS.imageRendering(`pixelated);
CSS.imageRendering(`crispEdges);

CSS.backgroundPosition(`bottom);
CSS.unsafe({js|backgroundPositionX|js}, {js|50%|js});
CSS.unsafe({js|backgroundPositionY|js}, {js|0|js});
CSS.backgroundPosition2(`zero, `zero);
CSS.backgroundPosition2(`rem(1.), `zero);

CSS.objectPosition2(`center, `top);
CSS.objectPosition2(`center, `bottom);
CSS.objectPosition2(`left, `center);
CSS.objectPosition2(`right, `center);
CSS.objectPosition2(`center, `center);

CSS.unsafe({js|objectPosition|js}, {js|25% 75%|js});
CSS.objectPosition2(`percent(25.), `center);

CSS.objectPosition2(`zero, `zero);
CSS.objectPosition2(`cm(1.), `cm(2.));
CSS.objectPosition2(`ch(10.), `em(8.));

CSS.unsafe({js|objectPosition|js}, {js|bottom 10px right 20px|js});
CSS.unsafe({js|objectPosition|js}, {js|right 3em bottom 10px|js});
CSS.unsafe({js|objectPosition|js}, {js|top 0 right 10px|js});

CSS.unsafe({js|objectPosition|js}, {js|inherit|js});
CSS.unsafe({js|objectPosition|js}, {js|initial|js});
CSS.unsafe({js|objectPosition|js}, {js|revert|js});
CSS.unsafe({js|objectPosition|js}, {js|revert-layer|js});
CSS.unsafe({js|objectPosition|js}, {js|unset|js});

let _loadingKeyframes =
CSS.keyframes([|
(0, [|CSS.backgroundPosition2(`zero, `zero)|]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If this test fail means that the module is not in sync with the ppx

$ dune build

$ dune describe pp ./input.re.ml | refmt --parse ml --print re
$ dune describe pp ./input.re
[@ocaml.ppx.context
{
tool_name: "ppx_driver",
Expand All @@ -33,6 +33,7 @@ If this test fail means that the module is not in sync with the ppx
cookies: [],
}
];

CSS.boxSizing(`borderBox);
CSS.boxSizing(`contentBox);
CSS.outlineStyle(`auto);
Expand All @@ -54,6 +55,7 @@ If this test fail means that the module is not in sync with the ppx
CSS.unsafe({js|resize|js}, {js|vertical|js});
CSS.textOverflow(`clip);
CSS.textOverflow(`ellipsis);

CSS.cursor(`default);
CSS.cursor(`none);
CSS.cursor(`contextMenu);
Expand All @@ -76,19 +78,26 @@ If this test fail means that the module is not in sync with the ppx
CSS.cursor(`zoomOut);
CSS.unsafe({js|caretColor|js}, {js|auto|js});
CSS.unsafe({js|caretColor|js}, {js|green|js});

CSS.unsafe({js|appearance|js}, {js|auto|js});
CSS.unsafe({js|appearance|js}, {js|none|js});

CSS.textOverflow(`clip);
CSS.textOverflow(`ellipsis);

CSS.textOverflow(`string({js|foo|js}));
CSS.unsafe({js|textOverflow|js}, {js|clip clip|js});
CSS.unsafe({js|textOverflow|js}, {js|ellipsis clip|js});

CSS.unsafe({js|textOverflow|js}, {js|'foo' clip|js});
CSS.unsafe({js|textOverflow|js}, {js|clip ellipsis|js});
CSS.unsafe({js|textOverflow|js}, {js|ellipsis ellipsis|js});

CSS.unsafe({js|textOverflow|js}, {js|'foo' ellipsis|js});

CSS.unsafe({js|textOverflow|js}, {js|clip 'foo'|js});
CSS.unsafe({js|textOverflow|js}, {js|ellipsis 'foo'|js});

CSS.unsafe({js|textOverflow|js}, {js|'foo' 'foo'|js});
CSS.userSelect(`auto);
CSS.userSelect(`text);
Expand Down
5 changes: 4 additions & 1 deletion packages/ppx/test/css-support/box-alignment-module.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If this test fail means that the module is not in sync with the ppx

$ dune build

$ dune describe pp ./input.re.ml | refmt --parse ml --print re
$ dune describe pp ./input.re
[@ocaml.ppx.context
{
tool_name: "ppx_driver",
Expand All @@ -32,6 +32,7 @@ If this test fail means that the module is not in sync with the ppx
cookies: [],
}
];

CSS.alignSelf(`auto);
CSS.alignSelf(`normal);
CSS.alignSelf(`stretch);
Expand Down Expand Up @@ -190,6 +191,7 @@ If this test fail means that the module is not in sync with the ppx
CSS.unsafe({js|placeItems|js}, {js|first baseline legacy left|js});
CSS.unsafe({js|placeItems|js}, {js|self-start legacy left|js});
CSS.unsafe({js|placeItems|js}, {js|unsafe start legacy left|js});

CSS.gap2(~rowGap=`zero, ~columnGap=`zero);
CSS.gap2(~rowGap=`zero, ~columnGap=`em(1.));
CSS.gap(`em(1.));
Expand All @@ -199,6 +201,7 @@ If this test fail means that the module is not in sync with the ppx
CSS.columnGap(`normal);
CSS.rowGap(`zero);
CSS.rowGap(`em(1.));

CSS.unsafe({js|marginTrim|js}, {js|none|js});
CSS.unsafe({js|marginTrim|js}, {js|in-flow|js});
CSS.unsafe({js|marginTrim|js}, {js|all|js});
10 changes: 9 additions & 1 deletion packages/ppx/test/css-support/box-sizing-module.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If this test fail means that the module is not in sync with the ppx

$ dune build

$ dune describe pp ./input.re.ml | refmt --parse ml --print re
$ dune describe pp ./input.re
[@ocaml.ppx.context
{
tool_name: "ppx_driver",
Expand All @@ -33,6 +33,7 @@ If this test fail means that the module is not in sync with the ppx
cookies: [],
}
];

CSS.width(`maxContent);
CSS.width(`minContent);
CSS.unsafe({js|width|js}, {js|fit-content(10%)|js});
Expand All @@ -51,12 +52,19 @@ If this test fail means that the module is not in sync with the ppx
CSS.maxHeight(`maxContent);
CSS.maxHeight(`minContent);
CSS.unsafe({js|maxHeight|js}, {js|fit-content(10%)|js});

CSS.aspectRatio(`auto);
CSS.aspectRatio(`num(2.));
CSS.aspectRatio(`ratio((16, 9)));

CSS.unsafe({js|width|js}, {js|fit-content|js});

CSS.unsafe({js|minWidth|js}, {js|fit-content|js});

CSS.unsafe({js|maxWidth|js}, {js|fit-content|js});

CSS.unsafe({js|height|js}, {js|fit-content|js});

CSS.unsafe({js|minHeight|js}, {js|fit-content|js});

CSS.unsafe({js|maxHeight|js}, {js|fit-content|js});
2 changes: 1 addition & 1 deletion packages/ppx/test/css-support/calc.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If this test fail means that the module is not in sync with the ppx
> (preprocess (pps styled-ppx)))
> EOF

$ dune describe pp ./input.re.ml | refmt --parse ml --print re
$ dune describe pp ./input.re
[@ocaml.ppx.context
{
tool_name: "ppx_driver",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If this test fail means that the module is not in sync with the ppx

$ dune build

$ dune describe pp ./input.re.ml | refmt --parse ml --print re
$ dune describe pp ./input.re
[@ocaml.ppx.context
{
tool_name: "ppx_driver",
Expand All @@ -33,6 +33,7 @@ If this test fail means that the module is not in sync with the ppx
cookies: [],
}
];

CSS.unsafe({js|color|js}, {js|unset|js});
CSS.unsafe({js|fontWeight|js}, {js|unset|js});
CSS.unsafe({js|backgroundImage|js}, {js|unset|js});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If this test fail means that the module is not in sync with the ppx

$ dune build

$ dune describe pp ./input.re.ml | refmt --parse ml --print re
$ dune describe pp ./input.re
[@ocaml.ppx.context
{
tool_name: "ppx_driver",
Expand All @@ -33,6 +33,7 @@ If this test fail means that the module is not in sync with the ppx
cookies: [],
}
];

CSS.unsafe({js|colorAdjust|js}, {js|economy|js});
CSS.unsafe({js|colorAdjust|js}, {js|exact|js});
CSS.unsafe({js|forcedColorAdjust|js}, {js|auto|js});
Expand Down
6 changes: 5 additions & 1 deletion packages/ppx/test/css-support/color-module.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If this test fail means that the module is not in sync with the ppx

$ dune build

$ dune describe pp ./input.re.ml | refmt --parse ml --print re
$ dune describe pp ./input.re
[@ocaml.ppx.context
{
tool_name: "ppx_driver",
Expand All @@ -33,6 +33,7 @@ If this test fail means that the module is not in sync with the ppx
cookies: [],
}
];

CSS.color(`rgba((0, 0, 0, `num(0.5))));
CSS.color(`hex({js|F06|js}));
CSS.color(`hex({js|FF0066|js}));
Expand Down Expand Up @@ -68,6 +69,7 @@ If this test fail means that the module is not in sync with the ppx
CSS.unsafe({js|columnRuleColor|js}, {js|hsl(0,0%,0%,.5)|js});
CSS.unsafe({js|columnRuleColor|js}, {js|transparent|js});
CSS.unsafe({js|columnRuleColor|js}, {js|currentColor|js});

CSS.color(`rgb((0, 51, 178)));
CSS.color(`rgb((0, 64, 185)));
CSS.color(`hsl((`deg(0.), `percent(0.), `percent(0.))));
Expand All @@ -84,6 +86,7 @@ If this test fail means that the module is not in sync with the ppx
CSS.color(`hex({js|000F|js}));
CSS.color(`hex({js|000000FF|js}));
CSS.color(CSS.rebeccapurple);

CSS.backgroundColor(`rgb((0, 51, 178)));
CSS.backgroundColor(`rgb((0, 64, 185)));
CSS.backgroundColor(`hsl((`deg(0.), `percent(0.), `percent(0.))));
Expand Down Expand Up @@ -160,5 +163,6 @@ If this test fail means that the module is not in sync with the ppx
CSS.unsafe({js|columnRuleColor|js}, {js|#000F|js});
CSS.unsafe({js|columnRuleColor|js}, {js|#000000FF|js});
CSS.unsafe({js|columnRuleColor|js}, {js|rebeccapurple|js});

CSS.color(`rgba((0, 0, 0, `num(1.))));
CSS.color(`rgba((0, 0, 0, `calc(`sub((`num(10.), `num(1.)))))));
Loading

0 comments on commit 21b4a4b

Please sign in to comment.