Use Spago instead of Bower for dependency management

This commit is contained in:
Adrian Sieber 2019-10-19 21:13:45 +00:00
parent 58035ea964
commit 06d897e66e
9 changed files with 46 additions and 48 deletions

4
.gitignore vendored
View File

@ -1,7 +1,5 @@
/bower_components/
/node_modules/
/output/
/.psci*
/src/.webpack.js
.pulp-cache/
.psc-ide-port
/.spago

View File

@ -1,28 +0,0 @@
{
"name": "purescript-yaml-next",
"moduleType": [
"node"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"output",
"test",
"docs"
],
"dependencies": {
"js-yaml": "^3.4.6",
"purescript-argonaut-core": "^4.0.1",
"purescript-foreign": "^5.0.0",
"purescript-foreign-generic": "^7.0.0",
"purescript-functions": "^4.0.0",
"purescript-ordered-collections": "^1.1.0",
"purescript-unsafe-coerce": "^4.0.0"
},
"devDependencies": {
"purescript-argonaut-codecs": "^4.0.2",
"purescript-console": "^4.1.0",
"purescript-spec": "^3.0.0"
}
}

12
package-lock.json generated
View File

@ -8,7 +8,7 @@
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"requires": {
"sprintf-js": "1.0.3"
"sprintf-js": "~1.0.2"
}
},
"esprima": {
@ -17,12 +17,12 @@
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
"js-yaml": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
"integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"requires": {
"argparse": "1.0.10",
"esprima": "4.0.1"
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
},
"sprintf-js": {

View File

@ -1,16 +1,15 @@
{
"name": "purescript-yaml-next",
"license": "SEE LICENSE FILE",
"repository": "",
"repository": "https://github.com/archaeron/purescript-yaml",
"private": true,
"contributors": [],
"main": "main.js",
"scripts": {
"postinstall": "bower install",
"build": "pulp build"
"postinstall": "spago build"
},
"devDependencies": {},
"dependencies": {
"js-yaml": "^3.12.0"
"js-yaml": "^3.13.1"
}
}

8
packages.dhall Normal file
View File

@ -0,0 +1,8 @@
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.13.3-20191005/packages.dhall sha256:ba287d858ada09c4164792ad4e643013b742c208cbedf5de2e35ee27b64b6817
let overrides = {=}
let additions = {=}
in upstream // overrides // additions

20
spago.dhall Normal file
View File

@ -0,0 +1,20 @@
{ name =
"yaml-next"
, dependencies =
[ "argonaut-codecs"
, "argonaut-core"
, "console"
, "effect"
, "foreign"
, "foreign-generic"
, "functions"
, "ordered-collections"
, "psci-support"
, "spec"
, "unsafe-coerce"
]
, packages =
./packages.dhall
, sources =
[ "src/**/*.purs", "test/**/*.purs" ]
}

View File

@ -5,8 +5,7 @@ module Data.YAML.Foreign.Decode (
import Foreign (F, Foreign, ForeignError(..), fail)
import Foreign.Generic (genericDecode)
import Foreign.Generic.Class (class GenericDecode)
import Foreign.Generic.Types (Options)
import Foreign.Generic.Class (class GenericDecode, Options)
import Data.Function.Uncurried (Fn3, runFn3)
import Data.Generic.Rep (class Generic)
import Prelude ((>=>), (<<<), pure, (>>=))

View File

@ -2,7 +2,7 @@ module Test.Instances where
import Data.YAML.Foreign.Encode
import Data.Argonaut.Core (toObject, toString)
import Data.Argonaut.Decode (getField)
import Data.Argonaut.Decode.Combinators (getField)
import Data.Argonaut.Decode.Class (class DecodeJson)
import Data.Either (Either(..))
import Data.Generic.Rep (class Generic)

View File

@ -1,19 +1,21 @@
module Test.Main where
import Data.Map as Map
import Control.Monad.Except (runExcept)
import Data.Argonaut.Decode (class DecodeJson, decodeJson)
import Data.Either (Either(..))
import Data.Map (Map)
import Data.Map as Map
import Data.YAML.Foreign.Decode (parseYAMLToJson)
import Data.YAML.Foreign.Encode (printYAML)
import Effect
import Effect (Effect)
import Effect.Aff (launchAff_)
import Prelude (Unit, discard, pure, ($), (<<<), (>>=))
import Test.Instances (GeoObject(..), Mobility(..), Point(..))
import Test.Spec (describe, it)
import Test.Spec.Assertions (shouldEqual)
import Test.Spec.Reporter.Console (consoleReporter)
import Test.Spec.Runner (run)
import Test.Spec.Runner (runSpec)
yamlInput :: String
yamlInput = """
@ -134,7 +136,7 @@ fullCircle :: String -> Either String String
fullCircle yamlString = (readPoint yamlString) >>= pure <<< printYAML
main :: Effect Unit
main = run [consoleReporter] do
main = launchAff_ $ runSpec [consoleReporter] do
describe "purescript-yaml" do
describe "decode" do
it "Decodes YAML" do