Skip to content

Commit

Permalink
upgrade deps (#87)
Browse files Browse the repository at this point in the history
* upgrade deps

* correct hash

* bump npm deps

* tidy
  • Loading branch information
martyall authored Apr 19, 2024
1 parent c17a0a3 commit 7aa55af
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 18 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
},
"dependencies": {
"ethjs-provider-http": "^0.1.6",
"keccak": "^1.0.2",
"keccak": "^3.0.0",
"rlp": "^2.0.0",
"secp256k1": "^3.0.1",
"yargs": "^8.0.2"
"secp256k1": "^5.0.0"
},
"devDependencies": {
"purescript": "^0.15.8",
Expand Down
163 changes: 160 additions & 3 deletions packages.dhall
Original file line number Diff line number Diff line change
@@ -1,5 +1,162 @@
let upstream =
https://raw.githubusercontent.com/f-o-a-m/package-sets/9e9623711d22de73259e765f5acf8407b7332998/purs-0.15.7-web3.dhall
sha256:f0ffdb72aef1af63caf537a130b40d8f73779e82496404d9cedb66c6a699b55d
https://github.com/purescript/package-sets/releases/download/psc-0.15.15-20240416/packages.dhall
sha256:ca727657c01cc31d0e79c2113b59126b9826f4b56d20a8193be3c725599fb754

in upstream
let eth-core-deps =
https://raw.githubusercontent.com/f-o-a-m/purescript-eth-core/master/packages.dhall
sha256:af2751772a729d58edf7056805007934e3687b3079f8a02ac514e705aeab8c42

let web3-deps =
https://raw.githubusercontent.com/f-o-a-m/purescript-web3/master/packages.dhall
sha256:c1bebe7e4899bd64304a84fea26f9ea635e20897f206ce6fa86bd446715c5ffc

let additions =
{ bytestrings = eth-core-deps.bytestrings
, coroutine-transducers = web3-deps.coroutine-transducers
, dodo-printer =
{ dependencies =
[ "aff"
, "ansi"
, "arrays"
, "avar"
, "console"
, "control"
, "effect"
, "either"
, "exceptions"
, "foldable-traversable"
, "integers"
, "lists"
, "maybe"
, "minibench"
, "newtype"
, "node-buffer"
, "node-child-process"
, "node-path"
, "node-process"
, "node-streams"
, "parallel"
, "partial"
, "posix-types"
, "prelude"
, "safe-coerce"
, "strings"
, "tuples"
]
, repo = "https://github.com/natefaubion/purescript-dodo-printer.git"
, version = "v2.2.1"
}
, eth-core = web3-deps.eth-core
, quotient = eth-core-deps.quotient
, tidy =
{ dependencies =
[ "arrays"
, "dodo-printer"
, "foldable-traversable"
, "lists"
, "maybe"
, "ordered-collections"
, "partial"
, "prelude"
, "language-cst-parser"
, "strings"
, "tuples"
]
, repo = "https://github.com/natefaubion/purescript-tidy.git"
, version = "v0.10.0"
}
, tidy-codegen =
{ dependencies =
[ "aff"
, "ansi"
, "arrays"
, "avar"
, "bifunctors"
, "console"
, "control"
, "dodo-printer"
, "effect"
, "either"
, "enums"
, "exceptions"
, "filterable"
, "foldable-traversable"
, "free"
, "identity"
, "integers"
, "language-cst-parser"
, "lazy"
, "lists"
, "maybe"
, "newtype"
, "node-buffer"
, "node-child-process"
, "node-path"
, "node-process"
, "node-streams"
, "ordered-collections"
, "parallel"
, "partial"
, "posix-types"
, "prelude"
, "record"
, "safe-coerce"
, "st"
, "strings"
, "tidy"
, "transformers"
, "tuples"
, "type-equality"
, "unicode"
]
, repo =
"https://github.com/natefaubion/purescript-tidy-codegen.git"
, version = "v4.0.0"
}
, web3 =
{ dependencies =
[ "aff"
, "argonaut"
, "arrays"
, "bifunctors"
, "bytestrings"
, "control"
, "coroutine-transducers"
, "coroutines"
, "effect"
, "either"
, "eth-core"
, "exceptions"
, "foldable-traversable"
, "foreign"
, "foreign-object"
, "fork"
, "gen"
, "heterogeneous"
, "maybe"
, "newtype"
, "parallel"
, "parsing"
, "partial"
, "prelude"
, "profunctor-lenses"
, "record"
, "ring-modules"
, "simple-json"
, "strings"
, "tagged"
, "tailrec"
, "transformers"
, "tuples"
, "typelevel-prelude"
, "unfoldable"
, "unsafe-coerce"
, "variant"
, "identity"
],
repo = "https://github.com/f-o-a-m/purescript-web3.git",
version = "v7.2.0"
}
}

in upstream // additions
3 changes: 0 additions & 3 deletions spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
, "control"
, "effect"
, "either"
, "errors"
, "eth-core"
, "exceptions"
, "fixed-points"
Expand All @@ -22,11 +21,9 @@
, "language-cst-parser"
, "lists"
, "maybe"
, "mkdirp"
, "newtype"
, "node-buffer"
, "node-fs"
, "node-fs-aff"
, "node-path"
, "node-process"
, "optparse"
Expand Down
3 changes: 1 addition & 2 deletions src/Data/AbiParser.purs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module Data.AbiParser where
import Prelude

import Control.Alternative ((<|>))
import Control.Error.Util (note)
import Data.Argonaut ((.:?))
import Data.Argonaut as A
import Data.Argonaut.Core (fromObject)
Expand All @@ -13,7 +12,7 @@ import Data.Argonaut.Decode.Error (JsonDecodeError(..), printJsonDecodeError)
import Data.Argonaut.Encode.Class (encodeJson)
import Data.Array (fromFoldable, intercalate, length, zip, (..))
import Data.Bifunctor (lmap)
import Data.Either (Either(..), either)
import Data.Either (Either(..), either, note)
import Data.Foldable (foldr)
import Data.FunctorWithIndex (mapWithIndex)
import Data.Generic.Rep (class Generic)
Expand Down
9 changes: 4 additions & 5 deletions src/Data/CodeGen.purs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Prelude

import Ansi.Codes (Color(..))
import Ansi.Output (withGraphics, foreground)
import Control.Error.Util (note)
import Control.Monad.Error.Class (throwError)
import Control.Monad.State (class MonadState, StateT, evalStateT, get, put)
import Control.Monad.Writer (class MonadTell, runWriterT, tell)
Expand All @@ -16,7 +15,7 @@ import Data.Argonaut.Prisms (_Object)
import Data.Array (catMaybes, concat, foldMap, length, null)
import Data.Array as Array
import Data.Bifunctor (lmap)
import Data.Either (Either(..), either)
import Data.Either (Either(..), either, note)
import Data.Foldable (for_)
import Data.Generator (genCode, toSignature)
import Data.Identity (Identity(..))
Expand All @@ -36,9 +35,9 @@ import Effect.Exception (error)
import Network.Ethereum.Core.HexString (unHex)
import Network.Ethereum.Core.Keccak256 (toSelector)
import Node.Encoding (Encoding(UTF8))
import Node.FS.Aff (readTextFile, writeTextFile, readdir, stat)
import Node.FS.Aff (readTextFile, writeTextFile, readdir, stat, mkdir')
import Node.FS.Perms (permsReadWrite)
import Node.FS.Stats as Stats
import Node.FS.Sync.Mkdirp (mkdirp)
import Node.Path (FilePath, basenameWithoutExt, extname)
import Partial.Unsafe (unsafePartial)
import Tidy.Codegen as Gen
Expand All @@ -56,7 +55,7 @@ generatePS :: GeneratorOptions -> Aff ABIErrors
generatePS os = do
let opts = os { pursDir = os.pursDir <> "/" <> replaceAll (Pattern ".") (Replacement "/") os.modulePrefix }
fs <- getAllJsonFiles opts.jsonDir
liftEffect $ mkdirp opts.pursDir
mkdir' opts.pursDir { recursive: true, mode: permsReadWrite }
case fs of
[] -> throwError <<< error $ "No abi json files found in directory: " <> opts.jsonDir
fs' -> do
Expand Down
4 changes: 2 additions & 2 deletions src/Data/GeneratorMain.purs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Data.CodeGen (GeneratorOptions, generatePS)
import Effect (Effect)
import Effect.Aff (launchAff_)
import Effect.Class (liftEffect)
import Node.Process (exit)
import Node.Process (exit')
import Options.Applicative (Parser, ParserInfo, boolean, execParser, fullDesc, header, help, helper, info, long, metavar, option, progDesc, showDefault, strOption, value, (<**>))

data Args = Args GeneratorOptions
Expand Down Expand Up @@ -62,7 +62,7 @@ generatorMain :: Effect Unit
generatorMain = launchAff_ do
(Args args) <- liftEffect $ execParser opts
errs <- generatePS args
liftEffect <<< exit $
liftEffect <<< exit' $
if (A.null errs) then 0 else 1
where
opts :: ParserInfo Args
Expand Down

0 comments on commit 7aa55af

Please sign in to comment.