From d248f7e637fb7a8cfb0e960cf99cb2e3b1d461fb Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Wed, 14 Oct 2026 22:16:49 +0000 Subject: [PATCH 1/8] Migrate repository tooling and CI to Spago --- .eslintrc.json | 26 -------------------------- .github/workflows/ci.yml | 33 +++++++++++---------------------- .gitignore | 7 ++++--- .oxfmtrc.json | 3 +++ .tidyrc.json | 10 ++++++++++ CHANGELOG.md | 2 ++ bower.json | 19 ------------------- package.json | 23 ++++++++++++++++------- spago.yaml | 13 +++++++++++++ 9 files changed, 59 insertions(+), 77 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..6d95f29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,30 +6,19 @@ 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/setup-node@v2 + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 with: - node-version: "14.x" - - - name: Install dependencies - run: | - npm install -g bower - npm install - bower install --production - - - name: Build source - run: npm run-script build - - - name: Run tests - run: | - bower install - npm run-script test --if-present + node-version: "24" + - run: npm install + - run: npm run build + - run: npm test + - run: npm run lint + - run: npm run format:check diff --git a/.gitignore b/.gitignore index b846b63..6c007d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ /.* !/.gitignore -!/.eslintrc.json +!/.oxfmtrc.json +!/.tidyrc.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 b93cf9d..caedd25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ Bugfixes: Other improvements: +- Migrate from Bower/Pulp to Spago and modernize CI, linting, and formatting tools. + ## [v4.0.0](https://github.com/purescript/purescript-partial/releases/tag/v4.0.0) - 2022-04-27 Breaking changes: diff --git a/bower.json b/bower.json deleted file mode 100644 index 64a4e15..0000000 --- a/bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "purescript-partial", - "homepage": "https://github.com/purescript/purescript-partial", - "description": "Utilities for working with partial functions", - "license": "BSD-3-Clause", - "repository": { - "type": "git", - "url": "https://github.com/purescript/purescript-partial.git" - }, - "ignore": [ - "**/.*", - "bower_components", - "node_modules", - "output", - "test", - "bower.json", - "package.json" - ] -} diff --git a/package.json b/package.json index a1d6811..6bf367b 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,23 @@ { "private": true, + "homepage": "https://github.com/purescript/purescript-partial", + "license": "BSD-3-Clause", + "repository": { + "type": "git", + "url": "https://github.com/purescript/purescript-partial.git" + }, "scripts": { - "clean": "rimraf output && rimraf .pulp-cache", - "build": "eslint src && pulp build -- --censor-lib --strict", - "test": "pulp test" + "build": "spago build", + "test": "spago test", + "lint": "oxlint --deny-warnings src test", + "format": "purs-tidy format-in-place src test && oxfmt --write .", + "format:check": "purs-tidy check src test && 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..ace7a86 --- /dev/null +++ b/spago.yaml @@ -0,0 +1,13 @@ +package: + name: partial + description: Utilities for working with partial functions + build: + strict: true + pedanticPackages: true + test: + main: Test.Main + strict: true + pedanticPackages: true + dependencies: [] + dependencies: [] +workspace: {} From e545a3750b66a36d0e10187cc3a0d9d3bf444943 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Wed, 14 Oct 2026 22:17:57 +0000 Subject: [PATCH 2/8] Format repository files with Oxfmt --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index caedd25..607e554 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Other improvements: ## [v4.0.0](https://github.com/purescript/purescript-partial/releases/tag/v4.0.0) - 2022-04-27 Breaking changes: + - Migrate FFI to ES modules (#24 by @kl0tl and @JordanMartinez) New features: @@ -28,6 +29,7 @@ Other improvements: ## [v3.0.0](https://github.com/purescript/purescript-partial/releases/tag/v3.0.0) - 2021-02-26 Breaking changes: + - Added support for PureScript 0.14 and dropped support for all previous versions (#16) - Removed deprecated `unsafePartialBecause` (#16) @@ -36,6 +38,7 @@ New features: Bugfixes: Other improvements: + - Added extra documentation to `unsafePartial` (#16) - Removed outer function in `_crashWith` FFI (#16) - Migrated CI to GitHub Actions and updated installation instructions to use Spago (#17) From 441c046266d182a59de9a3aa65ff20f5b1d81505 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Wed, 14 Oct 2026 23:50:03 +0000 Subject: [PATCH 3/8] Place package dependencies before test configuration --- spago.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spago.yaml b/spago.yaml index ace7a86..1cfd1a8 100644 --- a/spago.yaml +++ b/spago.yaml @@ -4,10 +4,10 @@ package: build: strict: true pedanticPackages: true + dependencies: [] test: main: Test.Main strict: true pedanticPackages: true dependencies: [] - dependencies: [] workspace: {} From 8c3ec5c304297611555413050da66eb3bc1293ff Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Thu, 15 Oct 2026 00:01:41 +0000 Subject: [PATCH 4/8] Configure registry publication metadata --- spago.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spago.yaml b/spago.yaml index 1cfd1a8..9ed2706 100644 --- a/spago.yaml +++ b/spago.yaml @@ -4,6 +4,12 @@ package: build: strict: true pedanticPackages: true + publish: + version: 4.0.1 + license: BSD-3-Clause + location: + githubOwner: purescript + githubRepo: purescript-partial dependencies: [] test: main: Test.Main From cc6bac8d4e5b33f40b3024348034998c292b25ef Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Thu, 15 Oct 2026 00:32:44 +0000 Subject: [PATCH 5/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 607e554..81f983a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ Bugfixes: Other improvements: -- Migrate from Bower/Pulp to Spago and modernize CI, linting, and formatting tools. +- Migrate from Bower/Pulp to Spago and modernize CI, linting, and formatting tools (#27 by @thomashoneyman) ## [v4.0.0](https://github.com/purescript/purescript-partial/releases/tag/v4.0.0) - 2022-04-27 From 6fb21717edff45bb010f8f16206c9370d3ec4553 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Thu, 15 Oct 2026 00:44:22 +0000 Subject: [PATCH 6/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 81f983a..40213a8 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] +## [v4.0.1](https://github.com/purescript/purescript-partial/releases/tag/v4.0.1) Breaking changes: From 6a370ce1a1734baabd744e49591962112c6fa23d Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Thu, 15 Oct 2026 21:26:11 +0000 Subject: [PATCH 7/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 40213a8..c9eaf0f 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). -## [v4.0.1](https://github.com/purescript/purescript-partial/releases/tag/v4.0.1) +## [Unreleased] + +Breaking changes: + +New features: + +Bugfixes: + +Other improvements: + +## [v4.0.1](https://github.com/purescript/purescript-partial/releases/tag/v4.0.1) - 2026-10-17 Breaking changes: From 5f30502315997afcb3ef13a69725a38d4547facf Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Sat, 17 Oct 2026 13:45:59 +0000 Subject: [PATCH 8/8] Complete release changelog links and README correction --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9eaf0f..99dab1b 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] +## [Unreleased](https://github.com/purescript/purescript-partial/compare/v4.0.1...HEAD) Breaking changes: @@ -23,6 +23,7 @@ Bugfixes: Other improvements: - Migrate from Bower/Pulp to Spago and modernize CI, linting, and formatting tools (#27 by @thomashoneyman) +- Fix incorrect constraint syntax in the README (#26 by @ursi) ## [v4.0.0](https://github.com/purescript/purescript-partial/releases/tag/v4.0.0) - 2022-04-27