From 1e565b134889b037f118e1294a84528553552119 Mon Sep 17 00:00:00 2001 From: Haled Odat <8566042+HalidOdat@users.noreply.github.com> Date: Thu, 5 Oct 2023 10:47:32 +0200 Subject: [PATCH 1/3] `CHANGELOG.md` update and version bump `v1.0.0` --- CHANGELOG.md | 46 +++++++++++++++++++++++++++++++++------------- Cargo.toml | 2 +- src/lib.rs | 2 +- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ef3b7a..020e40e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,60 +1,80 @@ # CHANGELOG -# [# 0.2.2 (2020-12-16)](https://github.com/boa-dev/ryu-js/compare/v0.2.1...v0.2.2) +## [# 1.0.0 (2023-10-05)](https://github.com/boa-dev/ryu-js/compare/v0.2.2...v1.0.0) - ECMAScript compliant implementation of `Number.prototype.toFixed()` -Internal improvements: +### Breaking changes + +- Minimum rust version has been bumped from `1.36.0` to `1.64.0`. + +### Feature Enhancements + +- [FEATURE](https://github.com/boa-dev/ryu-js/pull/35): + ECMAScript specification complaint `Number.prototype.toFixed()` implementation. (@HalidOdat) + +### Internal Improvements + +- [INTERNAL #1](https://github.com/boa-dev/ryu-js/pull/19): Added dependabot PRs. (@Razican) +- [INTERNAL #2](https://github.com/boa-dev/ryu-js/pull/21): Sync upstream/master. (@HalidOdat) +- [INTERNAL #3](https://github.com/boa-dev/ryu-js/pull/27): Add issue and PR templates. (@HalidOdat) +- [INTERNAL #4](https://github.com/boa-dev/ryu-js/pull/28): Switch to criterion for benchmarking. (@HalidOdat) +- [INTERNAL #5](https://github.com/boa-dev/ryu-js/pull/29): Benchmark CI. (@HalidOdat) +- [INTERNAL #6](https://github.com/boa-dev/ryu-js/pull/38): Enable merge queue. (@jedel1043) + +## [# 0.2.2 (2020-12-16)](https://github.com/boa-dev/ryu-js/compare/v0.2.1...v0.2.2) + +### Internal Improvements - [INTERNAL #17](https://github.com/boa-dev/ryu-js/pull/17) Sync to `dtolnay/ryu` master - [INTERNAL #16](https://github.com/boa-dev/ryu-js/pull/16) Sync to `dtolnay/ryu` master -# [# 0.2.1 (2020-11-11)](https://github.com/boa-dev/ryu-js/compare/v0.2.0...v0.2.1) +## [# 0.2.1 (2020-11-11)](https://github.com/boa-dev/ryu-js/compare/v0.2.0...v0.2.1) -Feature enhancements: +### Feature Enhancements - [FEATURE #11](https://github.com/boa-dev/ryu-js/pull/11): Null check in unsafe `format32` and `format64` (in debug mode). (@HalidOdat) -Bug fixes: +### Bug Fixes - BUG [#12](https://github.com/boa-dev/ryu-js/pull/12) [#13](https://github.com/boa-dev/ryu-js/pull/13): Documentation fixes (@HalidOdat) -# [# 0.2.0 (2020-07-14) - ECMAScript compliant `f32` conversions Release](https://github.com/boa-dev/ryu-js/compare/v0.1.0...v0.2.0) +## [# 0.2.0 (2020-07-14) - ECMAScript compliant `f32` conversions Release](https://github.com/boa-dev/ryu-js/compare/v0.1.0...v0.2.0) -Feature enhancements: +### Feature Enhancements - [FEATURE #6](https://github.com/boa-dev/ryu-js/pull/6): ECMAScript specification complaint `f32` to string conversions. (@HalidOdat) -Bug fixes: +### Bug Fixes - [BUG #2](https://github.com/boa-dev/ryu-js/pull/2) (@HalidOdat): - Fixed compatibility with rust `1.31.0`. - Fixed converting from `-0.0` to `0`. - Fixed max length docs for `format32` and `format64`. -Internal improvements: +### Internal Improvements - [INTERNAL #2](https://github.com/boa-dev/ryu-js/pull/2): Optimized `0` and `-0` to string conversion (@HalidOdat) -# 0.1.0 (2020-07-13) - ECMAScript compliant `f64` conversions Release +# # 0.1.0 (2020-07-13) - ECMAScript compliant `f64` conversions Release This is the initial release of this crate, it introduces ECMAScript compliant `f64` to string conversions. -Feature enhancements: +### Feature Enhancements - [FEATURE](https://github.com/boa-dev/ryu-js/commit/ed781f5772882e38c53d40707a60b4f11414b9c8): ECMAScript specification complaint `f64` to string conversions. (@Tropid) - [FEATURE](https://github.com/boa-dev/ryu-js/commit/fe366fa397d04324fa693b5d85134851b09719b3): Change name from `ryu` to `ryu-js`. (@Tropid) -Bug fixes: +### Bug Fixes - [BUG #1](https://github.com/boa-dev/ryu-js/pull/1): Fixed buffer overflow with length greater than 24 (max is 25). (@HalidOdat) -Internal improvements: +### Internal Improvements - [INTERNAL #1](https://github.com/boa-dev/ryu-js/pull/2): Fixed all clippy warnings/errors and tests (@HalidOdat) diff --git a/Cargo.toml b/Cargo.toml index 2b880c3..ee05241 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ryu-js" -version = "0.2.2" # don't forget to update html_root_url +version = "1.0.0" # don't forget to update html_root_url authors = ["David Tolnay ", "boa-dev"] categories = ["value-formatting", "no-std"] description = "Fast floating point to string conversion, ECMAScript compliant." diff --git a/src/lib.rs b/src/lib.rs index 5674318..aab20fd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,7 +53,7 @@ //! notation. #![no_std] -#![doc(html_root_url = "https://docs.rs/ryu-js/0.2.2")] +#![doc(html_root_url = "https://docs.rs/ryu-js/1.0.0")] #![allow( clippy::cast_lossless, clippy::cast_possible_truncation, From 567cfc60e30671fe2c0d4c4269cc068456513e8e Mon Sep 17 00:00:00 2001 From: Haled Odat <8566042+HalidOdat@users.noreply.github.com> Date: Thu, 5 Oct 2023 19:27:47 +0200 Subject: [PATCH 2/3] Apply review --- CHANGELOG.md | 2 +- Cargo.toml | 2 +- src/lib.rs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 020e40e..dc8ad48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ ### Feature Enhancements - [FEATURE](https://github.com/boa-dev/ryu-js/pull/35): - ECMAScript specification complaint `Number.prototype.toFixed()` implementation. (@HalidOdat) + ECMAScript specification compliant `Number.prototype.toFixed()` implementation. (@HalidOdat) ### Internal Improvements diff --git a/Cargo.toml b/Cargo.toml index ee05241..0deaf11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ryu-js" -version = "1.0.0" # don't forget to update html_root_url +version = "1.0.0" authors = ["David Tolnay ", "boa-dev"] categories = ["value-formatting", "no-std"] description = "Fast floating point to string conversion, ECMAScript compliant." diff --git a/src/lib.rs b/src/lib.rs index aab20fd..261195e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,7 +53,6 @@ //! notation. #![no_std] -#![doc(html_root_url = "https://docs.rs/ryu-js/1.0.0")] #![allow( clippy::cast_lossless, clippy::cast_possible_truncation, From af385c7c03fbb71a35fc4de358860c8ae10ffe47 Mon Sep 17 00:00:00 2001 From: Haled Odat <8566042+HalidOdat@users.noreply.github.com> Date: Thu, 5 Oct 2023 19:43:25 +0200 Subject: [PATCH 3/3] Update README.md --- CHANGELOG.md | 2 +- README.md | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc8ad48..3a5a5c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## [# 1.0.0 (2023-10-05)](https://github.com/boa-dev/ryu-js/compare/v0.2.2...v1.0.0) - ECMAScript compliant implementation of `Number.prototype.toFixed()` -### Breaking changes +### Breaking Changes - Minimum rust version has been bumped from `1.36.0` to `1.64.0`. diff --git a/README.md b/README.md index 57bd3ac..3ff74d4 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # Ryū-js -Ryū-js is a fork of the [ryu][ryu-crate] crate adjusted to comply to the ECMAScript [number-to-string][number-to-string] algorithm. +Ryū-js is a fork of the [ryu][ryu-crate] crate adjusted to comply to the ECMAScript [number-to-string][number-to-string] algorithm, also implementing [`Number.prototype.toFixed()`][number-to-fixed] compliant conversion. [ryu-crate]: https://crates.io/crates/ryu [number-to-string]: https://tc39.es/ecma262/#sec-numeric-types-number-tostring +[number-to-fixed]: https://tc39.es/ecma262/#sec-number.prototype.tofixed Pure Rust implementation of Ryū, an algorithm to quickly convert floating point numbers to decimal strings. @@ -23,7 +24,7 @@ uses nothing from the Rust standard library so is usable from no_std crates.* ```toml [dependencies] -ryu-js = "0.2" +ryu-js = "1.0" ```
@@ -38,8 +39,6 @@ fn main() { } ``` -
- ## Performance