From 03d4c876e25ba3da3649492fa63c7641a2aacabd Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Thu, 10 Oct 2024 15:31:33 +0700 Subject: [PATCH 1/5] feat: migrate to spago@next --- .github/workflows/ci.yml | 47 +++++++++------------------------------- bower.json | 42 ----------------------------------- package.json | 16 ++++++++++---- packages.dhall | 5 ----- spago.dhall | 28 ------------------------ spago.yaml | 38 ++++++++++++++++++++++++++++++++ 6 files changed, 60 insertions(+), 116 deletions(-) delete mode 100644 bower.json delete mode 100644 packages.dhall delete mode 100644 spago.dhall create mode 100644 spago.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 266172a..76cf55a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,56 +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 - npx pulp test diff --git a/bower.json b/bower.json deleted file mode 100644 index bbf1da8..0000000 --- a/bower.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "purescript-aff", - "homepage": "https://github.com/slamdata/purescript-aff", - "description": "Asynchronous effect monad", - "repository": { - "type": "git", - "url": "https://github.com/purescript-contrib/purescript-aff.git" - }, - "license": "Apache-2.0", - "ignore": [ - "**/.*", - "bower_components", - "node_modules", - "output", - "test", - "bower.json", - "package.json" - ], - "dependencies": { - "purescript-arrays": "^7.0.0", - "purescript-bifunctors": "^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-functions": "^6.0.0", - "purescript-maybe": "^6.0.0", - "purescript-newtype": "^5.0.0", - "purescript-parallel": "^7.0.0", - "purescript-prelude": "^6.0.0", - "purescript-refs": "^6.0.0", - "purescript-tailrec": "^6.0.0", - "purescript-transformers": "^6.0.0", - "purescript-unsafe-coerce": "^6.0.0" - }, - "devDependencies": { - "purescript-minibench": "^4.0.0", - "purescript-assert": "^6.0.0" - } -} diff --git a/package.json b/package.json index 1079001..a4d7882 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,19 @@ { "private": true, + "name": "purescript-aff", + "homepage": "https://github.com/slamdata/purescript-aff", + "description": "Asynchronous effect monad", + "repository": { + "type": "git", + "url": "https://github.com/purescript-contrib/purescript-aff.git" + }, + "license": "Apache-2.0", "scripts": { - "build": "eslint src && spago build --purs-args '--censor-lib --strict'", - "test": "spago test --no-install" + "build": "eslint src && spago build --censor-stats --strict --pedantic-packages", + "test": "spago test --offline" }, "devDependencies": { - "eslint": "^7.10.0", - "purescript-psa": "^0.8.2" + "eslint": "^9.12.0", + "purescript-psa": "^0.9.0" } } diff --git a/packages.dhall b/packages.dhall deleted file mode 100644 index e2fa4cb..0000000 --- a/packages.dhall +++ /dev/null @@ -1,5 +0,0 @@ -let upstream = - https://github.com/purescript/package-sets/releases/download/psc-0.15.4-20220725/packages.dhall - sha256:e56fbdf33a5afd2a610c81f8b940b413a638931edb41532164e641bb2a9ec29c - -in upstream diff --git a/spago.dhall b/spago.dhall deleted file mode 100644 index 4070681..0000000 --- a/spago.dhall +++ /dev/null @@ -1,28 +0,0 @@ -{ name = "aff" -, dependencies = - [ "arrays" - , "assert" - , "bifunctors" - , "console" - , "control" - , "datetime" - , "effect" - , "either" - , "exceptions" - , "foldable-traversable" - , "functions" - , "maybe" - , "minibench" - , "newtype" - , "parallel" - , "partial" - , "prelude" - , "refs" - , "st" - , "tailrec" - , "transformers" - , "unsafe-coerce" - ] -, packages = ./packages.dhall -, sources = [ "src/**/*.purs", "test/**/*.purs" ] -} diff --git a/spago.yaml b/spago.yaml new file mode 100644 index 0000000..d235e1b --- /dev/null +++ b/spago.yaml @@ -0,0 +1,38 @@ +package: + name: aff + publish: + license: Apache-2.0 + version: 8.0.0 + location: + githubOwner: purescript-contrib + githubRepo: purescript-aff + dependencies: + - control + - datetime + - effect + - either + - exceptions + - functions + - newtype + - parallel + - partial + - prelude + - st + - tailrec + - transformers + - unsafe-coerce + test: + main: Test.Main + dependencies: + - arrays + - assert + - bifunctors + - console + - foldable-traversable + - maybe + - minibench + - refs +workspace: + extraPackages: {} + packageSet: + registry: 60.4.0 From 7eb4df7fbc90111e44837af5292f765f48b6185c Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Fri, 11 Oct 2024 11:02:24 +0700 Subject: [PATCH 2/5] feat: migrate to spago@next --- .github/workflows/ci.yml | 2 +- package.json | 2 +- spago.yaml | 32 ++++++++++++++++---------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76cf55a..832e988 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: output - name: Build source - run: spago build --censor-stats --strict --pedantic-packages + run: spago build --censor-stats --strict --ensure-ranges --pedantic-packages - name: Run tests run: spago test --offline --censor-stats --strict --pedantic-packages -- --censor-codes=UserDefinedWarning diff --git a/package.json b/package.json index a4d7882..8867c04 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "license": "Apache-2.0", "scripts": { - "build": "eslint src && spago build --censor-stats --strict --pedantic-packages", + "build": "eslint src && spago build --censor-stats --strict --ensure-ranges --pedantic-packages", "test": "spago test --offline" }, "devDependencies": { diff --git a/spago.yaml b/spago.yaml index d235e1b..1c5b4d0 100644 --- a/spago.yaml +++ b/spago.yaml @@ -1,26 +1,26 @@ package: name: aff publish: - license: Apache-2.0 + license: MIT version: 8.0.0 location: githubOwner: purescript-contrib githubRepo: purescript-aff dependencies: - - control - - datetime - - effect - - either - - exceptions - - functions - - newtype - - parallel - - partial - - prelude - - st - - tailrec - - transformers - - unsafe-coerce + - control: ">=6.0.0 <7.0.0" + - datetime: ">=6.1.0 <7.0.0" + - effect: ">=4.0.0 <5.0.0" + - either: ">=6.1.0 <7.0.0" + - exceptions: ">=6.1.0 <7.0.0" + - functions: ">=6.0.0 <7.0.0" + - newtype: ">=5.0.0 <6.0.0" + - parallel: ">=7.0.0 <8.0.0" + - partial: ">=4.0.0 <5.0.0" + - prelude: ">=6.0.1 <7.0.0" + - st: ">=6.2.0 <7.0.0" + - tailrec: ">=6.1.0 <7.0.0" + - transformers: ">=6.1.0 <7.0.0" + - unsafe-coerce: ">=6.0.0 <7.0.0" test: main: Test.Main dependencies: @@ -35,4 +35,4 @@ package: workspace: extraPackages: {} packageSet: - registry: 60.4.0 + registry: 60.5.0 From 39067529a03dd065fc1dd6c81d79a3b449c8611a Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Sat, 12 Oct 2024 18:18:16 +0700 Subject: [PATCH 3/5] feat: remove bower.json and empty package-lock.json --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 832e988..13a43ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: run: spago build --censor-stats --strict --ensure-ranges --pedantic-packages - name: Run tests - run: spago test --offline --censor-stats --strict --pedantic-packages -- --censor-codes=UserDefinedWarning + run: spago test --offline --censor-stats --strict --pedantic-packages - name: Verify formatting run: purs-tidy check src test From cb90f8f2135834ac1f3e64cd83723ef4077ae1a4 Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Mon, 14 Oct 2024 11:24:59 +0700 Subject: [PATCH 4/5] feat: bump version to 9.0.0 --- spago.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spago.yaml b/spago.yaml index 1c5b4d0..3d51e33 100644 --- a/spago.yaml +++ b/spago.yaml @@ -2,7 +2,7 @@ package: name: aff publish: license: MIT - version: 8.0.0 + version: 9.0.0 location: githubOwner: purescript-contrib githubRepo: purescript-aff From 14d225cf4efeb9808da075e84358620a87882910 Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Mon, 14 Oct 2024 14:51:06 +0700 Subject: [PATCH 5/5] fix: libraries should not use package sets at all -> use solver --- spago.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spago.yaml b/spago.yaml index 3d51e33..33ab148 100644 --- a/spago.yaml +++ b/spago.yaml @@ -32,7 +32,4 @@ package: - maybe - minibench - refs -workspace: - extraPackages: {} - packageSet: - registry: 60.5.0 +workspace: {}