Skip to content

Commit 5ae6047

Browse files
committed
feat: migrate to spago@next
1 parent 87a8ffc commit 5ae6047

File tree

7 files changed

+64
-113
lines changed

7 files changed

+64
-113
lines changed

.github/workflows/ci.yml

+10-39
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,29 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12-
1312
steps:
14-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1514

16-
- name: Set up PureScript toolchain
15+
- name: Set up a PureScript toolchain
1716
uses: purescript-contrib/setup-purescript@main
1817
with:
19-
purescript: "unstable"
18+
purescript: "latest"
2019
purs-tidy: "latest"
20+
spago: "unstable"
2121

2222
- name: Cache PureScript dependencies
23-
uses: actions/cache@v2
23+
uses: actions/cache@v4
2424
with:
25-
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
25+
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.lock') }}
2626
path: |
2727
.spago
2828
output
2929
30-
- name: Set up Node toolchain
31-
uses: actions/setup-node@v2
32-
with:
33-
node-version: "14.x"
34-
35-
- name: Cache NPM dependencies
36-
uses: actions/cache@v2
37-
env:
38-
cache-name: cache-node-modules
39-
with:
40-
path: ~/.npm
41-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
42-
restore-keys: |
43-
${{ runner.os }}-build-${{ env.cache-name }}-
44-
${{ runner.os }}-build-
45-
${{ runner.os }}-
46-
47-
- name: Install NPM dependencies
48-
run: npm install
49-
50-
- name: Build the project
51-
run: npm run build
30+
- name: Build source
31+
run: spago build --censor-stats --strict --pedantic-packages
5232

5333
- name: Run tests
54-
run: npm run test
34+
run: spago test --offline --censor-stats --strict --pedantic-packages -- --censor-codes=UserDefinedWarning
5535

56-
- name: Check formatting
36+
- name: Verify formatting
5737
run: purs-tidy check src test
58-
59-
- name: Verify Bower & Pulp
60-
run: |
61-
npm install bower [email protected]
62-
npx bower install
63-
npx pulp build -- --censor-lib --strict
64-
if [ -d "test" ]; then
65-
npx pulp test
66-
fi

bower.json

+1-32
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,5 @@
2121
"bower.json",
2222
"gulpfile.js",
2323
"package.json"
24-
],
25-
"dependencies": {
26-
"purescript-aff": "^7.0.0",
27-
"purescript-argonaut-core": "^7.0.0",
28-
"purescript-arraybuffer-types": "^3.0.2",
29-
"purescript-arrays": "^7.0.0",
30-
"purescript-console": "^6.0.0",
31-
"purescript-control": "^6.0.0",
32-
"purescript-datetime": "^6.0.0",
33-
"purescript-effect": "^4.0.0",
34-
"purescript-either": "^6.0.0",
35-
"purescript-exceptions": "^6.0.0",
36-
"purescript-foldable-traversable": "^6.0.0",
37-
"purescript-foreign": "^7.0.0",
38-
"purescript-foreign-object": "^4.0.0",
39-
"purescript-form-urlencoded": "^7.0.0",
40-
"purescript-functions": "^6.0.0",
41-
"purescript-http-methods": "^6.0.0",
42-
"purescript-lists": "^7.0.0",
43-
"purescript-maybe": "^6.0.0",
44-
"purescript-media-types": "^6.0.0",
45-
"purescript-newtype": "^5.0.0",
46-
"purescript-nullable": "^6.0.0",
47-
"purescript-prelude": "^6.0.0",
48-
"purescript-transformers": "^6.0.0",
49-
"purescript-web-dom": "^6.0.0",
50-
"purescript-web-file": "^4.0.0",
51-
"purescript-web-xhr": "^5.0.0"
52-
},
53-
"devDependencies": {
54-
"purescript-psci-support": "^6.0.0"
55-
}
24+
]
5625
}

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"private": true,
33
"scripts": {
4-
"build": "eslint src && spago build --purs-args '--censor-lib --strict'"
4+
"build": "eslint src && spago build --censor-stats --strict --pedantic-packages"
55
},
66
"devDependencies": {
7-
"body-parser": "^1.19.0",
8-
"eslint": "^7.10.0",
9-
"express": "^4.17.1",
10-
"purescript-psa": "^0.8.2",
11-
"xhr2": "^0.2.0"
7+
"body-parser": "^1.20.3",
8+
"eslint": "^9.12.0",
9+
"express": "^4.21.1",
10+
"purescript-psa": "^0.9.0",
11+
"xhr2": "^0.2.1"
1212
}
1313
}

packages.dhall

-4
This file was deleted.

spago.dhall

-32
This file was deleted.

spago.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package:
2+
name: affjax
3+
publish:
4+
license: Apache-2.0
5+
version: 13.0.0
6+
location:
7+
githubOwner: purescript-contrib
8+
githubRepo: purescript-affjax
9+
dependencies:
10+
- aff
11+
- argonaut-core
12+
- arraybuffer-types
13+
- arrays
14+
- control
15+
- datetime
16+
- either
17+
- exceptions
18+
- foldable-traversable
19+
- foreign
20+
- form-urlencoded
21+
- functions
22+
- http-methods
23+
- lists
24+
- maybe
25+
- media-types
26+
- newtype
27+
- nullable
28+
- prelude
29+
- transformers
30+
- web-dom
31+
- web-file
32+
- web-xhr
33+
workspace:
34+
extraPackages: {}
35+
packageSet:
36+
registry: 60.5.0

test/Test/Main.purs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module Test.Main where
2+
3+
import Prelude
4+
5+
import Effect (Effect)
6+
import Effect.Class.Console (log)
7+
8+
main :: Effect Unit
9+
main = do
10+
log "🍕"
11+
log "You should add some tests."

0 commit comments

Comments
 (0)