diff --git a/package.json b/package.json index 7d94282..6d1ded4 100644 --- a/package.json +++ b/package.json @@ -61,9 +61,9 @@ "test:export": "vitest run --coverage --reporter=verbose --reporter=junit --outputFile=test/testResults.xml" }, "dependencies": { - "@formatjs/icu-messageformat-parser": "^2.4.0", - "@formatjs/intl-localematcher": "^0.2.32", - "intl-messageformat": "^10.3.5" + "@formatjs/icu-messageformat-parser": "^2.6.0", + "@formatjs/intl-localematcher": "^0.4.0", + "intl-messageformat": "^10.5.0" }, "peerDependencies": { "@types/react": ">=16.8.0", @@ -81,12 +81,12 @@ "@js-temporal/polyfill": "^0.4.4", "@schummar/runp": "1.12.0", "@testing-library/react": "14.0.0", - "@types/node": "20.2.5", - "@types/react": "18.2.7", - "@typescript-eslint/eslint-plugin": "5.59.8", - "@typescript-eslint/parser": "5.59.8", - "@vitest/coverage-c8": "0.31.2", - "eslint": "8.41.0", + "@types/node": "20.3.1", + "@types/react": "18.2.13", + "@typescript-eslint/eslint-plugin": "5.60.0", + "@typescript-eslint/parser": "5.60.0", + "@vitest/coverage-v8": "^0.32.2", + "eslint": "8.43.0", "eslint-config-prettier": "8.8.0", "eslint-plugin-prettier": "4.2.1", "jsdom": "22.1.0", @@ -95,10 +95,10 @@ "react": "18.2.0", "react-dom": "18.2.0", "rimraf": "5.0.1", - "semantic-release": "21.0.2", - "typescript": "5.0.4", + "semantic-release": "21.0.5", + "typescript": "5.1.3", "vite": "4.3.9", - "vitest": "0.31.2" + "vitest": "0.32.2" }, "files": [ "dist", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fbab0f2..dab7722 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,58 +1,58 @@ lockfileVersion: 5.4 specifiers: - '@formatjs/icu-messageformat-parser': ^2.4.0 - '@formatjs/intl-localematcher': ^0.2.32 + '@formatjs/icu-messageformat-parser': ^2.6.0 + '@formatjs/intl-localematcher': ^0.4.0 '@js-temporal/polyfill': ^0.4.4 '@schummar/runp': 1.12.0 '@testing-library/react': 14.0.0 - '@types/node': 20.2.5 - '@types/react': 18.2.7 - '@typescript-eslint/eslint-plugin': 5.59.8 - '@typescript-eslint/parser': 5.59.8 - '@vitest/coverage-c8': 0.31.2 - eslint: 8.41.0 + '@types/node': 20.3.1 + '@types/react': 18.2.13 + '@typescript-eslint/eslint-plugin': 5.60.0 + '@typescript-eslint/parser': 5.60.0 + '@vitest/coverage-v8': ^0.32.2 + eslint: 8.43.0 eslint-config-prettier: 8.8.0 eslint-plugin-prettier: 4.2.1 - intl-messageformat: ^10.3.5 + intl-messageformat: ^10.5.0 jsdom: 22.1.0 prettier: 2.8.8 publint: 0.1.12 react: 18.2.0 react-dom: 18.2.0 rimraf: 5.0.1 - semantic-release: 21.0.2 - typescript: 5.0.4 + semantic-release: 21.0.5 + typescript: 5.1.3 vite: 4.3.9 - vitest: 0.31.2 + vitest: 0.32.2 dependencies: - '@formatjs/icu-messageformat-parser': 2.4.0 - '@formatjs/intl-localematcher': 0.2.32 - intl-messageformat: 10.3.5 + '@formatjs/icu-messageformat-parser': 2.6.0 + '@formatjs/intl-localematcher': 0.4.0 + intl-messageformat: 10.5.0 devDependencies: '@js-temporal/polyfill': 0.4.4 '@schummar/runp': 1.12.0 '@testing-library/react': 14.0.0_biqbaboplfbrettd7655fr4n2y - '@types/node': 20.2.5 - '@types/react': 18.2.7 - '@typescript-eslint/eslint-plugin': 5.59.8_hnhvdstanz2zc7wdbtnhvs2o7u - '@typescript-eslint/parser': 5.59.8_opaykosi7ysrbskpnffskmbrki - '@vitest/coverage-c8': 0.31.2_vitest@0.31.2 - eslint: 8.41.0 - eslint-config-prettier: 8.8.0_eslint@8.41.0 - eslint-plugin-prettier: 4.2.1_xcqkel4mpum3npntysob2xmn54 + '@types/node': 20.3.1 + '@types/react': 18.2.13 + '@typescript-eslint/eslint-plugin': 5.60.0_6yzi2ymi2jevhjfd3hf6w262e4 + '@typescript-eslint/parser': 5.60.0_7yfldhli4vs6yywnkyiujhawka + '@vitest/coverage-v8': 0.32.2_vitest@0.32.2 + eslint: 8.43.0 + eslint-config-prettier: 8.8.0_eslint@8.43.0 + eslint-plugin-prettier: 4.2.1_zh6vkmzat4wtnmvmftdassiwyu jsdom: 22.1.0 prettier: 2.8.8 publint: 0.1.12 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 rimraf: 5.0.1 - semantic-release: 21.0.2 - typescript: 5.0.4 - vite: 4.3.9_@types+node@20.2.5 - vitest: 0.31.2_jsdom@22.1.0 + semantic-release: 21.0.5 + typescript: 5.1.3 + vite: 4.3.9_@types+node@20.3.1 + vitest: 0.32.2_jsdom@22.1.0 packages: @@ -61,7 +61,7 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.16 + '@jridgewell/trace-mapping': 0.3.18 dev: true /@babel/code-frame/7.18.6: @@ -308,13 +308,13 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils/4.2.0_eslint@8.41.0: + /@eslint-community/eslint-utils/4.2.0_eslint@8.43.0: resolution: {integrity: sha512-gB8T4H4DEfX2IV9zGDJPOBgP1e/DbfCPDTtEqUMckpvzS1OYtva8JdFYBqMwYk7xAQ429WGF/UPqn8uQ//h2vQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.41.0 + eslint: 8.43.0 eslint-visitor-keys: 3.4.1 dev: true @@ -340,47 +340,47 @@ packages: - supports-color dev: true - /@eslint/js/8.41.0: - resolution: {integrity: sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==} + /@eslint/js/8.43.0: + resolution: {integrity: sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@formatjs/ecma402-abstract/1.15.0: - resolution: {integrity: sha512-7bAYAv0w4AIao9DNg0avfOLTCPE9woAgs6SpXuMq11IN3A+l+cq8ghczwqSZBM11myvPSJA7vLn72q0rJ0QK6Q==} + /@formatjs/ecma402-abstract/1.17.0: + resolution: {integrity: sha512-6ueQTeJZtwKjmh23bdkq/DMqH4l4bmfvtQH98blOSbiXv/OUiyijSW6jU22IT8BNM1ujCaEvJfTtyCYVH38EMQ==} dependencies: - '@formatjs/intl-localematcher': 0.2.32 + '@formatjs/intl-localematcher': 0.4.0 tslib: 2.5.2 dev: false - /@formatjs/fast-memoize/2.0.1: - resolution: {integrity: sha512-M2GgV+qJn5WJQAYewz7q2Cdl6fobQa69S1AzSM2y0P68ZDbK5cWrJIcPCO395Of1ksftGZoOt4LYCO/j9BKBSA==} + /@formatjs/fast-memoize/2.2.0: + resolution: {integrity: sha512-hnk/nY8FyrL5YxwP9e4r9dqeM6cAbo8PeU9UjyXojZMNvVad2Z06FAVHyR3Ecw6fza+0GH7vdJgiKIVXTMbSBA==} dependencies: tslib: 2.5.2 dev: false - /@formatjs/icu-messageformat-parser/2.4.0: - resolution: {integrity: sha512-6Dh5Z/gp4F/HovXXu/vmd0If5NbYLB5dZrmhWVNb+BOGOEU3wt7Z/83KY1dtd7IDhAnYHasbmKE1RbTE0J+3hw==} + /@formatjs/icu-messageformat-parser/2.6.0: + resolution: {integrity: sha512-yT6at0qc0DANw9qM/TU8RZaCtfDXtj4pZM/IC2WnVU80yAcliS3KVDiuUt4jSQAeFL9JS5bc2hARnFmjPdA6qw==} dependencies: - '@formatjs/ecma402-abstract': 1.15.0 - '@formatjs/icu-skeleton-parser': 1.4.0 + '@formatjs/ecma402-abstract': 1.17.0 + '@formatjs/icu-skeleton-parser': 1.6.0 tslib: 2.5.2 dev: false - /@formatjs/icu-skeleton-parser/1.4.0: - resolution: {integrity: sha512-Qq347VM616rVLkvN6QsKJELazRyNlbCiN47LdH0Mc5U7E2xV0vatiVhGqd3KFgbc055BvtnUXR7XX60dCGFuWg==} + /@formatjs/icu-skeleton-parser/1.6.0: + resolution: {integrity: sha512-eMmxNpoX/J1IPUjPGSZwo0Wh+7CEvdEMddP2Jxg1gQJXfGfht/FdW2D5XDFj3VMbOTUQlDIdZJY7uC6O6gjPoA==} dependencies: - '@formatjs/ecma402-abstract': 1.15.0 + '@formatjs/ecma402-abstract': 1.17.0 tslib: 2.5.2 dev: false - /@formatjs/intl-localematcher/0.2.32: - resolution: {integrity: sha512-k/MEBstff4sttohyEpXxCmC3MqbUn9VvHGlZ8fauLzkbwXmVrEeyzS+4uhrvAk9DWU9/7otYWxyDox4nT/KVLQ==} + /@formatjs/intl-localematcher/0.4.0: + resolution: {integrity: sha512-bRTd+rKomvfdS4QDlVJ6TA/Jx1F2h/TBVO5LjvhQ7QPPHp19oPNMIum7W2CMEReq/zPxpmCeB31F9+5gl/qtvw==} dependencies: - tslib: 2.4.0 + tslib: 2.5.2 dev: false - /@humanwhocodes/config-array/0.11.8: - resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==} + /@humanwhocodes/config-array/0.11.10: + resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 @@ -422,7 +422,7 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.14 - '@jridgewell/trace-mapping': 0.3.16 + '@jridgewell/trace-mapping': 0.3.18 dev: true /@jridgewell/resolve-uri/3.1.0: @@ -439,8 +439,8 @@ packages: resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} dev: true - /@jridgewell/trace-mapping/0.3.16: - resolution: {integrity: sha512-LCQ+NeThyJ4k1W2d+vIKdxuSt9R3pQSZ4P92m7EakaYuXcVWbHuT5bjNcqLd4Rdgi6xYWYDvBJZJLZSLanjDcA==} + /@jridgewell/trace-mapping/0.3.18: + resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} dependencies: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 @@ -482,15 +482,15 @@ packages: '@octokit/types': 7.5.1 dev: true - /@octokit/core/4.0.5: - resolution: {integrity: sha512-4R3HeHTYVHCfzSAi0C6pbGXV8UDI5Rk+k3G7kLVNckswN9mvpOzW9oENfjfH3nEmzg8y3AmKmzs8Sg6pLCeOCA==} + /@octokit/core/4.2.4: + resolution: {integrity: sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==} engines: {node: '>= 14'} dependencies: '@octokit/auth-token': 3.0.1 '@octokit/graphql': 5.0.1 '@octokit/request': 6.2.1 '@octokit/request-error': 3.0.1 - '@octokit/types': 7.5.1 + '@octokit/types': 9.3.2 before-after-hook: 2.2.3 universal-user-agent: 6.0.0 transitivePeerDependencies: @@ -521,33 +521,42 @@ packages: resolution: {integrity: sha512-4EuKSk3N95UBWFau3Bz9b3pheQ8jQYbKmBL5+GSuY8YDPDwu03J4BjI+66yNi8aaX/3h1qDpb0mbBkLdr+cfGQ==} dev: true - /@octokit/plugin-paginate-rest/4.3.1_@octokit+core@4.0.5: - resolution: {integrity: sha512-h8KKxESmSFTcXX409CAxlaOYscEDvN2KGQRsLCGT1NSqRW+D6EXLVQ8vuHhFznS9MuH9QYw1GfsUN30bg8hjVA==} - engines: {node: '>= 14'} + /@octokit/openapi-types/18.0.0: + resolution: {integrity: sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw==} + dev: true + + /@octokit/plugin-paginate-rest/7.1.2_@octokit+core@4.2.4: + resolution: {integrity: sha512-Jx8KuKqEAVRsK6fMzZKv3h6UH9/NRDHsDRtUAROqqmZlCptM///Uef7A1ViZ/cbDplekz7VbDWdFLAZ/mpuDww==} + engines: {node: '>= 18'} peerDependencies: '@octokit/core': '>=4' dependencies: - '@octokit/core': 4.0.5 - '@octokit/types': 7.5.1 + '@octokit/core': 4.2.4 + '@octokit/tsconfig': 2.0.0 + '@octokit/types': 9.3.2 dev: true - /@octokit/plugin-request-log/1.0.4_@octokit+core@4.0.5: - resolution: {integrity: sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==} + /@octokit/plugin-retry/5.0.4_@octokit+core@4.2.4: + resolution: {integrity: sha512-hw00fDIhOgijy4aSxS6weWF5uqZVeoiC/AptLLyjL8KFCJRGRaXfcfgj76h/Z3cSLTjRsEIQnNCTig8INttL/g==} + engines: {node: '>= 18'} peerDependencies: '@octokit/core': '>=3' dependencies: - '@octokit/core': 4.0.5 + '@octokit/core': 4.2.4 + '@octokit/request-error': 4.0.2 + '@octokit/types': 10.0.0 + bottleneck: 2.19.5 dev: true - /@octokit/plugin-rest-endpoint-methods/6.6.2_@octokit+core@4.0.5: - resolution: {integrity: sha512-n9dL5KMpz9qVFSNdcVWC8ZPbl68QbTk7+CMPXCXqaMZOLn1n1YuoSFFCy84Ge0fx333fUqpnBHv8BFjwGtUQkA==} - engines: {node: '>= 14'} + /@octokit/plugin-throttling/6.1.0_@octokit+core@4.2.4: + resolution: {integrity: sha512-JqMbTiPC0sUSTsLQsdq3JVx1mx8UtTo5mwR80YqPXE93+XhevvSyOR1rO2Z+NbO/r0TK4hqFJSSi/9oIZBxZTg==} + engines: {node: '>= 18'} peerDependencies: - '@octokit/core': '>=3' + '@octokit/core': ^4.0.0 dependencies: - '@octokit/core': 4.0.5 - '@octokit/types': 7.5.1 - deprecation: 2.3.1 + '@octokit/core': 4.2.4 + '@octokit/types': 9.3.2 + bottleneck: 2.19.5 dev: true /@octokit/request-error/3.0.1: @@ -559,6 +568,15 @@ packages: once: 1.4.0 dev: true + /@octokit/request-error/4.0.2: + resolution: {integrity: sha512-uqwUEmZw3x4I9DGYq9fODVAAvcLsPQv97NRycP6syEFu5916M189VnNBW2zANNwqg3OiligNcAey7P0SET843w==} + engines: {node: '>= 18'} + dependencies: + '@octokit/types': 10.0.0 + deprecation: 2.3.1 + once: 1.4.0 + dev: true + /@octokit/request/6.2.1: resolution: {integrity: sha512-gYKRCia3cpajRzDSU+3pt1q2OcuC6PK8PmFIyxZDWCzRXRSIBH8jXjFJ8ZceoygBIm0KsEUg4x1+XcYBz7dHPQ==} engines: {node: '>= 14'} @@ -573,16 +591,14 @@ packages: - encoding dev: true - /@octokit/rest/19.0.4: - resolution: {integrity: sha512-LwG668+6lE8zlSYOfwPj4FxWdv/qFXYBpv79TWIQEpBLKA9D/IMcWsF/U9RGpA3YqMVDiTxpgVpEW3zTFfPFTA==} - engines: {node: '>= 14'} + /@octokit/tsconfig/2.0.0: + resolution: {integrity: sha512-tWnrai3quGt8+gRN2edzo9fmraWekeryXPeXDomMw2oFSpu/lH3VSWGn/q4V+rwjTRMeeXk/ci623/01Zet4VQ==} + dev: true + + /@octokit/types/10.0.0: + resolution: {integrity: sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==} dependencies: - '@octokit/core': 4.0.5 - '@octokit/plugin-paginate-rest': 4.3.1_@octokit+core@4.0.5 - '@octokit/plugin-request-log': 1.0.4_@octokit+core@4.0.5 - '@octokit/plugin-rest-endpoint-methods': 6.6.2_@octokit+core@4.0.5 - transitivePeerDependencies: - - encoding + '@octokit/openapi-types': 18.0.0 dev: true /@octokit/types/7.5.1: @@ -591,6 +607,12 @@ packages: '@octokit/openapi-types': 13.13.1 dev: true + /@octokit/types/9.3.2: + resolution: {integrity: sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==} + dependencies: + '@octokit/openapi-types': 18.0.0 + dev: true + /@pkgjs/parseargs/0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -624,20 +646,20 @@ packages: hasBin: true dev: true - /@semantic-release/commit-analyzer/9.0.2_semantic-release@21.0.2: - resolution: {integrity: sha512-E+dr6L+xIHZkX4zNMe6Rnwg4YQrWNXK+rNsvwOPpdFppvZO1olE2fIgWhv89TkQErygevbjsZFSIxp+u6w2e5g==} - engines: {node: '>=14.17'} + /@semantic-release/commit-analyzer/10.0.1_semantic-release@21.0.5: + resolution: {integrity: sha512-9ejHzTAijYs9z246sY/dKBatmOPcd0GQ7lH4MgLCkv1q4GCiDZRkjHJkaQZXZVaK7mJybS+sH3Ng6G8i3pYMGQ==} + engines: {node: '>=18'} peerDependencies: - semantic-release: '>=18.0.0-beta.1' + semantic-release: '>=20.1.0' dependencies: - conventional-changelog-angular: 5.0.13 - conventional-commits-filter: 2.0.7 - conventional-commits-parser: 3.2.4 + conventional-changelog-angular: 6.0.0 + conventional-commits-filter: 3.0.0 + conventional-commits-parser: 4.0.0 debug: 4.3.4 import-from: 4.0.0 - lodash: 4.17.21 + lodash-es: 4.17.21 micromatch: 4.0.5 - semantic-release: 21.0.2 + semantic-release: 21.0.5 transitivePeerDependencies: - supports-color dev: true @@ -647,35 +669,40 @@ packages: engines: {node: '>=14.17'} dev: true - /@semantic-release/github/8.0.6_semantic-release@21.0.2: - resolution: {integrity: sha512-ZxgaxYCeqt9ylm2x3OPqUoUqBw1p60LhxzdX6BqJlIBThupGma98lttsAbK64T6L6AlNa2G5T66BbiG8y0PIHQ==} - engines: {node: '>=14.17'} + /@semantic-release/error/4.0.0: + resolution: {integrity: sha512-mgdxrHTLOjOddRVYIYDo0fR3/v61GNN1YGkfbrjuIKg/uMgCd+Qzo3UAXJ+woLQQpos4pl5Esuw5A7AoNlzjUQ==} + engines: {node: '>=18'} + dev: true + + /@semantic-release/github/9.0.3_semantic-release@21.0.5: + resolution: {integrity: sha512-X6gq4USKVlCxPwIIyXb99jU7gwVWlnsKOevs+OyABRdoqc+OIRITbFmrrYU3eE1vGMGk+Qu/GAoLUQQQwC3YOA==} + engines: {node: '>=18'} peerDependencies: - semantic-release: '>=18.0.0-beta.1' + semantic-release: '>=20.1.0' dependencies: - '@octokit/rest': 19.0.4 - '@semantic-release/error': 3.0.0 - aggregate-error: 3.1.0 - bottleneck: 2.19.5 + '@octokit/core': 4.2.4 + '@octokit/plugin-paginate-rest': 7.1.2_@octokit+core@4.2.4 + '@octokit/plugin-retry': 5.0.4_@octokit+core@4.2.4 + '@octokit/plugin-throttling': 6.1.0_@octokit+core@4.2.4 + '@semantic-release/error': 4.0.0 + aggregate-error: 4.0.1 debug: 4.3.4 dir-glob: 3.0.1 - fs-extra: 10.1.0 - globby: 11.1.0 - http-proxy-agent: 5.0.0 - https-proxy-agent: 5.0.1 + globby: 13.2.0 + http-proxy-agent: 7.0.0 + https-proxy-agent: 7.0.0 issue-parser: 6.0.0 - lodash: 4.17.21 + lodash-es: 4.17.21 mime: 3.0.0 - p-filter: 2.1.0 - p-retry: 4.6.2 - semantic-release: 21.0.2 - url-join: 4.0.1 + p-filter: 3.0.0 + semantic-release: 21.0.5 + url-join: 5.0.0 transitivePeerDependencies: - encoding - supports-color dev: true - /@semantic-release/npm/10.0.3_semantic-release@21.0.2: + /@semantic-release/npm/10.0.3_semantic-release@21.0.5: resolution: {integrity: sha512-Chbv3kX4o+y+r1X6hsqBVB8NFbSVfiNlYOqMG6o9Wc8r5Y4cjxfbaMCuJ++XAtw3YXYX/NVD05cPzBi4Orjusg==} engines: {node: '>=18'} peerDependencies: @@ -692,12 +719,12 @@ packages: rc: 1.2.8 read-pkg: 8.0.0 registry-auth-token: 5.0.2 - semantic-release: 21.0.2 + semantic-release: 21.0.5 semver: 7.3.8 tempy: 3.0.0 dev: true - /@semantic-release/release-notes-generator/11.0.2_semantic-release@21.0.2: + /@semantic-release/release-notes-generator/11.0.2_semantic-release@21.0.5: resolution: {integrity: sha512-B+Aa82uciufoaoJulnzq7ezqH36nrHOO15ubJmg2hZitzCpPAa6X0pOtkffG+30HLdck5Ky2uJC4uAm/YylbOw==} engines: {node: '>=18'} peerDependencies: @@ -713,7 +740,7 @@ packages: into-stream: 7.0.0 lodash-es: 4.17.21 read-pkg-up: 9.1.0 - semantic-release: 21.0.2 + semantic-release: 21.0.5 transitivePeerDependencies: - supports-color dev: true @@ -777,8 +804,8 @@ packages: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true - /@types/node/20.2.5: - resolution: {integrity: sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==} + /@types/node/20.3.1: + resolution: {integrity: sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==} dev: true /@types/normalize-package-data/2.4.1: @@ -792,21 +819,17 @@ packages: /@types/react-dom/18.0.6: resolution: {integrity: sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==} dependencies: - '@types/react': 18.2.7 + '@types/react': 18.2.13 dev: true - /@types/react/18.2.7: - resolution: {integrity: sha512-ojrXpSH2XFCmHm7Jy3q44nXDyN54+EYKP2lBhJ2bqfyPj6cIUW/FZW/Csdia34NQgq7KYcAlHi5184m4X88+yw==} + /@types/react/18.2.13: + resolution: {integrity: sha512-vJ+zElvi/Zn9cVXB5slX2xL8PZodPCwPRDpittQdw43JR2AJ5k3vKdgJJyneV/cYgIbLQUwXa9JVDvUZXGba+Q==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.2 csstype: 3.1.1 dev: true - /@types/retry/0.12.0: - resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} - dev: true - /@types/scheduler/0.16.2: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} dev: true @@ -815,8 +838,8 @@ packages: resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} dev: true - /@typescript-eslint/eslint-plugin/5.59.8_hnhvdstanz2zc7wdbtnhvs2o7u: - resolution: {integrity: sha512-JDMOmhXteJ4WVKOiHXGCoB96ADWg9q7efPWHRViT/f09bA8XOMLAVHHju3l0MkZnG1izaWXYmgvQcUjTRcpShQ==} + /@typescript-eslint/eslint-plugin/5.60.0_6yzi2ymi2jevhjfd3hf6w262e4: + resolution: {integrity: sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -827,24 +850,24 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.4.0 - '@typescript-eslint/parser': 5.59.8_opaykosi7ysrbskpnffskmbrki - '@typescript-eslint/scope-manager': 5.59.8 - '@typescript-eslint/type-utils': 5.59.8_opaykosi7ysrbskpnffskmbrki - '@typescript-eslint/utils': 5.59.8_opaykosi7ysrbskpnffskmbrki + '@typescript-eslint/parser': 5.60.0_7yfldhli4vs6yywnkyiujhawka + '@typescript-eslint/scope-manager': 5.60.0 + '@typescript-eslint/type-utils': 5.60.0_7yfldhli4vs6yywnkyiujhawka + '@typescript-eslint/utils': 5.60.0_7yfldhli4vs6yywnkyiujhawka debug: 4.3.4 - eslint: 8.41.0 + eslint: 8.43.0 grapheme-splitter: 1.0.4 ignore: 5.2.0 natural-compare-lite: 1.4.0 semver: 7.3.8 - tsutils: 3.21.0_typescript@5.0.4 - typescript: 5.0.4 + tsutils: 3.21.0_typescript@5.1.3 + typescript: 5.1.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.59.8_opaykosi7ysrbskpnffskmbrki: - resolution: {integrity: sha512-AnR19RjJcpjoeGojmwZtCwBX/RidqDZtzcbG3xHrmz0aHHoOcbWnpDllenRDmDvsV0RQ6+tbb09/kyc+UT9Orw==} + /@typescript-eslint/parser/5.60.0_7yfldhli4vs6yywnkyiujhawka: + resolution: {integrity: sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -853,26 +876,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.59.8 - '@typescript-eslint/types': 5.59.8 - '@typescript-eslint/typescript-estree': 5.59.8_typescript@5.0.4 + '@typescript-eslint/scope-manager': 5.60.0 + '@typescript-eslint/types': 5.60.0 + '@typescript-eslint/typescript-estree': 5.60.0_typescript@5.1.3 debug: 4.3.4 - eslint: 8.41.0 - typescript: 5.0.4 + eslint: 8.43.0 + typescript: 5.1.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.59.8: - resolution: {integrity: sha512-/w08ndCYI8gxGf+9zKf1vtx/16y8MHrZs5/tnjHhMLNSixuNcJavSX4wAiPf4aS5x41Es9YPCn44MIe4cxIlig==} + /@typescript-eslint/scope-manager/5.60.0: + resolution: {integrity: sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.59.8 - '@typescript-eslint/visitor-keys': 5.59.8 + '@typescript-eslint/types': 5.60.0 + '@typescript-eslint/visitor-keys': 5.60.0 dev: true - /@typescript-eslint/type-utils/5.59.8_opaykosi7ysrbskpnffskmbrki: - resolution: {integrity: sha512-+5M518uEIHFBy3FnyqZUF3BMP+AXnYn4oyH8RF012+e7/msMY98FhGL5SrN29NQ9xDgvqCgYnsOiKp1VjZ/fpA==} + /@typescript-eslint/type-utils/5.60.0_7yfldhli4vs6yywnkyiujhawka: + resolution: {integrity: sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -881,23 +904,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.59.8_typescript@5.0.4 - '@typescript-eslint/utils': 5.59.8_opaykosi7ysrbskpnffskmbrki + '@typescript-eslint/typescript-estree': 5.60.0_typescript@5.1.3 + '@typescript-eslint/utils': 5.60.0_7yfldhli4vs6yywnkyiujhawka debug: 4.3.4 - eslint: 8.41.0 - tsutils: 3.21.0_typescript@5.0.4 - typescript: 5.0.4 + eslint: 8.43.0 + tsutils: 3.21.0_typescript@5.1.3 + typescript: 5.1.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.59.8: - resolution: {integrity: sha512-+uWuOhBTj/L6awoWIg0BlWy0u9TyFpCHrAuQ5bNfxDaZ1Ppb3mx6tUigc74LHcbHpOHuOTOJrBoAnhdHdaea1w==} + /@typescript-eslint/types/5.60.0: + resolution: {integrity: sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.59.8_typescript@5.0.4: - resolution: {integrity: sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg==} + /@typescript-eslint/typescript-estree/5.60.0_typescript@5.1.3: + resolution: {integrity: sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -905,31 +928,31 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.59.8 - '@typescript-eslint/visitor-keys': 5.59.8 + '@typescript-eslint/types': 5.60.0 + '@typescript-eslint/visitor-keys': 5.60.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 - tsutils: 3.21.0_typescript@5.0.4 - typescript: 5.0.4 + tsutils: 3.21.0_typescript@5.1.3 + typescript: 5.1.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.59.8_opaykosi7ysrbskpnffskmbrki: - resolution: {integrity: sha512-Tr65630KysnNn9f9G7ROF3w1b5/7f6QVCJ+WK9nhIocWmx9F+TmCAcglF26Vm7z8KCTwoKcNEBZrhlklla3CKg==} + /@typescript-eslint/utils/5.60.0_7yfldhli4vs6yywnkyiujhawka: + resolution: {integrity: sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.2.0_eslint@8.41.0 + '@eslint-community/eslint-utils': 4.2.0_eslint@8.43.0 '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.59.8 - '@typescript-eslint/types': 5.59.8 - '@typescript-eslint/typescript-estree': 5.59.8_typescript@5.0.4 - eslint: 8.41.0 + '@typescript-eslint/scope-manager': 5.60.0 + '@typescript-eslint/types': 5.60.0 + '@typescript-eslint/typescript-estree': 5.60.0_typescript@5.1.3 + eslint: 8.43.0 eslint-scope: 5.1.1 semver: 7.3.8 transitivePeerDependencies: @@ -937,62 +960,70 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys/5.59.8: - resolution: {integrity: sha512-pJhi2ms0x0xgloT7xYabil3SGGlojNNKjK/q6dB3Ey0uJLMjK2UDGJvHieiyJVW/7C3KI+Z4Q3pEHkm4ejA+xQ==} + /@typescript-eslint/visitor-keys/5.60.0: + resolution: {integrity: sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.59.8 + '@typescript-eslint/types': 5.60.0 eslint-visitor-keys: 3.4.1 dev: true - /@vitest/coverage-c8/0.31.2_vitest@0.31.2: - resolution: {integrity: sha512-RznxfxFtoV8xYt8e0h57OeulqOfFZJsa5pxXKW+xFW9ZHamSZ0wJC57FS4oh3Xbe0JNaHwSJ0KeClXgnuW1fkw==} + /@vitest/coverage-v8/0.32.2_vitest@0.32.2: + resolution: {integrity: sha512-/+V3nB3fyeuuSeKxCfi6XmWjDIxpky7AWSkGVfaMjAk7di8igBwRsThLjultwIZdTDH1RAxpjmCXEfSqsMFZOA==} peerDependencies: - vitest: '>=0.30.0 <1' + vitest: '>=0.32.0 <1' dependencies: '@ampproject/remapping': 2.2.1 - c8: 7.13.0 + '@bcoe/v8-coverage': 0.2.3 + istanbul-lib-coverage: 3.2.0 + istanbul-lib-report: 3.0.0 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.5 magic-string: 0.30.0 picocolors: 1.0.0 std-env: 3.3.2 - vitest: 0.31.2_jsdom@22.1.0 + test-exclude: 6.0.0 + v8-to-istanbul: 9.1.0 + vitest: 0.32.2_jsdom@22.1.0 + transitivePeerDependencies: + - supports-color dev: true - /@vitest/expect/0.31.2: - resolution: {integrity: sha512-AOuh2NLN9zJ0SkvsItRkS/W39akYpUvo5LOnay3zEhGSnRgivPu2D3S8QlMij1hFMQcX+dlMilPgJatUHiGQ4A==} + /@vitest/expect/0.32.2: + resolution: {integrity: sha512-6q5yzweLnyEv5Zz1fqK5u5E83LU+gOMVBDuxBl2d2Jfx1BAp5M+rZgc5mlyqdnxquyoiOXpXmFNkcGcfFnFH3Q==} dependencies: - '@vitest/spy': 0.31.2 - '@vitest/utils': 0.31.2 + '@vitest/spy': 0.32.2 + '@vitest/utils': 0.32.2 chai: 4.3.7 dev: true - /@vitest/runner/0.31.2: - resolution: {integrity: sha512-k2mWrzZD1xsWfzwEXeVr2XF4v8ELpFOKLxRbcnzZclHelOLn27nXvnw1A4JwJtmca64C3/6lo4WHZDlq3TefLQ==} + /@vitest/runner/0.32.2: + resolution: {integrity: sha512-06vEL0C1pomOEktGoLjzZw+1Fb+7RBRhmw/06WkDrd1akkT9i12su0ku+R/0QM69dfkIL/rAIDTG+CSuQVDcKw==} dependencies: - '@vitest/utils': 0.31.2 + '@vitest/utils': 0.32.2 concordance: 5.0.4 p-limit: 4.0.0 pathe: 1.1.0 dev: true - /@vitest/snapshot/0.31.2: - resolution: {integrity: sha512-NXRlbP3sM5+KELb8oXVHf7UWD+liBnSsS+4JlDVPD5+KPquZmgNR0xPLW5VEb5HoQZQpKTAFhtGf1AczRCbAhg==} + /@vitest/snapshot/0.32.2: + resolution: {integrity: sha512-JwhpeH/PPc7GJX38vEfCy9LtRzf9F4er7i4OsAJyV7sjPwjj+AIR8cUgpMTWK4S3TiamzopcTyLsZDMuldoi5A==} dependencies: magic-string: 0.30.0 pathe: 1.1.0 pretty-format: 27.5.1 dev: true - /@vitest/spy/0.31.2: - resolution: {integrity: sha512-81zcAkCCgAc1gA7UvLOWCvkIwrgzaqHBdv9sskOt2xh1+l+RMX9G7sVYj3AOsib3UDR0MCSXit49xKILTMnikw==} + /@vitest/spy/0.32.2: + resolution: {integrity: sha512-Q/ZNILJ4ca/VzQbRM8ur3Si5Sardsh1HofatG9wsJY1RfEaw0XKP8IVax2lI1qnrk9YPuG9LA2LkZ0EI/3d4ug==} dependencies: tinyspy: 2.1.0 dev: true - /@vitest/utils/0.31.2: - resolution: {integrity: sha512-B2AoocMpIiBezediqFzSqvuXI7AZlmlPkh3oj20Jh3bL35c8YYWk9KfOLkEjsLCrOHOUFXoYFc+ACiELCIJVRw==} + /@vitest/utils/0.32.2: + resolution: {integrity: sha512-lnJ0T5i03j0IJaeW73hxe2AuVnZ/y1BhhCOuIcl9LIzXnbpXJT9Lrt6brwKHXLOiA7MZ6N5hSJjt0xE1dGNCzQ==} dependencies: - concordance: 5.0.4 + diff-sequences: 29.4.3 loupe: 2.3.6 pretty-format: 27.5.1 dev: true @@ -1037,12 +1068,13 @@ packages: - supports-color dev: true - /aggregate-error/3.1.0: - resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} - engines: {node: '>=8'} + /agent-base/7.1.0: + resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} + engines: {node: '>= 14'} dependencies: - clean-stack: 2.2.0 - indent-string: 4.0.0 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color dev: true /aggregate-error/4.0.1: @@ -1178,25 +1210,6 @@ packages: fill-range: 7.0.1 dev: true - /c8/7.13.0: - resolution: {integrity: sha512-/NL4hQTv1gBL6J6ei80zu3IiTrmePDKXKXOTLpHvcIWZTVYQlDhVWjjWvkhICylE8EwwnMVzDZugCvdx0/DIIA==} - engines: {node: '>=10.12.0'} - hasBin: true - dependencies: - '@bcoe/v8-coverage': 0.2.3 - '@istanbuljs/schema': 0.1.3 - find-up: 5.0.0 - foreground-child: 2.0.0 - istanbul-lib-coverage: 3.2.0 - istanbul-lib-report: 3.0.0 - istanbul-reports: 3.1.5 - rimraf: 3.0.2 - test-exclude: 6.0.0 - v8-to-istanbul: 9.0.1 - yargs: 16.2.0 - yargs-parser: 20.2.9 - dev: true - /cac/6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -1268,11 +1281,6 @@ packages: resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} dev: true - /clean-stack/2.2.0: - resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} - engines: {node: '>=6'} - dev: true - /clean-stack/4.2.0: resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} engines: {node: '>=12'} @@ -1289,14 +1297,6 @@ packages: '@colors/colors': 1.5.0 dev: true - /cliui/7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - /cliui/8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -1374,6 +1374,13 @@ packages: q: 1.5.1 dev: true + /conventional-changelog-angular/6.0.0: + resolution: {integrity: sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg==} + engines: {node: '>=14'} + dependencies: + compare-func: 2.0.0 + dev: true + /conventional-changelog-writer/5.0.1: resolution: {integrity: sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ==} engines: {node: '>=10'} @@ -1398,6 +1405,14 @@ packages: modify-values: 1.0.1 dev: true + /conventional-commits-filter/3.0.0: + resolution: {integrity: sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q==} + engines: {node: '>=14'} + dependencies: + lodash.ismatch: 4.4.0 + modify-values: 1.0.1 + dev: true + /conventional-commits-parser/3.2.4: resolution: {integrity: sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==} engines: {node: '>=10'} @@ -1411,6 +1426,17 @@ packages: through2: 4.0.2 dev: true + /conventional-commits-parser/4.0.0: + resolution: {integrity: sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==} + engines: {node: '>=14'} + hasBin: true + dependencies: + JSONStream: 1.3.5 + is-text-path: 1.0.1 + meow: 8.1.2 + split2: 3.2.2 + dev: true + /convert-source-map/1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: true @@ -1530,6 +1556,11 @@ packages: resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} dev: true + /diff-sequences/29.4.3: + resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dev: true + /dir-glob/3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1649,16 +1680,16 @@ packages: engines: {node: '>=12'} dev: true - /eslint-config-prettier/8.8.0_eslint@8.41.0: + /eslint-config-prettier/8.8.0_eslint@8.43.0: resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.41.0 + eslint: 8.43.0 dev: true - /eslint-plugin-prettier/4.2.1_xcqkel4mpum3npntysob2xmn54: + /eslint-plugin-prettier/4.2.1_zh6vkmzat4wtnmvmftdassiwyu: resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -1669,8 +1700,8 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.41.0 - eslint-config-prettier: 8.8.0_eslint@8.41.0 + eslint: 8.43.0 + eslint-config-prettier: 8.8.0_eslint@8.43.0 prettier: 2.8.8 prettier-linter-helpers: 1.0.0 dev: true @@ -1696,16 +1727,16 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.41.0: - resolution: {integrity: sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==} + /eslint/8.43.0: + resolution: {integrity: sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.2.0_eslint@8.41.0 + '@eslint-community/eslint-utils': 4.2.0_eslint@8.43.0 '@eslint-community/regexpp': 4.4.0 '@eslint/eslintrc': 2.0.3 - '@eslint/js': 8.41.0 - '@humanwhocodes/config-array': 0.11.8 + '@eslint/js': 8.43.0 + '@humanwhocodes/config-array': 0.11.10 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 @@ -1915,14 +1946,6 @@ packages: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true - /foreground-child/2.0.0: - resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} - engines: {node: '>=8.0.0'} - dependencies: - cross-spawn: 7.0.3 - signal-exit: 3.0.7 - dev: true - /foreground-child/3.1.1: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} @@ -1947,15 +1970,6 @@ packages: readable-stream: 2.3.7 dev: true - /fs-extra/10.1.0: - resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} - engines: {node: '>=12'} - dependencies: - graceful-fs: 4.2.10 - jsonfile: 6.1.0 - universalify: 2.0.0 - dev: true - /fs-extra/11.1.1: resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} engines: {node: '>=14.14'} @@ -2078,6 +2092,17 @@ packages: slash: 3.0.0 dev: true + /globby/13.2.0: + resolution: {integrity: sha512-jWsQfayf13NvqKUIL3Ta+CIqMnvlaIDFveWE/dpOZ9+3AMEJozsxDvKA02zync9UuvOM8rOXzsD5GqKP4OnWPQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + dir-glob: 3.0.1 + fast-glob: 3.2.12 + ignore: 5.2.0 + merge2: 1.4.1 + slash: 4.0.0 + dev: true + /graceful-fs/4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: true @@ -2170,6 +2195,16 @@ packages: - supports-color dev: true + /http-proxy-agent/7.0.0: + resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.0 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /https-proxy-agent/5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} @@ -2180,6 +2215,16 @@ packages: - supports-color dev: true + /https-proxy-agent/7.0.0: + resolution: {integrity: sha512-0euwPCRyAPSgGdzD1IVN9nJYHtBhJwb6XPfbpQcYbPCwrBidX6GzxmchnaF4sfF/jPb74Ojx5g4yTg3sixlyPw==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.0 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /human-signals/4.3.0: resolution: {integrity: sha512-zyzVyMjpGBX2+6cDVZeFPCdtOtdsxOeseRhB9tkQ6xXmGUNrcnBzdEKPy3VPNYz+4gy1oukVOXcrJCunSyc6QQ==} engines: {node: '>=14.18.0'} @@ -2247,12 +2292,12 @@ packages: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} dev: true - /intl-messageformat/10.3.5: - resolution: {integrity: sha512-6kPkftF8Jg3XJCkGKa5OD+nYQ+qcSxF4ZkuDdXZ6KGG0VXn+iblJqRFyDdm9VvKcMyC0Km2+JlVQffFM52D0YA==} + /intl-messageformat/10.5.0: + resolution: {integrity: sha512-AvojYuOaRb6r2veOKfTVpxH9TrmjSdc5iR9R5RgBwrDZYSmAAFVT+QLbW3C4V7Qsg0OguMp67Q/EoUkxZzXRGw==} dependencies: - '@formatjs/ecma402-abstract': 1.15.0 - '@formatjs/fast-memoize': 2.0.1 - '@formatjs/icu-messageformat-parser': 2.4.0 + '@formatjs/ecma402-abstract': 1.17.0 + '@formatjs/fast-memoize': 2.2.0 + '@formatjs/icu-messageformat-parser': 2.6.0 tslib: 2.5.2 dev: false @@ -2370,6 +2415,17 @@ packages: supports-color: 7.2.0 dev: true + /istanbul-lib-source-maps/4.0.1: + resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} + engines: {node: '>=10'} + dependencies: + debug: 4.3.4 + istanbul-lib-coverage: 3.2.0 + source-map: 0.6.1 + transitivePeerDependencies: + - supports-color + dev: true + /istanbul-reports/3.1.5: resolution: {integrity: sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==} engines: {node: '>=8'} @@ -2653,7 +2709,7 @@ packages: engines: {node: '>=8'} dev: true - /marked-terminal/5.1.1_marked@4.1.1: + /marked-terminal/5.1.1_marked@5.1.0: resolution: {integrity: sha512-+cKTOx9P4l7HwINYhzbrBSyzgxO2HaHKGZGuB1orZsMIgXYaJyfidT81VXRdpelW/PcHEWxywscePVgI/oUF6g==} engines: {node: '>=14.13.1 || >=16.0.0'} peerDependencies: @@ -2663,14 +2719,14 @@ packages: cardinal: 2.1.1 chalk: 5.1.0 cli-table3: 0.6.3 - marked: 4.1.1 + marked: 5.1.0 node-emoji: 1.11.0 supports-hyperlinks: 2.3.0 dev: true - /marked/4.1.1: - resolution: {integrity: sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw==} - engines: {node: '>= 12'} + /marked/5.1.0: + resolution: {integrity: sha512-z3/nBe7aTI8JDszlYLk7dDVNpngjw0o1ZJtrA9kIfkkHcIF+xH7mO23aISl4WxP83elU+MFROgahqdpd05lMEQ==} + engines: {node: '>= 18'} hasBin: true dev: true @@ -3015,11 +3071,11 @@ packages: engines: {node: '>=12'} dev: true - /p-filter/2.1.0: - resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} - engines: {node: '>=8'} + /p-filter/3.0.0: + resolution: {integrity: sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: - p-map: 2.1.0 + p-map: 5.5.0 dev: true /p-is-promise/3.0.0: @@ -3083,9 +3139,11 @@ packages: p-limit: 4.0.0 dev: true - /p-map/2.1.0: - resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} - engines: {node: '>=6'} + /p-map/5.5.0: + resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==} + engines: {node: '>=12'} + dependencies: + aggregate-error: 4.0.1 dev: true /p-reduce/3.0.0: @@ -3093,14 +3151,6 @@ packages: engines: {node: '>=12'} dev: true - /p-retry/4.6.2: - resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} - engines: {node: '>=8'} - dependencies: - '@types/retry': 0.12.0 - retry: 0.13.1 - dev: true - /p-try/1.0.0: resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} engines: {node: '>=4'} @@ -3472,11 +3522,6 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true - /retry/0.13.1: - resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} - engines: {node: '>= 4'} - dev: true - /reusify/1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -3547,16 +3592,16 @@ packages: loose-envify: 1.4.0 dev: true - /semantic-release/21.0.2: - resolution: {integrity: sha512-Hl6lyJdZ0pAYD07Z1FIUmg06UzSC3fEjHS7U31YppNQ8jOwjjt7pVzW9OfpoO0vbmqD3Tc+b/iZh5fqvKt01OA==} + /semantic-release/21.0.5: + resolution: {integrity: sha512-mCc7Hx9Ro/1Clk9tLLgwQIQuiEzx+1OX12EazvNysnx1VG4eaNJE9b9IyWtTxyFxaFYi7nM5VB5ZDVzheHTDPA==} engines: {node: '>=18'} hasBin: true dependencies: - '@semantic-release/commit-analyzer': 9.0.2_semantic-release@21.0.2 - '@semantic-release/error': 3.0.0 - '@semantic-release/github': 8.0.6_semantic-release@21.0.2 - '@semantic-release/npm': 10.0.3_semantic-release@21.0.2 - '@semantic-release/release-notes-generator': 11.0.2_semantic-release@21.0.2 + '@semantic-release/commit-analyzer': 10.0.1_semantic-release@21.0.5 + '@semantic-release/error': 4.0.0 + '@semantic-release/github': 9.0.3_semantic-release@21.0.5 + '@semantic-release/npm': 10.0.3_semantic-release@21.0.5 + '@semantic-release/release-notes-generator': 11.0.2_semantic-release@21.0.5 aggregate-error: 4.0.1 cosmiconfig: 8.1.0 debug: 4.3.4 @@ -3569,8 +3614,8 @@ packages: hook-std: 3.0.0 hosted-git-info: 6.1.1 lodash-es: 4.17.21 - marked: 4.1.1 - marked-terminal: 5.1.1_marked@4.1.1 + marked: 5.1.0 + marked-terminal: 5.1.1_marked@5.1.0 micromatch: 4.0.5 p-each-series: 3.0.0 p-reduce: 3.0.0 @@ -3654,6 +3699,11 @@ packages: engines: {node: '>=8'} dev: true + /slash/4.0.0: + resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} + engines: {node: '>=12'} + dev: true + /source-map-js/1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} @@ -3942,21 +3992,17 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tslib/2.4.0: - resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} - dev: false - /tslib/2.5.2: resolution: {integrity: sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==} - /tsutils/3.21.0_typescript@5.0.4: + /tsutils/3.21.0_typescript@5.1.3: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.0.4 + typescript: 5.1.3 dev: true /type-check/0.4.0: @@ -4006,9 +4052,9 @@ packages: engines: {node: '>=14.16'} dev: true - /typescript/5.0.4: - resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} - engines: {node: '>=12.20'} + /typescript/5.1.3: + resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==} + engines: {node: '>=14.17'} hasBin: true dev: true @@ -4051,8 +4097,9 @@ packages: punycode: 2.3.0 dev: true - /url-join/4.0.1: - resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} + /url-join/5.0.0: + resolution: {integrity: sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true /url-parse/1.5.10: @@ -4066,11 +4113,11 @@ packages: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true - /v8-to-istanbul/9.0.1: - resolution: {integrity: sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==} + /v8-to-istanbul/9.1.0: + resolution: {integrity: sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==} engines: {node: '>=10.12.0'} dependencies: - '@jridgewell/trace-mapping': 0.3.16 + '@jridgewell/trace-mapping': 0.3.18 '@types/istanbul-lib-coverage': 2.0.4 convert-source-map: 1.9.0 dev: true @@ -4082,8 +4129,8 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vite-node/0.31.2_@types+node@20.2.5: - resolution: {integrity: sha512-NvoO7+zSvxROC4JY8cyp/cO7DHAX3dwMOHQVDdNtCZ4Zq8wInnR/bJ/lfsXqE6wrUgtYCE5/84qHS+A7vllI3A==} + /vite-node/0.32.2_@types+node@20.3.1: + resolution: {integrity: sha512-dTQ1DCLwl2aEseov7cfQ+kDMNJpM1ebpyMMMwWzBvLbis8Nla/6c9WQcqpPssTwS6Rp/+U6KwlIj8Eapw4bLdA==} engines: {node: '>=v14.18.0'} hasBin: true dependencies: @@ -4092,7 +4139,7 @@ packages: mlly: 1.2.0 pathe: 1.1.0 picocolors: 1.0.0 - vite: 4.3.9_@types+node@20.2.5 + vite: 4.3.9_@types+node@20.3.1 transitivePeerDependencies: - '@types/node' - less @@ -4103,7 +4150,7 @@ packages: - terser dev: true - /vite/4.3.9_@types+node@20.2.5: + /vite/4.3.9_@types+node@20.3.1: resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -4128,7 +4175,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.2.5 + '@types/node': 20.3.1 esbuild: 0.17.12 postcss: 8.4.24 rollup: 3.23.0 @@ -4136,8 +4183,8 @@ packages: fsevents: 2.3.2 dev: true - /vitest/0.31.2_jsdom@22.1.0: - resolution: {integrity: sha512-O0qKHDbI+zXxwq1WOeqFjxP5v1mDqqM6gllPuOUJkK2YFyQ2nEo8CELR4Mg68ryTSSh527ysBmEN69bDvL2LkQ==} + /vitest/0.32.2_jsdom@22.1.0: + resolution: {integrity: sha512-hU8GNNuQfwuQmqTLfiKcqEhZY72Zxb7nnN07koCUNmntNxbKQnVbeIS6sqUgR3eXSlbOpit8+/gr1KpqoMgWCQ==} engines: {node: '>=v14.18.0'} hasBin: true peerDependencies: @@ -4169,12 +4216,12 @@ packages: dependencies: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 - '@types/node': 20.2.5 - '@vitest/expect': 0.31.2 - '@vitest/runner': 0.31.2 - '@vitest/snapshot': 0.31.2 - '@vitest/spy': 0.31.2 - '@vitest/utils': 0.31.2 + '@types/node': 20.3.1 + '@vitest/expect': 0.32.2 + '@vitest/runner': 0.32.2 + '@vitest/snapshot': 0.32.2 + '@vitest/spy': 0.32.2 + '@vitest/utils': 0.32.2 acorn: 8.8.2 acorn-walk: 8.2.0 cac: 6.7.14 @@ -4190,8 +4237,8 @@ packages: strip-literal: 1.0.1 tinybench: 2.5.0 tinypool: 0.5.0 - vite: 4.3.9_@types+node@20.2.5 - vite-node: 0.31.2_@types+node@20.2.5 + vite: 4.3.9_@types+node@20.3.1 + vite-node: 0.32.2_@types+node@20.3.1 why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -4344,19 +4391,6 @@ packages: engines: {node: '>=12'} dev: true - /yargs/16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 - dev: true - /yargs/17.7.1: resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==} engines: {node: '>=12'} diff --git a/src/extractICU.ts b/src/extractICU.ts index 612e9f0..61cfab0 100644 --- a/src/extractICU.ts +++ b/src/extractICU.ts @@ -1,4 +1,4 @@ -import { ICUArgument, ICUDateArgument, ICUNumberArgument, OtherString } from './types'; +import { Flatten, ICUArgument, ICUDateArgument, ICUNumberArgument, OtherString } from './types'; type Whitespace = ' ' | '\t' | '\n' | '\r'; @@ -85,13 +85,18 @@ type TupleStripEscapes = T extends readonly [infer First, ...infer Rest] ? [S //////////////////////////////////////////////////////////////////////////////// // Makes type readable -type Flatten = T extends object - ? { - [P in keyof T]: T[P]; - } - : T; + +// Make provided args optional +type MakeProvidedOptional = { + [K in keyof T as K extends ProvidedArgs ? never : K]: T[K]; +} & { + [K in ProvidedArgs & keyof T]?: T[K]; +}; /** Calculates an object type with all variables and their types in the given ICU format string */ -export type GetICUArgs = Flatten< - TupleParseBlock> : FindBlocks>> +export type GetICUArgs = Flatten< + MakeProvidedOptional< + TupleParseBlock> : FindBlocks>>, + ProvidedArgs + > >; diff --git a/src/react/translator.tsx b/src/react/translator.tsx index 6260844..49fd0d0 100644 --- a/src/react/translator.tsx +++ b/src/react/translator.tsx @@ -1,4 +1,4 @@ -import { Fragment, ReactNode, useContext, useMemo } from 'react'; +import { Fragment, ReactNode, useContext, useEffect, useMemo, useState } from 'react'; import { TranslationContext } from '.'; import { TranslatorFn } from '..'; import { hash } from '../cache'; @@ -7,7 +7,7 @@ import { intlHelpers } from '../intlHelpers'; import { Store } from '../store'; import { format, translate } from '../translate'; import { createGetTranslator } from '../translator'; -import { Dict, FlattenDict, Values } from '../types'; +import { Dict, FlattenDict, ICUArgument, ICUDateArgument, Values } from '../types'; import { HookTranslator, HookTranslatorOptions, @@ -17,11 +17,14 @@ import { ReactCreateTranslatorResult, } from './types'; import { useStore } from './useStore'; +import { resolveProvidedArgs } from '../resolveProvidedArgs'; -export function createTranslator(options: ReactCreateTranslatorOptions): ReactCreateTranslatorResult> { +export function createTranslator( + options: ReactCreateTranslatorOptions, +): ReactCreateTranslatorResult, ProvidedArgs> { type FD = FlattenDict; - const store = new Store(options); + const store = new Store(options); const { sourceLocale, fallbackLocale, @@ -35,19 +38,47 @@ export function createTranslator(options: ReactCreateTranslatorO pluralRulesOptions, relativeTimeFormatOptions, ignoreMissingArgs, + provideArgs, } = options; + function useProvidedArgs() { + const [args, setArgs] = useState(resolveProvidedArgs(provideArgs)); + + useEffect(() => { + const handles: (() => void)[] = []; + + for (const [, value] of Object.entries(provideArgs ?? {})) { + if (typeof value === 'object' && value !== null && 'subscribe' in value) { + const handle = (value as any).subscribe(() => { + setArgs(resolveProvidedArgs(provideArgs)); + }); + + handles.push(handle); + } + } + + return () => { + for (const handle of handles) { + handle(); + } + }; + }, []); + + return args; + } + ///////////////////////////////////////////////////////////////////////////// // hook translator ///////////////////////////////////////////////////////////////////////////// - const useTranslator: ReactCreateTranslatorResult['useTranslator'] = (overrideLocale) => { + const useTranslator: ReactCreateTranslatorResult['useTranslator'] = (overrideLocale) => { const contextLocale = useContext(TranslationContext).locale; const locale = overrideLocale ?? contextLocale ?? sourceLocale; const dicts = useStore(store, locale, ...calcLocales(locale, fallbackToLessSpecific, fallbackLocale)); const [sourceDict] = useStore(store, sourceLocale); + const providedArgs = useProvidedArgs(); return useMemo(() => { - const t: TranslatorFn = (id, ...[values, options]) => { + const t: TranslatorFn = (id, ...[values, options]) => { const fallback = options?.fallback ?? defaultFallback; const placeholder = options?.placeholder ?? defaultPlaceholder; return translate({ @@ -61,31 +92,37 @@ export function createTranslator(options: ReactCreateTranslatorO warn, cache: store.cache, ignoreMissingArgs, + providedArgs, }) as any; }; - return Object.assign, Omit, keyof TranslatorFn>>(t, { - locale, - - unknown: t as HookTranslator['unknown'], - dynamic: t as HookTranslator['dynamic'], + return Object.assign, Omit, keyof TranslatorFn>>( + t, + { + locale, - format(template, ...[values]) { - return format({ - template, - values: values as any, - locale, + unknown: t as HookTranslator['unknown'], + dynamic: t as HookTranslator['dynamic'], + + format(template, ...[values]) { + return format({ + template, + values: values as any, + locale, + cache: store.cache, + ignoreMissingArgs, + providedArgs, + }); + }, + + ...intlHelpers({ cache: store.cache, - }); + transform: (fn) => fn(locale), + dateTimeFormatOptions, + listFormatOptions, + }), }, - - ...intlHelpers({ - cache: store.cache, - transform: (fn) => fn(locale), - dateTimeFormatOptions, - listFormatOptions, - }), - }); + ); }, [locale, dicts, sourceDict]); }; @@ -98,13 +135,14 @@ export function createTranslator(options: ReactCreateTranslatorO options, }: { id: string; - values: Values[0]; - options?: Values[1]; + values: Values[0]; + options?: Values[1]; }) { const contextLocale = useContext(TranslationContext).locale; const locale = options?.locale ?? contextLocale ?? sourceLocale; const dicts = useStore(store, locale, ...calcLocales(locale, fallbackToLessSpecific, fallbackLocale)); const [sourceDict] = useStore(store, sourceLocale); + const providedArgs = useProvidedArgs(); const fallback = options?.fallback ?? defaultFallback; const placeholder = options?.placeholder ?? defaultPlaceholder; @@ -122,8 +160,9 @@ export function createTranslator(options: ReactCreateTranslatorO warn, cache: store.cache, ignoreMissingArgs, + providedArgs, }), - [locale, dicts, sourceDict, id, values, fallback, placeholder], + [locale, dicts, sourceDict, providedArgs, id, values, fallback, placeholder], ); const textArray = castArray(text); const Component = options?.component ?? Fragment; @@ -137,7 +176,7 @@ export function createTranslator(options: ReactCreateTranslatorO ); } - const createTranslatorComponent: TranslatorFn = (id, ...[values, options]) => { + const createTranslatorComponent: TranslatorFn = (id, ...[values, options]) => { return ; }; @@ -145,21 +184,28 @@ export function createTranslator(options: ReactCreateTranslatorO renderFn, dependecies = [renderFn], }: { - renderFn: (t: HookTranslator) => ReactNode; + renderFn: Parameters['render']>[0]; dependecies?: any[]; }) => { const t = useTranslator(); - const value = useMemo(() => renderFn(t), [t, ...dependecies]); + const providedArgs = useProvidedArgs(); + const value = useMemo( + () => + renderFn(t, { + providedArgs: providedArgs as Record, + }), + [t, providedArgs, ...dependecies], + ); return <>{value}; }; - const render: InlineTranslator['render'] = (renderFn, dependecies) => { + const render: InlineTranslator['render'] = (renderFn, dependecies) => { return ; }; - const t: InlineTranslator = Object.assign< - TranslatorFn, - Omit, keyof TranslatorFn> + const t: InlineTranslator = Object.assign< + TranslatorFn, + Omit, keyof TranslatorFn> >(createTranslatorComponent, { locale: render((t) => t.locale, []), @@ -168,12 +214,14 @@ export function createTranslator(options: ReactCreateTranslatorO format(template, ...[values]) { return render( - (t) => + (t, { providedArgs }) => format({ template, values: values as any, locale: t.locale, cache: store.cache, + ignoreMissingArgs, + providedArgs, }), [template, hash(values)], ); diff --git a/src/react/types.ts b/src/react/types.ts index d7cff3e..cf7ef42 100644 --- a/src/react/types.ts +++ b/src/react/types.ts @@ -1,17 +1,18 @@ import { ElementType, ReactNode } from 'react'; import { CreateTranslatorResult } from '..'; -import { CreateTranslatorOptions, Dict, FlatDict, Translator } from '../types'; +import { CreateTranslatorOptions, Dict, FlatDict, ICUArgument, ICUDateArgument, Translator } from '../types'; -export interface ReactCreateTranslatorOptions extends CreateTranslatorOptions { +export type ReactCreateTranslatorOptions = CreateTranslatorOptions & { /** Display while a locale is loading */ placeholder?: string | ((id: string, sourceTranslation?: string | readonly string[]) => string); -} +}; -export interface ReactCreateTranslatorResult extends CreateTranslatorResult { +export interface ReactCreateTranslatorResult + extends CreateTranslatorResult { /** Returns a translator instance in a hook, which updates as locales changes or dictionaries are loaded */ - useTranslator: (locale?: string) => HookTranslator; + useTranslator: (locale?: string) => HookTranslator; /** Returns an inline translator instance, which updates as locales changes or dictionaries are loaded */ - t: InlineTranslator; + t: InlineTranslator; } export interface HookTranslatorOptions { @@ -21,8 +22,8 @@ export interface HookTranslatorOptions { placeholder?: string; } -export interface HookTranslator - extends Translator {} +export interface HookTranslator + extends Translator {} export interface InlineTranslatorOptions { /** Override locale */ @@ -35,10 +36,19 @@ export interface InlineTranslatorOptions { component?: ElementType; } -export interface InlineTranslator extends HookTranslator { +export interface InlineTranslator + extends HookTranslator { /** Render something using the currently active locale * @param renderFn your custom render function * @param dependencies if provided, will memoize the result of renderFn as long as dependencies stay the same (shallow compare) */ - render(renderFn: (t: HookTranslator) => ReactNode, dependencies?: any[]): ReactNode; + render( + renderFn: ( + t: HookTranslator, + context: { + providedArgs: Record; + }, + ) => ReactNode, + dependencies?: any[], + ): ReactNode; } diff --git a/src/resolveProvidedArgs.ts b/src/resolveProvidedArgs.ts new file mode 100644 index 0000000..199c0b5 --- /dev/null +++ b/src/resolveProvidedArgs.ts @@ -0,0 +1,13 @@ +import { ICUArgument, ICUDateArgument } from './types'; + +export function resolveProvidedArgs(providedArgs?: Record) { + return Object.fromEntries( + Object.entries(providedArgs ?? {}).map(([id, value]) => { + if (typeof value === 'object' && value !== null && 'get' in value) { + return [id, value.get() as ICUArgument | ICUDateArgument]; + } + + return [id, value as ICUArgument | ICUDateArgument]; + }), + ); +} diff --git a/src/store.ts b/src/store.ts index 4f19383..b563410 100644 --- a/src/store.ts +++ b/src/store.ts @@ -4,12 +4,12 @@ import { flattenDict } from './flattenDict'; import { arrEquals } from './helpers'; import { CreateTranslatorOptions, Dict, FlatDict, MaybePromise } from './types'; -export class Store { +export class Store { dicts = new Map>(); cache = new Cache(this.options.cacheOptions); subs = new Set<() => void>(); - constructor(public options: CreateTranslatorOptions) {} + constructor(public options: CreateTranslatorOptions) {} load(locale: string): MaybePromise { let entry = this.dicts.get(locale); diff --git a/src/translate.ts b/src/translate.ts index be107db..d2785f9 100644 --- a/src/translate.ts +++ b/src/translate.ts @@ -4,7 +4,7 @@ import { MaybePromise } from '.'; import { Cache } from './cache'; import { customDateTimeFormat, customDateTimeFormatRange } from './intlHelpers'; import { mapPotentialArray } from './mapPotentialArray'; -import { FlatDict } from './types'; +import { FlatDict, ICUArgument, ICUDateArgument } from './types'; export function translate({ dicts, @@ -17,6 +17,7 @@ export function translate({ warn, cache, ignoreMissingArgs, + providedArgs, }: { dicts: MaybePromise[]; sourceDict?: MaybePromise | null; @@ -27,7 +28,8 @@ export function translate({ locale: string; warn?: (locale: string, id: string) => void; cache: Cache; - ignoreMissingArgs?: boolean | string | ((id: string, template: string) => string); + ignoreMissingArgs: boolean | string | ((id: string, template: string) => string) | undefined; + providedArgs: Record | undefined; }): string | F | (string | F)[] | F { if (fallback !== undefined) { dicts = dicts.slice(0, 1); @@ -45,6 +47,8 @@ export function translate({ values, locale, cache, + ignoreMissingArgs, + providedArgs, }) : undefined, (sourceTranslation) => { @@ -68,6 +72,8 @@ export function translate({ values, locale, cache, + ignoreMissingArgs, + providedArgs, }) : undefined; return fallback(id, sourceTranslation); @@ -78,7 +84,7 @@ export function translate({ return id; } - return mapPotentialArray(template, (template) => format({ template, values, locale, cache, ignoreMissingArgs })); + return mapPotentialArray(template, (template) => format({ template, values, locale, cache, ignoreMissingArgs, providedArgs })); } export function format({ @@ -87,13 +93,17 @@ export function format({ locale, cache, ignoreMissingArgs, + providedArgs, }: { template: string; values?: Record; locale?: string; cache: Cache; - ignoreMissingArgs?: boolean | string | ((id: string, template: string) => string); + ignoreMissingArgs: boolean | string | ((id: string, template: string) => string) | undefined; + providedArgs: Record | undefined; }): string { + values = { ...providedArgs, ...values }; + try { const ast = parse(template, { requiresOtherClause: false }); diff --git a/src/translator.ts b/src/translator.ts index ab36a3f..c02e8ce 100644 --- a/src/translator.ts +++ b/src/translator.ts @@ -1,12 +1,13 @@ import { TranslatorFn } from '.'; import { calcLocales } from './helpers'; import { intlHelpers } from './intlHelpers'; +import { resolveProvidedArgs } from './resolveProvidedArgs'; import { Store } from './store'; import { format, translate } from './translate'; import { CreateTranslatorOptions, CreateTranslatorResult, Dict, FlattenDict, Translator } from './types'; export const createGetTranslator = - ( + ( store: Store, { fallbackLocale, @@ -20,15 +21,16 @@ export const createGetTranslator = pluralRulesOptions, relativeTimeFormatOptions, ignoreMissingArgs, - }: CreateTranslatorOptions, - ): ((locale: string) => Promise>>) => + provideArgs, + }: CreateTranslatorOptions, + ): ((locale: string) => Promise, ProvidedArgs>>) => async (locale: string) => { type FD = FlattenDict; const dicts = await store.loadAll(locale, ...calcLocales(locale, fallbackToLessSpecific, fallbackLocale)); const sourceDict = await store.load(sourceLocale); - const t: TranslatorFn = (id, ...[values, options]) => { + const t: TranslatorFn = (id, ...[values, options]) => { const fallback = options?.fallback ?? globalFallback; return translate({ dicts, @@ -40,14 +42,15 @@ export const createGetTranslator = warn, cache: store.cache, ignoreMissingArgs, + providedArgs: resolveProvidedArgs(provideArgs), }) as any; }; - return Object.assign, Omit, keyof TranslatorFn>>(t, { + return Object.assign, Omit, keyof TranslatorFn>>(t, { locale, - unknown: t as Translator['unknown'], - dynamic: t as Translator['dynamic'], + unknown: t as Translator['unknown'], + dynamic: t as Translator['dynamic'], format(template, ...[values]) { return format({ @@ -55,6 +58,8 @@ export const createGetTranslator = values: values as any, locale, cache: store.cache, + ignoreMissingArgs, + providedArgs: resolveProvidedArgs(provideArgs), }); }, @@ -70,7 +75,9 @@ export const createGetTranslator = }); }; -export function createTranslator(options: CreateTranslatorOptions): CreateTranslatorResult> { +export function createTranslator( + options: CreateTranslatorOptions, +): CreateTranslatorResult, ProvidedArgs> { const store = new Store(options); return { diff --git a/src/types.ts b/src/types.ts index be4b0b5..fba200b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -10,10 +10,18 @@ export type MaybePromise = T | Promise; /** Merge tuple into intersection */ export type Merge = T extends [infer A, ...infer Rest] ? (Rest extends [any, ...any] ? A & Merge : A) : T; -export type FlatKeys = string & - keyof { - [K in keyof D as D[K] extends Dict ? `${string & K}.${FlatKeys}` : K]: 1; - }; +export type IsAny = 0 extends 1 & T ? true : false; + +export type IsNever = [T] extends [never] ? true : false; + +export type OnlyOptional = Partial extends T ? true : false; + +export type FlatKeys = IsAny extends true + ? string + : string & + keyof { + [K in keyof D as D[K] extends Dict ? `${string & K}.${FlatKeys}` : K]: 1; + }; export type DeepValue> = K extends `${infer Head}.${infer Rest}` ? DeepValue> @@ -27,68 +35,88 @@ export type FlattenDict = { type MatchingKeys = keyof D extends infer K ? (K extends Pattern ? K : never) : never; +export type Flatten = T extends object + ? { + [P in keyof T]: T[P]; + } + : T; + //////////////////////////////////////////////////////////////////////////////// // Public types //////////////////////////////////////////////////////////////////////////////// export type Dict = { [id: string]: Dict | string | readonly string[] }; export type FlatDict = Record; -export interface CreateTranslatorOptions { - /** The source dictionary. It's type determines the available ids. */ - sourceDictionary?: D; - /** The source dictionary's locale */ - sourceLocale: string; - /** Locale(s) to fall back to if a string is not available in the active locale */ - fallbackLocale?: string | readonly string[] | ((locale: string) => string | readonly string[]); - /** Fall back to less specific language versions. E.g. en-US -> en - * @default true - */ - fallbackToLessSpecific?: boolean; - /** Dictionaries. Either a record with locales as keys or a function that takes a locale and returns a promise of a dictionary - * @param locale the active locale - */ - dicts?: { [locale: string]: Dict | (() => MaybePromise) } | ((locale: string) => MaybePromise); - /** Custom fallback handler. Will be called when a string is not available in the active locale. - * @param id flat dictionary key - * @param sourceTranslation translated string in source locale - */ - fallback?: string | ((id: string, sourceTranslation?: string | readonly string[]) => string); - ignoreMissingArgs?: boolean | string | ((id: string, template: string) => string); - /** Receive warning when strings are missing. */ - warn?: (locale: string, id: string) => void; - /** Configure cache for intl instances */ - cacheOptions?: CacheOptions; - /** Default options */ - dateTimeFormatOptions?: Intl.DateTimeFormatOptions; - /** Default options */ - listFormatOptions?: Intl.ListFormatOptions; - /** Default options */ - numberFormatOptions?: Intl.NumberFormatOptions; - /** Default options */ - pluralRulesOptions?: Intl.PluralRulesOptions; - /** Default options */ - relativeTimeFormatOptions?: Intl.RelativeTimeFormatOptions; -} - -export interface CreateTranslatorResult { +export type CreateTranslatorOptions = Flatten< + { + /** The source dictionary. It's type determines the available ids. */ + sourceDictionary?: D; + /** The source dictionary's locale */ + sourceLocale: string; + /** Locale(s) to fall back to if a string is not available in the active locale */ + fallbackLocale?: string | readonly string[] | ((locale: string) => string | readonly string[]); + /** Fall back to less specific language versions. E.g. en-US -> en + * @default true + */ + fallbackToLessSpecific?: boolean; + /** Dictionaries. Either a record with locales as keys or a function that takes a locale and returns a promise of a dictionary + * @param locale the active locale + */ + dicts?: { [locale: string]: Dict | (() => MaybePromise) } | ((locale: string) => MaybePromise); + /** Custom fallback handler. Will be called when a string is not available in the active locale. + * @param id flat dictionary key + * @param sourceTranslation translated string in source locale + */ + fallback?: string | ((id: string, sourceTranslation?: string | readonly string[]) => string); + ignoreMissingArgs?: boolean | string | ((id: string, template: string) => string); + /** Receive warning when strings are missing. */ + warn?: (locale: string, id: string) => void; + /** Configure cache for intl instances */ + cacheOptions?: CacheOptions; + /** Default options */ + dateTimeFormatOptions?: Intl.DateTimeFormatOptions; + /** Default options */ + listFormatOptions?: Intl.ListFormatOptions; + /** Default options */ + numberFormatOptions?: Intl.NumberFormatOptions; + /** Default options */ + pluralRulesOptions?: Intl.PluralRulesOptions; + /** Default options */ + relativeTimeFormatOptions?: Intl.RelativeTimeFormatOptions; + } & (IsNever extends true + ? { provideArgs?: Record } + : { + provideArgs: Record< + ProvidedArgs, + | ICUArgument + | ICUDateArgument + | { + get(): ICUArgument | ICUDateArgument; + subscribe(callback: () => void): () => void; + } + >; + }) +>; + +export interface CreateTranslatorResult { /** Returns a promise for a translator instance */ - getTranslator: (locale: string) => Promise>; + getTranslator: (locale: string) => Promise>; /** Clear all dictionary data. As needed the dictionaries will be reloaded. Useful for OTA translation updates. */ clearDicts: () => void; } -export type Values = +export type Values = // any string => unknown arguments string extends T ? [value?: Record, options?: Options] : string[] extends T ? [value?: Record, options?: Options] : // for unions, extract arguments for each union member individually - (T extends any ? (k: GetICUArgs) => void : never) extends (k: infer Args) => void - ? Args extends Record + (T extends any ? (k: GetICUArgs) => void : never) extends (k: infer Args) => void + ? OnlyOptional extends true ? // if no arguments are found, allow omitting values - [values?: {}, options?: Options] + [values?: Args, options?: Options] : [values: Args, options?: Options] : never; @@ -97,16 +125,16 @@ export interface GetTranslatorOptions { fallback?: string; } -export interface TranslatorFn { +export interface TranslatorFn { /** Translate a dictionary id to a string in the active locale */ ( id: TKey, - ...values: Values + ...values: Values ): TString extends readonly string[] ? (Output extends string ? readonly string[] : Output) : Output; } -export interface Translator - extends TranslatorFn, +export interface Translator + extends TranslatorFn, IntlHelpers { locale: Output; @@ -120,11 +148,11 @@ export interface Translator( id: TMatchingKey extends never ? never : TKey, - ...values: TMatchingKey extends never ? never : Values + ...values: TMatchingKey extends never ? never : Values ): TString extends readonly string[] ? (Output extends string ? readonly string[] : Output) : Output; /** Format the given template directly. */ - format(template: T, ...values: Values): Output; + format(template: T, ...values: Values): Output; } export interface IntlHelpers { diff --git a/test/react.test.tsx b/test/react.test.tsx index 0f5cbc1..8b773d1 100644 --- a/test/react.test.tsx +++ b/test/react.test.tsx @@ -2,7 +2,7 @@ import { act, fireEvent, render, screen } from '@testing-library/react'; import React, { ReactNode, useState } from 'react'; import { beforeEach, expect, test } from 'vitest'; import { FlattenDict } from '../src'; -import { createTranslator, HookTranslator, MaybePromise, TranslationContextProvider } from '../src/react'; +import { HookTranslator, MaybePromise, TranslationContextProvider, createTranslator } from '../src/react'; import { dictDe, dictEn, dictEs, wait } from './_helpers'; type D = FlattenDict; @@ -407,3 +407,37 @@ test('placeholder', async () => { expect(div.textContent).toBe('key1:de'); }); + +test('provided args', async () => { + let value = 0; + let listener: (() => void) | undefined; + + const { t: _t } = createTranslator({ + sourceDictionary: { + foo: '{value}', + } as const, + sourceLocale: 'en', + provideArgs: { + value: { + get: () => value, + subscribe(callback) { + listener = callback; + return () => { + listener = undefined; + }; + }, + }, + }, + }); + + render({_t('foo')}); + const div = screen.getByTestId('provided args'); + expect(div.textContent).toBe('0'); + + act(() => { + value = 1; + listener?.(); + }); + + expect(div.textContent).toBe('1'); +}); diff --git a/test/translator.test.ts b/test/translator.test.ts index 3610c6a..1c13fcd 100644 --- a/test/translator.test.ts +++ b/test/translator.test.ts @@ -535,16 +535,18 @@ describe('ignoreMissingArgs', () => { [ id: 'nested.key2' | 'selectWithOtherNested', ...args: - | [values: { value2: ICUArgument } & { value: 'option1'; nested1: ICUArgument }, options?: any] - | [values: { value2: ICUArgument } & { value: 'option2'; nested2: ICUArgument }, options?: any] - | [values: { value2: ICUArgument } & { value: OtherString; nested3: ICUArgument }, options?: any] | [ - values: { value2: ICUArgument } & { - value: (string & {}) | 'option1' | 'option2'; - nested1: ICUArgument; - nested2: ICUArgument; - nested3: ICUArgument; - }, + values: { value2: ICUArgument } & ( + | { value: 'option1'; nested1: ICUArgument } + | { value: 'option2'; nested2: ICUArgument } + | { value: OtherString; nested3: ICUArgument } + | { + value: (string & {}) | 'option1' | 'option2'; + nested1: ICUArgument; + nested2: ICUArgument; + nested3: ICUArgument; + } + ), options?: any, ], ] @@ -584,4 +586,50 @@ describe('ignoreMissingArgs', () => { expect(_t('escapeSharpOutsidePlural', { word: 'text' })).toBe(`text '# times text`); }); }); + + describe('provided args', () => { + test('provided args directly', async () => { + const { getTranslator } = createTranslator({ + sourceDictionary: { + foo: '{foo}', + bar: '{bar}', + baz: '{foo} and {bar}', + } as const, + sourceLocale: 'en', + provideArgs: { bar: 'x' }, + }); + + const t = await getTranslator('en'); + expectTypeOf(t<'foo'>).parameters.toEqualTypeOf<[key: 'foo', values: { foo: ICUArgument }, options?: any]>(); + expectTypeOf(t<'bar'>).parameters.toEqualTypeOf<[key: 'bar', values?: { bar?: ICUArgument }, options?: any]>(); + expectTypeOf(t<'baz'>).parameters.toEqualTypeOf<[key: 'baz', values: { foo: ICUArgument; bar: ICUArgument }, options?: any]>; + + expect(t('bar')).toBe('x'); + expect(t('bar', { bar: 'y' })).toBe('y'); + }); + + test('provided args subscribed', async () => { + let value = 0; + + const { getTranslator } = createTranslator({ + sourceDictionary: { + foo: '{value}', + } as const, + sourceLocale: 'en', + provideArgs: { + value: { + get: () => value, + subscribe: () => () => undefined, + }, + }, + }); + + const t = await getTranslator('en'); + expect(t('foo')).toBe('0'); + + value = 1; + // listener?.(); + expect(t('foo')).toBe('1'); + }); + }); });