From 4c85370d866a153c70cf7c5c6d69dc5df532fe6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 11:40:11 +0000 Subject: [PATCH 1/5] Update usvg requirement from 0.20.0 to 0.22.0 Updates the requirements on [usvg](https://github.com/RazrFalcon/resvg) to permit the latest version. - [Release notes](https://github.com/RazrFalcon/resvg/releases) - [Changelog](https://github.com/RazrFalcon/resvg/blob/master/CHANGELOG.md) - [Commits](https://github.com/RazrFalcon/resvg/compare/v0.20.0...v0.22.0) --- updated-dependencies: - dependency-name: usvg dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7052037..c25f9f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ default = ["console_error_panic_hook"] [dependencies] resvg = { version = "0.20.0", default-features = false, features = ["filter"] } -usvg = { version = "0.20.0", default-features = false, features = [ "filter", "text"] } +usvg = { version = "0.22.0", default-features = false, features = [ "filter", "text"] } svgtypes = "0.8.0" tiny-skia = "0.6.1" From 2feb0ae05ccf11f186a6e451e25d00aab550f130 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 11:40:15 +0000 Subject: [PATCH 2/5] Update resvg requirement from 0.20.0 to 0.22.0 Updates the requirements on [resvg](https://github.com/RazrFalcon/resvg) to permit the latest version. - [Release notes](https://github.com/RazrFalcon/resvg/releases) - [Changelog](https://github.com/RazrFalcon/resvg/blob/master/CHANGELOG.md) - [Commits](https://github.com/RazrFalcon/resvg/compare/v0.20.0...v0.22.0) --- updated-dependencies: - dependency-name: resvg dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7052037..9c15272 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ crate-type = ["cdylib", "rlib"] default = ["console_error_panic_hook"] [dependencies] -resvg = { version = "0.20.0", default-features = false, features = ["filter"] } +resvg = { version = "0.22.0", default-features = false, features = ["filter"] } usvg = { version = "0.20.0", default-features = false, features = [ "filter", "text"] } svgtypes = "0.8.0" From 1a7640e88acc184d780c3d4c48bdf33bc773bfc8 Mon Sep 17 00:00:00 2001 From: ssssota Date: Mon, 21 Feb 2022 21:58:18 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=9A=A8=20add=20image=20href=20resolve?= =?UTF-8?q?r=20with=20default=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/converter.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/converter.rs b/src/converter.rs index 266f64b..010b092 100644 --- a/src/converter.rs +++ b/src/converter.rs @@ -65,6 +65,7 @@ impl Converter { ) .ok_or_else(|| JsValue::from_str("Invalid width or height"))?, fontdb: &fontdb, + image_href_resolver: &usvg::ImageHrefResolver::default(), }; let scale = scale.unwrap_or(1.0); let tree = From 9ac506450675668464b29abb557ffe4b266b4237 Mon Sep 17 00:00:00 2001 From: ssssota Date: Wed, 20 Apr 2022 22:16:22 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E2=9E=95=20bump=20up=20ci=20pnpm=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/benchmark.yml | 6 +++--- .github/workflows/checks.yml | 16 ++++++++-------- .github/workflows/deploy-site.yml | 4 ++-- .github/workflows/publish.yml | 8 ++++---- .github/workflows/update-snapshot.yml | 4 ++-- .github/workflows/version.yml | 8 ++++---- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 649f89f..4e8ef15 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -13,10 +13,10 @@ jobs: WORKING_DIR: benchmark steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: - version: 6.20.1 - - uses: actions/setup-node@v2 + version: latest + - uses: actions/setup-node@v3 with: node-version: lts/* cache: pnpm diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 802b950..73165d5 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -12,9 +12,9 @@ jobs: timeout-minutes: 15 steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: - version: 6.20.1 + version: latest - uses: actions/setup-node@v2 with: node-version: lts/* @@ -56,9 +56,9 @@ jobs: needs: [setup] steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: - version: 6.20.1 + version: latest - uses: actions/setup-node@v2 with: node-version: lts/* @@ -80,9 +80,9 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: - version: 6.20.1 + version: latest - uses: actions/setup-node@v2 with: node-version: ${{ matrix.node }} @@ -122,9 +122,9 @@ jobs: WORKING_DIR_BENCH: benchmark steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: - version: 6.20.1 + version: latest - uses: actions/setup-node@v2 with: node-version: lts/* diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index 08c84f6..380e693 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -11,9 +11,9 @@ jobs: WORKING_DIR: site steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: - version: 6.20.1 + version: latest - uses: actions/setup-node@v2 with: node-version: lts/* diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 966ff9b..ff2d7e1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,9 +10,9 @@ jobs: timeout-minutes: 15 steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: - version: 6.20.1 + version: latest - uses: actions/setup-node@v2 with: node-version: lts/* @@ -47,9 +47,9 @@ jobs: WORKING_DIR: site steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: - version: 6.20.1 + version: latest - uses: actions/setup-node@v2 with: node-version: lts/* diff --git a/.github/workflows/update-snapshot.yml b/.github/workflows/update-snapshot.yml index c87d137..bd89e30 100644 --- a/.github/workflows/update-snapshot.yml +++ b/.github/workflows/update-snapshot.yml @@ -9,9 +9,9 @@ jobs: timeout-minutes: 15 steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: - version: 6.20.1 + version: latest - uses: actions/setup-node@v2 with: node-version: lts/* diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index b47e7e7..667e4da 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -14,9 +14,9 @@ jobs: timeout-minutes: 15 steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: - version: 6.20.1 + version: latest - uses: actions/setup-node@v2 with: node-version: lts/* @@ -45,9 +45,9 @@ jobs: needs: [version] steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 + - uses: pnpm/action-setup@v2 with: - version: 6.20.1 + version: latest - uses: actions/setup-node@v2 with: node-version: lts/* From a0b2e303bc415920d6938978dee8b0675f2f940b Mon Sep 17 00:00:00 2001 From: ssssota Date: Sun, 24 Apr 2022 01:56:42 +0900 Subject: [PATCH 5/5] fix: default size --- test/node/index.test.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/node/index.test.ts b/test/node/index.test.ts index f3d5984..b6e6cf8 100644 --- a/test/node/index.test.ts +++ b/test/node/index.test.ts @@ -20,10 +20,14 @@ describe('svg2png', () => { ); }); - it('should throw because invalid svg (missing width and height)', async () => { - await expect( - svg2png(''), - ).rejects.toThrow('Invalid width or height'); + it('should convert with default sizes', async () => { + const actual = await svg2png( + '', + ); + const expected = await svg2png( + '', + ); + expect(actual).toStrictEqual(expected); }); it('should convert because specify width and height', async () => {