Skip to content

Commit 20e25df

Browse files
committed
Version bumps
1 parent 5ea79fb commit 20e25df

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

bower.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,26 @@
2424
"package.json"
2525
],
2626
"dependencies": {
27-
"purescript-web-html": "#compiler/0.12",
28-
"purescript-effect": "#compiler/0.12",
29-
"purescript-either": "#compiler/0.12",
30-
"purescript-globals": "#compiler/0.12",
31-
"purescript-lists": "#compiler/0.12",
32-
"purescript-maybe": "#compiler/0.12",
33-
"purescript-prelude": "#compiler/0.12",
34-
"purescript-semirings": "#compiler/0.12",
35-
"purescript-tuples": "#compiler/0.12",
36-
"purescript-validation": "#compiler/0.12",
37-
"purescript-aff": "#compiler/0.12",
38-
"purescript-control": "#compiler/0.12",
39-
"purescript-console": "#compiler/0.12",
40-
"purescript-integers": "#compiler/0.12",
41-
"purescript-foldable-traversable": "#compiler/0.12"
27+
"purescript-web-html": "^1.0.0",
28+
"purescript-effect": "^2.0.0",
29+
"purescript-either": "^4.0.0",
30+
"purescript-globals": "^4.0.0",
31+
"purescript-lists": "^5.0.0",
32+
"purescript-maybe": "^4.0.0",
33+
"purescript-prelude": "^4.0.0",
34+
"purescript-semirings": "^5.0.0",
35+
"purescript-tuples": "^5.0.0",
36+
"purescript-validation": "^4.0.0",
37+
"purescript-aff": "^5.0.0",
38+
"purescript-control": "^4.0.0",
39+
"purescript-console": "^4.1.0",
40+
"purescript-integers": "^4.0.0",
41+
"purescript-foldable-traversable": "^4.0.0"
4242
},
4343
"devDependencies": {
44-
"purescript-console": "#compiler/0.12",
45-
"purescript-assert": "#compiler/0.12",
46-
"purescript-record": "#compiler/0.12",
47-
"purescript-generics-rep": "#compiler/0.12"
44+
"purescript-console": "^4.1.0",
45+
"purescript-assert": "^4.0.0",
46+
"purescript-record": "^1.0.0",
47+
"purescript-generics-rep": "^6.0.0"
4848
}
4949
}

src/Routing.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ module Routing
66
import Prelude
77

88
import Data.Either (Either)
9-
import Global (decodeURIComponent)
9+
import Global.Unsafe (unsafeDecodeURIComponent)
1010
import Routing.Match (Match, runMatch)
1111
import Routing.Parser (parse)
1212

1313
-- | Runs a `Match` parser.
1414
match :: forall a. Match a -> String -> Either String a
15-
match = matchWith decodeURIComponent
15+
match = matchWith unsafeDecodeURIComponent
1616

1717
-- | Runs a `Match` parser given a custom String decoder.
1818
matchWith :: forall a. (String -> String) -> Match a -> String -> Either String a

src/Routing/PushState.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ makeInterface = do
7474
listen k = do
7575
fresh <- Ref.read freshRef
7676
Ref.write (fresh + 1) freshRef
77-
Ref.modify (Map.insert fresh k) listenersRef
78-
pure $ Ref.modify (Map.delete fresh) listenersRef
77+
Ref.modify_ (Map.insert fresh k) listenersRef
78+
pure $ Ref.modify_ (Map.delete fresh) listenersRef
7979

8080
locationState = do
8181
loc <- DOM.window >>= Window.location
@@ -195,7 +195,7 @@ makeImmediate run = do
195195
nextTick ← Ref.new (Right 0)
196196
obsvNode ← Text.toNode <$> DOM.createTextNode "" document
197197
observer ← DOM.mutationObserver \_ _ → do
198-
Ref.modify (either (Right <<< add 1) Right) nextTick
198+
Ref.modify_ (either (Right <<< add 1) Right) nextTick
199199
run
200200
DOM.observe obsvNode { characterData: true } observer
201201
pure do

test/Test/Browser.purs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Data.Maybe (Maybe(..), maybe)
99
import Effect (Effect)
1010
import Effect.Exception (error, throwException)
1111
import Effect.Ref as Ref
12-
import Foreign (readInt, toForeign)
12+
import Foreign (readInt, unsafeToForeign)
1313
import Record as Rec
1414
import Routing.Hash (hashes, setHash)
1515
import Routing.Match (Match, lit)
@@ -131,24 +131,24 @@ runPushStateTests = withTest \{ assert } -> do
131131
Just old', new'
132132
| Rec.equal old' loc1 && Rec.equal new' loc2 -> do
133133
assert "Locations: init -> a" true
134-
hist.pushState (toForeign 2) "/b#b"
134+
hist.pushState (unsafeToForeign 2) "/b#b"
135135
| Rec.equal old' loc2 && Rec.equal new' loc3 -> do
136136
assert "Locations: a -> b" true
137-
hist.pushState (toForeign 3) "/c/d"
137+
hist.pushState (unsafeToForeign 3) "/c/d"
138138
| Rec.equal old' loc3 && Rec.equal new' loc4 -> do
139139
assert "Locations: b -> c/d" true
140-
hist.pushState (toForeign 4) "e"
140+
hist.pushState (unsafeToForeign 4) "e"
141141
| Rec.equal old' loc4 && Rec.equal new' loc5 -> do
142142
assert "Locations: c/d -> c/e" true
143-
hist.pushState (toForeign 5) "?f"
143+
hist.pushState (unsafeToForeign 5) "?f"
144144
| Rec.equal old' loc5 && Rec.equal new' loc6 -> do
145145
assert "Locations: c/e -> c/e?f" true
146-
hist.pushState (toForeign 6) "/"
146+
hist.pushState (unsafeToForeign 6) "/"
147147
done
148148
_, _ -> do
149149
done
150150
assert "Locations: fail" false
151-
hist.pushState (toForeign 1) "/a?a"
151+
hist.pushState (unsafeToForeign 1) "/a?a"
152152

153153
main :: Effect Unit
154154
main = do

0 commit comments

Comments
 (0)