Skip to content

Commit

Permalink
Integrate node-streams-aff into library (#52)
Browse files Browse the repository at this point in the history
* Copy over Node.Stream.Aff as-is

* Update code for breaking changes

* Simplify usage of `readable`

* Copy over tests as-is, renaming Main.purs

* Get tests to compile and pass

* Update CI

* Format docs

* Add changelog entry

* Update pulp to 16.0.2; fix CI usage of pulp
  • Loading branch information
JordanMartinez authored Jul 8, 2023
1 parent cad41aa commit c6e0134
Show file tree
Hide file tree
Showing 13 changed files with 796 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ jobs:
- name: Run tests
run: |
bower install
npm run-script test --if-present
npx pulp test
npx pulp test --main Test.Main1
npx pulp test --main Test.Main2 | wc -c
npx pulp test --main Test.Main3 -- <(head --bytes 1000000 /dev/zero)
npx pulp test --main Test.Main4
- name: Check formatting
run: |
purs-tidy check src test
purs-tidy check src test
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@ New features:
- pipeline
- fromString, fromBuffer
- newPassThrough
- Integrated `node-streams-aff` into library (#52 by @JordanMartinez)

Convenience APIs added for readable streams in "paused" mode:
- readSome
- readAll
- readN

Convenience APIs for writeable streams:
- write
- end

Convenience APIs for converting `String`s from/to `Array Buffer`
- toStringUTF8
- fromStringUTF8

The only APIs from the library not added were `newReadable` and `push`.

Bugfixes:
- Drop misleading comment for `setEncoding` (#51 by @JordanMartinez)
Expand All @@ -65,6 +81,7 @@ Other improvements:
- Refactor tests using `passThrough` streams (#49 by @JordanMartinez)
- Updated FFI to use uncurried functions (#50 by @JordanMartinez)
- Relocated `setEncoding`, `Read`, and `Write` for better locality in docs (#51 by @JordanMartinez)
- Added `node-streams-aff` tests (#52 by @JordanMartinez)

## [v7.0.0](https://github.com/purescript-node/purescript-node-streams/releases/tag/v7.0.0) - 2022-04-29

Expand Down
6 changes: 4 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"devDependencies": {
"purescript-assert": "^6.0.0",
"purescript-console": "^6.0.0",
"purescript-partial": "^4.0.0"
"purescript-partial": "^4.0.0",
"purescript-spec": "^7.3.0"
},
"dependencies": {
"purescript-effect": "^4.0.0",
Expand All @@ -23,6 +24,7 @@
"purescript-node-buffer": "^9.0.0",
"purescript-nullable": "^6.0.0",
"purescript-prelude": "^6.0.0",
"purescript-node-event-emitter": "https://github.com/purescript-node/purescript-node-event-emitter.git#^3.0.0"
"purescript-node-event-emitter": "https://github.com/purescript-node/purescript-node-event-emitter.git#^3.0.0",
"purescript-aff": "^7.1.0"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"devDependencies": {
"eslint": "^7.15.0",
"pulp": "16.0.0-0",
"pulp": "^16.0.2",
"purescript-psa": "^0.8.2",
"rimraf": "^3.0.2"
}
Expand Down
Loading

0 comments on commit c6e0134

Please sign in to comment.