Releases: spinframework/spin-js-sdk
Releases · spinframework/spin-js-sdk
v0.5.0
Spin JS SDK v0.5.0
v0.4.0
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
- add note to update templates by @karthik2804 in #109
- Make JS/TS templates match main repo. by @calebschoepp in #111
- add minimal
setTimeout
implementation by @dicej in #112 - Add string and uint8array to fetch body by @karthik2804 in #113
- make return type flexible by @karthik2804 in #115
- Add the toJson method URL and allow usage in fetch by @karthik2804 in #117
- add crypto.verify and timingSafeEqual by @karthik2804 in #120
- fix ci for checksum job by @karthik2804 in #121
- add new handler signature
handler(req, res)
by @karthik2804 in #116 - use canary spin to run tests by @karthik2804 in #124
- add support for Spin KV by @karthik2804 in #125
- Add support for redis
execute
by @karthik2804 in #123 - add .spin to gitignore in templates by @karthik2804 in #126
- version bump to v0.4.0 by @karthik2804 in #127
- bump template versions by @karthik2804 in #128
New Contributors
- @calebschoepp made their first contribution in #111
Full Changelog: v0.3.0...v0.4.0
v0.3.0
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 theHttpRequest
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
- add entries method to URLSearchParams by @karthik2804 in #91
- remove workarounds for
quickjs-wasm-rs
case conversion by @dicej in #81 - rename build action to release by @karthik2804 in #93
- typed options for fetch by @karthik2804 in #95
- Bump json5 from 2.2.1 to 2.2.3 in /examples/javascript/simple_ssr by @dependabot in #94
- fix URLSearchParams.entries and add iterator by @karthik2804 in #92
- make headers optional for http response by @karthik2804 in #89
- add release process by @karthik2804 in #96
- add some cli output while building the js module by @karthik2804 in #98
- add router to the SDK by @karthik2804 in #99
- add test action by @karthik2804 in #97
- add sha256 and sha512 digests by @karthik2804 in #101
- add createHmac method by @karthik2804 in #102
- enable
Wizer::wasm_bulk_memory
by @dicej in #105 - update spin to v0.7.1 in tests by @karthik2804 in #104
- use user input in
package.json
when usingspin new
by @karthik2804 in #106 - prepare for v0.3.0 by @karthik2804 in #107
- bump spin sdk version for release by @karthik2804 in #108
Full Changelog: v0.2.0...v0.3.0
v0.2.0
>=0.7.0
.
This release brings in a couple of improvements:
- Addition of support for
sadd
,smembers
andsrem
redis commands. - Support for development on ARM based Linux devices.
See below for the full list of changes.
What's Changed
- update examples, templates and readme by @karthik2804 in #60
- Add explicit type to handleRequest argument by @karthik2804 in #62
- remove types folder in templates by @karthik2804 in #63
- fix readme to reflect the name change of the package by @karthik2804 in #64
- Add snippets to enable
spin add
by @radu-matei in #66 - fix templates to use liquid filters by @karthik2804 in #68
- fix typo in template content by @rajatjindal in #69
- switch back to upstream Javy by @dicej in #65
- Bump decode-uri-component from 0.2.0 to 0.2.2 in /crates/spin-js-engine/src/js_sdk by @dependabot in #55
- chore: Update cargo.lock by @karthik2804 in #71
- Renable redis::del as it works with spin 0.7.0 by @karthik2804 in #70
- fix: redis::del and types by @karthik2804 in #74
- Add .gitignore and also exclude_files to templates by @karthik2804 in #75
- Add redis commands SADD SMEMBERS SREM by @karthik2804 in #76
- add linux arm64 builds by @karthik2804 in #78
- bump types to v0.2.0 for new release by @karthik2804 in #79
- update spin-sdk dependency to v0.2.0 by @karthik2804 in #80
- bump js2wasm to v0.2.0 by @karthik2804 in #82
New Contributors
- @radu-matei made their first contribution in #66
- @rajatjindal made their first contribution in #69
Full Changelog: v0.1.0...v0.2.0
v0.1.0
What's Changed
- add text and json methods to fetch by @karthik2804 in #7
- add .status and .ok to response from fetch by @karthik2804 in #6
- Add text-encoding as a part of sdk by @karthik2804 in #8
- Add more functions to fetch and url for sdk by @karthik2804 in #10
- add file read for static assets support by @karthik2804 in #11
- Add examples by @karthik2804 in #12
- Replace URL parser as older package was deprecated by @karthik2804 in #14
- Add examples for typescript and add starter templates by @karthik2804 in #13
- refactor SDK and add types to URL by @karthik2804 in #21
- Add fsPromise.readdir with minimal implementation for file types by @karthik2804 in #22
- add minimal glob and fix read_dir error by @karthik2804 in #23
- Replace default Math.random() implementation by @karthik2804 in #25
- feat/add_crypto.getRandomValues by @karthik2804 in #27
- feat: incoming req parser by @karthik2804 in #28
- Add Url parsing by @karthik2804 in #29
- fix httprequest type so proper headers are set on responses by @karthik2804 in #30
- eliminate
unsafe
blocks inspin-js-engine
by @dicej in #32 - switch back to upstream Shopify/javy repo by @dicej in #33
- fix math random to use proper implementation by @karthik2804 in #34
- Readme and example nits by @mikkelhegn in #35
- feat/add_redis by @karthik2804 in #36
- switch from vector to hashmap for headers in handleRequest by @karthik2804 in #38
- Fix type overrides for URL and crypto by @karthik2804 in #39
- Add utility to enable formdata parsing by @karthik2804 in #37
- canary build artifact for spinjs by @karthik2804 in #40
- use case-preserving
Serializer
andDeserializer
by @dicej in #42 - run cargo update by @karthik2804 in #43
- add macos builds by @karthik2804 in #44
- Ci/add windows build by @karthik2804 in #45
- remove binaryen for windows by @karthik2804 in #47
- Add Apache2 license by @karthik2804 in #46
- Run workflow only when SDK source code is modified by @karthik2804 in #48
- Bump loader-utils from 2.0.2 to 2.0.4 in /examples/javascript/simple_ssr by @dependabot in #31
- add checksum, plugin package and release action by @karthik2804 in #49
- rename help binary by @karthik2804 in #50
- prepare the types package for publication by @karthik2804 in #51
- Add a readme to the npm package by @karthik2804 in #52
- fix optional builds as earlier one was failing by @karthik2804 in #53
- Bump types package version to add readme by @karthik2804 in #54
- switch to published npm package by @karthik2804 in #56
- ci: build on tags by @karthik2804 in #57
New Contributors
- @karthik2804 made their first contribution in #7
- @dicej made their first contribution in #32
- @mikkelhegn made their first contribution in #35
Full Changelog: https://github.com/fermyon/spin-js-sdk/commits/v0.1.0