From 115f7b394601276b765c3b3b3bb5fb4bb01954c0 Mon Sep 17 00:00:00 2001 From: Gary Burgess Date: Tue, 8 May 2018 12:22:00 +0100 Subject: [PATCH 1/2] Updates for 0.12 --- bower.json | 14 +++++++------- test/Main.purs | 30 +++++++++++++++++++----------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/bower.json b/bower.json index e57093f..3bdbf6a 100644 --- a/bower.json +++ b/bower.json @@ -5,6 +5,10 @@ ], "description": "A library for dealing with nulls", "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/purescript-contrib/purescript-nullable.git" + }, "ignore": [ "**/.*", "bower_components", @@ -14,14 +18,10 @@ "package.json" ], "dependencies": { - "purescript-maybe": "^3.0.0", - "purescript-functions": "^3.0.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/paf31/purescript-nullable.git" + "purescript-maybe": "#compiler/0.12", + "purescript-functions": "#compiler/0.12" }, "devDependencies": { - "purescript-console": "^3.0.0" + "purescript-assert": "#compiler/0.12" } } diff --git a/test/Main.purs b/test/Main.purs index 2c2d456..a5733aa 100644 --- a/test/Main.purs +++ b/test/Main.purs @@ -2,18 +2,26 @@ module Test.Main where import Prelude -import Control.Monad.Eff (Eff) -import Control.Monad.Eff.Console (CONSOLE, logShow) import Data.Maybe (Maybe(..)) import Data.Nullable (toNullable, toMaybe) +import Effect (Effect) +import Test.Assert (assertEqual) -main :: Eff (console :: CONSOLE) Unit +main :: Effect Unit main = do - logShow $ toNullable (Nothing :: Maybe Number) - logShow $ toNullable (Just 42) - - logShow $ toMaybe $ toNullable (Nothing :: Maybe Number) - logShow $ toMaybe $ toNullable (Just 42) - - logShow $ toNullable Nothing == toNullable (Just 42) - logShow $ toNullable Nothing `compare` toNullable (Just 42) + assertEqual + { actual: toMaybe $ toNullable (Nothing :: Maybe Number) + , expected: Nothing + } + assertEqual + { actual: toMaybe $ toNullable (Just 42) + , expected: Just 42 + } + assertEqual + { actual: toNullable Nothing == toNullable (Just 42) + , expected: false + } + assertEqual + { actual: toNullable Nothing `compare` toNullable (Just 42) + , expected: LT + } From 2ff12f711a325f4461d10653c5dfaf746925cf89 Mon Sep 17 00:00:00 2001 From: Gary Burgess Date: Thu, 24 May 2018 15:02:22 +0100 Subject: [PATCH 2/2] Update dependencies --- .travis.yml | 10 +++++++++- bower.json | 6 +++--- package.json | 9 ++++----- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 968390b..d980b08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,20 @@ language: node_js dist: trusty sudo: required node_js: stable +env: + - PATH=$HOME/purescript:$PATH install: + - TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p') + - wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz + - tar -xvf $HOME/purescript.tar.gz -C $HOME/ + - chmod a+x $HOME/purescript - npm install -g bower - npm install - - bower install script: + - bower install --production - npm run -s build + - bower install + - npm run -s test after_success: - >- test $TRAVIS_TAG && diff --git a/bower.json b/bower.json index 3bdbf6a..43401e1 100644 --- a/bower.json +++ b/bower.json @@ -18,10 +18,10 @@ "package.json" ], "dependencies": { - "purescript-maybe": "#compiler/0.12", - "purescript-functions": "#compiler/0.12" + "purescript-maybe": "^4.0.0", + "purescript-functions": "^4.0.0" }, "devDependencies": { - "purescript-assert": "#compiler/0.12" + "purescript-assert": "^4.0.0" } } diff --git a/package.json b/package.json index b6361b9..6615039 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,9 @@ "test": "pulp test" }, "devDependencies": { - "eslint": "^3.19.0", - "pulp": "^11.0.0", - "purescript": "^0.11.1", - "purescript-psa": "^0.5.0", - "rimraf": "^2.6.1" + "eslint": "^4.19.1", + "pulp": "^12.2.0", + "purescript-psa": "^0.6.0", + "rimraf": "^2.6.2" } }