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