From 4c6429adf0c202eeccacba807742b29e93954914 Mon Sep 17 00:00:00 2001 From: Klaustin Date: Fri, 8 Mar 2024 17:16:03 +0800 Subject: [PATCH] update canvas library to latest version --- dist/index.js.map | 2 +- package-lock.json | 60 +++++++++++++++++++++++++++++++++++------------ package.json | 2 +- src/index.ts | 2 +- 4 files changed, 48 insertions(+), 18 deletions(-) diff --git a/dist/index.js.map b/dist/index.js.map index 6ada976..0dcc571 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAGA,iDAA8C;AAC9C,qEAAkE;AA6DlE,MAAa,iBAAiB;IAU7B;;;;OAIG;IACH,YAAY,OAAiC;QAE5C,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,QAAQ,EAAE;YACtD,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;SAC3D;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,QAAQ,EAAE;YAC1D,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;SAC9C;QACD,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE;YAC5D,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAC/C;QAED,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,MAAM,MAAM,GAAG,IAAA,2BAAY,EAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM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C,CAAC;QACxE,MAAc,CAAC,KAAK,GAAI,MAAc,CAAC,KAAK,IAAI,EAAE,CAAC;QACpD,6DAA6D;QAC7D,aAAa,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC;QACpD,aAAa,CAAC,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC;QACzC,aAAa,CAAC,OAAO,CAAC,SAAS,GAAG,KAAY,CAAC;QAC/C,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACvC,MAAc,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,4BAA4B;QACjE,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAc,EAAE,aAAa,CAAC,CAAC;QAC/D,OAAQ,MAAc,CAAC,KAAK,CAAC;QAC7B,OAAO,KAAK,CAAC;IACd,CAAC;CACD;AAnOD,8CAmOC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 04e15c2..27feca9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "4.1.6", "license": "MIT", "dependencies": { - "canvas": "^2.8.0", + "canvas": "^2.11.2", "tslib": "^2.3.1" }, "devDependencies": { @@ -1281,13 +1281,13 @@ } }, "node_modules/canvas": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.8.0.tgz", - "integrity": "sha512-gLTi17X8WY9Cf5GZ2Yns8T5lfBOcGgFehDFb+JQwDqdOoBOcECS9ZWMEAqMSVcMYwXD659J8NyzjRY/2aE+C2Q==", + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz", + "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==", "hasInstallScript": true, "dependencies": { "@mapbox/node-pre-gyp": "^1.0.0", - "nan": "^2.14.0", + "nan": "^2.17.0", "simple-get": "^3.0.3" }, "engines": { @@ -4508,9 +4508,9 @@ "dev": true }, "node_modules/nan": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", + "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==" }, "node_modules/neo-async": { "version": "2.6.2", @@ -5879,6 +5879,22 @@ "canvas": "2.8.0" } }, + "node_modules/resemblejs/node_modules/canvas": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.8.0.tgz", + "integrity": "sha512-gLTi17X8WY9Cf5GZ2Yns8T5lfBOcGgFehDFb+JQwDqdOoBOcECS9ZWMEAqMSVcMYwXD659J8NyzjRY/2aE+C2Q==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.0", + "nan": "^2.14.0", + "simple-get": "^3.0.3" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/resolve": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", @@ -8722,12 +8738,12 @@ "dev": true }, "canvas": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.8.0.tgz", - "integrity": "sha512-gLTi17X8WY9Cf5GZ2Yns8T5lfBOcGgFehDFb+JQwDqdOoBOcECS9ZWMEAqMSVcMYwXD659J8NyzjRY/2aE+C2Q==", + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz", + "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==", "requires": { "@mapbox/node-pre-gyp": "^1.0.0", - "nan": "^2.14.0", + "nan": "^2.17.0", "simple-get": "^3.0.3" } }, @@ -11206,9 +11222,9 @@ "dev": true }, "nan": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", + "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==" }, "neo-async": { "version": "2.6.2", @@ -12235,6 +12251,20 @@ "dev": true, "requires": { "canvas": "2.8.0" + }, + "dependencies": { + "canvas": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.8.0.tgz", + "integrity": "sha512-gLTi17X8WY9Cf5GZ2Yns8T5lfBOcGgFehDFb+JQwDqdOoBOcECS9ZWMEAqMSVcMYwXD659J8NyzjRY/2aE+C2Q==", + "dev": true, + "optional": true, + "requires": { + "@mapbox/node-pre-gyp": "^1.0.0", + "nan": "^2.14.0", + "simple-get": "^3.0.3" + } + } } }, "resolve": { diff --git a/package.json b/package.json index 4227047..510ec78 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "readme": "README.md", "license": "MIT", "dependencies": { - "canvas": "^2.8.0", + "canvas": "^2.11.2", "tslib": "^2.3.1" }, "peerDependencies": { diff --git a/src/index.ts b/src/index.ts index 635d9bf..a3e9945 100644 --- a/src/index.ts +++ b/src/index.ts @@ -286,7 +286,7 @@ export class ChartJSNodeCanvas { configuration.options.animation = false as any; const context = canvas.getContext('2d'); (global as any).Image = this._image; // Some plugins use this API - const chart = new this._chartJs(context, configuration); + const chart = new this._chartJs(context as any, configuration); delete (global as any).Image; return chart; }