Notable changes to this project are documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Breaking changes:
New features:
Bugfixes:
Other improvements:
v9.0.0 - 2022-06-05
Breaking changes:
-
Expose Buffer API using typeclass-less API witout removing typeclass API (#53 by @JordanMartinez)
Previously, compiler would fail to infer the type of
Buffer.create 1asEffect Bufferbecause the Buffer API was exposed only via the multiparameter typeclassMonadBuffer. Due to the functional dependency between the two parameters, the monadic type cannot be inferred until the buffer type is known (eitherBufferorSTBuffer).:import Node.Buffer as Buffer -- Example 1 main :: Effect Unit main = do x <- Buffer.create 1 -- compiler: is this `Int -> Effect Buffer` or `Int -> ST h (STBuffer h)? pure unit
The workaround was to add a type annotation, indicating the
xis aBuffer:import Node.Buffer as Buffer -- Example 2 main :: Effect Unit main = do x :: Buffer <- Buffer.create 1 -- compiler: Oh! It's `Int -> Effect Buffer` pure unit
This change does not break anyone's code if one was using a
create(or another such typeclass member) to getInt -> Effect Buffer. Rather, such users can now drop the:: Bufferannotation (i.e. Example 1 above now compiles).If one was using
createto getforall m buf. MonadBuffer buf m => Int -> m buf, then one will need to update their imports:-import Node.Buffer (class MonadBuffer) +import Node.Buffer.Class (class MonadBuffer)
New features:
-
Added the following APIs (#55 by @JordanMartinez)
Buffer.alloc,Buffer.allocUnsafe,Buffer.allocUnsafeSlowBuffer.poolSize,Buffer.setPoolSizebuffer.swap16,buffer.swap32,buffer.swap64buffer.compare: https://nodejs.org/docs/latest-v18.x/api/buffer.html#bufcomparetarget-targetstart-targetend-sourcestart-sourceendbuffer.toString(encoding, start, end): https://nodejs.org/docs/latest-v18.x/api/buffer.html#buftostringencoding-start-endbuffer.transcode(buf, from, to)- constants:
-
Added a new data constructor for
Encoding:Base64Url(#56 by @JordanMartinez)
Bugfixes:
Other improvements:
- Format code with
purs-tidy; enforce in CI (#52 by @JordanMartinez) - Update FFI to use uncurried functions (#54 by @JordanMartinez)
- Removed
Internal.pursfile (#54 by @JordanMartinez) - Bumped CI's node version to
lts/*(#55/#57 by @JordanMartinez) - Updated CI
actions/checkoutandactions/setup-nodeetov3(#55 by @JordanMartinez)
v8.0.0 - 2022-04-27
Breaking changes:
- Update project and deps to PureScript v0.15.0 (#46 by @sigma-andex and @JordanMartinez)
New features:
Bugfixes:
Other improvements:
v7.0.1 - 2021-05-06
Other improvements:
- Fix warnings revealed by v0.14.1 PS release (#44 by @JordanMartinez)
v7.0.0 - 2021-02-26
Breaking changes:
- Updated code for PureScript 0.14 and dropped the
proxydependency as theproxylibrary has been migrated intoprelude(#39).
Other improvements:
- Removed primes from the
concat'function in FFI in preparation for ES modules support (#36) - Migrated CI to use GitHub Actions and updated installation instructions to use Spago (#38)
- Stopped returning empty objects in foreign implementations for functions which return
Unitfor a small performance benefit (#40) - Added a CHANGELOG.md file and pull request template to the repository (#41)
v6.0.0 - 2019-07-24
- Add a
MutableBuffertype class with instances for bothEffectandST, to allow mutating buffers in either monad, and potentially other monads too (#24, @Dretch) - Remove the
Show Bufferinstance, as reading from a mutable buffer is effectful (@Dretch) - Use
Numberfor reading and writing with Buffers (#25, @hdgarrood)
v5.0.0 - 2018-05-26
- Updated for PureScript 0.12
v4.1.0 - 2017-12-11
- Added
fromArrayBuffer(@matthewleon)
v4.0.0 - 2017-11-19
- Added
toArrayBuffer(@matthewleon)
v3.0.1 - 2017-06-20
- Fixed an encoding issue in
writeString(@justinwoo)
v3.0.0 - 2017-04-04
- Updated for 0.11 (@anilanar)
v2.0.1 - 2017-02-10
- Fixed
getAtOffsetFFI implementation (@rightfold) - Fixed documentation typo (@rightfold)
v2.0.0 - 2016-10-17
- Updated dependencies (@nwolverson)
- Added
latin1encoding (@Risto-Stevcev)
v1.0.0 - 2016-06-06
- Compatibility with psc 0.9
- Better behaved
Showinstance, plus anencodingToNodefunction which is now recommended for use with node APIs instead ofshow.
v0.2.2 - 2016-04-03
- Fixed
byteLength, which had a bad FFI declaration, so that it would throw an error every time it was called.
v0.2.1 - 2016-04-03
- No code changes, this tag was just for publishing to Pursuit.
v0.2.0 - 2015-11-11
- Major important fixes. This is a breaking change as type signatures have changed. (@hdgarrood)
v0.1.1 - 2015-11-10
- Fixed
write,writeString, andfill, which used to immediately throw errors at runtime upon use.
v0.1.0 - 2015-07-06
- Support for compiler version 0.7
- Use Int instead of Number where appropriate (which happens to be everywhere)
v0.0.1 - 2014-10-14
- Initial versioned release