Migrate to Purescript 12

This commit is contained in:
Gareth Daniel Smith 2018-07-28 08:40:04 +01:00
parent 7bfc8d7c02
commit f021c70946
7 changed files with 56 additions and 65 deletions

View File

@ -7,10 +7,10 @@
], ],
"license": "MIT", "license": "MIT",
"homepage": "https://github.com/icyrockcom/purescript-cheerio", "homepage": "https://github.com/icyrockcom/purescript-cheerio",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/icyrockcom/purescript-cheerio.git" "url": "https://github.com/icyrockcom/purescript-cheerio.git"
}, },
"ignore": [ "ignore": [
"**/.*", "**/.*",
"node_modules", "node_modules",
@ -19,11 +19,11 @@
"tests" "tests"
], ],
"dependencies": { "dependencies": {
"purescript-functions": "^3.0.0", "purescript-functions": "^4.0.0",
"purescript-test-unit": "^13.0.0", "purescript-test-unit": "^14.0.0",
"purescript-psci-support": "^3.0.0", "purescript-psci-support": "^4.0.0",
"purescript-console": "^3.0.0", "purescript-console": "^4.1.0",
"purescript-eff": "^3.1.0", "purescript-effect": "^2.0.0",
"purescript-prelude": "^3.1.1" "purescript-prelude": "^4.0.1"
} }
} }

