Skip to content

Commit c6e0134

Browse files
Integrate node-streams-aff into library (#52)
* 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
1 parent cad41aa commit c6e0134

File tree

13 files changed

+796
-5
lines changed

13 files changed

+796
-5
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ jobs:
3333
- name: Run tests
3434
run: |
3535
bower install
36-
npm run-script test --if-present
36+
npx pulp test
37+
npx pulp test --main Test.Main1
38+
npx pulp test --main Test.Main2 | wc -c
39+
npx pulp test --main Test.Main3 -- <(head --bytes 1000000 /dev/zero)
40+
npx pulp test --main Test.Main4
3741
3842
- name: Check formatting
3943
run: |
40-
purs-tidy check src test
44+
purs-tidy check src test

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,22 @@ New features:
5252
- pipeline
5353
- fromString, fromBuffer
5454
- newPassThrough
55+
- Integrated `node-streams-aff` into library (#52 by @JordanMartinez)
56+
57+
Convenience APIs added for readable streams in "paused" mode:
58+
- readSome
59+
- readAll
60+
- readN
61+
62+
Convenience APIs for writeable streams:
63+
- write
64+
- end
65+
66+
Convenience APIs for converting `String`s from/to `Array Buffer`
67+
- toStringUTF8
68+
- fromStringUTF8
69+
70+
The only APIs from the library not added were `newReadable` and `push`.
5571

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

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

bower.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"devDependencies": {
1515
"purescript-assert": "^6.0.0",
1616
"purescript-console": "^6.0.0",
17-
"purescript-partial": "^4.0.0"
17+
"purescript-partial": "^4.0.0",
18+
"purescript-spec": "^7.3.0"
1819
},
1920
"dependencies": {
2021
"purescript-effect": "^4.0.0",
@@ -23,6 +24,7 @@
2324
"purescript-node-buffer": "^9.0.0",
2425
"purescript-nullable": "^6.0.0",
2526
"purescript-prelude": "^6.0.0",
26-
"purescript-node-event-emitter": "https://github.com/purescript-node/purescript-node-event-emitter.git#^3.0.0"
27+
"purescript-node-event-emitter": "https://github.com/purescript-node/purescript-node-event-emitter.git#^3.0.0",
28+
"purescript-aff": "^7.1.0"
2729
}
2830
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"devDependencies": {
1111
"eslint": "^7.15.0",
12-
"pulp": "16.0.0-0",
12+
"pulp": "^16.0.2",
1313
"purescript-psa": "^0.8.2",
1414
"rimraf": "^3.0.2"
1515
}

0 commit comments

Comments
 (0)