From dae59629924b717c628cccc04d5808c6b5b13170 Mon Sep 17 00:00:00 2001 From: dangreen Date: Mon, 30 Nov 2026 15:25:30 +0400 Subject: [PATCH 1/5] build: build the package with Vite Vite builds the same ESM and CommonJS entries that rollup with swc did, unminified and for modern targets, so the pure annotations reach the bundlers of consumers. Declarations are emitted from tsconfig.build.json, and the scripts follow the Trigen baseline. --- .clean-publish | 4 +- package.json | 37 ++--- pnpm-lock.yaml | 350 +++++++++----------------------------------- rollup.config.js | 52 ------- tsconfig.build.json | 43 ++++++ tsconfig.json | 44 ++---- vite.config.js | 24 ++- 7 files changed, 162 insertions(+), 392 deletions(-) delete mode 100644 rollup.config.js create mode 100644 tsconfig.build.json diff --git a/.clean-publish b/.clean-publish index b1c46691e..f79b0a8d7 100644 --- a/.clean-publish +++ b/.clean-publish @@ -1,6 +1,6 @@ { "withoutPublish": true, "tempDir": "package", - "fields": ["tsd"], - "files": ["website"] + "fields": ["scripts", "publishConfig"], + "files": ["website", "sandboxes", "**/*.spec.{ts,tsx}"] } diff --git a/package.json b/package.json index 5a62e2fbb..69ccbf06f 100644 --- a/package.json +++ b/package.json @@ -33,24 +33,27 @@ "import": "./dist/index.js", "require": "./dist/index.cjs" }, - "directory": "package" + "directory": "package", + "linkDirectory": false }, "files": [ "dist" ], "scripts": { - "prepublishOnly": "pnpm test && pnpm build && del ./package && clean-publish", - "postpublish": "del ./package", - "emitDeclarations": "tsc --emitDeclarationOnly", - "build": "rollup -c && pnpm emitDeclarations", + "clear:package": "del ./package", + "clear": "del ./package ./dist ./coverage ./storybook-static", + "prepublishOnly": "run test build clear:package clean-publish", + "postpublish": "pnpm clear:package", + "emitDeclarations": "tsc --emitDeclarationOnly -p tsconfig.build.json", + "build": "run -p [ vite build ] emitDeclarations", "start:storybook": "storybook dev -p 6006 --ci", "build:storybook": "del ./storybook-static; NODE_ENV=production storybook build", - "test:lint": "eslint \"src/**/*.{ts,tsx}\" \"stories/**/*.{ts,tsx}\" \"sandboxes/**/*.{ts,tsx}\" \"test/**/*.{ts,tsx}\"", + "lint": "eslint \"src/**/*.{ts,tsx}\" \"stories/**/*.{ts,tsx}\" \"sandboxes/**/*.{ts,tsx}\"", "test:unit": "vitest run --coverage", "test:unit:watch": "vitest watch", + "test:types": "tsc --noEmit", "test:size": "size-limit", - "test:typings": "tsd", - "test": "pnpm test:lint && pnpm test:unit", + "test": "run -p lint test:unit test:types", "format": "prettier --write src", "commit": "cz", "updateGitHooks": "simple-git-hooks" @@ -63,7 +66,6 @@ "@commitlint/cli": "^17.0.0", "@commitlint/config-conventional": "^17.0.0", "@commitlint/cz-commitlint": "^17.0.0", - "@rollup/plugin-node-resolve": "^16.0.3", "@size-limit/preset-small-lib": "^11.2.0", "@storybook/addon-actions": "^8.4.7", "@storybook/addon-controls": "^8.4.7", @@ -74,11 +76,10 @@ "@storybook/react": "^8.4.7", "@storybook/react-vite": "^8.4.7", "@storybook/theming": "^8.4.7", - "@swc/core": "^1.13.5", - "@swc/helpers": "^0.5.17", "@testing-library/dom": "^10.4.0", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.1.0", + "@trigen/scripts": "^12.0.0", "@types/faker": "^5.5.8", "@types/node": "^18.0.0", "@types/react": "^19.2.2", @@ -87,7 +88,6 @@ "@typescript-eslint/parser": "^8.18.0", "@vitejs/plugin-react": "^5.0.0", "@vitest/coverage-v8": "^4.0.0", - "browserslist": "^4.24.2", "chart.js": "^4.4.7", "chartjs-adapter-date-fns": "^3.0.0", "chartjs-plugin-annotation": "^3.1.0", @@ -111,25 +111,12 @@ "prettier": "^3.4.2", "react": "^19.0.0", "react-dom": "^19.0.0", - "rollup": "^4.0.0", - "rollup-plugin-swc3": "^0.12.0", "simple-git-hooks": "^2.6.1", "size-limit": "^11.1.6", "storybook": "^8.4.7", - "tsd": "^0.33.0", "typescript": "^5.7.2", "vite": "^7.0.0", "vitest": "^4.0.0", "vitest-canvas-mock": "^0.3.3" - }, - "tsd": { - "directory": "./test", - "compilerOptions": { - "paths": { - "react-chartjs-2": [ - "./src" - ] - } - } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 94b8ff14f..879550356 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,9 +17,6 @@ importers: '@commitlint/cz-commitlint': specifier: ^17.0.0 version: 17.8.1(@swc/core@1.13.5(@swc/helpers@0.5.17))(commitizen@4.3.1(@types/node@18.19.68)(typescript@5.7.2))(inquirer@8.2.5) - '@rollup/plugin-node-resolve': - specifier: ^16.0.3 - version: 16.0.3(rollup@4.29.1) '@size-limit/preset-small-lib': specifier: ^11.2.0 version: 11.2.0(size-limit@11.1.6) @@ -50,12 +47,6 @@ importers: '@storybook/theming': specifier: ^8.4.7 version: 8.4.7(storybook@8.4.7(prettier@3.4.2)(supports-color@7.2.0)) - '@swc/core': - specifier: ^1.13.5 - version: 1.13.5(@swc/helpers@0.5.17) - '@swc/helpers': - specifier: ^0.5.17 - version: 0.5.17 '@testing-library/dom': specifier: ^10.4.0 version: 10.4.0 @@ -65,6 +56,9 @@ importers: '@testing-library/react': specifier: ^16.1.0 version: 16.1.0(@testing-library/dom@10.4.0)(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@trigen/scripts': + specifier: ^12.0.0 + version: 12.0.0 '@types/faker': specifier: ^5.5.8 version: 5.5.9 @@ -89,9 +83,6 @@ importers: '@vitest/coverage-v8': specifier: ^4.0.0 version: 4.0.4(supports-color@7.2.0)(vitest@4.0.4(@types/node@18.19.68)(happy-dom@20.0.8)(jiti@2.4.2)(jsdom@25.0.1(supports-color@7.2.0))(supports-color@7.2.0)(terser@5.37.0)) - browserslist: - specifier: ^4.24.2 - version: 4.24.3 chart.js: specifier: ^4.4.7 version: 4.4.7 @@ -161,12 +152,6 @@ importers: react-dom: specifier: ^19.0.0 version: 19.0.0(react@19.0.0) - rollup: - specifier: ^4.0.0 - version: 4.29.1 - rollup-plugin-swc3: - specifier: ^0.12.0 - version: 0.12.1(@swc/core@1.13.5(@swc/helpers@0.5.17))(rollup@4.29.1) simple-git-hooks: specifier: ^2.6.1 version: 2.11.1 @@ -176,9 +161,6 @@ importers: storybook: specifier: ^8.4.7 version: 8.4.7(prettier@3.4.2)(supports-color@7.2.0) - tsd: - specifier: ^0.33.0 - version: 0.33.0 typescript: specifier: ^5.7.2 version: 5.7.2 @@ -191,6 +173,7 @@ importers: vitest-canvas-mock: specifier: ^0.3.3 version: 0.3.3(vitest@4.0.4(@types/node@18.19.68)(happy-dom@20.0.8)(jiti@2.4.2)(jsdom@25.0.1(supports-color@7.2.0))(supports-color@7.2.0)(terser@5.37.0)) + linkDirectory: false publishDirectory: package packages: @@ -487,9 +470,6 @@ packages: resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==} engines: {node: '>=18'} - '@dual-bundle/import-meta-resolve@4.1.0': - resolution: {integrity: sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==} - '@esbuild/aix-ppc64@0.24.2': resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} engines: {node: '>=18'} @@ -814,9 +794,6 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@fastify/deepmerge@2.0.1': - resolution: {integrity: sha512-hx+wJQr9Ph1hY/dyzY0SxqjumMyqZDlIF6oe71dpRKDHUg7dFQfjG94qqwQ274XRjmUrwKiYadex8XplNHx3CA==} - '@humanwhocodes/config-array@0.13.0': resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} engines: {node: '>=10.10.0'} @@ -830,10 +807,6 @@ packages: resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} deprecated: Use @eslint/object-schema instead - '@jest/schemas@29.6.3': - resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - '@joshwooding/vite-plugin-react-docgen-typescript@0.4.2': resolution: {integrity: sha512-feQ+ntr+8hbVudnsTUapiMN9q8T90XA1d5jn9QzY09sNoj4iD9wi0PY1vsBFTda4ZjEaxRK9S81oarR2nj7TFQ==} peerDependencies: @@ -896,15 +869,6 @@ packages: '@rolldown/pluginutils@1.0.0-beta.38': resolution: {integrity: sha512-N/ICGKleNhA5nc9XXQG/kkKHJ7S55u0x0XUJbbkmdCnFuoRkM1Il12q9q0eX19+M7KKUEPw/daUPIRnxhcxAIw==} - '@rollup/plugin-node-resolve@16.0.3': - resolution: {integrity: sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.78.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - '@rollup/pluginutils@5.1.4': resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} engines: {node: '>=14.0.0'} @@ -914,15 +878,6 @@ packages: rollup: optional: true - '@rollup/pluginutils@5.3.0': - resolution: {integrity: sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - '@rollup/rollup-android-arm-eabi@4.29.1': resolution: {integrity: sha512-ssKhA8RNltTZLpG6/QNkCSge+7mBQGUqJRisZ2MDQcEGaK93QESEgWK2iOpIDZ7k9zPVkG5AS3ksvD5ZWxmItw==} cpu: [arm] @@ -987,6 +942,7 @@ packages: resolution: {integrity: sha512-Py5vFd5HWYN9zxBv3WMrLAXY3yYJ6Q/aVERoeUFwiDGiMOWsMs7FokXihSOaT/PMWUty/Pj60XDQndK3eAfE6A==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-gnueabihf@4.52.5': resolution: {integrity: sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==} @@ -997,6 +953,7 @@ packages: resolution: {integrity: sha512-RiWpGgbayf7LUcuSNIbahr0ys2YnEERD4gYdISA06wa0i8RALrnzflh9Wxii7zQJEB2/Eh74dX4y/sHKLWp5uQ==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm-musleabihf@4.52.5': resolution: {integrity: sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==} @@ -1007,6 +964,7 @@ packages: resolution: {integrity: sha512-Z80O+taYxTQITWMjm/YqNoe9d10OX6kDh8X5/rFCMuPqsKsSyDilvfg+vd3iXIqtfmp+cnfL1UrYirkaF8SBZA==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-gnu@4.52.5': resolution: {integrity: sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==} @@ -1017,6 +975,7 @@ packages: resolution: {integrity: sha512-fOHRtF9gahwJk3QVp01a/GqS4hBEZCV1oKglVVq13kcK3NeVlS4BwIFzOHDbmKzt3i0OuHG4zfRP0YoG5OF/rA==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-musl@4.52.5': resolution: {integrity: sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==} @@ -1032,11 +991,13 @@ packages: resolution: {integrity: sha512-5a7q3tnlbcg0OodyxcAdrrCxFi0DgXJSoOuidFUzHZ2GixZXQs6Tc3CHmlvqKAmOs5eRde+JJxeIf9DonkmYkw==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-powerpc64le-gnu@4.29.1': resolution: {integrity: sha512-9b4Mg5Yfz6mRnlSPIdROcfw1BU22FQxmfjlp/CShWwO3LilKQuMISMTtAu/bxmmrE6A902W2cZJuzx8+gJ8e9w==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-ppc64-gnu@4.52.5': resolution: {integrity: sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==} @@ -1047,6 +1008,7 @@ packages: resolution: {integrity: sha512-G5pn0NChlbRM8OJWpJFMX4/i8OEU538uiSv0P6roZcbpe/WfhEO+AT8SHVKfp8qhDQzaz7Q+1/ixMy7hBRidnQ==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.52.5': resolution: {integrity: sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==} @@ -1062,6 +1024,7 @@ packages: resolution: {integrity: sha512-WM9lIkNdkhVwiArmLxFXpWndFGuOka4oJOZh8EP3Vb8q5lzdSCBuhjavJsw68Q9AKDGeOOIHYzYm4ZFvmWez5g==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.52.5': resolution: {integrity: sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==} @@ -1072,6 +1035,7 @@ packages: resolution: {integrity: sha512-87xYCwb0cPGZFoGiErT1eDcssByaLX4fc0z2nRM6eMtV9njAfEE6OW3UniAoDhX4Iq5xQVpE6qO9aJbCFumKYQ==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.52.5': resolution: {integrity: sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==} @@ -1082,6 +1046,7 @@ packages: resolution: {integrity: sha512-xufkSNppNOdVRCEC4WKvlR1FBDyqCSCpQeMMgv9ZyXqqtKBfkw1yfGMTUTs9Qsl6WQbJnsGboWCp7pJGkeMhKA==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-linux-x64-musl@4.52.5': resolution: {integrity: sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==} @@ -1131,8 +1096,13 @@ packages: '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} - '@sinclair/typebox@0.27.8': - resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@simple-libs/child-process-utils@2.0.0': + resolution: {integrity: sha512-dvNoRKLijXnD0XoJAz94pbNuB5GQgDr55UhpSPhffDkTT0Cmcqh9jSCOtwfT2d4H6MI9E7c4SgtMuJXZ6F3c6A==} + engines: {node: '>=22'} + + '@simple-libs/stream-utils@2.0.0': + resolution: {integrity: sha512-fCTuZK4QBa+39Oz9l4OGfJfz+GpwCp3AqO7Zch3to99xHPgstVsRFpeQ8LNd2o1Gv8raL2mCFwiaHh7bFSp5DQ==} + engines: {node: '>=22'} '@sindresorhus/merge-streams@2.3.0': resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} @@ -1296,24 +1266,28 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [glibc] '@swc/core-linux-arm64-musl@1.13.5': resolution: {integrity: sha512-9+ZxFN5GJag4CnYnq6apKTnnezpfJhCumyz0504/JbHLo+Ue+ZtJnf3RhyA9W9TINtLE0bC4hKpWi8ZKoETyOQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [musl] '@swc/core-linux-x64-gnu@1.13.5': resolution: {integrity: sha512-WD530qvHrki8Ywt/PloKUjaRKgstQqNGvmZl54g06kA+hqtSE2FTG9gngXr3UJxYu/cNAjJYiBifm7+w4nbHbA==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [glibc] '@swc/core-linux-x64-musl@1.13.5': resolution: {integrity: sha512-Luj8y4OFYx4DHNQTWjdIuKTq2f5k6uSXICqx+FSabnXptaOBAbJHNbHT/06JZh6NRUouaf0mYXN0mcsqvkhd7Q==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [musl] '@swc/core-win32-arm64-msvc@1.13.5': resolution: {integrity: sha512-cZ6UpumhF9SDJvv4DA2fo9WIzlNFuKSkZpZmPG1c+4PFSEMy5DFOjBSllCvnqihCabzXzpn6ykCwBmHpy31vQw==} @@ -1374,6 +1348,11 @@ packages: '@types/react-dom': optional: true + '@trigen/scripts@12.0.0': + resolution: {integrity: sha512-ts1wM//tP2+IHtk9HLwdGCyiOdqvTmqeErpkmUy8yTDpai2N//5wEL9ODHoCZdywInRvN/ePwUhxPEbibwiQHw==} + engines: {node: '>=22'} + hasBin: true + '@tsconfig/node10@1.0.11': resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} @@ -1386,10 +1365,6 @@ packages: '@tsconfig/node16@1.0.4': resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - '@tsd/typescript@5.9.3': - resolution: {integrity: sha512-JSSdNiS0wgd8GHhBwnMAI18Y8XPhLVN+dNelPfZCXFhy9Lb3NbnFyp9JKxxr54jSUkEJPk3cidvCoHducSaRMQ==} - engines: {node: '>=14.17'} - '@types/aria-query@5.0.4': resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} @@ -1417,9 +1392,6 @@ packages: '@types/doctrine@0.0.9': resolution: {integrity: sha512-eOIHzCUSH7SMfonMG1LsC2f8vxBFtho6NGBznK41R84YzPuvSBzrhEps33IsQiOW9+VL6NQ9DbjQJznk/S4uRA==} - '@types/eslint@7.29.0': - resolution: {integrity: sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==} - '@types/eslint@9.6.1': resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} @@ -1621,6 +1593,10 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + argue-cli@3.2.1: + resolution: {integrity: sha512-h8QG03KSAympQnbZe0k5h/mnQCCkoKO9rVQ0L+F99+NNTV4vm18Lq70WwIKE0aLN3mM1EUf42l960bl6Dd0jOw==} + engines: {node: '>=22'} + aria-query@5.3.0: resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} @@ -1643,10 +1619,6 @@ packages: resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} engines: {node: '>= 0.4'} - array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - array.prototype.findlast@1.2.5: resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} engines: {node: '>= 0.4'} @@ -2041,10 +2013,6 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} - defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} @@ -2085,18 +2053,10 @@ packages: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} - diff-sequences@29.6.3: - resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} - dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} - doctrine@2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} @@ -2245,10 +2205,6 @@ packages: eslint-plugin-n: '^15.0.0 || ^16.0.0 ' eslint-plugin-promise: ^6.0.0 - eslint-formatter-pretty@4.1.0: - resolution: {integrity: sha512-IsUTtGxF1hrH6lMWiSl1WbGaiP01eT6kzywdY1U+zLc0MP+nwEnUiS9UI8IaOTUhTeQJLlCEWIbXINBH4YJbBQ==} - engines: {node: '>=10'} - eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} @@ -2327,9 +2283,6 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-rule-docs@1.1.235: - resolution: {integrity: sha512-+TQ+x4JdTnDoFEXXb3fDvfGOwnyNV7duH8fXWTPD1ieaBmB8omj7Gw/pMBBu4uI2uJCCU8APDaQJzWuXnTsH4A==} - eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2587,10 +2540,6 @@ packages: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} - globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - globby@14.0.2: resolution: {integrity: sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==} engines: {node: '>=18'} @@ -2737,10 +2686,6 @@ packages: resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} engines: {node: '>= 0.4'} - irregular-plurals@3.5.0: - resolution: {integrity: sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==} - engines: {node: '>=8'} - is-arguments@1.2.0: resolution: {integrity: sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==} engines: {node: '>= 0.4'} @@ -2821,9 +2766,6 @@ packages: resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} engines: {node: '>= 0.4'} - is-module@1.0.0: - resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - is-negative-zero@2.0.3: resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} engines: {node: '>= 0.4'} @@ -2966,14 +2908,6 @@ packages: jest-canvas-mock@2.5.2: resolution: {integrity: sha512-vgnpPupjOL6+L5oJXzxTxFrlGEIbHdZqFU+LFNdtLxZ3lRDCl17FlTMM7IatoRQkrcyOTMlDinjUguqmQ6bR2A==} - jest-diff@29.7.0: - resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - jest-get-type@29.6.3: - resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - jiti@2.4.2: resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} hasBin: true @@ -3169,10 +3103,6 @@ packages: resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} engines: {node: '>=10'} - meow@9.0.0: - resolution: {integrity: sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==} - engines: {node: '>=10'} - merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -3342,6 +3272,10 @@ packages: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-limit@7.3.3: + resolution: {integrity: sha512-SKgVvDU5TNIxQ4r30U75BNLC6a+6GOEjngrk/ysM5+Zu3oJuk1SC5ApzIzY/7PjCEjoVPMWJ0zho/4QUiEB7TQ==} + engines: {node: '>=20'} + p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -3410,10 +3344,6 @@ packages: resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} engines: {node: '>=12'} - plur@4.0.0: - resolution: {integrity: sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==} - engines: {node: '>=10'} - polished@4.3.1: resolution: {integrity: sha512-OBatVyC/N7SCW/FaDHrSd+vn0o5cS855TOmYi4OkdWUMSJCET/xip//ch8xGUvtr3i44X9LVyWwQlRMTN3pwSA==} engines: {node: '>=10'} @@ -3447,10 +3377,6 @@ packages: resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} - pretty-format@29.7.0: - resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - process@0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} @@ -3494,9 +3420,6 @@ packages: react-is@17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} - react-is@18.3.1: - resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} - react-refresh@0.17.0: resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} engines: {node: '>=0.10.0'} @@ -3602,18 +3525,6 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup-plugin-swc3@0.12.1: - resolution: {integrity: sha512-iNV1T432XvyejZ19/41C2gLbXxEOiiJynPPAFF0WzwwFT5FHx7SstAp0yjJRLyrbZjfIhoWJVl3hX3c3Stv/GQ==} - engines: {node: '>=16'} - peerDependencies: - '@swc/core': '>=1.2.165' - rollup: ^2.0.0 || ^3.0.0 || ^4.0.0 - - rollup-preserve-directives@1.1.3: - resolution: {integrity: sha512-oXqxd6ZzkoQej8Qt0k+S/yvO2+S4CEVEVv2g85oL15o0cjAKTKEuo2MzyA8FcsBBXbtytBzBMFAbhvQg4YyPUQ==} - peerDependencies: - rollup: ^2.0.0 || ^3.0.0 || ^4.0.0 - rollup@4.29.1: resolution: {integrity: sha512-RaJ45M/kmJUzSWDs1Nnd5DdV4eerC98idtUOVr6FfKcgxqvjwHmxc5upLF9qZU9EpsVzzhleFahrT3shLuJzIw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -3733,10 +3644,6 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - slash@5.1.0: resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} engines: {node: '>=14.16'} @@ -3844,10 +3751,6 @@ packages: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} - supports-hyperlinks@2.3.0: - resolution: {integrity: sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==} - engines: {node: '>=8'} - supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -3960,11 +3863,6 @@ packages: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} - tsd@0.33.0: - resolution: {integrity: sha512-/PQtykJFVw90QICG7zyPDMIyueOXKL7jOJVoX5pILnb3Ux+7QqynOxfVvarE+K+yi7BZyOSY4r+OZNWSWRiEwQ==} - engines: {node: '>=14.16'} - hasBin: true - tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -4296,6 +4194,10 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + yocto-queue@1.2.2: + resolution: {integrity: sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==} + engines: {node: '>=12.20'} + snapshots: '@adobe/css-tools@4.4.1': {} @@ -4731,8 +4633,6 @@ snapshots: '@csstools/css-tokenizer@3.0.4': optional: true - '@dual-bundle/import-meta-resolve@4.1.0': {} - '@esbuild/aix-ppc64@0.24.2': optional: true @@ -4909,8 +4809,6 @@ snapshots: '@eslint/js@8.57.1': {} - '@fastify/deepmerge@2.0.1': {} - '@humanwhocodes/config-array@0.13.0(supports-color@7.2.0)': dependencies: '@humanwhocodes/object-schema': 2.0.3 @@ -4923,10 +4821,6 @@ snapshots: '@humanwhocodes/object-schema@2.0.3': {} - '@jest/schemas@29.6.3': - dependencies: - '@sinclair/typebox': 0.27.8 - '@joshwooding/vite-plugin-react-docgen-typescript@0.4.2(typescript@5.7.2)(vite@7.1.11(@types/node@18.19.68)(jiti@2.4.2)(terser@5.37.0))': dependencies: magic-string: 0.27.0 @@ -4991,16 +4885,6 @@ snapshots: '@rolldown/pluginutils@1.0.0-beta.38': {} - '@rollup/plugin-node-resolve@16.0.3(rollup@4.29.1)': - dependencies: - '@rollup/pluginutils': 5.3.0(rollup@4.29.1) - '@types/resolve': 1.20.2 - deepmerge: 4.3.1 - is-module: 1.0.0 - resolve: 1.22.11 - optionalDependencies: - rollup: 4.29.1 - '@rollup/pluginutils@5.1.4(rollup@4.29.1)': dependencies: '@types/estree': 1.0.6 @@ -5009,14 +4893,6 @@ snapshots: optionalDependencies: rollup: 4.29.1 - '@rollup/pluginutils@5.3.0(rollup@4.29.1)': - dependencies: - '@types/estree': 1.0.8 - estree-walker: 2.0.2 - picomatch: 4.0.3 - optionalDependencies: - rollup: 4.29.1 - '@rollup/rollup-android-arm-eabi@4.29.1': optional: true @@ -5142,7 +5018,11 @@ snapshots: '@rtsao/scc@1.1.0': {} - '@sinclair/typebox@0.27.8': {} + '@simple-libs/child-process-utils@2.0.0': + dependencies: + '@simple-libs/stream-utils': 2.0.0 + + '@simple-libs/stream-utils@2.0.0': {} '@sindresorhus/merge-streams@2.3.0': {} @@ -5360,16 +5240,20 @@ snapshots: '@swc/core-win32-ia32-msvc': 1.13.5 '@swc/core-win32-x64-msvc': 1.13.5 '@swc/helpers': 0.5.17 + optional: true - '@swc/counter@0.1.3': {} + '@swc/counter@0.1.3': + optional: true '@swc/helpers@0.5.17': dependencies: tslib: 2.8.1 + optional: true '@swc/types@0.1.25': dependencies: '@swc/counter': 0.1.3 + optional: true '@testing-library/dom@10.4.0': dependencies: @@ -5402,6 +5286,13 @@ snapshots: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) + '@trigen/scripts@12.0.0': + dependencies: + '@simple-libs/child-process-utils': 2.0.0 + '@simple-libs/stream-utils': 2.0.0 + argue-cli: 3.2.1 + p-limit: 7.3.3 + '@tsconfig/node10@1.0.11': {} '@tsconfig/node12@1.0.11': {} @@ -5410,8 +5301,6 @@ snapshots: '@tsconfig/node16@1.0.4': {} - '@tsd/typescript@5.9.3': {} - '@types/aria-query@5.0.4': {} '@types/babel__core@7.20.5': @@ -5448,11 +5337,6 @@ snapshots: '@types/doctrine@0.0.9': {} - '@types/eslint@7.29.0': - dependencies: - '@types/estree': 1.0.8 - '@types/json-schema': 7.0.15 - '@types/eslint@9.6.1': dependencies: '@types/estree': 1.0.8 @@ -5467,7 +5351,8 @@ snapshots: '@types/hammerjs@2.0.46': {} - '@types/json-schema@7.0.15': {} + '@types/json-schema@7.0.15': + optional: true '@types/json5@0.0.29': {} @@ -5696,6 +5581,8 @@ snapshots: argparse@2.0.1: {} + argue-cli@3.2.1: {} + aria-query@5.3.0: dependencies: dequal: 2.0.3 @@ -5723,8 +5610,6 @@ snapshots: get-intrinsic: 1.2.6 is-string: 1.1.1 - array-union@2.1.0: {} - array.prototype.findlast@1.2.5: dependencies: call-bind: 1.0.8 @@ -6187,8 +6072,6 @@ snapshots: deep-is@0.1.4: {} - deepmerge@4.3.1: {} - defaults@1.0.4: dependencies: clone: 1.0.4 @@ -6232,14 +6115,8 @@ snapshots: detect-indent@6.1.0: {} - diff-sequences@29.6.3: {} - diff@4.0.2: {} - dir-glob@3.0.1: - dependencies: - path-type: 4.0.0 - doctrine@2.1.0: dependencies: esutils: 2.0.3 @@ -6538,17 +6415,6 @@ snapshots: eslint-plugin-n: 17.15.1(eslint@8.57.1(supports-color@7.2.0)) eslint-plugin-promise: 7.2.1(eslint@8.57.1(supports-color@7.2.0)) - eslint-formatter-pretty@4.1.0: - dependencies: - '@types/eslint': 7.29.0 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - eslint-rule-docs: 1.1.235 - log-symbols: 4.1.0 - plur: 4.0.0 - string-width: 4.2.3 - supports-hyperlinks: 2.3.0 - eslint-import-resolver-node@0.3.9(supports-color@7.2.0): dependencies: debug: 3.2.7(supports-color@7.2.0) @@ -6656,8 +6522,6 @@ snapshots: string.prototype.matchall: 4.0.12 string.prototype.repeat: 1.0.0 - eslint-rule-docs@1.1.235: {} - eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 @@ -6999,15 +6863,6 @@ snapshots: define-properties: 1.2.1 gopd: 1.2.0 - globby@11.1.0: - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.3.2 - merge2: 1.4.1 - slash: 3.0.0 - globby@14.0.2: dependencies: '@sindresorhus/merge-streams': 2.3.0 @@ -7161,8 +7016,6 @@ snapshots: hasown: 2.0.2 side-channel: 1.1.0 - irregular-plurals@3.5.0: {} - is-arguments@1.2.0: dependencies: call-bound: 1.0.3 @@ -7237,8 +7090,6 @@ snapshots: is-map@2.0.3: {} - is-module@1.0.0: {} - is-negative-zero@2.0.3: {} is-number-object@1.1.0: @@ -7377,15 +7228,6 @@ snapshots: cssfontparser: 1.2.1 moo-color: 1.0.3 - jest-diff@29.7.0: - dependencies: - chalk: 4.1.2 - diff-sequences: 29.6.3 - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - - jest-get-type@29.6.3: {} - jiti@2.4.2: {} js-tokens@4.0.0: {} @@ -7577,21 +7419,6 @@ snapshots: type-fest: 0.18.1 yargs-parser: 20.2.9 - meow@9.0.0: - dependencies: - '@types/minimist': 1.2.5 - camelcase-keys: 6.2.2 - decamelize: 1.2.0 - decamelize-keys: 1.1.1 - hard-rejection: 2.1.0 - minimist-options: 4.1.0 - normalize-package-data: 3.0.3 - read-pkg-up: 7.0.1 - redent: 3.0.0 - trim-newlines: 3.0.1 - type-fest: 0.18.1 - yargs-parser: 20.2.9 - merge-stream@2.0.0: {} merge2@1.4.1: {} @@ -7783,6 +7610,10 @@ snapshots: dependencies: yocto-queue: 0.1.0 + p-limit@7.3.3: + dependencies: + yocto-queue: 1.2.2 + p-locate@4.1.0: dependencies: p-limit: 2.3.0 @@ -7833,10 +7664,6 @@ snapshots: picomatch@4.0.3: {} - plur@4.0.0: - dependencies: - irregular-plurals: 3.5.0 - polished@4.3.1: dependencies: '@babel/runtime': 7.26.0 @@ -7865,12 +7692,6 @@ snapshots: ansi-styles: 5.2.0 react-is: 17.0.2 - pretty-format@29.7.0: - dependencies: - '@jest/schemas': 29.6.3 - ansi-styles: 5.2.0 - react-is: 18.3.1 - process@0.11.10: {} prop-types@15.8.1: @@ -7919,8 +7740,6 @@ snapshots: react-is@17.0.2: {} - react-is@18.3.1: {} - react-refresh@0.17.0: {} react@18.3.1: @@ -8042,21 +7861,6 @@ snapshots: dependencies: glob: 7.2.3 - rollup-plugin-swc3@0.12.1(@swc/core@1.13.5(@swc/helpers@0.5.17))(rollup@4.29.1): - dependencies: - '@dual-bundle/import-meta-resolve': 4.1.0 - '@fastify/deepmerge': 2.0.1 - '@rollup/pluginutils': 5.1.4(rollup@4.29.1) - '@swc/core': 1.13.5(@swc/helpers@0.5.17) - get-tsconfig: 4.8.1 - rollup: 4.29.1 - rollup-preserve-directives: 1.1.3(rollup@4.29.1) - - rollup-preserve-directives@1.1.3(rollup@4.29.1): - dependencies: - magic-string: 0.30.19 - rollup: 4.29.1 - rollup@4.29.1: dependencies: '@types/estree': 1.0.6 @@ -8081,6 +7885,7 @@ snapshots: '@rollup/rollup-win32-ia32-msvc': 4.29.1 '@rollup/rollup-win32-x64-msvc': 4.29.1 fsevents: 2.3.3 + optional: true rollup@4.52.5: dependencies: @@ -8236,8 +8041,6 @@ snapshots: picocolors: 1.1.1 tinyglobby: 0.2.10 - slash@3.0.0: {} - slash@5.1.0: {} source-map-js@1.2.1: {} @@ -8364,11 +8167,6 @@ snapshots: dependencies: has-flag: 4.0.0 - supports-hyperlinks@2.3.0: - dependencies: - has-flag: 4.0.0 - supports-color: 7.2.0 - supports-preserve-symlinks-flag@1.0.0: {} symbol-tree@3.2.4: @@ -8484,16 +8282,6 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tsd@0.33.0: - dependencies: - '@tsd/typescript': 5.9.3 - eslint-formatter-pretty: 4.1.0 - globby: 11.1.0 - jest-diff: 29.7.0 - meow: 9.0.0 - path-exists: 4.0.0 - read-pkg-up: 7.0.1 - tslib@2.8.1: {} type-check@0.4.0: @@ -8827,3 +8615,5 @@ snapshots: yn@3.1.1: {} yocto-queue@0.1.0: {} + + yocto-queue@1.2.2: {} diff --git a/rollup.config.js b/rollup.config.js deleted file mode 100644 index ec839989f..000000000 --- a/rollup.config.js +++ /dev/null @@ -1,52 +0,0 @@ -import { swc } from 'rollup-plugin-swc3'; -import { nodeResolve } from '@rollup/plugin-node-resolve'; -import pkg from './package.json' with { type: 'json' }; - -const extensions = ['.js', '.ts', '.tsx']; -const external = _ => /node_modules/.test(_) && !/@swc\/helpers/.test(_); -const plugins = targets => [ - nodeResolve({ - extensions, - }), - swc({ - tsconfig: false, - jsc: { - parser: { - syntax: 'typescript', - tsx: true, - }, - transform: { - react: { - runtime: 'automatic', - useBuiltins: true, - }, - }, - externalHelpers: true, - }, - env: { - targets, - }, - module: { - type: 'es6', - }, - sourceMaps: true, - }), -]; - -export default { - input: pkg.exports, - plugins: plugins('defaults and supports es6-module'), - external, - output: [ - { - file: pkg.publishConfig.exports.import, - format: 'es', - sourcemap: true, - }, - { - file: pkg.publishConfig.exports.require, - format: 'cjs', - sourcemap: true, - }, - ], -}; diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 000000000..9c4b7e40a --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,43 @@ +{ + "compilerOptions": { + /* Type Checking */ + "strict": true, + "strictBindCallApply": true, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + /* Modules */ + "module": "NodeNext", + "moduleResolution": "NodeNext", + "resolveJsonModule": true, + /* Emit */ + "declaration": true, + "declarationMap": true, + "inlineSourceMap": true, + "outDir": "dist", + "rootDir": "src", + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, + "isolatedModules": true, + "verbatimModuleSyntax": true, + /* Language and Environment */ + "jsx": "react-jsx", + "lib": [ + "dom", + "esnext" + ], + "types": [], + "target": "ESNext", + /* Completeness */ + "skipLibCheck": true + }, + "include": [ + "src" + ], + "exclude": [ + "**/*.config.ts", + "**/*.spec.tsx" + ] +} diff --git a/tsconfig.json b/tsconfig.json index c97513678..7ce662a18 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,37 +1,17 @@ { + "extends": "./tsconfig.build.json", "compilerOptions": { - /* Type Checking */ - "strict": true, - "strictBindCallApply": true, - "noFallthroughCasesInSwitch": true, - "noImplicitOverride": true, - "noImplicitReturns": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - /* Modules */ - "baseUrl": ".", - "module": "NodeNext", - "moduleResolution": "NodeNext", - "resolveJsonModule": true, - /* Emit */ - "declaration": true, - "declarationMap": true, - "inlineSourceMap": true, - "outDir": "dist", - /* Interop Constraints */ - "allowSyntheticDefaultImports": true, - "isolatedModules": true, - /* Language and Environment */ - "jsx": "preserve", - "lib": [ - "dom", - "esnext" - ], - "target": "ESNext", - /* Completeness */ - "skipLibCheck": true + "rootDir": ".", + "allowJs": true, + "types": [ + "node", + "@testing-library/jest-dom/vitest" + ] }, "include": [ - "src" - ] + "src", + "*.js", + "*.ts" + ], + "exclude": [] } diff --git a/vite.config.js b/vite.config.js index a66b74121..36407cc6a 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,19 +1,41 @@ import { defineConfig } from 'vite'; +import { configDefaults } from 'vitest/config'; import react from '@vitejs/plugin-react'; export default defineConfig({ plugins: [react()], + build: { + target: 'esnext', + lib: { + // CommonJS stays: it was dropped once and restored in v5.1 + formats: ['es', 'cjs'], + entry: { + index: './src/index.ts', + }, + }, + rollupOptions: { + external: id => /^(react|chart\.js)(\/|$)/.test(id), + }, + sourcemap: true, + minify: false, + emptyOutDir: false, + }, test: { environment: 'happy-dom', - setupFiles: ['test/setup.ts'], + setupFiles: ['@testing-library/jest-dom/vitest', 'vitest-canvas-mock'], server: { deps: { inline: ['vitest-canvas-mock'], }, }, + exclude: [...configDefaults.exclude, './package'], coverage: { reporter: ['lcovonly', 'text'], include: ['src/**/*'], }, + typecheck: { + enabled: true, + include: ['**/*.spec.tsx'], + }, }, }); From a737b5f2909d3e98350ddfb5248282f27b8f9572 Mon Sep 17 00:00:00 2001 From: dangreen Date: Mon, 30 Nov 2026 15:25:32 +0400 Subject: [PATCH 2/5] test: move tests next to the sources and check types with tsc Specs live beside the code they test, and tsd type tests become @ts-expect-error cases in them, checked by tsc and by Vitest typecheck. --- .eslintrc.json | 38 ++++++++++++++--- .github/workflows/tests.yml | 6 +-- test/chart.test.tsx => src/chart.spec.tsx | 35 +++++++++++++-- src/typedCharts.spec.tsx | 41 ++++++++++++++++++ test/chart.test-d.tsx | 52 ----------------------- test/setup.ts | 3 -- 6 files changed, 107 insertions(+), 68 deletions(-) rename test/chart.test.tsx => src/chart.spec.tsx (93%) create mode 100644 src/typedCharts.spec.tsx delete mode 100644 test/chart.test-d.tsx delete mode 100644 test/setup.ts diff --git a/.eslintrc.json b/.eslintrc.json index 48cb1bcb8..398f39be5 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,9 @@ { "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint", "prettier"], + "plugins": [ + "@typescript-eslint", + "prettier" + ], "extends": [ "standard", "standard-react", @@ -22,11 +25,21 @@ } }, "rules": { - "curly": [2, "multi-line"], - "quotes": [2, "single", "avoid-escape"], + "curly": [ + 2, + "multi-line" + ], + "quotes": [ + 2, + "single", + "avoid-escape" + ], "react/display-name": 0, "react/jsx-boolean-value": 1, - "jsx-quotes": [1, "prefer-single"], + "jsx-quotes": [ + 1, + "prefer-single" + ], "react/jsx-no-undef": 1, "react/jsx-sort-props": 0, "react/jsx-uses-react": 1, @@ -37,11 +50,24 @@ "react/prop-types": 0, "react/react-in-jsx-scope": 0, "react/self-closing-comp": 1, - "semi": [2, "always"], + "semi": [ + 2, + "always" + ], "strict": 0, "no-use-before-define": 0, "@typescript-eslint/no-use-before-define": 2, "@typescript-eslint/consistent-type-imports": "error", "@typescript-eslint/no-import-type-side-effects": "error" - } + }, + "overrides": [ + { + "files": [ + "**/*.spec.tsx" + ], + "rules": { + "@typescript-eslint/no-explicit-any": "off" + } + } + ] } diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bf85cc236..a8eea2a68 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,10 +25,8 @@ jobs: cache: 'pnpm' - name: Install dependencies run: pnpm install - - name: Build package - run: pnpm build - name: Check types - run: pnpm test:typings + run: pnpm test:types lint: runs-on: ubuntu-latest name: lint @@ -47,7 +45,7 @@ jobs: - name: Install dependencies run: pnpm install - name: Lint files - run: pnpm test:lint + run: pnpm lint unit: runs-on: ubuntu-latest name: unit diff --git a/test/chart.test.tsx b/src/chart.spec.tsx similarity index 93% rename from test/chart.test.tsx rename to src/chart.spec.tsx index 6c68b3cc9..0561198c0 100644 --- a/test/chart.test.tsx +++ b/src/chart.spec.tsx @@ -2,9 +2,10 @@ import { vi, beforeEach, afterEach, describe, it, expect } from 'vitest'; import { render, cleanup, fireEvent } from '@testing-library/react'; import 'chart.js/auto'; import { Chart as ChartJS } from 'chart.js'; -import { Chart } from '../src/index.js'; +import type { Plugin } from 'chart.js'; +import { Chart } from './chart.js'; -describe('', () => { +describe('Chart', () => { const data = { labels: ['red', 'blue'], datasets: [{ label: 'colors', data: [1, 2] }], @@ -272,7 +273,7 @@ describe('', () => { expect(chart).toBe(null); }); - it('should add className ', () => { + it('should add className', () => { render( ', () => { expect(update).toHaveBeenCalledTimes(1); expect(update).toBeCalledWith('active'); }); + + it('should accept plugins of its chart type', () => { + const element = ( + []} /> + ); + + expect(element.props.plugins).toEqual([]); + }); + + it('should accept datasets of different chart types', () => { + const multiTypeData = { + datasets: [ + { + type: 'line' as const, + label: 'Dataset 1', + data: [], + }, + { + type: 'bar' as const, + label: 'Dataset 2', + data: [], + }, + ], + }; + const element = ; + + expect(element.props.data).toBe(multiTypeData); + }); }); diff --git a/src/typedCharts.spec.tsx b/src/typedCharts.spec.tsx new file mode 100644 index 000000000..2258cbfb7 --- /dev/null +++ b/src/typedCharts.spec.tsx @@ -0,0 +1,41 @@ +import { describe, it, expect } from 'vitest'; +import type { Plugin } from 'chart.js'; +import { Doughnut, Scatter } from './typedCharts.js'; + +describe('typedCharts', () => { + const data = { + datasets: [], + }; + + describe('Scatter', () => { + it('should accept plugins of its chart type', () => { + const element = ( + []} /> + ); + + expect(element.props.plugins).toEqual([]); + }); + + it('should reject plugins of another chart type', () => { + // @ts-expect-error Plugins of a bar chart do not fit a scatter chart + const element = []} />; + + expect(element.props.plugins).toEqual([]); + }); + + it('should reject options of another chart type', () => { + // @ts-expect-error `cutout` is an option of doughnut and pie charts + const element = ; + + expect(element.props.options).toEqual({ cutout: '75%' }); + }); + }); + + describe('Doughnut', () => { + it('should accept options of its chart type', () => { + const element = ; + + expect(element.props.options).toEqual({ cutout: '75%' }); + }); + }); +}); diff --git a/test/chart.test-d.tsx b/test/chart.test-d.tsx deleted file mode 100644 index a4ab3994c..000000000 --- a/test/chart.test-d.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import { expectError } from 'tsd'; -import type { Plugin } from 'chart.js'; -import { Chart, Scatter, Doughnut } from '../src/index.js'; - -const data = { - datasets: [], -}; -const multiTypeData = { - datasets: [ - { - type: 'line' as const, - label: 'Dataset 1', - data: [], - }, - { - type: 'bar' as const, - label: 'Dataset 2', - data: [], - }, - ], -}; - -/** - * Should check type-specific props - */ - -[]} />; -[]} />; -; -[]} />; - -expectError([]} />); - -/** - * Should check type-specific options - */ - -; - -expectError( - -); diff --git a/test/setup.ts b/test/setup.ts deleted file mode 100644 index 64b6cbf0e..000000000 --- a/test/setup.ts +++ /dev/null @@ -1,3 +0,0 @@ -import '@testing-library/jest-dom/vitest'; - -import 'vitest-canvas-mock'; From 7261b7e0aadc9b287b898739a71f21820e35d201 Mon Sep 17 00:00:00 2001 From: dangreen Date: Mon, 30 Nov 2026 16:35:15 +0400 Subject: [PATCH 3/5] fix: keep the pure annotations of forwardRef calls swc added them to the build, Vite does not: without them a bundler keeps Chart and its Chart.js core even when only an event helper is imported. The annotations are in the sources now, and size-limit measures a helper-only import. The type test of plugins on the generic Chart, lost in the move from tsd, is back. --- .size-limit.json | 6 ++++++ src/chart.spec.tsx | 8 ++++++++ src/chart.tsx | 4 +++- src/typedCharts.tsx | 9 ++++++--- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.size-limit.json b/.size-limit.json index b1634d3a4..f53936773 100644 --- a/.size-limit.json +++ b/.size-limit.json @@ -16,5 +16,11 @@ "path": "dist/index.js", "import": "{ Line }", "limit": "600 B" + }, + { + "name": "Event helper", + "path": "dist/index.js", + "import": "{ getElementAtEvent }", + "limit": "100 B" } ] diff --git a/src/chart.spec.tsx b/src/chart.spec.tsx index 0561198c0..a79b7d105 100644 --- a/src/chart.spec.tsx +++ b/src/chart.spec.tsx @@ -440,6 +440,14 @@ describe('Chart', () => { expect(element.props.plugins).toEqual([]); }); + it('should accept plugins typed for another chart type', () => { + const element = ( + []} /> + ); + + expect(element.props.plugins).toEqual([]); + }); + it('should accept datasets of different chart types', () => { const multiTypeData = { datasets: [ diff --git a/src/chart.tsx b/src/chart.tsx index f742a2308..d148cf347 100644 --- a/src/chart.tsx +++ b/src/chart.tsx @@ -112,4 +112,6 @@ function ChartComponent< ); } -export const Chart = forwardRef(ChartComponent) as BaseChartComponent; +export const Chart = /* @__PURE__ */ forwardRef( + ChartComponent +) as BaseChartComponent; diff --git a/src/typedCharts.tsx b/src/typedCharts.tsx index 77f7dab51..1dd7ea846 100644 --- a/src/typedCharts.tsx +++ b/src/typedCharts.tsx @@ -25,9 +25,12 @@ function createTypedChart( ) { ChartJS.register(registerables); - return forwardRef, Omit, 'type'>>( - (props, ref) => - ) as TypedChartComponent; + return /* @__PURE__ */ forwardRef< + ChartJSOrUndefined, + Omit, 'type'> + >((props, ref) => ( + + )) as TypedChartComponent; } export const Line = /* #__PURE__ */ createTypedChart('line', LineController); From c41680b6e68bb94e2558bf73e720c128377ab08a Mon Sep 17 00:00:00 2001 From: dangreen Date: Mon, 30 Nov 2026 19:14:15 +0400 Subject: [PATCH 4/5] test: render the typed chart components The specs checked only the props types, so the render function of the typed components was never run. --- src/typedCharts.spec.tsx | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/typedCharts.spec.tsx b/src/typedCharts.spec.tsx index 2258cbfb7..996a455d6 100644 --- a/src/typedCharts.spec.tsx +++ b/src/typedCharts.spec.tsx @@ -1,13 +1,33 @@ -import { describe, it, expect } from 'vitest'; +import { createRef } from 'react'; +import { afterEach, describe, it, expect } from 'vitest'; +import { render, cleanup } from '@testing-library/react'; +import { Chart as ChartJS, LinearScale } from 'chart.js'; import type { Plugin } from 'chart.js'; +import type { ChartJSOrUndefined } from './types.js'; import { Doughnut, Scatter } from './typedCharts.js'; +// The components register their controllers themselves +ChartJS.register(LinearScale); + describe('typedCharts', () => { const data = { datasets: [], }; + afterEach(() => { + cleanup(); + }); + describe('Scatter', () => { + it('should render a scatter chart', () => { + const ref = createRef>(); + + render(); + + expect(ref.current).toBeInstanceOf(ChartJS); + expect(ref.current?.config).toHaveProperty('type', 'scatter'); + }); + it('should accept plugins of its chart type', () => { const element = ( []} /> @@ -32,6 +52,17 @@ describe('typedCharts', () => { }); describe('Doughnut', () => { + it('should render a doughnut chart', () => { + const ref = createRef>(); + + render( + + ); + + expect(ref.current).toBeInstanceOf(ChartJS); + expect(ref.current?.config).toHaveProperty('type', 'doughnut'); + }); + it('should accept options of its chart type', () => { const element = ; From eb39ad83c900e5b80a6c363da139ce0a72c5e363 Mon Sep 17 00:00:00 2001 From: dangreen Date: Mon, 30 Nov 2026 19:27:12 +0400 Subject: [PATCH 5/5] test: check the controller, ref and options of the typed charts With empty datasets Chart.js never looks up the controller, so the tests passed even without the controller registration. Each test now checks one behavior. --- src/typedCharts.spec.tsx | 61 +++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/src/typedCharts.spec.tsx b/src/typedCharts.spec.tsx index 996a455d6..28d005470 100644 --- a/src/typedCharts.spec.tsx +++ b/src/typedCharts.spec.tsx @@ -1,13 +1,20 @@ import { createRef } from 'react'; import { afterEach, describe, it, expect } from 'vitest'; import { render, cleanup } from '@testing-library/react'; -import { Chart as ChartJS, LinearScale } from 'chart.js'; +import { + Chart as ChartJS, + ArcElement, + DoughnutController, + LinearScale, + PointElement, + ScatterController, +} from 'chart.js'; import type { Plugin } from 'chart.js'; import type { ChartJSOrUndefined } from './types.js'; import { Doughnut, Scatter } from './typedCharts.js'; // The components register their controllers themselves -ChartJS.register(LinearScale); +ChartJS.register(ArcElement, LinearScale, PointElement); describe('typedCharts', () => { const data = { @@ -19,13 +26,30 @@ describe('typedCharts', () => { }); describe('Scatter', () => { + const scatterData = { + datasets: [{ data: [{ x: 1, y: 1 }] }], + }; + it('should render a scatter chart', () => { const ref = createRef>(); - render(); + render( + + ); + + expect(ref.current?.getDatasetMeta(0).controller).toBeInstanceOf( + ScatterController + ); + }); + + it('should pass the chart instance to a ref', () => { + const ref = createRef>(); + + render( + + ); expect(ref.current).toBeInstanceOf(ChartJS); - expect(ref.current?.config).toHaveProperty('type', 'scatter'); }); it('should accept plugins of its chart type', () => { @@ -52,15 +76,38 @@ describe('typedCharts', () => { }); describe('Doughnut', () => { + const doughnutData = { + datasets: [{ data: [1] }], + }; + it('should render a doughnut chart', () => { const ref = createRef>(); render( - + ); - expect(ref.current).toBeInstanceOf(ChartJS); - expect(ref.current?.config).toHaveProperty('type', 'doughnut'); + expect(ref.current?.getDatasetMeta(0).controller).toBeInstanceOf( + DoughnutController + ); + }); + + it('should pass options to the chart', () => { + const ref = createRef>(); + + render( + + ); + + expect(ref.current?.options).toHaveProperty('cutout', '75%'); }); it('should accept options of its chart type', () => {