62
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "purescript-cheerio", "name": "purescript-cheerio",
"version": "0.1.0", "version": "0.2.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -19,12 +19,12 @@
"resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz",
"integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=", "integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=",
"requires": { "requires": {
"css-select": "1.2.0", "css-select": "~1.2.0",
"dom-serializer": "0.1.0", "dom-serializer": "~0.1.0",
"entities": "1.1.1", "entities": "~1.1.1",
"htmlparser2": "3.9.2", "htmlparser2": "^3.9.1",
"lodash": "4.17.4", "lodash": "^4.15.0",
"parse5": "3.0.3" "parse5": "^3.0.1"
} }
}, },
"core-util-is": { "core-util-is": {
@ -37,10 +37,10 @@
"resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
"integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
"requires": { "requires": {
"boolbase": "1.0.0", "boolbase": "~1.0.0",
"css-what": "2.1.0", "css-what": "2.1",
"domutils": "1.5.1", "domutils": "1.5.1",
"nth-check": "1.0.1" "nth-check": "~1.0.1"
} }
}, },
"css-what": { "css-what": {
@ -53,8 +53,8 @@
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
"integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
"requires": { "requires": {
"domelementtype": "1.1.3", "domelementtype": "~1.1.1",
"entities": "1.1.1" "entities": "~1.1.1"
}, },
"dependencies": { "dependencies": {
"domelementtype": { "domelementtype": {
@ -74,7 +74,7 @@
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz",
"integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=",
"requires": { "requires": {
"domelementtype": "1.3.0" "domelementtype": "1"
} }
}, },
"domutils": { "domutils": {
@ -82,8 +82,8 @@
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
"integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
"requires": { "requires": {
"dom-serializer": "0.1.0", "dom-serializer": "0",
"domelementtype": "1.3.0" "domelementtype": "1"
} }
}, },
"entities": { "entities": {
@ -96,12 +96,12 @@
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz",
"integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=",
"requires": { "requires": {
"domelementtype": "1.3.0", "domelementtype": "^1.3.0",
"domhandler": "2.4.1", "domhandler": "^2.3.0",
"domutils": "1.5.1", "domutils": "^1.5.1",
"entities": "1.1.1", "entities": "^1.1.1",
"inherits": "2.0.3", "inherits": "^2.0.1",
"readable-stream": "2.3.3" "readable-stream": "^2.0.2"
} }
}, },
"inherits": { "inherits": {
@ -124,7 +124,7 @@
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz",
"integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=",
"requires": { "requires": {
"boolbase": "1.0.0" "boolbase": "~1.0.0"
} }
}, },
"parse5": { "parse5": {
@ -132,7 +132,7 @@
"resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz",
"integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==",
"requires": { "requires": {
"@types/node": "9.3.0" "@types/node": "*"
} }
}, },
"process-nextick-args": { "process-nextick-args": {
@ -145,13 +145,13 @@
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
"integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
"requires": { "requires": {
"core-util-is": "1.0.2", "core-util-is": "~1.0.0",
"inherits": "2.0.3", "inherits": "~2.0.3",
"isarray": "1.0.0", "isarray": "~1.0.0",
"process-nextick-args": "1.0.7", "process-nextick-args": "~1.0.6",
"safe-buffer": "5.1.1", "safe-buffer": "~5.1.1",
"string_decoder": "1.0.3", "string_decoder": "~1.0.3",
"util-deprecate": "1.0.2" "util-deprecate": "~1.0.1"
} }
}, },
"safe-buffer": { "safe-buffer": {
@ -164,7 +164,7 @@
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": { "requires": {
"safe-buffer": "5.1.1" "safe-buffer": "~5.1.0"
} }
}, },
"util-deprecate": { "util-deprecate": {

View File

@ -1,6 +1,6 @@
{ {
"name": "purescript-cheerio", "name": "purescript-cheerio",
"version": "0.1.0", "version": "0.2.0",
"description": "PureScript bindings for Cheerio", "description": "PureScript bindings for Cheerio",
"main": "index.js", "main": "index.js",
"directories": { "directories": {

View File

@ -1,13 +1,13 @@
{ {
"name": "purescript-cheerio", "name": "purescript-cheerio",
"set": "psc-0.11.7", "set": "psc-0.12.0-20180704",
"source": "https://github.com/purescript/package-sets.git", "source": "https://github.com/purescript/package-sets.git",
"depends": [ "depends": [
"functions", "functions",
"test-unit", "test-unit",
"psci-support", "psci-support",
"console", "console",
"eff", "effect",
"prelude" "prelude"
] ]
} }

View File

@ -2,13 +2,10 @@ module Test.Cheerio where
import Prelude hiding (eq) import Prelude hiding (eq)
import Control.Monad.Eff (Eff) import Effect (Effect)
import Control.Monad.Eff.AVar (AVAR)
import Control.Monad.Eff.Console (CONSOLE)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Test.Unit (TestSuite, suite, test) import Test.Unit (TestSuite, suite, test)
import Test.Unit.Assert as Assert import Test.Unit.Assert as Assert
import Test.Unit.Console (TESTOUTPUT)
import Test.Unit.Main (runTest) import Test.Unit.Main (runTest)
import Cheerio import Cheerio
@ -32,10 +29,10 @@ import Cheerio.Static (loadRoot)
import Test.HtmlEx (htmlEx) import Test.HtmlEx (htmlEx)
main :: Eff (avar :: AVAR, console :: CONSOLE, testOutput :: TESTOUTPUT) Unit main :: Effect Unit
main = runTest suites main = runTest suites
suites :: forall eff. TestSuite eff suites :: TestSuite
suites = do suites = do
suite "Attributes" do suite "Attributes" do
test "attr" do test "attr" do

View File

@ -2,13 +2,10 @@ module Test.Cheerio.Static where
import Prelude hiding (eq) import Prelude hiding (eq)
import Control.Monad.Eff (Eff) import Effect (Effect)
import Control.Monad.Eff.AVar (AVAR)
import Control.Monad.Eff.Console (CONSOLE)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Test.Unit (TestSuite, suite, test) import Test.Unit (TestSuite, suite, test)
import Test.Unit.Assert as Assert import Test.Unit.Assert as Assert
import Test.Unit.Console (TESTOUTPUT)
import Test.Unit.Main (runTest) import Test.Unit.Main (runTest)
import Cheerio (attr, find, length, text) import Cheerio (attr, find, length, text)
@ -24,10 +21,10 @@ import Cheerio.Static
import Test.HtmlEx (htmlEx) import Test.HtmlEx (htmlEx)
main :: Eff (avar :: AVAR, console :: CONSOLE, testOutput :: TESTOUTPUT) Unit main :: Effect Unit
main = runTest suites main = runTest suites
suites :: forall eff. TestSuite eff suites :: TestSuite
suites = do suites = do
suite "Loading" do suite "Loading" do
test "load" do test "load" do
@ -50,4 +47,4 @@ suites = do
test "html" do test "html" do
Assert.equal Assert.equal
(Just """<li class="apple">Apple</li>""") (Just """<li class="apple">Apple</li>""")
(loadRoot htmlEx # find ".apple" # html) (loadRoot htmlEx # find ".apple" # html)

View File

@ -2,20 +2,17 @@ module Test.Main where
import Prelude hiding (eq) import Prelude hiding (eq)
import Control.Monad.Eff (Eff) import Effect (Effect)
import Control.Monad.Eff.AVar (AVAR)
import Control.Monad.Eff.Console (CONSOLE)
import Test.Unit (TestSuite) import Test.Unit (TestSuite)
import Test.Unit.Console (TESTOUTPUT)
import Test.Unit.Main (runTest) import Test.Unit.Main (runTest)
import Test.Cheerio as C import Test.Cheerio as C
import Test.Cheerio.Static as CS import Test.Cheerio.Static as CS
main :: Eff (avar :: AVAR, console :: CONSOLE, testOutput :: TESTOUTPUT) Unit main :: Effect Unit
main = runTest suites main = runTest suites
suites :: forall eff. TestSuite eff suites :: TestSuite
suites = do suites = do
C.suites C.suites
CS.suites CS.suites