From d8b8dab777c8dfb37c02c4d3cfe2235498e9c4d2 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Wed, 14 Oct 2026 23:47:29 +0000 Subject: [PATCH 1/8] Migrate to Spago and modernize CI tooling --- .eslintrc.json | 26 -------------------------- .github/workflows/ci.yml | 29 +++++++++++++---------------- .gitignore | 6 ++++-- .oxfmtrc.json | 3 +++ .tidyrc.json | 10 ++++++++++ CHANGELOG.md | 2 +- bower.json | 23 ----------------------- package.json | 20 ++++++++++++++------ spago.yaml | 10 ++++++++++ 9 files changed, 55 insertions(+), 74 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 .oxfmtrc.json create mode 100644 .tidyrc.json delete mode 100644 bower.json create mode 100644 spago.yaml diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 1c6afb9..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module" - }, - "extends": "eslint:recommended", - "rules": { - "strict": [2, "global"], - "block-scoped-var": 2, - "consistent-return": 2, - "eqeqeq": [2, "smart"], - "guard-for-in": 2, - "no-caller": 2, - "no-extend-native": 2, - "no-loop-func": 2, - "no-new": 2, - "no-param-reassign": 2, - "no-return-assign": 2, - "no-unused-expressions": 2, - "no-use-before-define": 2, - "radix": [2, "always"], - "indent": [2, 2], - "quotes": [2, "double"], - "semi": [2, "always"] - } -} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c69237a..e239fe5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,30 +6,27 @@ on: pull_request: branches: [master] +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - uses: purescript-contrib/setup-purescript@main - with: - purescript: "unstable" + - uses: actions/checkout@v6 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v6 with: - node-version: "14.x" + node-version: "24" - name: Install dependencies - run: | - npm install -g bower - npm install - bower install --production + run: npm install - name: Build source - run: npm run-script build + run: npm run build + + - name: Lint + run: npm run lint - - name: Run tests - run: | - bower install - npm run-script test --if-present + - name: Check formatting + run: npm run format:check diff --git a/.gitignore b/.gitignore index b846b63..7ddb3b1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ /.* !/.gitignore -!/.eslintrc.json +!/.tidyrc.json +!/.oxfmtrc.json !/.github/ /bower_components/ /node_modules/ /output/ -package-lock.json +/package-lock.json +/spago.lock diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 0000000..757fd64 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,3 @@ +{ + "trailingComma": "es5" +} diff --git a/.tidyrc.json b/.tidyrc.json new file mode 100644 index 0000000..9e39cf1 --- /dev/null +++ b/.tidyrc.json @@ -0,0 +1,10 @@ +{ + "importSort": "ide", + "importWrap": "source", + "indent": 2, + "operatorsFile": null, + "ribbon": 1, + "typeArrowPlacement": "first", + "unicode": "never", + "width": null +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d703ec..51a1300 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ New features: Bugfixes: Other improvements: +- Migrate from Bower/Pulp to Spago and update CI, linting, and formatting. ## [v6.0.0](https://github.com/purescript/purescript-assert/releases/tag/v6.0.0) - 2022-04-27 @@ -82,4 +83,3 @@ This release works with versions 0.7.\* of the PureScript compiler. It will not ## [v0.1.0-rc.1](https://github.com/purescript/purescript-assert/releases/tag/v0.1.0-rc.1) - 2015-06-06 Initial release candidate. - diff --git a/bower.json b/bower.json deleted file mode 100644 index 9dc239c..0000000 --- a/bower.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "purescript-assert", - "homepage": "https://github.com/purescript/purescript-assert", - "license": "BSD-3-Clause", - "repository": { - "type": "git", - "url": "https://github.com/purescript/purescript-assert.git" - }, - "ignore": [ - "**/.*", - "bower_components", - "node_modules", - "output", - "test", - "bower.json", - "package.json" - ], - "dependencies": { - "purescript-console": "^6.0.0", - "purescript-effect": "^4.0.0", - "purescript-prelude": "^6.0.0" - } -} diff --git a/package.json b/package.json index 4ea39f9..29488a6 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,21 @@ { "private": true, + "license": "BSD-3-Clause", + "repository": { + "type": "git", + "url": "https://github.com/purescript/purescript-assert.git" + }, "scripts": { - "clean": "rimraf output && rimraf .pulp-cache", - "build": "eslint src && pulp build -- --censor-lib --strict" + "build": "spago build", + "lint": "oxlint --deny-warnings src", + "format": "purs-tidy format-in-place src && oxfmt --write .", + "format:check": "purs-tidy check src && oxfmt --check ." }, "devDependencies": { - "eslint": "^7.15.0", - "pulp": "16.0.0-0", - "purescript-psa": "^0.8.2", - "rimraf": "^3.0.2" + "oxfmt": "^0.73.0", + "oxlint": "^1.88.0", + "purescript": "^0.15.16", + "purs-tidy": "^0.11.1", + "spago": "^1.0.5" } } diff --git a/spago.yaml b/spago.yaml new file mode 100644 index 0000000..36307a5 --- /dev/null +++ b/spago.yaml @@ -0,0 +1,10 @@ +package: + name: assert + build: + strict: true + pedanticPackages: true + dependencies: + - console: ">=6.0.0 <7.0.0" + - effect: ">=4.0.0 <5.0.0" + - prelude: ">=6.0.0 <7.0.0" +workspace: {} From ca0fdf1f4a08713096c9c3dec030a31b2d99eeaf Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Wed, 14 Oct 2026 23:50:12 +0000 Subject: [PATCH 2/8] Format PureScript and repository files --- CHANGELOG.md | 4 ++++ src/Test/Assert.purs | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51a1300..6fdf372 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,11 +11,13 @@ New features: Bugfixes: Other improvements: + - Migrate from Bower/Pulp to Spago and update CI, linting, and formatting. ## [v6.0.0](https://github.com/purescript/purescript-assert/releases/tag/v6.0.0) - 2022-04-27 Breaking changes: + - Migrate FFI to ES Modules (#22 by @sigma-andex and @JordanMartinez) New features: @@ -27,6 +29,7 @@ Other improvements: ## [v5.0.0](https://github.com/purescript/purescript-assert/releases/tag/v5.0.0) - 2021-02-26 Breaking changes: + - Added support for PureScript 0.14 and dropped support for all previous versions (#16) New features: @@ -34,6 +37,7 @@ New features: Bugfixes: Other improvements: + - Generated changelog and added PR template (#18, #19) - Migrated to GitHub Actions and updated installation instructions (#17) - Updated psa to v0.8.0 diff --git a/src/Test/Assert.purs b/src/Test/Assert.purs index e5c80ed..3fcf79d 100644 --- a/src/Test/Assert.purs +++ b/src/Test/Assert.purs @@ -84,13 +84,15 @@ assertEqual' => String -> { actual :: a, expected :: a } -> Effect Unit -assertEqual' userMessage {actual, expected} = do +assertEqual' userMessage { actual, expected } = do unless result $ error message assert' message result where message = (if userMessage == "" then "" else userMessage <> "\n") - <> "Expected: " <> show expected - <> "\nActual: " <> show actual + <> "Expected: " + <> show expected + <> "\nActual: " + <> show actual result = actual == expected -- | Throws a runtime exception when the value is `false`. From a208cd44d778d15f7cd714859be0003282eb39dc Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Wed, 14 Oct 2026 23:58:44 +0000 Subject: [PATCH 3/8] Add registry publication metadata --- spago.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spago.yaml b/spago.yaml index 36307a5..45af56b 100644 --- a/spago.yaml +++ b/spago.yaml @@ -3,6 +3,12 @@ package: build: strict: true pedanticPackages: true + publish: + version: 6.0.1 + license: BSD-3-Clause + location: + githubOwner: purescript + githubRepo: purescript-assert dependencies: - console: ">=6.0.0 <7.0.0" - effect: ">=4.0.0 <5.0.0" From 14d39710bb2669e483d3d633997dbbfafb5eb08a Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Thu, 15 Oct 2026 00:32:45 +0000 Subject: [PATCH 4/8] Credit migration pull request in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fdf372..f5dd137 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ Bugfixes: Other improvements: -- Migrate from Bower/Pulp to Spago and update CI, linting, and formatting. +- Migrate from Bower/Pulp to Spago and update CI, linting, and formatting (#24 by @thomashoneyman) ## [v6.0.0](https://github.com/purescript/purescript-assert/releases/tag/v6.0.0) - 2022-04-27 From 5beaddb752937cd35047fb5850baa5a68c528b82 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Thu, 15 Oct 2026 00:44:48 +0000 Subject: [PATCH 5/8] Prepare versioned changelog for release --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5dd137..3bfbbe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [v6.0.1](https://github.com/purescript/purescript-assert/releases/tag/v6.0.1) Breaking changes: From 6761a7753478d413939d2dba5420d0d68f971ecb Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Thu, 15 Oct 2026 21:26:16 +0000 Subject: [PATCH 6/8] Restore Unreleased changelog template and date proposed release --- CHANGELOG.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bfbbe2..f8a9c69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,17 @@ Notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [v6.0.1](https://github.com/purescript/purescript-assert/releases/tag/v6.0.1) +## [Unreleased] + +Breaking changes: + +New features: + +Bugfixes: + +Other improvements: + +## [v6.0.1](https://github.com/purescript/purescript-assert/releases/tag/v6.0.1) - 2026-10-17 Breaking changes: From 9f5c0be76f7e6919e4c66a585f87abfbcc96e20d Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Thu, 15 Oct 2026 21:33:12 +0000 Subject: [PATCH 7/8] Describe the library in Spago metadata --- spago.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/spago.yaml b/spago.yaml index 45af56b..cec9630 100644 --- a/spago.yaml +++ b/spago.yaml @@ -1,5 +1,6 @@ package: name: assert + description: Basic assertions for low-level testing of core libraries build: strict: true pedanticPackages: true From 711b580be2900f04fe958f46a38afa9eaa9c258d Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Thu, 15 Oct 2026 17:45:00 -0400 Subject: [PATCH 8/8] Update package description in spago.yaml --- spago.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spago.yaml b/spago.yaml index cec9630..d744b9e 100644 --- a/spago.yaml +++ b/spago.yaml @@ -1,6 +1,6 @@ package: name: assert - description: Basic assertions for low-level testing of core libraries + description: Basic assertions for low-level testing build: strict: true pedanticPackages: true