Skip to content

Releases: spinframework/spin-js-sdk

v0.5.0

11 Jul 16:49
v0.5.0
f1f15b9
Compare
Choose a tag to compare
Spin JS SDK v0.5.0

v0.4.0

17 Feb 17:27
v0.4.0
95104e9
Compare
Choose a tag to compare

This release brings in a few exciting changes and improvements to the SDK:

  • The SDK now supports Spin KV allowing for data persistence.
  • A new handler function signature that enables building responses by chaining:
import { Handler, HttpRequest, HttpResponse } from "spin-sdk"

export const handler: Handler = async function (request: HttpRequest, response: ResponseObject): Promise<void> {

    response.status(200).header("content-type", "text/html").body("Chaining works")
}
  • More flexible types on fetch and response allowing for usage of strings.
  • Addition of more cryptography functions:
    • timingSafeEqual
    • crypto.verify
  • Add Redis execute command to allow running arbitrary Redis commands.
  • Addition of setTimeout.

See below for the full list of changes.

What's Changed

New Contributors

Full Changelog: v0.3.0...v0.4.0

v0.3.0

30 Jan 23:42
v0.3.0
3a069cb
Compare
Choose a tag to compare

This release brings in a couple of bugfixes and improvements

  • A new inbuilt router (based on itty-router) to provide easy routing in a single component. The new handleRequest method takes in the HttpRequest
import { HandleRequest, HttpRequest, HttpResponse } from "spin-sdk"

const encoder = new TextEncoder()

let router = utils.Router()

router.get("/", () => {return {status: 200, body: encoder.encode("default route").buffer}})
router.get("/home", () => {return {status: 200, body: encoder.encode("home route").buffer}})

export const handleRequest: HandleRequest = async function (request: HttpRequest): Promise<HttpResponse> {
    
    return await router.handle(request)
}
  • Addition of support for some cryptographic functions
    • crypto.createHash
    • crypto.createHmac
    • crytpo.subtle.digest

See below for the full list of changes.

What's Changed

Full Changelog: v0.2.0...v0.3.0

v0.2.0

22 Dec 13:36
v0.2.0
227f0b2
Compare
Choose a tag to compare

⚠️ This release requires a Spin version >=0.7.0.

This release brings in a couple of improvements:

  • Addition of support for sadd, smembers and srem redis commands.
  • Support for development on ARM based Linux devices.

See below for the full list of changes.

What's Changed

New Contributors

Full Changelog: v0.1.0...v0.2.0

v0.1.0

02 Dec 23:30
v0.1.0
2fa7a9c
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/fermyon/spin-js-sdk/commits/v0.1.0