Skip to content

Commit 7bb86e6

Browse files
Migrate from Bower/Pulp to Spago (#178)
1 parent 1c9cde3 commit 7bb86e6

31 files changed

Lines changed: 319 additions & 324 deletions

‎.eslintrc.json‎

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎.github/workflows/ci.yml‎

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,20 @@ on:
66
pull_request:
77
branches: [master]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
build:
1114
runs-on: ubuntu-latest
1215
steps:
13-
- uses: actions/checkout@v2
14-
15-
- uses: purescript-contrib/setup-purescript@main
16-
with:
17-
purescript: "unstable"
18-
19-
- uses: actions/setup-node@v2
16+
- uses: actions/checkout@v6
17+
- uses: actions/setup-node@v6
2018
with:
21-
node-version: "14.x"
22-
23-
- name: Install dependencies
24-
run: |
25-
npm install -g bower
26-
npm install
27-
bower install --production
28-
29-
- name: Build source
30-
run: npm run-script build
31-
32-
- name: Run tests
33-
run: |
34-
bower install
35-
npm run-script test --if-present
19+
node-version: "24"
20+
- run: npm install
21+
- run: npm run build
22+
- run: npm test
23+
- run: npm run bench
24+
- run: npm run lint
25+
- run: npm run format:check

‎.gitignore‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/.*
22
!/.gitignore
3-
!/.eslintrc.json
3+
!/.tidyrc.json
4+
!/.oxfmtrc.json
45
!/.github/
56
/bower_components/
67
/node_modules/
78
/output/
8-
package-lock.json
9+
/package-lock.json
10+
/spago.lock

‎.oxfmtrc.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"trailingComma": "es5"
3+
}

‎.tidyrc.json‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"importSort": "ide",
3+
"importWrap": "source",
4+
"indent": 2,
5+
"operatorsFile": null,
6+
"ribbon": 1,
7+
"typeArrowPlacement": "first",
8+
"unicode": "never",
9+
"width": null
10+
}

‎CHANGELOG.md‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,37 @@
22

33
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).
44

5-
## [Unreleased]
5+
## [Unreleased](https://github.com/purescript/purescript-strings/compare/v6.1.0...HEAD)
66

77
Breaking changes:
88

