Skip to content

Commit

Permalink
Update deps + switch to opam on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alex35mil committed Feb 26, 2024
1 parent 8b31e42 commit ecd04cd
Show file tree
Hide file tree
Showing 9 changed files with 309 additions and 160 deletions.
310 changes: 216 additions & 94 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

53 changes: 18 additions & 35 deletions .github/workflows/scripts/write-package-json.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,26 @@
const fs = require("fs");
const path = require("path");

const {
name,
version,
description,
author,
license,
repository,
keywords
} = require("../../../package.json");
const { name, version, description, author, license, repository, keywords } = require("../../../package.json");
const { dependencies } = require("../../../lib/package.json");

const packageJson = JSON.stringify(
{
name,
version,
description,
author,
license,
repository,
keywords,
dependencies,
files: [
"src",
"bin",
"bsconfig.json",
"postinstall.js",
],
scripts: {
postinstall: "node ./postinstall.js"
}
},
null,
2
{
name,
version,
description,
author,
license,
repository,
keywords,
dependencies,
files: ["src", "bin", "rescript.json", "postinstall.js"],
scripts: {
postinstall: "node ./postinstall.js",
},
},
null,
2,
);

fs.writeFileSync(
path.join(__dirname, "..", "..", "..", "_release", "package.json"),
packageJson,
{ encoding: "utf8" }
);
fs.writeFileSync(path.join(__dirname, "..", "..", "..", "_release", "package.json"), packageJson, { encoding: "utf8" });
21 changes: 9 additions & 12 deletions devbox.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"packages": [
"path:./nix/ocaml#ocaml",
"path:./nix/ocaml#dune",
"path:./nix/ocaml#result",
"path:./nix/ocaml#findlib",
"path:./nix/ocaml#ppxlib",
"path:./nix/ocaml#alcotest",
"path:./nix/ocaml#merlin",
"path:./nix/ocaml#lsp",
"path:./nix/ocaml#ocamlformat",
"path:./nix/ocaml#ocamlformat_rpc",
"ocamlPackages.ocaml",
"ocamlPackages.dune_3",
"ocamlPackages.findlib",
"ocamlPackages.ppxlib",
"ocamlPackages.alcotest",
"ocamlPackages.ocaml-lsp",
"ocamlPackages.ocamlformat",
"ocamlPackages.ocamlformat-rpc-lib",
"nodejs",
"yarn",
"awscli2"
"yarn"
],
"shell": {
"init_hook": [
Expand Down
44 changes: 32 additions & 12 deletions devbox.lock
Original file line number Diff line number Diff line change
@@ -1,22 +1,42 @@
{
"lockfile_version": "1",
"packages": {
"awscli2": {
"resolved": "github:NixOS/nixpkgs/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62#awscli2",
"source": "nixpkg"
},
"nodejs": {
"resolved": "github:NixOS/nixpkgs/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62#nodejs",
"source": "nixpkg"
},
"path:./nix/ocaml#alcotest": {},
"path:./nix/ocaml#dune": {},
"path:./nix/ocaml#findlib": {},
"path:./nix/ocaml#lsp": {},
"path:./nix/ocaml#merlin": {},
"path:./nix/ocaml#ocaml": {},
"path:./nix/ocaml#ppxlib": {},
"path:./nix/ocaml#result": {},
"ocamlPackages.alcotest": {
"resolved": "github:NixOS/nixpkgs/75a52265bda7fd25e06e3a67dee3f0354e73243c#ocamlPackages.alcotest",
"source": "nixpkg"
},
"ocamlPackages.dune_3": {
"resolved": "github:NixOS/nixpkgs/75a52265bda7fd25e06e3a67dee3f0354e73243c#ocamlPackages.dune_3",
"source": "nixpkg"
},
"ocamlPackages.findlib": {
"resolved": "github:NixOS/nixpkgs/75a52265bda7fd25e06e3a67dee3f0354e73243c#ocamlPackages.findlib",
"source": "nixpkg"
},
"ocamlPackages.ocaml": {
"resolved": "github:NixOS/nixpkgs/75a52265bda7fd25e06e3a67dee3f0354e73243c#ocamlPackages.ocaml",
"source": "nixpkg"
},
"ocamlPackages.ocaml-lsp": {
"resolved": "github:NixOS/nixpkgs/75a52265bda7fd25e06e3a67dee3f0354e73243c#ocamlPackages.ocaml-lsp",
"source": "nixpkg"
},
"ocamlPackages.ocamlformat": {
"resolved": "github:NixOS/nixpkgs/75a52265bda7fd25e06e3a67dee3f0354e73243c#ocamlPackages.ocamlformat",
"source": "nixpkg"
},
"ocamlPackages.ocamlformat-rpc-lib": {
"resolved": "github:NixOS/nixpkgs/75a52265bda7fd25e06e3a67dee3f0354e73243c#ocamlPackages.ocamlformat-rpc-lib",
"source": "nixpkg"
},
"ocamlPackages.ppxlib": {
"resolved": "github:NixOS/nixpkgs/75a52265bda7fd25e06e3a67dee3f0354e73243c#ocamlPackages.ppxlib",
"source": "nixpkg"
},
"yarn": {
"resolved": "github:NixOS/nixpkgs/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62#yarn",
"source": "nixpkg"
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
(lang dune 2.6)
(name re-formality-ppx)
(name re-formality-ppx)
1 change: 1 addition & 0 deletions dune-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 2.6)
10 changes: 4 additions & 6 deletions esy.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
"buildsInSource": "_build"
},
"dependencies": {
"ocaml": "4.12.0",
"@opam/dune": "3.7.0",
"@opam/ppxlib": "0.28.0",
"@opam/ocamlfind": "1.9.6"
"ocaml": "4.14.1",
"@opam/dune": "3.11.1",
"@opam/ppxlib": "0.30.0"
},
"devDependencies": {
"@opam/merlin": "*",
"@opam/alcotest": "1.4.0"
"@opam/alcotest": "1.7.0"
}
}
6 changes: 6 additions & 0 deletions ppx/bin/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
(env
(static
(flags
(:standard -ccopt -static))))

(executable
(package re-formality-ppx)
(name bin)
(public_name re-formality-ppx)
(libraries re-formality-ppx.lib))
22 changes: 22 additions & 0 deletions re-formality-ppx.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
opam-version: "2.0"
name: "re-formality-ppx"
version: "4.0.0-beta.20"
synopsis: "Form validation tool for @rescript/react"
description: """
Form validation tool for @rescript/react
"""
maintainer: "Alex Fedoseev <[email protected]>"
authors: "Alex Fedoseev <[email protected]>"
license: "MIT"
homepage: "https://github.com/MinimaHQ/re-formality.git"
bug-reports: "https://github.com/MinimaHQ/re-formality/issues"
dev-repo: "git+https://github.com/MinimaHQ/re-formality.git"
depends: [
"ocaml" { = "4.14.1" }
"dune" { = "3.11.1" }
"ppxlib" { = "0.30.0" }
"alcotest" { = "1.7.0" }
]
build: [
["dune" "build" "-p" name "-j" jobs]
]

0 comments on commit ecd04cd

Please sign in to comment.