From f2e23f5d763795c1e499e1eda5b70078a6de501a Mon Sep 17 00:00:00 2001 From: LongYinan Date: Thu, 11 Nov 2021 09:50:15 +0000 Subject: [PATCH] fix: `vercel/nft` and `webpack` compatible issue --- index.js | 20 ++--- js-binding.js | 220 +++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 28 +++---- pnpm-lock.yaml | 158 ++++++++++++++++++----------------- 4 files changed, 317 insertions(+), 109 deletions(-) create mode 100644 js-binding.js diff --git a/index.js b/index.js index d9aa39c4..e390e81d 100644 --- a/index.js +++ b/index.js @@ -1,16 +1,6 @@ const { platform, homedir } = require('os') const { join } = require('path') -const { loadBinding } = require('@node-rs/helper') - -/** - * __dirname means load native addon from current dir - * 'skia' means native addon name is `skia` - * the first arguments was decided by `napi.name` field in `package.json` - * the second arguments was decided by `name` field in `package.json` - * loadBinding helper will load `skia.[PLATFORM].node` from `__dirname` first - * If failed to load addon, it will fallback to load from `@napi-rs/skia-[PLATFORM]` - */ const { CanvasRenderingContext2D, CanvasElement, @@ -22,9 +12,9 @@ const { CanvasPattern, GlobalFonts, convertSVGTextToPath: _convertSVGTextToPath, -} = loadBinding(__dirname, 'skia', '@napi-rs/canvas') +} = require('./js-binding') -const Geometry = require('./geometry') +const { DOMPoint, DOMMatrix, DOMRect } = require('./geometry') const StrokeJoin = { Miter: 0, @@ -335,7 +325,7 @@ if (!process.env.DISABLE_SYSTEM_FONTS_LOAD) { } function convertSVGTextToPath(input) { - return _convertSVGTextToPath(Buffer.from(input), GlobalFontsSingleton) + return _convertSVGTextToPath(Buffer.isBuffer(input) ? input : Buffer.from(input), GlobalFontsSingleton) } module.exports = { @@ -349,7 +339,9 @@ module.exports = { StrokeCap, StrokeJoin, SvgExportFlag, - ...Geometry, GlobalFonts: GlobalFontsSingleton, convertSVGTextToPath, + DOMPoint, + DOMMatrix, + DOMRect, } diff --git a/js-binding.js b/js-binding.js new file mode 100644 index 00000000..f03a0a6c --- /dev/null +++ b/js-binding.js @@ -0,0 +1,220 @@ +const { existsSync, readFileSync } = require('fs') +const { join } = require('path') + +const { platform, arch } = process + +let nativeBinding = null +let localFileExisted = false +let isMusl = false +let loadError = null + +switch (platform) { + case 'android': + if (arch !== 'arm64') { + throw new Error(`Unsupported architecture on Android ${arch}`) + } + localFileExisted = existsSync(join(__dirname, 'skia.android-arm64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.android-arm64.node') + } else { + nativeBinding = require('@napi-rs/canvas-android-arm64') + } + } catch (e) { + loadError = e + } + break + case 'win32': + // eslint-disable-next-line sonarjs/no-nested-switch + switch (arch) { + case 'x64': + localFileExisted = existsSync(join(__dirname, 'skia.win32-x64-msvc.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.win32-x64-msvc.node') + } else { + nativeBinding = require('@napi-rs/canvas-win32-x64-msvc') + } + } catch (e) { + loadError = e + } + break + case 'ia32': + localFileExisted = existsSync(join(__dirname, 'skia.win32-ia32-msvc.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.win32-ia32-msvc.node') + } else { + nativeBinding = require('@napi-rs/canvas-win32-ia32-msvc') + } + } catch (e) { + loadError = e + } + break + case 'arm64': + localFileExisted = existsSync(join(__dirname, 'skia.win32-arm64-msvc.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.win32-arm64-msvc.node') + } else { + nativeBinding = require('@napi-rs/canvas-win32-arm64-msvc') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on Windows: ${arch}`) + } + break + case 'darwin': + // eslint-disable-next-line sonarjs/no-nested-switch + switch (arch) { + case 'x64': + localFileExisted = existsSync(join(__dirname, 'skia.darwin-x64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.darwin-x64.node') + } else { + nativeBinding = require('@napi-rs/canvas-darwin-x64') + } + } catch (e) { + loadError = e + } + break + case 'arm64': + localFileExisted = existsSync(join(__dirname, 'skia.darwin-arm64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.darwin-arm64.node') + } else { + nativeBinding = require('@napi-rs/canvas-darwin-arm64') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on macOS: ${arch}`) + } + break + case 'freebsd': + if (arch !== 'x64') { + throw new Error(`Unsupported architecture on FreeBSD: ${arch}`) + } + localFileExisted = existsSync(join(__dirname, 'skia.freebsd-x64.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.freebsd-x64.node') + } else { + nativeBinding = require('@napi-rs/canvas-freebsd-x64') + } + } catch (e) { + loadError = e + } + break + case 'linux': + // eslint-disable-next-line sonarjs/no-nested-switch + switch (arch) { + case 'x64': + isMusl = readFileSync('/usr/bin/ldd', 'utf8').includes('musl') + if (isMusl) { + localFileExisted = existsSync(join(__dirname, 'skia.linux-x64-musl.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.linux-x64-musl.node') + } else { + nativeBinding = require('@napi-rs/canvas-linux-x64-musl') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync(join(__dirname, 'skia.linux-x64-gnu.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.linux-x64-gnu.node') + } else { + nativeBinding = require('@napi-rs/canvas-linux-x64-gnu') + } + } catch (e) { + loadError = e + } + } + break + case 'arm64': + isMusl = readFileSync('/usr/bin/ldd', 'utf8').includes('musl') + if (isMusl) { + localFileExisted = existsSync(join(__dirname, 'skia.linux-arm64-musl.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.linux-arm64-musl.node') + } else { + nativeBinding = require('@napi-rs/canvas-linux-arm64-musl') + } + } catch (e) { + loadError = e + } + } else { + localFileExisted = existsSync(join(__dirname, 'skia.linux-arm64-gnu.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.linux-arm64-gnu.node') + } else { + nativeBinding = require('@napi-rs/canvas-linux-arm64-gnu') + } + } catch (e) { + loadError = e + } + } + break + case 'arm': + localFileExisted = existsSync(join(__dirname, 'skia.linux-arm-gnueabihf.node')) + try { + if (localFileExisted) { + nativeBinding = require('./skia.linux-arm-gnueabihf.node') + } else { + nativeBinding = require('@napi-rs/canvas-linux-arm-gnueabihf') + } + } catch (e) { + loadError = e + } + break + default: + throw new Error(`Unsupported architecture on Linux: ${arch}`) + } + break + default: + throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`) +} + +if (!nativeBinding) { + if (loadError) { + throw loadError + } + throw new Error(`Failed to load native binding`) +} + +const { + CanvasRenderingContext2D, + CanvasElement, + createContext, + SVGCanvas, + Path2D, + ImageData, + Image, + CanvasPattern, + GlobalFonts, + convertSVGTextToPath, +} = nativeBinding + +module.exports.CanvasRenderingContext2D = CanvasRenderingContext2D +module.exports.CanvasElement = CanvasElement +module.exports.createContext = createContext +module.exports.SVGCanvas = SVGCanvas +module.exports.Path2D = Path2D +module.exports.ImageData = ImageData +module.exports.Image = Image +module.exports.CanvasPattern = CanvasPattern +module.exports.GlobalFonts = GlobalFonts +module.exports.convertSVGTextToPath = convertSVGTextToPath diff --git a/package.json b/package.json index 03dba4cd..fe0de3f6 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "files": [ "index.d.ts", "index.js", - "geometry.js" + "geometry.js", + "js-binding.js" ], "napi": { "name": "skia", @@ -66,37 +67,34 @@ "@jimp/custom": "^0.16.1", "@jimp/jpeg": "^0.16.1", "@jimp/png": "^0.16.1", - "@napi-rs/cli": "^1.3.3", + "@napi-rs/cli": "^1.3.5", "@octokit/rest": "^18.12.0", - "@swc-node/register": "^1.3.6", - "@types/lodash": "^4.14.175", - "@typescript-eslint/eslint-plugin": "^5.0.0", - "@typescript-eslint/parser": "^5.0.0", + "@swc-node/register": "^1.4.0", + "@types/lodash": "^4.14.176", + "@typescript-eslint/eslint-plugin": "^5.3.1", + "@typescript-eslint/parser": "^5.3.1", "ava": "^3.15.0", - "benny": "^3.7.0", + "benny": "^3.7.1", "canvas": "^2.8.0", "canvaskit-wasm": "^0.30.0", "chalk": "^4.1.2", "conventional-changelog-cli": "^2.1.1", - "eslint": "^8.0.1", + "eslint": "^8.2.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.25.2", + "eslint-plugin-import": "^2.25.3", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-sonarjs": "^0.10.0", - "husky": "^7.0.2", - "lint-staged": "^11.2.3", + "husky": "^7.0.4", + "lint-staged": "^11.2.6", "lodash": "^4.17.21", "npm-run-all": "^4.1.5", "pinst": "^2.1.6", "png.js": "^0.2.1", "prettier": "^2.4.1", "putasset": "^5.0.3", - "skia-canvas": "^0.9.25", + "skia-canvas": "^0.9.27", "typescript": "^4.4.4" }, - "dependencies": { - "@node-rs/helper": "^1.2.1" - }, "lint-staged": { "*.@(js|ts|tsx)": [ "prettier --write", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 103d80bf..3fafe82f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,38 +5,34 @@ specifiers: '@jimp/custom': ^0.16.1 '@jimp/jpeg': ^0.16.1 '@jimp/png': ^0.16.1 - '@napi-rs/cli': ^1.3.3 - '@node-rs/helper': ^1.2.1 + '@napi-rs/cli': ^1.3.5 '@octokit/rest': ^18.12.0 - '@swc-node/register': ^1.3.6 - '@types/lodash': ^4.14.175 - '@typescript-eslint/eslint-plugin': ^5.0.0 - '@typescript-eslint/parser': ^5.0.0 + '@swc-node/register': ^1.4.0 + '@types/lodash': ^4.14.176 + '@typescript-eslint/eslint-plugin': ^5.3.1 + '@typescript-eslint/parser': ^5.3.1 ava: ^3.15.0 - benny: ^3.7.0 + benny: ^3.7.1 canvas: ^2.8.0 canvaskit-wasm: ^0.30.0 chalk: ^4.1.2 conventional-changelog-cli: ^2.1.1 - eslint: ^8.0.1 + eslint: ^8.2.0 eslint-config-prettier: ^8.3.0 - eslint-plugin-import: ^2.25.2 + eslint-plugin-import: ^2.25.3 eslint-plugin-prettier: ^4.0.0 eslint-plugin-sonarjs: ^0.10.0 - husky: ^7.0.2 - lint-staged: ^11.2.3 + husky: ^7.0.4 + lint-staged: ^11.2.6 lodash: ^4.17.21 npm-run-all: ^4.1.5 pinst: ^2.1.6 png.js: ^0.2.1 prettier: ^2.4.1 putasset: ^5.0.3 - skia-canvas: ^0.9.25 + skia-canvas: ^0.9.27 typescript: ^4.4.4 -dependencies: - '@node-rs/helper': 1.2.1 - devDependencies: '@jimp/core': 0.16.1 '@jimp/custom': 0.16.1 @@ -44,21 +40,21 @@ devDependencies: '@jimp/png': 0.16.1_@jimp+custom@0.16.1 '@napi-rs/cli': 1.3.5 '@octokit/rest': 18.12.0 - '@swc-node/register': 1.3.7 + '@swc-node/register': 1.4.0 '@types/lodash': 4.14.176 - '@typescript-eslint/eslint-plugin': 5.2.0_9a56ca1c5fc1d82b3da3317a5c6f9ab1 - '@typescript-eslint/parser': 5.2.0_eslint@8.1.0+typescript@4.4.4 + '@typescript-eslint/eslint-plugin': 5.3.1_4653b7803b7453f5f37717b7e1448517 + '@typescript-eslint/parser': 5.3.1_eslint@8.2.0+typescript@4.4.4 ava: 3.15.0 benny: 3.7.1 canvas: 2.8.0 canvaskit-wasm: 0.30.0 chalk: 4.1.2 conventional-changelog-cli: 2.1.1 - eslint: 8.1.0 - eslint-config-prettier: 8.3.0_eslint@8.1.0 - eslint-plugin-import: 2.25.2_eslint@8.1.0 - eslint-plugin-prettier: 4.0.0_850528f9ec3c0797b9b19a94a36b5ba3 - eslint-plugin-sonarjs: 0.10.0_eslint@8.1.0 + eslint: 8.2.0 + eslint-config-prettier: 8.3.0_eslint@8.2.0 + eslint-plugin-import: 2.25.3_eslint@8.2.0 + eslint-plugin-prettier: 4.0.0_307f015733298e29da9050ea0cee5b9e + eslint-plugin-sonarjs: 0.10.0_eslint@8.2.0 husky: 7.0.4 lint-staged: 11.2.6 lodash: 4.17.21 @@ -136,8 +132,8 @@ packages: arrify: 1.0.1 dev: true - /@eslint/eslintrc/1.0.3: - resolution: {integrity: sha512-DHI1wDPoKCBPoLZA3qDR91+3te/wDSc1YhKg3jR8NxKKRJq2hwHwcWv31cSwSYvIBrmbENoYMWcenW8uproQqg==} + /@eslint/eslintrc/1.0.4: + resolution: {integrity: sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -146,7 +142,7 @@ packages: globals: 13.12.0 ignore: 4.0.6 import-fresh: 3.3.0 - js-yaml: 3.14.1 + js-yaml: 4.1.0 minimatch: 3.0.4 strip-json-comments: 3.1.1 transitivePeerDependencies: @@ -252,11 +248,13 @@ packages: /@napi-rs/triples/1.0.3: resolution: {integrity: sha512-jDJTpta+P4p1NZTFVLHJ/TLFVYVcOqv6l8xwOeBKNPMgY/zDYH/YH7SJbvrr/h1RcS9GzbPcLKGzpuK9cV56UA==} + dev: true /@node-rs/helper/1.2.1: resolution: {integrity: sha512-R5wEmm8nbuQU0YGGmYVjEc0OHtYsuXdpRG+Ut/3wZ9XAvQWyThN08bTh2cBJgoZxHQUPtvRfeQuxcAgLuiBISg==} dependencies: '@napi-rs/triples': 1.0.3 + dev: true /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -439,17 +437,17 @@ packages: engines: {node: '>=6'} dev: true - /@swc-node/core/1.7.1: - resolution: {integrity: sha512-m/21f7irvu+/P3Lqz2qEJVUf10vqqMp/4sUtxxn7tVjqKwTWPJF7DbZGsaEcWXLC9UxFdw7hLrNY61OL7hJNSA==} + /@swc-node/core/1.8.0: + resolution: {integrity: sha512-oolF9LG4GP6NhUMWqGi2bDomE3v0CYmNl/kJN2+Hh+iYLdv7l36B0GWFGLnSnq0sWyjrp+1Ur7MZTZFGnK1a3w==} engines: {node: '>= 10'} dependencies: '@swc/core': 1.2.106 dev: true - /@swc-node/register/1.3.7: - resolution: {integrity: sha512-rgnTtKkXkwH0xPTi/FG1mgZzNM7Isw1/jPHRLm3Mc3yfAcDOJ/L7pzOt12TQMg71oqj5tCvDvXynWhjrBQTtdg==} + /@swc-node/register/1.4.0: + resolution: {integrity: sha512-CYWzafuOLjzFdjogPb6zgxonF564HSA0Pzo6KtcLsszJq2+ylyPl/RgdxhrD8FfRPLVabiG3GZ7gagX+70jQCA==} dependencies: - '@swc-node/core': 1.7.1 + '@swc-node/core': 1.8.0 '@swc-node/sourcemap-support': 0.1.10 chalk: 4.1.2 debug: 4.3.2 @@ -629,8 +627,8 @@ packages: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} dev: true - /@typescript-eslint/eslint-plugin/5.2.0_9a56ca1c5fc1d82b3da3317a5c6f9ab1: - resolution: {integrity: sha512-qQwg7sqYkBF4CIQSyRQyqsYvP+g/J0To9ZPVNJpfxfekl5RmdvQnFFTVVwpRtaUDFNvjfe/34TgY/dpc3MgNTw==} + /@typescript-eslint/eslint-plugin/5.3.1_4653b7803b7453f5f37717b7e1448517: + resolution: {integrity: sha512-cFImaoIr5Ojj358xI/SDhjog57OK2NqlpxwdcgyxDA3bJlZcJq5CPzUXtpD7CxI2Hm6ATU7w5fQnnkVnmwpHqw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -640,11 +638,11 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 5.2.0_eslint@8.1.0+typescript@4.4.4 - '@typescript-eslint/parser': 5.2.0_eslint@8.1.0+typescript@4.4.4 - '@typescript-eslint/scope-manager': 5.2.0 + '@typescript-eslint/experimental-utils': 5.3.1_eslint@8.2.0+typescript@4.4.4 + '@typescript-eslint/parser': 5.3.1_eslint@8.2.0+typescript@4.4.4 + '@typescript-eslint/scope-manager': 5.3.1 debug: 4.3.2 - eslint: 8.1.0 + eslint: 8.2.0 functional-red-black-tree: 1.0.1 ignore: 5.1.8 regexpp: 3.2.0 @@ -655,26 +653,26 @@ packages: - supports-color dev: true - /@typescript-eslint/experimental-utils/5.2.0_eslint@8.1.0+typescript@4.4.4: - resolution: {integrity: sha512-fWyT3Agf7n7HuZZRpvUYdFYbPk3iDCq6fgu3ulia4c7yxmPnwVBovdSOX7RL+k8u6hLbrXcdAehlWUVpGh6IEw==} + /@typescript-eslint/experimental-utils/5.3.1_eslint@8.2.0+typescript@4.4.4: + resolution: {integrity: sha512-RgFn5asjZ5daUhbK5Sp0peq0SSMytqcrkNfU4pnDma2D8P3ElZ6JbYjY8IMSFfZAJ0f3x3tnO3vXHweYg0g59w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' dependencies: '@types/json-schema': 7.0.9 - '@typescript-eslint/scope-manager': 5.2.0 - '@typescript-eslint/types': 5.2.0 - '@typescript-eslint/typescript-estree': 5.2.0_typescript@4.4.4 - eslint: 8.1.0 + '@typescript-eslint/scope-manager': 5.3.1 + '@typescript-eslint/types': 5.3.1 + '@typescript-eslint/typescript-estree': 5.3.1_typescript@4.4.4 + eslint: 8.2.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.1.0 + eslint-utils: 3.0.0_eslint@8.2.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/parser/5.2.0_eslint@8.1.0+typescript@4.4.4: - resolution: {integrity: sha512-Uyy4TjJBlh3NuA8/4yIQptyJb95Qz5PX//6p8n7zG0QnN4o3NF9Je3JHbVU7fxf5ncSXTmnvMtd/LDQWDk0YqA==} + /@typescript-eslint/parser/5.3.1_eslint@8.2.0+typescript@4.4.4: + resolution: {integrity: sha512-TD+ONlx5c+Qhk21x9gsJAMRohWAUMavSOmJgv3JGy9dgPhuBd5Wok0lmMClZDyJNLLZK1JRKiATzCKZNUmoyfw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -683,31 +681,31 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.2.0 - '@typescript-eslint/types': 5.2.0 - '@typescript-eslint/typescript-estree': 5.2.0_typescript@4.4.4 + '@typescript-eslint/scope-manager': 5.3.1 + '@typescript-eslint/types': 5.3.1 + '@typescript-eslint/typescript-estree': 5.3.1_typescript@4.4.4 debug: 4.3.2 - eslint: 8.1.0 + eslint: 8.2.0 typescript: 4.4.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.2.0: - resolution: {integrity: sha512-RW+wowZqPzQw8MUFltfKYZfKXqA2qgyi6oi/31J1zfXJRpOn6tCaZtd9b5u9ubnDG2n/EMvQLeZrsLNPpaUiFQ==} + /@typescript-eslint/scope-manager/5.3.1: + resolution: {integrity: sha512-XksFVBgAq0Y9H40BDbuPOTUIp7dn4u8oOuhcgGq7EoDP50eqcafkMVGrypyVGvDYHzjhdUCUwuwVUK4JhkMAMg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.2.0 - '@typescript-eslint/visitor-keys': 5.2.0 + '@typescript-eslint/types': 5.3.1 + '@typescript-eslint/visitor-keys': 5.3.1 dev: true - /@typescript-eslint/types/5.2.0: - resolution: {integrity: sha512-cTk6x08qqosps6sPyP2j7NxyFPlCNsJwSDasqPNjEQ8JMD5xxj2NHxcLin5AJQ8pAVwpQ8BMI3bTxR0zxmK9qQ==} + /@typescript-eslint/types/5.3.1: + resolution: {integrity: sha512-bG7HeBLolxKHtdHG54Uac750eXuQQPpdJfCYuw4ZI3bZ7+GgKClMWM8jExBtp7NSP4m8PmLRM8+lhzkYnSmSxQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.2.0_typescript@4.4.4: - resolution: {integrity: sha512-RsdXq2XmVgKbm9nLsE3mjNUM7BTr/K4DYR9WfFVMUuozHWtH5gMpiNZmtrMG8GR385EOSQ3kC9HiEMJWimxd/g==} + /@typescript-eslint/typescript-estree/5.3.1_typescript@4.4.4: + resolution: {integrity: sha512-PwFbh/PKDVo/Wct6N3w+E4rLZxUDgsoII/GrWM2A62ETOzJd4M6s0Mu7w4CWsZraTbaC5UQI+dLeyOIFF1PquQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -715,8 +713,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.2.0 - '@typescript-eslint/visitor-keys': 5.2.0 + '@typescript-eslint/types': 5.3.1 + '@typescript-eslint/visitor-keys': 5.3.1 debug: 4.3.2 globby: 11.0.4 is-glob: 4.0.3 @@ -727,11 +725,11 @@ packages: - supports-color dev: true - /@typescript-eslint/visitor-keys/5.2.0: - resolution: {integrity: sha512-Nk7HizaXWWCUBfLA/rPNKMzXzWS8Wg9qHMuGtT+v2/YpPij4nVXrVJc24N/r5WrrmqK31jCrZxeHqIgqRzs0Xg==} + /@typescript-eslint/visitor-keys/5.3.1: + resolution: {integrity: sha512-3cHUzUuVTuNHx0Gjjt5pEHa87+lzyqOiHXy/Gz+SJOCW1mpw9xQHIIEwnKn+Thph1mgWyZ90nboOcSuZr/jTTQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.2.0 + '@typescript-eslint/types': 5.3.1 eslint-visitor-keys: 3.0.0 dev: true @@ -1855,13 +1853,13 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-prettier/8.3.0_eslint@8.1.0: + /eslint-config-prettier/8.3.0_eslint@8.2.0: resolution: {integrity: sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.1.0 + eslint: 8.2.0 dev: true /eslint-import-resolver-node/0.3.6: @@ -1880,8 +1878,8 @@ packages: pkg-dir: 2.0.0 dev: true - /eslint-plugin-import/2.25.2_eslint@8.1.0: - resolution: {integrity: sha512-qCwQr9TYfoBHOFcVGKY9C9unq05uOxxdklmBXLVvcwo68y5Hta6/GzCZEMx2zQiu0woKNEER0LE7ZgaOfBU14g==} + /eslint-plugin-import/2.25.3_eslint@8.2.0: + resolution: {integrity: sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==} engines: {node: '>=4'} peerDependencies: eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 @@ -1890,7 +1888,7 @@ packages: array.prototype.flat: 1.2.5 debug: 2.6.9 doctrine: 2.1.0 - eslint: 8.1.0 + eslint: 8.2.0 eslint-import-resolver-node: 0.3.6 eslint-module-utils: 2.7.1 has: 1.0.3 @@ -1902,7 +1900,7 @@ packages: tsconfig-paths: 3.11.0 dev: true - /eslint-plugin-prettier/4.0.0_850528f9ec3c0797b9b19a94a36b5ba3: + /eslint-plugin-prettier/4.0.0_307f015733298e29da9050ea0cee5b9e: resolution: {integrity: sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==} engines: {node: '>=6.0.0'} peerDependencies: @@ -1913,19 +1911,19 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.1.0 - eslint-config-prettier: 8.3.0_eslint@8.1.0 + eslint: 8.2.0 + eslint-config-prettier: 8.3.0_eslint@8.2.0 prettier: 2.4.1 prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-sonarjs/0.10.0_eslint@8.1.0: + /eslint-plugin-sonarjs/0.10.0_eslint@8.2.0: resolution: {integrity: sha512-FBRIBmWQh2UAfuLSnuYEfmle33jIup9hfkR0X8pkfjeCKNpHUG8qyZI63ahs3aw8CJrv47QJ9ccdK3ZxKH016A==} engines: {node: '>=10'} peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 dependencies: - eslint: 8.1.0 + eslint: 8.2.0 dev: true /eslint-scope/5.1.1: @@ -1944,13 +1942,13 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.1.0: + /eslint-utils/3.0.0_eslint@8.2.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.1.0 + eslint: 8.2.0 eslint-visitor-keys: 2.1.0 dev: true @@ -1964,12 +1962,12 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.1.0: - resolution: {integrity: sha512-JZvNneArGSUsluHWJ8g8MMs3CfIEzwaLx9KyH4tZ2i+R2/rPWzL8c0zg3rHdwYVpN/1sB9gqnjHwz9HoeJpGHw==} + /eslint/8.2.0: + resolution: {integrity: sha512-erw7XmM+CLxTOickrimJ1SiF55jiNlVSp2qqm0NuBWPtHYQCegD5ZMaW0c3i5ytPqL+SSLaCxdvQXFPLJn+ABw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.0.3 + '@eslint/eslintrc': 1.0.4 '@humanwhocodes/config-array': 0.6.0 ajv: 6.12.6 chalk: 4.1.2 @@ -1979,7 +1977,7 @@ packages: enquirer: 2.3.6 escape-string-regexp: 4.0.0 eslint-scope: 6.0.0 - eslint-utils: 3.0.0_eslint@8.1.0 + eslint-utils: 3.0.0_eslint@8.2.0 eslint-visitor-keys: 3.0.0 espree: 9.0.0 esquery: 1.4.0 @@ -4774,7 +4772,7 @@ packages: /wide-align/1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} dependencies: - string-width: 2.1.1 + string-width: 4.2.3 dev: true /widest-line/3.1.0: