From 2648f15210cbd1df95da9f729c5afdcfc20eba2f Mon Sep 17 00:00:00 2001 From: Shivansh Vij Date: Fri, 17 Feb 2023 16:14:12 -0500 Subject: [PATCH] Updating CHANGELOG.md, bumping versions, and updating the storage implementations with bug fixes (#55) --- CHANGELOG.md | 9 ++++++++- go/storage/storage.go | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- ts/storage/index.ts | 4 ++-- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e68d328..135e60db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [v0.3.5] - 2023-02-17 + +### Fixes + +- Fixing a bug in `go/storage` and `ts/storage` where the entire function path would be used to parse the filename instead of just the base file name + ## [v0.3.4] - 2023-02-17 ### Changes @@ -95,7 +101,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Initial release of the Scale Runtime library. -[unreleased]: https://github.com/loopholelabs/scale/compare/v0.3.4...HEAD +[unreleased]: https://github.com/loopholelabs/scale/compare/v0.3.5...HEAD +[v0.3.5]: https://github.com/loopholelabs/scale/compare/v0.3.5 [v0.3.4]: https://github.com/loopholelabs/scale/compare/v0.3.4 [v0.3.3]: https://github.com/loopholelabs/scale/compare/v0.3.3 [v0.3.2]: https://github.com/loopholelabs/scale/compare/v0.3.2 diff --git a/go/storage/storage.go b/go/storage/storage.go index b5ce92e4..08cee60b 100644 --- a/go/storage/storage.go +++ b/go/storage/storage.go @@ -128,8 +128,8 @@ func (s *Storage) Get(name string, tag string, org string, hash string) (*Entry, return &Entry{ ScaleFunc: sf, - Hash: s.getHashFromFileName(matches[0]), - Organization: s.getOrgFromFileName(matches[0]), + Hash: s.getHashFromFileName(path.Base(matches[0])), + Organization: s.getOrgFromFileName(path.Base(matches[0])), }, nil } diff --git a/package-lock.json b/package-lock.json index 660708fb..51c76ed5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@loopholelabs/scale-ts", - "version": "0.3.4", + "version": "0.3.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@loopholelabs/scale-ts", - "version": "0.3.4", + "version": "0.3.5", "license": "apache-2.0", "dependencies": { "@loopholelabs/polyglot-ts": "^0.4.0", diff --git a/package.json b/package.json index bab6799b..b4bd53bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@loopholelabs/scale-ts", - "version": "0.3.4", + "version": "0.3.5", "description": "Scale is a highly-performant WebAssembly function runtime that enables composable, language-agnostic software development.", "source": "./ts/index.ts", "main": "dist/main.js", diff --git a/ts/storage/index.ts b/ts/storage/index.ts index 28be2558..6a1edb01 100644 --- a/ts/storage/index.ts +++ b/ts/storage/index.ts @@ -68,8 +68,8 @@ export class Storage{ return { scaleFunc: ScaleFunc.Read(matches[0]), - hash: matches[0].split("_")[3], - organization: matches[0].split("_")[0], + hash: path.basename(matches[0]).split("_")[3], + organization: path.basename(matches[0]).split("_")[0], }; }