diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc54710..76cf55a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,58 +9,29 @@ on: jobs: build: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Set up PureScript toolchain + - name: Set up a PureScript toolchain uses: purescript-contrib/setup-purescript@main with: - purescript: "unstable" + purescript: "latest" purs-tidy: "latest" + spago: "unstable" - name: Cache PureScript dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: - key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }} + key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.lock') }} path: | .spago output - - name: Set up Node toolchain - uses: actions/setup-node@v2 - with: - node-version: "14.x" - - - name: Cache NPM dependencies - uses: actions/cache@v2 - env: - cache-name: cache-node-modules - with: - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Install NPM dependencies - run: npm install - - - name: Build the project - run: npm run build + - name: Build source + run: spago build --censor-stats --strict --pedantic-packages - name: Run tests - run: npm run test + run: spago test --offline --censor-stats --strict --pedantic-packages -- --censor-codes=UserDefinedWarning - - name: Check formatting + - name: Verify formatting run: purs-tidy check src test - - - name: Verify Bower & Pulp - run: | - npm install bower pulp@16.0.0-0 - npx bower install - npx pulp build -- --censor-lib --strict - if [ -d "test" ]; then - npx pulp test - fi diff --git a/bower.json b/bower.json index 2e2ae8d..77d2a81 100644 --- a/bower.json +++ b/bower.json @@ -21,36 +21,5 @@ "bower.json", "gulpfile.js", "package.json" - ], - "dependencies": { - "purescript-aff": "^7.0.0", - "purescript-argonaut-core": "^7.0.0", - "purescript-arraybuffer-types": "^3.0.2", - "purescript-arrays": "^7.0.0", - "purescript-console": "^6.0.0", - "purescript-control": "^6.0.0", - "purescript-datetime": "^6.0.0", - "purescript-effect": "^4.0.0", - "purescript-either": "^6.0.0", - "purescript-exceptions": "^6.0.0", - "purescript-foldable-traversable": "^6.0.0", - "purescript-foreign": "^7.0.0", - "purescript-foreign-object": "^4.0.0", - "purescript-form-urlencoded": "^7.0.0", - "purescript-functions": "^6.0.0", - "purescript-http-methods": "^6.0.0", - "purescript-lists": "^7.0.0", - "purescript-maybe": "^6.0.0", - "purescript-media-types": "^6.0.0", - "purescript-newtype": "^5.0.0", - "purescript-nullable": "^6.0.0", - "purescript-prelude": "^6.0.0", - "purescript-transformers": "^6.0.0", - "purescript-web-dom": "^6.0.0", - "purescript-web-file": "^4.0.0", - "purescript-web-xhr": "^5.0.0" - }, - "devDependencies": { - "purescript-psci-support": "^6.0.0" - } + ] } diff --git a/package.json b/package.json index f0133e3..af79276 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "private": true, "scripts": { - "build": "eslint src && spago build --purs-args '--censor-lib --strict'" + "build": "eslint src && spago build --censor-stats --strict --pedantic-packages" }, "devDependencies": { - "body-parser": "^1.19.0", - "eslint": "^7.10.0", - "express": "^4.17.1", - "purescript-psa": "^0.8.2", - "xhr2": "^0.2.0" + "body-parser": "^1.20.3", + "eslint": "^9.12.0", + "express": "^4.21.1", + "purescript-psa": "^0.9.0", + "xhr2": "^0.2.1" } } diff --git a/packages.dhall b/packages.dhall deleted file mode 100644 index 582d6d3..0000000 --- a/packages.dhall +++ /dev/null @@ -1,4 +0,0 @@ -let upstream = - https://raw.githubusercontent.com/purescript/package-sets/prepare-0.15/src/packages.dhall - -in upstream diff --git a/spago.dhall b/spago.dhall deleted file mode 100644 index 81a57e7..0000000 --- a/spago.dhall +++ /dev/null @@ -1,32 +0,0 @@ -{ name = "affjax" -, dependencies = - [ "aff" - , "argonaut-core" - , "arraybuffer-types" - , "arrays" - , "console" - , "control" - , "datetime" - , "effect" - , "either" - , "exceptions" - , "foldable-traversable" - , "foreign" - , "foreign-object" - , "form-urlencoded" - , "functions" - , "http-methods" - , "lists" - , "maybe" - , "media-types" - , "newtype" - , "nullable" - , "prelude" - , "transformers" - , "web-dom" - , "web-file" - , "web-xhr" - ] -, packages = ./packages.dhall -, sources = [ "src/**/*.purs" ] -} diff --git a/spago.yaml b/spago.yaml new file mode 100644 index 0000000..35b6867 --- /dev/null +++ b/spago.yaml @@ -0,0 +1,36 @@ +package: + name: affjax + publish: + license: Apache-2.0 + version: 13.0.0 + location: + githubOwner: purescript-contrib + githubRepo: purescript-affjax + dependencies: + - aff + - argonaut-core + - arraybuffer-types + - arrays + - control + - datetime + - either + - exceptions + - foldable-traversable + - foreign + - form-urlencoded + - functions + - http-methods + - lists + - maybe + - media-types + - newtype + - nullable + - prelude + - transformers + - web-dom + - web-file + - web-xhr +workspace: + extraPackages: {} + packageSet: + registry: 60.5.0 diff --git a/test/Test/Main.purs b/test/Test/Main.purs new file mode 100644 index 0000000..3590d4d --- /dev/null +++ b/test/Test/Main.purs @@ -0,0 +1,11 @@ +module Test.Main where + +import Prelude + +import Effect (Effect) +import Effect.Class.Console (log) + +main :: Effect Unit +main = do + log "🍕" + log "You should add some tests."