Skip to content

Commit b25e51d

Browse files
committed
chore: update
1 parent d50c8cd commit b25e51d

5 files changed

Lines changed: 1340 additions & 1187 deletions

File tree

package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,54 +38,54 @@
3838
"peerDependencies": {
3939
"@liquid-js/qrcode-generator": "^1.1.0",
4040
"@xmldom/xmldom": "^0.9.0",
41-
"file-type": "^21.0.0",
41+
"file-type": "^21.0.0 || ^22.0.0",
4242
"sharp": ">0.32.1 <1.0.0"
4343
},
4444
"devDependencies": {
45-
"@commitlint/cli": "^20.4.1",
46-
"@commitlint/config-conventional": "^20.4.1",
47-
"@liquid-js/qrcode-generator": "^1.1.3",
45+
"@commitlint/cli": "^20.5.0",
46+
"@commitlint/config-conventional": "^20.5.0",
47+
"@liquid-js/qrcode-generator": "^1.1.4",
4848
"@liquid-js/rollup-plugin-closure-compiler": "^0.28.1",
49-
"@rollup/plugin-commonjs": "^29.0.0",
49+
"@rollup/plugin-commonjs": "^29.0.2",
5050
"@rollup/plugin-node-resolve": "^16.0.3",
51-
"@rollup/plugin-terser": "^0.4.4",
51+
"@rollup/plugin-terser": "^1.0.0",
5252
"@rollup/plugin-typescript": "^12.3.0",
53-
"@stylistic/eslint-plugin": "^5.8.0",
53+
"@stylistic/eslint-plugin": "^5.10.0",
5454
"@testdeck/mocha": "^0.3.3",
5555
"@types/chai": "^5.2.3",
56-
"@types/jsdom": "^27.0.0",
56+
"@types/jsdom": "^28.0.1",
5757
"@types/jsdom-global": "^3.0.7",
5858
"@types/mocha": "^10",
5959
"@types/node": "<25.0.0",
6060
"@types/sharp": "^0.32.0",
6161
"@types/source-map-support": "^0.5.10",
62-
"@xmldom/xmldom": "^0.9.6",
63-
"canvas": "^3.2.1",
62+
"@xmldom/xmldom": "^0.9.9",
63+
"canvas": "^3.2.3",
6464
"chai": "^6.2.2",
6565
"clean-package": "^2.2.0",
66-
"commit-and-tag-version": "^12.6.1",
66+
"commit-and-tag-version": "^12.7.1",
6767
"eslint": "<10.0.0",
6868
"eslint-plugin-import": "^2.32.0",
69-
"eslint-plugin-jsdoc": "^62.5.4",
69+
"eslint-plugin-jsdoc": "^62.9.0",
7070
"eslint-plugin-prefer-arrow-functions": "^3.9.1",
7171
"eslint-plugin-unused-imports": "^4.4.1",
72-
"file-type": "^21.3.0",
73-
"google-closure-compiler": "^20260128.0.0",
72+
"file-type": "^22.0.0",
73+
"google-closure-compiler": "^20260405.0.0",
7474
"husky": "^9.1.7",
75-
"jsdom": "^28.0.0",
75+
"jsdom": "^29.0.2",
7676
"jsdom-global": "^3.0.2",
7777
"mocha": "^11.7.5",
78-
"npm-check-updates": "^19.3.2",
79-
"rimraf": "^6.1.2",
80-
"rollup": "^4.57.1",
78+
"npm-check-updates": "^20.0.0",
79+
"rimraf": "^6.1.3",
80+
"rollup": "^4.60.1",
8181
"rollup-plugin-minify-template-literals": "^1.1.7",
8282
"sharp": "^0.34.5",
8383
"source-map-support": "^0.5.21",
8484
"ts-node-maintained": "^10.9.6",
85-
"typedoc": "^0.28.16",
86-
"typescript": "^5.9.3",
87-
"typescript-eslint": "^8.55.0",
88-
"vite": "^7.3.1"
85+
"typedoc": "^0.28.18",
86+
"typescript": "^6.0.2",
87+
"typescript-eslint": "^8.58.0",
88+
"vite": "^8.0.7"
8989
},
9090
"resolutions": {
9191
"@eslint/core": "^0.17.0"

src/tools/browser-utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ export function drawToCanvas(
4141
const dy = ((y % 1) + 1) % 1
4242
let aaCanvas: HTMLCanvasElement | OffscreenCanvas
4343
try {
44-
aaCanvas = new OffscreenCanvas(Math.ceil(w + dx), Math.ceil(h + dy))
44+
aaCanvas = new OffscreenCanvas(Math.ceil(w + dx + 2), Math.ceil(h + dy + 2))
4545
} catch (_) {
4646
// Fallback to regular canvas element
4747
aaCanvas = document.createElement('canvas')
48-
aaCanvas.width = image.width * aaFactor
49-
aaCanvas.height = image.height * aaFactor
48+
aaCanvas.width = Math.ceil(w + dx + 2)
49+
aaCanvas.height = Math.ceil(h + dy + 2)
5050
}
51-
aaCanvas.getContext('2d')?.drawImage(image, dx, dy, w, h)
51+
aaCanvas.getContext('2d')?.drawImage(image, dx + 1, dy + 1, w, h)
5252
const imgData = lanczosResize(aaCanvas, {
5353
width: width - 2 * margin,
5454
height: height - 2 * margin

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"module": "esnext",
1010
"target": "es2024",
1111
"allowJs": true,
12-
"moduleResolution": "node",
12+
"moduleResolution": "bundler",
1313
"declaration": true,
1414
"allowSyntheticDefaultImports": true,
1515
"strict": true,

tsconfig.lib.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"rootDir": "./src"
5+
},
36
"include": [
47
"./src/**/*"
58
],

0 commit comments

Comments
 (0)