All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
4.3.0 - 2024-10-14
- Added conditional export "node" - symbols previously only exported from
@fanoutio/grip/node
are now available on the main@fanoutio/grip
export when the condition"node"
is present when resolving imports.
4.2.0 - 2024-03-25
- examples: Added examples for using
@fanoutio/grip
with Bun, Deno, Cloudflare Workers, Remix, and Next.js backend applications
- docs: Correct wording of Fastly Compute demos to use Secret Store
- docs: Correct imports in buildFanoutGripConfig example in README
- examples: Correct typos and use consistent spacing in Node.js and Fastly Compute examples
4.1.0 - 2024-03-18
- feat: Added buildGripConfig function for Fastly Fanout
- docs: Update docs on publishing through Fastly Fanout
4.0.2 - 2024-03-06
- fix: Fix "types" field in package.json
- docs: Write
127.0.0.1
instead oflocalhost
4.0.1 - 2024-03-04
parseGripUri
second parameter can haveundefined
values and they will successfully be ignored.
4.0.0 - 2024-03-01
- Major update improving simplicity
- Simplified build, now exported as ESM modules only.
- Now based on Web-interoperable APIs (such as
fetch()
andcrypto.subtle
).- Usage on Web-interoperable runtimes no longer requires polyfills for Node.js
functionality such as
node:crypto
. isWsOverHttp()
andgetWebSocketContextFromReq()
functions now work withRequest
objects rather than Node.js'sIncomingMessage
objects.
- Usage on Web-interoperable runtimes no longer requires polyfills for Node.js
functionality such as
- Separated out Node.js support into its own export,
"@fanoutio/grip/node"
.isNodeReqWsOverHttp()
andgetWebSocketContextFromNodeReq()
functions work with Node.js'sIncomingMessage
objects.
GRIP_URL
now allowskey
andverify-key
query parameters to be provided as:- JSON stringified representation of
JsonWebKey
- base64-encoded representations (prefixed with
base64:
) ofUint8Array
, JSON-stringifiedJsonWebKey
, or PEM file (SPKI or PKCS#8).
- JSON stringified representation of
parseGripUri
now accepts a second parameter which can be used to merge parameters into aIGripConfig
.validateGripSig
is now available onPublisher
, allowing you to easily check aGrip-Sig
header against the publisher clients registered with aPublisher
.Publisher
can now be configured with a custom channel prefix that will be applied when publishing messages.Publisher
can now be configured with an overridefetch()
function that will be called when publishing messages.- Public Keys for Fastly Fanout are now exported as constants.
3.3.1 - 2023-09-14
- Updated dependency versions
3.3.0 - 2023-09-02
- Support for
verify_iss
andverify_key
GRIP configurations and parsing them from GRIP_URLs. - Support for Bearer tokens, using the new
Auth.Bearer
class.- Use a Bearer token by creating IGripConfig with
key
, but without acontrol_iss
. This can also be parsed fromGRIP_URL
that have akey
without aniss
.
- Use a Bearer token by creating IGripConfig with
- Updated with full support for Fastly Fanout.
3.2.0 - 2022-11-06
- Revert to npm instead of pnpm
- Removed unneeded log message
3.1.0 - 2022-06-06
- Now uses pnpm instead of npm
- Pluggable architecture for Publishers that need to use a different transport mechanism
3.0.0 - 2020-08-24
- Major update with great improvements in usability, with support for modern
language features such as
class
andasync
/await
. - Collapsed
js-pubcontrol
intojs-grip
, simplifying use and deployment. - Reorganized utility functions into categorized files.
- Rewritten in TypeScript and exporting types files to enable static type checking and IDE completion.
- CommonJS and ESM builds are standard TypeScript builds, so that they can be imported in Node and in modern bundlers that offer features such as tree shaking.
- Source code formatted with Prettier.
GripInstruct
class to handle generation ofGrip-*
headers
- Using
jsonwebtoken
library instead ofjwt-simple
. This is a more modern implementation that does not depend on thecrypto
library from Node. buildWebSocketControlMessage()
renamed tocreateWebSocketControlMessage()
.
- Removed
createHold*
functions in favor ofGripInstruct
class
2.0.0-beta.0 - 2020-01-13
- Added ESM build. Uses Rollup (https://rollupjs.org/) to build bundles for consumption as CommonJS, ESM, and the Browser.
- Added new simple NodeJS based demo, providing a server and a publisher, designed to be used with pushpin (https://pushpin.org).
- Added a shimmed
Buffer
object to browser build, as it is needed during JWT authorization. - IDE metadata for IntelliJ IDEA.
- Repository now called
js-grip
to reflect that this is useful in all types of JavaScript, including the browser. - Now distributed as a public scoped package
@fanouio/grip
. - Source files and tests rewritten in modern style JavaScript
- Source files moved from
/lib
to/src
- Basic data structures now using ES6 classes.
- Start using "changelog" over "change log" since it's the common usage.
- Bump major version to 2 to indicate that this is a modernized new version.
- Improved README by being more straightforward with the basic use case.
GripPubControl
now directory inherits fromPubControl
.GripPubControl.publish
API has been changed, and the callback is now optional. If no callback is provided, a Promise is returned instead.
v 0.1.0 04-03-2013 - Initial Release. Formats, Channel, Response, Publisher.
v 0.1.1 04-16-2013 - Fixed serious bug in Response that was preventing proper JSON generation.
v 0.1.2 04-17-2013 - Signature validation, HttpStream Close.
v 0.1.3 04-18-2013 - Fixed signature validation exp calculation.
v 0.1.4 04-18-2013 - Updated samples to match pubcontrol v0.2
v 0.1.5 05-15-2013 - Documentation updates to reflect new company name.
v 1.0.0 01-21-2015 - Changed design to match the other language libs.
v 1.1.0 01-22-2015 - Added an applyConfig method to GripPubControl.
v 1.2.0 01-31-2015 - Added timeout functionality to create_hold_response.
v 1.2.1 02-02-2015 - Updated the dependency versions.
v 1.2.2 03-03-2015 - Added createHold as an export.
v 1.2.3 03-03-2015 - Added buffer decoding to decodeWebSocketEvents.
v 1.2.4 03-08-2015 - Added buffer encoding to decodeWebSocketEvents.
v 1.2.5 03-25-2015 - Split code into multiple files and added tests and docs.
v 1.2.6 12-10-2017 - Implement workaround for parseGripUri.
v 1.2.7 12-13-2017 - Clean package dir.