Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .eslintrc.json

This file was deleted.

29 changes: 13 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"trailingComma": "es5"
}
10 changes: 10 additions & 0 deletions .tidyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"importSort": "ide",
"importWrap": "source",
"indent": 2,
"operatorsFile": null,
"ribbon": 1,
"typeArrowPlacement": "first",
"unicode": "never",
"width": null
}
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,22 @@ Bugfixes:

Other improvements:

## [v6.0.1](https://github.com/purescript/purescript-assert/releases/tag/v6.0.1) - 2026-10-17

Breaking changes:

New features:

Bugfixes:

Other improvements:

- 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

Breaking changes:

- Migrate FFI to ES Modules (#22 by @sigma-andex and @JordanMartinez)

New features:
Expand All @@ -26,13 +39,15 @@ 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:

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
Expand Down Expand Up @@ -82,4 +97,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.

23 changes: 0 additions & 23 deletions bower.json

This file was deleted.

20 changes: 14 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
17 changes: 17 additions & 0 deletions spago.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package:
name: assert
Comment thread
thomashoneyman marked this conversation as resolved.
description: Basic assertions for low-level testing
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"
- prelude: ">=6.0.0 <7.0.0"
workspace: {}
8 changes: 5 additions & 3 deletions src/Test/Assert.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
Loading