99
New features:
10-
- Added `startsWith` and `endsWith` (#147)
1110

1211
Bugfixes:
1312

1413
Other improvements:
14+
15+
## [v6.1.0](https://github.com/purescript/purescript-strings/releases/tag/v6.1.0) - 2026-10-17
16+
17+
New features:
18+
19+
- Added `startsWith` and `endsWith` (#147)
20+
21+
Other improvements:
22+
23+
- Migrate from Bower/Pulp to Spago and update CI (#178 by @thomashoneyman)
1524
- Redefine `Data.String.NonEmpty.CodeUnits.fromFoldable1` in terms of `singleton` (#168 by @postsolar)
1625

1726
## [v6.0.1](https://github.com/purescript/purescript-strings/releases/tag/v6.0.1) - 2022-08-16
1827

1928
Bugfixes:
29+
2030
- Fix `Char`'s `toEnum` implementation (#163 by @JordanMartinez)
2131

2232
## [v6.0.0](https://github.com/purescript/purescript-strings/releases/tag/v6.0.0) - 2022-04-27
2333

2434
Breaking changes:
35+
2536
- Migrate FFI to ES modules (#158 by @kl0tl and @JordanMartinez)
2637
- Replaced polymorphic proxies with monomorphic `Proxy` (#158 by @JordanMartinez)
2738
- In `slice`, drop bounds checking and `Maybe` return type (#145 by Quelklef)
@@ -31,24 +42,29 @@ New features:
3142
Bugfixes:
3243

3344
Other improvements:
45+
3446
- Surround code with backticks in documentation (#148)
3547
- Make `RegexFlags` a `newtype` and a `Newtype` instance for it(#159 by @mhmdanas)
3648

3749
## [v5.0.0](https://github.com/purescript/purescript-strings/releases/tag/v5.0.0) - 2021-02-26
3850

3951
Breaking changes:
52+
4053
- Added support for PureScript 0.14 and dropped support for all previous versions (#129)
4154
- Updated `replace'` to reflect the existence of optional capturing groups (#126)
4255

4356
New features:
57+
4458
- Replaced `unsafeCoerce` with `coerce` where appropriate (#130)
4559
- Replaced monomorphic proxies with `Type.Proxy.Proxy` and polymorphic variables (#134)
4660
- Added a dotAll regexp flag (#133)
4761

4862
Bugfixes:
63+
4964
- Removed the bounds check from the foreign implementation of `lastIndexOf'` (#137)
5065

5166
Other improvements:
67+
5268
- Fix line endings to match overall project style (#132)
5369
- Removed references to `codePointToInt`, which no longer exists (#135)
5470
- Migrated CI to GitHub Actions and updated installation instructions to use Spago (#136)
@@ -129,7 +145,7 @@ Other improvements:
129145

130146
- Updated dependencies
131147
- `Pattern` and `Replacement` newtypes are now used to distinguish between arguments when a function accepts multiple strings
132-
- `RegexFlags` have been reworked as a monoid (@Risto-Stevcev)
148+
- `RegexFlags` have been reworked as a monoid (@Risto-Stevcev)
133149

134150
## [v1.1.0](https://github.com/purescript/purescript-strings/releases/tag/v1.1.0) - 2016-07-20
135151

‎bench/spago.yaml‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package:
2+
name: strings-bench
3+
build:
4+
strict: true
5+
pedanticPackages: true
6+
dependencies:
7+
- arrays: ">=7.0.0 <8.0.0"
8+
- console: ">=6.0.0 <7.0.0"
9+
- effect: ">=4.0.0 <5.0.0"
10+
- maybe: ">=6.0.0 <7.0.0"
11+
- minibench: ">=4.0.0 <5.0.0"
12+
- partial: ">=4.0.0 <5.0.0"
13+
- prelude: ">=6.0.0 <7.0.0"
14+
- strings: "*"

bench/Main.purs renamed to bench/src/Main.purs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ module Bench.Main where
22

33
import Prelude
44

5-
import Control.Monad.Eff (Eff)
6-
import Control.Monad.Eff.Console (CONSOLE, log)
75
import Data.Array.NonEmpty (fromArray)
86
import Data.Maybe (fromJust)
9-
import Data.String (toCharArray)
10-
import Data.String.NonEmpty (fromFoldable1, fromNonEmptyCharArray)
7+
import Data.String.CodeUnits (toCharArray)
8+
import Data.String.NonEmpty.CodeUnits (fromFoldable1, fromNonEmptyCharArray)
9+
import Effect (Effect)
10+
import Effect.Console (log)
1111
import Partial.Unsafe (unsafePartial)
1212
import Performance.Minibench (benchWith)
1313

14-
main :: Eff (console :: CONSOLE) Unit
14+
main :: Effect Unit
1515
main = do
1616
log "NonEmpty conversions"
1717
log "======"
1818
log ""
1919
benchNonEmptyConversions
2020

21-
benchNonEmptyConversions :: Eff (console :: CONSOLE) Unit
21+
benchNonEmptyConversions :: Effect Unit
2222
benchNonEmptyConversions = do
2323
log "fromNonEmptyCharArray: short"
2424
log "---"

‎bower.json‎

Lines changed: 0 additions & 41 deletions
This file was deleted.

‎package.json‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
{
22
"private": true,
33
"scripts": {
4-
"clean": "rimraf output && rimraf .pulp-cache",
5-
"build": "eslint src && pulp build -- --censor-lib --strict",
6-
"test": "pulp test && npm run test:run:without_codePointAt",
4+
"build": "spago build",
5+
"test": "spago test -p strings && npm run test:run:without_codePointAt",
76
"test:run:without_codePointAt": "node -e \"delete String.prototype.codePointAt; import('./output/Test.Main/index.js').then(m => m.main());\"",
8-
"bench:build": "purs compile 'bench/**/*.purs' 'src/**/*.purs' 'bower_components/*/src/**/*.purs'",
9-
"bench:run": "node --expose-gc -e 'require(\"./output/Bench.Main/index.js\").main()'",
10-
"bench": "npm run bench:build && npm run bench:run"
7+
"bench:build": "spago build -p strings-bench",
8+
"bench:run": "node --expose-gc -e \"import('./output/Bench.Main/index.js').then(m => m.main());\"",
9+
"bench": "npm run bench:build && npm run bench:run",
10+
"lint": "oxlint --deny-warnings src test",
11+
"format": "purs-tidy format-in-place src test bench/src && oxfmt --write .",
12+
"format:check": "purs-tidy check src test bench/src && oxfmt --check ."
1113
},
1214
"devDependencies": {
13-
"eslint": "^7.15.0",
14-
"pulp": "16.0.0-0",
15-
"purescript-psa": "^0.8.2",
16-
"rimraf": "^3.0.2"
15+
"oxfmt": "^0.73.0",
16+
"oxlint": "^1.88.0",
17+
"purescript": "^0.15.16",
18+
"purs-tidy": "^0.11.1",
19+
"spago": "^1.0.5"
1720
}
1821
}

0 commit comments

Comments
 (0)