Skip to content

Commit 1aba1c2

Browse files
authored
Release v1.1.1 (#21)
* Updating rust release to properly login Signed-off-by: Shivansh Vij <[email protected]> * Changing `license` in package.json to be SPDX compliant * Bumping dependency versions * Bumping dependency versions * Fix: Decode None Crashes (#19) * Bumping dependency versions * Fixing cargo Signed-off-by: Shivansh Vij <[email protected]> --------- Verified that this PR functions. Signed-off-by: Shivansh Vij <[email protected]> * Staging v1.1.1 (#20) * Bumping versions to v1.1.1 Signed-off-by: Shivansh Vij <[email protected]> * Updating changelog with dependency changes Signed-off-by: Shivansh Vij <[email protected]> --------- Signed-off-by: Shivansh Vij <[email protected]> --------- Signed-off-by: Shivansh Vij <[email protected]>
1 parent 839f5b7 commit 1aba1c2

File tree

7 files changed

+233
-215
lines changed

7 files changed

+233
-215
lines changed

.github/workflows/releases.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
- name: Cargo build
2121
run: cargo build --release
2222
- name: Publish to crates.io
23-
run: cargo publish --token $CRATES_IO_TOKEN
23+
run: cargo publish
2424
env:
25-
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
25+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2626
Typescript:
2727
runs-on: ubuntu-latest
2828
steps:

CHANGELOG.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,26 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
99

10+
## [v1.1.1] - 2023-06-12
11+
12+
### Fixes
13+
14+
- Fixing the `decode_none` Rust function which would previously crash if it was decoding from a buffer of size 0.
15+
16+
### Dependencies
17+
18+
- Bumping Typescript `@typescript-eslint/eslint-plugin` from `^5.59.10` to `^5.59.11`
19+
- Bumping Typescript `@typescript-eslint/parser` from `^5.59.10` to `^5.59.11`
20+
- Bumping Typescript `@types/node` from `^20.2.5` to `^20.3.0`
21+
- Bumping Rust `serde_json` from `1.0.82` to `1.0.96`
22+
- Bumping Rust `base64` from `0.21.0` to `0.21.2`
23+
1024
## [v1.1.0] - 2023-06-07
1125

1226
### Changes
1327

1428
- Merging Typescript, Golang, and Rust implementations into a single repository
1529

16-
[unreleased]: https://github.com/loopholelabs/scale/compare/v1.1.0...HEAD
30+
[unreleased]: https://github.com/loopholelabs/scale/compare/v1.1.1...HEAD
31+
[v1.1.1]: https://github.com/loopholelabs/scale/compare/v1.1.1
1732
[v1.1.0]: https://github.com/loopholelabs/scale/compare/v1.1.0

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "polyglot_rs"
3-
version = "1.1.0"
3+
version = "1.1.1"
44
edition = "2021"
55
description="A high-performance serialization framework used for encoding and decoding arbitrary datastructures across languages."
66
license = "Apache-2.0"
@@ -26,11 +26,11 @@ byteorder = "1"
2626

2727
[dev-dependencies]
2828
serde = { version = "1.0", features = ["derive"] }
29-
serde_json = "1.0.82"
30-
base64 = "0.21.0"
29+
serde_json = "1.0.96"
30+
base64 = "0.21.2"
3131
num_enum = "0.6.1"
3232

3333
[profile.release]
3434
opt-level = 3
3535
lto = true
36-
codegen-units = 1
36+
codegen-units = 1

decoder.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@ pub trait Decoder {
7575

7676
impl Decoder for Cursor<&mut Vec<u8>> {
7777
fn decode_none(&mut self) -> bool {
78-
if let Ok(kind) = self.read_u8() {
79-
if kind == Kind::None as u8 {
80-
return true;
78+
match self.read_u8() {
79+
Ok(kind) => {
80+
if kind == Kind::None as u8 {
81+
return true;
82+
}
83+
self.set_position(self.position() - 1);
8184
}
85+
Err(_) => {}
8286
}
83-
self.set_position(self.position() - 1);
8487
false
8588
}
8689

0 commit comments

Comments
 (0)