git.iko.soy/rowtype-yoga/purescript-unique
on master help sign in
Updates for PureScript 0.11
33214famechairoi
.eslintrc.jsonnew file+28
@@ -0,0 +1,28 @@
1+{
2+ "parserOptions": {
3+ "ecmaVersion": 5
4+ },
5+ "extends": "eslint:recommended",
6+ "env": {
7+ "commonjs": true
8+ },
9+ "rules": {
10+ "strict": [2, "global"],
11+ "block-scoped-var": 2,
12+ "consistent-return": 2,
13+ "eqeqeq": [2, "smart"],
14+ "guard-for-in": 2,
15+ "no-caller": 2,
16+ "no-extend-native": 2,
17+ "no-loop-func": 2,
18+ "no-new": 2,
19+ "no-param-reassign": 2,
20+ "no-return-assign": 2,
21+ "no-unused-expressions": 2,
22+ "no-use-before-define": 2,
23+ "radix": [2, "always"],
24+ "indent": [2, 2, { "SwitchCase": 1 }],
25+ "quotes": [2, "double"],
26+ "semi": [2, "always"]
27+ }
28+}
.gitignore+7−8
@@ -1,8 +1,7 @@
1+/.*
2+!/.gitignore
3+!/.eslintrc.json
4+!/.travis.yml
1−/bower_components
5+/bower_components/
2−/node_modules
6+/node_modules/
3−/.psci_modules
4−/output
7+/output/
5−/.psci
6−/npm-debug.log*
7−/.pulp-cache
8−/.pursuit.json
.jscsrcdeleted−13
@@ -1,13 +0,0 @@
1−{
2− "preset": "grunt",
3− "disallowSpacesInFunctionExpression": null,
4− "disallowSpacesInAnonymousFunctionExpression": null,
5− "requireSpacesInAnonymousFunctionExpression": {
6− "beforeOpeningRoundBrace": true,
7− "beforeOpeningCurlyBrace": true
8− },
9− "disallowSpacesInsideObjectBrackets": null,
10− "requireSpacesInsideObjectBrackets": "all",
11− "validateQuoteMarks": "\"",
12− "requireCurlyBraces": null
13−}
.jshintrcdeleted−19
@@ -1,19 +0,0 @@
1−{
2− "bitwise": true,
3− "eqeqeq": true,
4− "forin": true,
5− "freeze": true,
6− "funcscope": true,
7− "futurehostile": true,
8− "globalstrict": true,
9− "latedef": true,
10− "maxparams": 1,
11− "noarg": true,
12− "nocomma": true,
13− "nonew": true,
14− "notypeof": true,
15− "singleGroups": true,
16− "undef": true,
17− "unused": true,
18− "eqnull": true
19−}
.travis.yml+7−13
@@ -1,7 +1,7 @@
1language: node_js
1language: node_js
2−sudo: false
2+dist: trusty
3+sudo: required
3−node_js:
4+node_js: stable
4− - 5
5env:
5env:
6 - PATH=$HOME/purescript:$PATH
6 - PATH=$HOME/purescript:$PATH
7install:
7install:
@@ -12,13 +12,7 @@ install:
12 - npm install -g bower
12 - npm install -g bower
13 - npm install
13 - npm install
14script:
14script:
15+ - bower install --production
15− - npm run build
16+ - npm run -s build
16− - npm run test
17+ - bower install
17−after_success:
18+ - npm -s test
18−- >-
19− test $TRAVIS_TAG &&
20− psc-publish > .pursuit.json &&
21− curl -X POST http://pursuit.purescript.org/packages \
22− -d @.pursuit.json \
23− -H 'Accept: application/json' \
24− -H "Authorization: token ${GITHUB_TOKEN}"
bower.json+4−7
@@ -2,9 +2,6 @@
2 "name": "purescript-unique",
2 "name": "purescript-unique",
3 "homepage": "https://github.com/mechairoi/purescript-unique",
3 "homepage": "https://github.com/mechairoi/purescript-unique",
4 "description": "Data.Unique for PureScript",
4 "description": "Data.Unique for PureScript",
5− "keywords": [
6− "purescript"
7− ],
8 "license": "MIT",
5 "license": "MIT",
9 "repository": {
6 "repository": {
10 "type": "git",
7 "type": "git",
@@ -20,11 +17,11 @@
20 "package.json"
17 "package.json"
21 ],
18 ],
22 "dependencies": {
19 "dependencies": {
23− "purescript-prelude": "^2.1.0",
20+ "purescript-prelude": "^3.0.0",
24− "purescript-eff": "^2.0.0"
21+ "purescript-eff": "^3.1.0"
25 },
22 },
26 "devDependencies": {
23 "devDependencies": {
27− "purescript-console": "^2.0.0",
24+ "purescript-console": "^3.0.0",
28− "purescript-assert": "^2.0.0"
25+ "purescript-assert": "^3.0.0"
29 }
26 }
30}
27}
package.json+6−10
@@ -1,18 +1,14 @@
1{
1{
2− "name": "purescript-unique",
3− "description": "Data.Unique for PureScript",
4 "private": true,
2 "private": true,
5− "license": "MIT",
6 "devDependencies": {
3 "devDependencies": {
7− "jscs": "^2.9.0",
4+ "eslint": "^3.19.0",
8− "jshint": "^2.9.1",
9− "pulp": "^9.0.1",
5+ "pulp": "^11.0.0",
10− "rimraf": "^2.5.1"
6+ "purescript-psa": "^0.5.1",
7+ "rimraf": "^2.6.1"
11 },
8 },
12 "scripts": {
9 "scripts": {
13− "postinstall": "bower install",
10+ "clean": "rimraf output && rimraf .pulp-cache",
14− "build": "jshint src && jscs src && pulp build && rimraf docs && pulp docs",
11+ "build": "eslint src && pulp build -- --censor-lib --strict",
15− "docs": "pulp docs",
16 "test": "pulp test"
12 "test": "pulp test"
17 }
13 }
18}
14}
src/Data/Unique.purs+2−2
@@ -4,10 +4,10 @@ module Data.Unique
4 , UNIQ()
4 , UNIQ()
5 ) where
5 ) where
6
6
7−import Control.Monad.Eff (Eff)
7+import Control.Monad.Eff (Eff, kind Effect)
8import Prelude (class Ord, class Eq, class Show, compare, (==))
8import Prelude (class Ord, class Eq, class Show, compare, (==))
9
9
10−foreign import data UNIQ :: !
10+foreign import data UNIQ :: Effect
11
11
12newtype Unique = Unique String
12newtype Unique = Unique String
13
13
test/Main.purs+1−1
@@ -1,6 +1,6 @@
1module Test.Main where
1module Test.Main where
2
2
3−import Prelude ((==), ($), (/=), bind, Unit)
3+import Prelude ((==), ($), (/=), discard, bind, Unit)
4import Data.Unique (newUnique, UNIQ)
4import Data.Unique (newUnique, UNIQ)
5import Test.Assert (assert, ASSERT)
5import Test.Assert (assert, ASSERT)
6import Control.Monad.Eff (Eff)
6import Control.Monad.Eff (Eff)