Skip to content

Commit

Permalink
2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yisibl committed Feb 9, 2023
1 parent ecf46ac commit 30ac8d8
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 15 deletions.
44 changes: 43 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,47 @@ This changelog also contains important changes in dependencies.

## [Unreleased]

## [2.4.0] - 2023-02-09

This is a brand new version with 2-3x faster performance. It also resolves an issue with a specific SVG causing an error, and all users are advised to upgrade to this version.

```shell
resvg-js(Rust):
39.6 ops/s, ±1.72% | fastest

sharp:
10.9 ops/s, ±31.43% | 72.47% slower

svg2img(canvg + node-canvas):
10.8 ops/s, ±28.52% | slowest, 72.73% slower
```

The upgrade will be hard due to the big changes made to upstream resvg. resvg 0.28.0 started with the removal of the ability to output SVG string, and we had to backport that functionality to a new crate: `usvg-writer`.

Eventually, we upgraded resvg for 2 successive versions, and are now at the latest 0.29.0.

### Changed

- feat: upgrade resvg/usvg to 0.28.0. [#194](https://github.com/yisibl/resvg-js/issues/194) Thanks to @zimond
- feat: upgrade resvg/usvg to 0.29.0. [#199](https://github.com/yisibl/resvg-js/issues/199) Thanks to @zimond
- chore: upgrade rust-toolchain to nightly-2023-02-01. [#199](https://github.com/yisibl/resvg-js/issues/199) Thanks to @yisibl
- chore: remove bench-related dependencies. [#200](https://github.com/yisibl/resvg-js/issues/200) Thanks to @yisibl

### Fixed

- fix: 'the previous segment must be M/L/C' error. [#204](https://github.com/yisibl/resvg-js/issues/204) Thanks to @yisibl

This is a normal error thrown by resvg when parsing Path Command, and has been confirmed as fixed in resvg 0.29.0.

Add a test to ensure it is now fixed.

```shell
thread '<unnamed>' panicked at 'the previous segment must be M/L/C'

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
```

## [2.3.1] - 2023-02-02

- feat: upgrade wasm-bindgen to 0.2.84
Expand Down Expand Up @@ -477,7 +518,8 @@ The first official version, use [resvg 0.18.0](https://github.com/RazrFalcon/res
- Support custom fonts and system fonts.
- Supports setting the background color of PNG.

[unreleased]: https://github.com/yisibl/resvg-js/compare/v2.3.1...HEAD
[unreleased]: https://github.com/yisibl/resvg-js/compare/v2.4.0...HEAD
[2.4.0]: https://github.com/yisibl/resvg-js/compare/v2.3.1...v2.4.0
[2.3.1]: https://github.com/yisibl/resvg-js/compare/v2.3.0...v2.3.1
[2.3.0]: https://github.com/yisibl/resvg-js/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/yisibl/resvg-js/compare/v2.1.0...v2.2.0
Expand Down
2 changes: 1 addition & 1 deletion npm/android-arm-eabi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-android-arm-eabi",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"android"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/android-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-android-arm64",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"android"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-darwin-arm64",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-darwin-x64",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-arm-gnueabihf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-linux-arm-gnueabihf",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-linux-arm64-gnu",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-arm64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-linux-arm64-musl",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-linux-x64-gnu",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-linux-x64-musl",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-win32-arm64-msvc",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/win32-ia32-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-win32-ia32-msvc",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js-win32-x64-msvc",
"version": "2.3.1",
"version": "2.4.0",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-js",
"version": "2.3.1",
"version": "2.4.0",
"description": "A high-performance SVG renderer and toolkit, powered by Rust based resvg and napi-rs",
"main": "index.js",
"repository": "[email protected]:yisibl/resvg-js.git",
Expand Down
2 changes: 1 addition & 1 deletion wasm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@resvg/resvg-wasm",
"version": "2.3.1",
"version": "2.4.0",
"description": "A high-performance SVG renderer and toolkit, powered by Rust based resvg and napi-rs",
"main": "index.js",
"module": "index.mjs",
Expand Down

1 comment on commit 30ac8d8

@vercel
Copy link

@vercel vercel bot commented on 30ac8d8 Feb 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

resvg-js – ./

resvg-js-yisibl.vercel.app
resvg-js.vercel.app
resvg-js-git-main-yisibl.vercel.app

Please sign in to comment.