diff --git a/.eslintrc.js b/.eslintrc.js index 1573d92d69a..2896766b2f1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -114,7 +114,7 @@ module.exports = defineConfig({ }, }, { - files: ['test/*.spec.ts'], + files: ['test/**/*.spec.ts'], extends: ['plugin:vitest/recommended'], rules: { 'deprecation/deprecation': 'off', diff --git a/package.json b/package.json index 5a84d7fe69d..01fa4386c7e 100644 --- a/package.json +++ b/package.json @@ -88,16 +88,16 @@ }, "devDependencies": { "@actions/github": "~5.1.1", - "@algolia/client-search": "~4.18.0", + "@algolia/client-search": "~4.19.1", "@types/markdown-it": "~12.2.3", "@types/node": "~20.4.1", "@types/prettier": "~2.7.3", - "@types/react": "~18.2.15", + "@types/react": "~18.2.17", "@types/sanitize-html": "~2.9.0", "@types/semver": "~7.5.0", "@types/validator": "~13.7.17", - "@typescript-eslint/eslint-plugin": "~5.62.0", - "@typescript-eslint/parser": "~5.62.0", + "@typescript-eslint/eslint-plugin": "~6.2.0", + "@typescript-eslint/parser": "~6.2.0", "@vitest/coverage-v8": "~0.33.0", "@vitest/ui": "~0.33.0", "@vueuse/core": "~10.2.1", @@ -128,7 +128,7 @@ "typescript": "~4.9.5", "validator": "~13.9.0", "vite": "~4.4.2", - "vitepress": "1.0.0-beta.5", + "vitepress": "1.0.0-beta.7", "vitest": "~0.33.0", "vue": "~3.3.4" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 54415ea687d..48933cb3bb9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,8 +5,8 @@ devDependencies: specifier: ~5.1.1 version: 5.1.1 '@algolia/client-search': - specifier: ~4.18.0 - version: 4.18.0 + specifier: ~4.19.1 + version: 4.19.1 '@types/markdown-it': specifier: ~12.2.3 version: 12.2.3 @@ -17,8 +17,8 @@ devDependencies: specifier: ~2.7.3 version: 2.7.3 '@types/react': - specifier: ~18.2.15 - version: 18.2.15 + specifier: ~18.2.17 + version: 18.2.17 '@types/sanitize-html': specifier: ~2.9.0 version: 2.9.0 @@ -29,11 +29,11 @@ devDependencies: specifier: ~13.7.17 version: 13.7.17 '@typescript-eslint/eslint-plugin': - specifier: ~5.62.0 - version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.44.0)(typescript@4.9.5) + specifier: ~6.2.0 + version: 6.2.0(@typescript-eslint/parser@6.2.0)(eslint@8.44.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: ~5.62.0 - version: 5.62.0(eslint@8.44.0)(typescript@4.9.5) + specifier: ~6.2.0 + version: 6.2.0(eslint@8.44.0)(typescript@4.9.5) '@vitest/coverage-v8': specifier: ~0.33.0 version: 0.33.0(vitest@0.33.0) @@ -125,8 +125,8 @@ devDependencies: specifier: ~4.4.2 version: 4.4.2(@types/node@20.4.1) vitepress: - specifier: 1.0.0-beta.5 - version: 1.0.0-beta.5(@algolia/client-search@4.18.0)(@types/node@20.4.1)(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0) + specifier: 1.0.0-beta.7 + version: 1.0.0-beta.7(@algolia/client-search@4.19.1)(@types/node@20.4.1)(@types/react@18.2.17)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0) vitest: specifier: ~0.33.0 version: 0.33.0(@vitest/ui@0.33.0) @@ -158,47 +158,47 @@ packages: tunnel: 0.0.6 dev: true - /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.17.1)(search-insights@2.6.0): + /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.17.1)(search-insights@2.6.0): resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.17.1)(search-insights@2.6.0) - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.17.1) + '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.17.1)(search-insights@2.6.0) + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.17.1) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights dev: true - /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.17.1)(search-insights@2.6.0): + /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.17.1)(search-insights@2.6.0): resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} peerDependencies: search-insights: '>= 1 < 3' dependencies: - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.17.1) + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.17.1) search-insights: 2.6.0 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch dev: true - /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.17.1): + /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.17.1): resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.17.1) - '@algolia/client-search': 4.18.0 + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.17.1) + '@algolia/client-search': 4.19.1 algoliasearch: 4.17.1 dev: true - /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.17.1): + /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.17.1): resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: - '@algolia/client-search': 4.18.0 + '@algolia/client-search': 4.19.1 algoliasearch: 4.17.1 dev: true @@ -212,8 +212,8 @@ packages: resolution: {integrity: sha512-fvi1WT8aSiGAKrcTw8Qg3RYgcwW8GZMHcqEm4AyDBEy72JZlFBSY80cTQ75MslINjCHXLDT+9EN8AGI9WVY7uA==} dev: true - /@algolia/cache-common@4.18.0: - resolution: {integrity: sha512-BmxsicMR4doGbeEXQu8yqiGmiyvpNvejYJtQ7rvzttEAMxOPoWEHrWyzBQw4x7LrBY9pMrgv4ZlUaF8PGzewHg==} + /@algolia/cache-common@4.19.1: + resolution: {integrity: sha512-XGghi3l0qA38HiqdoUY+wvGyBsGvKZ6U3vTiMBT4hArhP3fOGLXpIINgMiiGjTe4FVlTa5a/7Zf2bwlIHfRqqg==} dev: true /@algolia/cache-in-memory@4.17.1: @@ -246,11 +246,11 @@ packages: '@algolia/transporter': 4.17.1 dev: true - /@algolia/client-common@4.18.0: - resolution: {integrity: sha512-7N+soJFP4wn8tjTr3MSUT/U+4xVXbz4jmeRfWfVAzdAbxLAQbHa0o/POSdTvQ8/02DjCLelloZ1bb4ZFVKg7Wg==} + /@algolia/client-common@4.19.1: + resolution: {integrity: sha512-3kAIVqTcPrjfS389KQvKzliC559x+BDRxtWamVJt8IVp7LGnjq+aVAXg4Xogkur1MUrScTZ59/AaUd5EdpyXgA==} dependencies: - '@algolia/requester-common': 4.18.0 - '@algolia/transporter': 4.18.0 + '@algolia/requester-common': 4.19.1 + '@algolia/transporter': 4.19.1 dev: true /@algolia/client-personalization@4.17.1: @@ -269,20 +269,20 @@ packages: '@algolia/transporter': 4.17.1 dev: true - /@algolia/client-search@4.18.0: - resolution: {integrity: sha512-F9xzQXTjm6UuZtnsLIew6KSraXQ0AzS/Ee+OD+mQbtcA/K1sg89tqb8TkwjtiYZ0oij13u3EapB3gPZwm+1Y6g==} + /@algolia/client-search@4.19.1: + resolution: {integrity: sha512-mBecfMFS4N+yK/p0ZbK53vrZbL6OtWMk8YmnOv1i0LXx4pelY8TFhqKoTit3NPVPwoSNN0vdSN9dTu1xr1XOVw==} dependencies: - '@algolia/client-common': 4.18.0 - '@algolia/requester-common': 4.18.0 - '@algolia/transporter': 4.18.0 + '@algolia/client-common': 4.19.1 + '@algolia/requester-common': 4.19.1 + '@algolia/transporter': 4.19.1 dev: true /@algolia/logger-common@4.17.1: resolution: {integrity: sha512-Us28Ot+fLEmX9M96sa65VZ8EyEEzhYPxfhV9aQyKDjfXbUdJlJxKt6wZpoEg9RAPSdO8IjK9nmuW2P8au3rRsg==} dev: true - /@algolia/logger-common@4.18.0: - resolution: {integrity: sha512-46etYgSlkoKepkMSyaoriSn2JDgcrpc/nkOgou/lm0y17GuMl9oYZxwKKTSviLKI5Irk9nSKGwnBTQYwXOYdRg==} + /@algolia/logger-common@4.19.1: + resolution: {integrity: sha512-i6pLPZW/+/YXKis8gpmSiNk1lOmYCmRI6+x6d2Qk1OdfvX051nRVdalRbEcVTpSQX6FQAoyeaui0cUfLYW5Elw==} dev: true /@algolia/logger-console@4.17.1: @@ -301,8 +301,8 @@ packages: resolution: {integrity: sha512-HggXdjvVFQR0I5l7hM5WdHgQ1tqcRWeyXZz8apQ7zPWZhirmY2E9D6LVhDh/UnWQNEm7nBtM+eMFONJ3bZccIQ==} dev: true - /@algolia/requester-common@4.18.0: - resolution: {integrity: sha512-xlT8R1qYNRBCi1IYLsx7uhftzdfsLPDGudeQs+xvYB4sQ3ya7+ppolB/8m/a4F2gCkEO6oxpp5AGemM7kD27jA==} + /@algolia/requester-common@4.19.1: + resolution: {integrity: sha512-BisRkcWVxrDzF1YPhAckmi2CFYK+jdMT60q10d7z3PX+w6fPPukxHRnZwooiTUrzFe50UBmLItGizWHP5bDzVQ==} dev: true /@algolia/requester-node-http@4.17.1: @@ -319,12 +319,12 @@ packages: '@algolia/requester-common': 4.17.1 dev: true - /@algolia/transporter@4.18.0: - resolution: {integrity: sha512-xbw3YRUGtXQNG1geYFEDDuFLZt4Z8YNKbamHPkzr3rWc6qp4/BqEeXcI2u/P/oMq2yxtXgMxrCxOPA8lyIe5jw==} + /@algolia/transporter@4.19.1: + resolution: {integrity: sha512-nkpvPWbpuzxo1flEYqNIbGz7xhfhGOKGAZS7tzC+TELgEmi7z99qRyTfNSUlW7LZmB3ACdnqAo+9A9KFBENviQ==} dependencies: - '@algolia/cache-common': 4.18.0 - '@algolia/logger-common': 4.18.0 - '@algolia/requester-common': 4.18.0 + '@algolia/cache-common': 4.19.1 + '@algolia/logger-common': 4.19.1 + '@algolia/requester-common': 4.19.1 dev: true /@ampproject/remapping@2.2.1: @@ -426,10 +426,10 @@ packages: resolution: {integrity: sha512-2Pu9HDg/uP/IT10rbQ+4OrTQuxIWdKVUEdcw9/w7kZJv9NeHS6skJx1xuRiFyoGKwAzcHXnLp7csE99sj+O1YA==} dev: true - /@docsearch/js@3.5.1(@algolia/client-search@4.18.0)(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0): + /@docsearch/js@3.5.1(@algolia/client-search@4.19.1)(@types/react@18.2.17)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0): resolution: {integrity: sha512-EXi8de5njxgP6TV3N9ytnGRLG9zmBNTEZjR4VzwPcpPLbZxxTLG2gaFyJyKiFVQxHW/DPlMrDJA3qoRRGEkgZw==} dependencies: - '@docsearch/react': 3.5.1(@algolia/client-search@4.18.0)(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0) + '@docsearch/react': 3.5.1(@algolia/client-search@4.19.1)(@types/react@18.2.17)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0) preact: 10.15.1 transitivePeerDependencies: - '@algolia/client-search' @@ -439,7 +439,7 @@ packages: - search-insights dev: true - /@docsearch/react@3.5.1(@algolia/client-search@4.18.0)(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0): + /@docsearch/react@3.5.1(@algolia/client-search@4.19.1)(@types/react@18.2.17)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0): resolution: {integrity: sha512-t5mEODdLzZq4PTFAm/dvqcvZFdPDMdfPE5rJS5SC8OUq9mPzxEy6b+9THIqNM9P0ocCb4UC5jqBrxKclnuIbzQ==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' @@ -453,10 +453,10 @@ packages: react-dom: optional: true dependencies: - '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.17.1)(search-insights@2.6.0) - '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.18.0)(algoliasearch@4.17.1) + '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.17.1)(search-insights@2.6.0) + '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.17.1) '@docsearch/css': 3.5.1 - '@types/react': 18.2.15 + '@types/react': 18.2.17 algoliasearch: 4.17.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -1192,8 +1192,8 @@ packages: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} dev: true - /@types/react@18.2.15: - resolution: {integrity: sha512-oEjE7TQt1fFTFSbf8kkNuc798ahTUzn3Le67/PWjE8MAfYAD/qB7O8hSTcromLFqHCt9bcdOg5GXMokzTjJ5SA==} + /@types/react@18.2.17: + resolution: {integrity: sha512-u+e7OlgPPh+aryjOm5UJMX32OvB2E3QASOAqVMY6Ahs90djagxwv2ya0IctglNbNTexC12qCSMZG47KPfy1hAA==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.3 @@ -1238,47 +1238,50 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.44.0)(typescript@4.9.5): - resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/eslint-plugin@6.2.0(@typescript-eslint/parser@6.2.0)(eslint@8.44.0)(typescript@4.9.5): + resolution: {integrity: sha512-rClGrMuyS/3j0ETa1Ui7s6GkLhfZGKZL3ZrChLeAiACBE/tRc1wq8SNZESUuluxhLj9FkUefRs2l6bCIArWBiQ==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.62.0(eslint@8.44.0)(typescript@4.9.5) - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0(eslint@8.44.0)(typescript@4.9.5) - '@typescript-eslint/utils': 5.62.0(eslint@8.44.0)(typescript@4.9.5) + '@typescript-eslint/parser': 6.2.0(eslint@8.44.0)(typescript@4.9.5) + '@typescript-eslint/scope-manager': 6.2.0 + '@typescript-eslint/type-utils': 6.2.0(eslint@8.44.0)(typescript@4.9.5) + '@typescript-eslint/utils': 6.2.0(eslint@8.44.0)(typescript@4.9.5) + '@typescript-eslint/visitor-keys': 6.2.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.44.0 graphemer: 1.4.0 ignore: 5.2.4 + natural-compare: 1.4.0 natural-compare-lite: 1.4.0 semver: 7.5.4 - tsutils: 3.21.0(typescript@4.9.5) + ts-api-utils: 1.0.1(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@5.62.0(eslint@8.44.0)(typescript@4.9.5): - resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/parser@6.2.0(eslint@8.44.0)(typescript@4.9.5): + resolution: {integrity: sha512-igVYOqtiK/UsvKAmmloQAruAdUHihsOCvplJpplPZ+3h4aDkC/UKZZNKgB6h93ayuYLuEymU3h8nF1xMRbh37g==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) + '@typescript-eslint/scope-manager': 6.2.0 + '@typescript-eslint/types': 6.2.0 + '@typescript-eslint/typescript-estree': 6.2.0(typescript@4.9.5) + '@typescript-eslint/visitor-keys': 6.2.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.44.0 typescript: 4.9.5 @@ -1302,29 +1305,29 @@ packages: '@typescript-eslint/visitor-keys': 5.59.7 dev: true - /@typescript-eslint/scope-manager@5.62.0: - resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/scope-manager@6.2.0: + resolution: {integrity: sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==} + engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 + '@typescript-eslint/types': 6.2.0 + '@typescript-eslint/visitor-keys': 6.2.0 dev: true - /@typescript-eslint/type-utils@5.62.0(eslint@8.44.0)(typescript@4.9.5): - resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/type-utils@6.2.0(eslint@8.44.0)(typescript@4.9.5): + resolution: {integrity: sha512-DnGZuNU2JN3AYwddYIqrVkYW0uUQdv0AY+kz2M25euVNlujcN2u+rJgfJsBFlUEzBB6OQkUqSZPyuTLf2bP5mw==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: '*' + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) - '@typescript-eslint/utils': 5.62.0(eslint@8.44.0)(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 6.2.0(typescript@4.9.5) + '@typescript-eslint/utils': 6.2.0(eslint@8.44.0)(typescript@4.9.5) debug: 4.3.4(supports-color@8.1.1) eslint: 8.44.0 - tsutils: 3.21.0(typescript@4.9.5) + ts-api-utils: 1.0.1(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: - supports-color @@ -1340,9 +1343,9 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/types@5.62.0: - resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/types@6.2.0: + resolution: {integrity: sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==} + engines: {node: ^16.0.0 || >=18.0.0} dev: true /@typescript-eslint/typescript-estree@5.59.11(typescript@4.9.5): @@ -1387,22 +1390,22 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@5.62.0(typescript@4.9.5): - resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/typescript-estree@6.2.0(typescript@4.9.5): + resolution: {integrity: sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 + '@typescript-eslint/types': 6.2.0 + '@typescript-eslint/visitor-keys': 6.2.0 debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - tsutils: 3.21.0(typescript@4.9.5) + ts-api-utils: 1.0.1(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: - supports-color @@ -1448,20 +1451,19 @@ packages: - typescript dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.44.0)(typescript@4.9.5): - resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/utils@6.2.0(eslint@8.44.0)(typescript@4.9.5): + resolution: {integrity: sha512-RCFrC1lXiX1qEZN8LmLrxYRhOkElEsPKTVSNout8DMzf8PeWoQG7Rxz2SadpJa3VSh5oYKGwt7j7X/VRg+Y3OQ==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.44.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) + '@typescript-eslint/scope-manager': 6.2.0 + '@typescript-eslint/types': 6.2.0 + '@typescript-eslint/typescript-estree': 6.2.0(typescript@4.9.5) eslint: 8.44.0 - eslint-scope: 5.1.1 semver: 7.5.4 transitivePeerDependencies: - supports-color @@ -1484,22 +1486,22 @@ packages: eslint-visitor-keys: 3.4.1 dev: true - /@typescript-eslint/visitor-keys@5.62.0: - resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/visitor-keys@6.2.0: + resolution: {integrity: sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==} + engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/types': 6.2.0 eslint-visitor-keys: 3.4.1 dev: true - /@vitejs/plugin-vue@4.2.3(vite@4.4.0-beta.3)(vue@3.3.4): + /@vitejs/plugin-vue@4.2.3(vite@4.4.7)(vue@3.3.4): resolution: {integrity: sha512-R6JDUfiZbJA9cMiguQ7jxALsgiprjBeHL5ikpXfJCH62pPHtI+JdJ5xWj6Ev73yXSlYl86+blXn1kZHQ7uElxw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 4.4.0-beta.3(@types/node@20.4.1) + vite: 4.4.7(@types/node@20.4.1) vue: 3.3.4 dev: true @@ -1604,7 +1606,7 @@ packages: '@vue/shared': 3.3.4 estree-walker: 2.0.2 magic-string: 0.30.1 - postcss: 8.4.24 + postcss: 8.4.27 source-map-js: 1.0.2 dev: true @@ -1676,7 +1678,7 @@ packages: - vue dev: true - /@vueuse/integrations@10.2.1(focus-trap@7.4.3)(vue@3.3.4): + /@vueuse/integrations@10.2.1(focus-trap@7.5.2)(vue@3.3.4): resolution: {integrity: sha512-FDP5lni+z9FjHE9H3xuvwSjoRV9U8jmDvJpmHPCBjUgPGYRynwb60eHWXCFJXLUtb4gSIHy0e+iaEbrKdalCkQ==} peerDependencies: async-validator: '*' @@ -1719,7 +1721,7 @@ packages: dependencies: '@vueuse/core': 10.2.1(vue@3.3.4) '@vueuse/shared': 10.2.1(vue@3.3.4) - focus-trap: 7.4.3 + focus-trap: 7.5.2 vue-demi: 0.14.5(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' @@ -3304,10 +3306,10 @@ packages: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true - /focus-trap@7.4.3: - resolution: {integrity: sha512-BgSSbK4GPnS2VbtZ50VtOv1Sti6DIkj3+LkVjiWMNjLeAp1SH1UlLx3ULu/DCu4vq5R4/uvTm+zrvsMsuYmGLg==} + /focus-trap@7.5.2: + resolution: {integrity: sha512-p6vGNNWLDGwJCiEjkSK6oERj/hEyI9ITsSwIUICBoKLlWiTWXJRfQibCwcoi50rTZdbi87qDtUlMCmQwsGSgPw==} dependencies: - tabbable: 6.1.2 + tabbable: 6.2.0 dev: true /for-each@0.3.3: @@ -4691,6 +4693,15 @@ packages: source-map-js: 1.0.2 dev: true + /postcss@8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + /preact@10.15.1: resolution: {integrity: sha512-qs2ansoQEwzNiV5eAcRT1p1EC/dmEzaATVDJNiB3g2sRDWdA7b7MurXdJjB2+/WQktGWZwxvDrnuRFbWuIr64g==} dev: true @@ -5353,8 +5364,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /tabbable@6.1.2: - resolution: {integrity: sha512-qCN98uP7i9z0fIS4amQ5zbGBOq+OSigYeGvPy7NDk8Y9yncqDZ9pRPgfsc2PJIVM9RrJj7GIfuRgmjoUU9zTHQ==} + /tabbable@6.2.0: + resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} dev: true /temp-dir@2.0.0: @@ -5464,6 +5475,15 @@ packages: engines: {node: '>=8'} dev: true + /ts-api-utils@1.0.1(typescript@4.9.5): + resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 4.9.5 + dev: true + /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true @@ -5673,7 +5693,7 @@ packages: mlly: 1.4.0 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.2(@types/node@20.4.1) + vite: 4.4.7(@types/node@20.4.1) transitivePeerDependencies: - '@types/node' - less @@ -5685,8 +5705,8 @@ packages: - terser dev: true - /vite@4.4.0-beta.3(@types/node@20.4.1): - resolution: {integrity: sha512-IC/thYTvArOFRJ4qvvudnu4KKZOVc+gduS3I9OfC5SbP/Rf4kkP7z6Of2QpKeOSVqwIK24khW6VOUmVD/0yzSQ==} + /vite@4.4.2(@types/node@20.4.1): + resolution: {integrity: sha512-zUcsJN+UvdSyHhYa277UHhiJ3iq4hUBwHavOpsNUGsTgjBeoBlK8eDt+iT09pBq0h9/knhG/SPrZiM7cGmg7NA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -5721,8 +5741,8 @@ packages: fsevents: 2.3.2 dev: true - /vite@4.4.2(@types/node@20.4.1): - resolution: {integrity: sha512-zUcsJN+UvdSyHhYa277UHhiJ3iq4hUBwHavOpsNUGsTgjBeoBlK8eDt+iT09pBq0h9/knhG/SPrZiM7cGmg7NA==} + /vite@4.4.7(@types/node@20.4.1): + resolution: {integrity: sha512-6pYf9QJ1mHylfVh39HpuSfMPojPSKVxZvnclX1K1FyZ1PXDOcLBibdq5t1qxJSnL63ca8Wf4zts6mD8u8oc9Fw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -5751,28 +5771,28 @@ packages: dependencies: '@types/node': 20.4.1 esbuild: 0.18.11 - postcss: 8.4.24 + postcss: 8.4.27 rollup: 3.26.0 optionalDependencies: fsevents: 2.3.2 dev: true - /vitepress@1.0.0-beta.5(@algolia/client-search@4.18.0)(@types/node@20.4.1)(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0): - resolution: {integrity: sha512-/RjqqRsSEKkzF6HhK5e5Ij+bZ7ETb9jNCRRgIMm10gJ+ZLC3D1OqkE465lEqCeJUgt2HZ6jmWjDqIBfrJSpv7w==} + /vitepress@1.0.0-beta.7(@algolia/client-search@4.19.1)(@types/node@20.4.1)(@types/react@18.2.17)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0): + resolution: {integrity: sha512-P9Rw+FXatKIU4fVdtKxqwHl6fby8E/8zE3FIfep6meNgN4BxbWqoKJ6yfuuQQR9IrpQqwnyaBh4LSabyll6tWg==} hasBin: true dependencies: '@docsearch/css': 3.5.1 - '@docsearch/js': 3.5.1(@algolia/client-search@4.18.0)(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0) - '@vitejs/plugin-vue': 4.2.3(vite@4.4.0-beta.3)(vue@3.3.4) + '@docsearch/js': 3.5.1(@algolia/client-search@4.19.1)(@types/react@18.2.17)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.6.0) + '@vitejs/plugin-vue': 4.2.3(vite@4.4.7)(vue@3.3.4) '@vue/devtools-api': 6.5.0 '@vueuse/core': 10.2.1(vue@3.3.4) - '@vueuse/integrations': 10.2.1(focus-trap@7.4.3)(vue@3.3.4) + '@vueuse/integrations': 10.2.1(focus-trap@7.5.2)(vue@3.3.4) body-scroll-lock: 4.0.0-beta.0 - focus-trap: 7.4.3 + focus-trap: 7.5.2 mark.js: 8.11.1 minisearch: 6.1.0 shiki: 0.14.3 - vite: 4.4.0-beta.3(@types/node@20.4.1) + vite: 4.4.7(@types/node@20.4.1) vue: 3.3.4 transitivePeerDependencies: - '@algolia/client-search' diff --git a/scripts/apidoc/typedoc.ts b/scripts/apidoc/typedoc.ts index 1a782aa9b0d..2e86f2c28d1 100644 --- a/scripts/apidoc/typedoc.ts +++ b/scripts/apidoc/typedoc.ts @@ -35,6 +35,7 @@ export function loadProject( entryPoints: ['src/index.ts'], pretty: true, cleanOutputDir: true, + tsconfig: 'tsconfig.build.json', } ): [Application, ProjectReflection] { const app = newTypeDocApp(); diff --git a/src/locales/mk/location/city_name.ts b/src/locales/mk/location/city_name.ts index 4514d298b2f..3fa6f97ff19 100644 --- a/src/locales/mk/location/city_name.ts +++ b/src/locales/mk/location/city_name.ts @@ -13,23 +13,20 @@ export default [ 'Вевчани', 'Велес', 'Виница', - 'Вранештица', 'Врапчиште', 'Гази Баба', 'Гевгелија', 'Гостивар', 'Градско', 'Дебар', - 'Дебарца', + 'Дебрца', 'Делчево', 'Демир Капија', 'Демир Хисар', 'Дојран', 'Долнени', - 'Другово', 'Ѓорче Петров', 'Желино', - 'Зајас', 'Зелениково', 'Зрновци', 'Илинден', @@ -55,7 +52,6 @@ export default [ 'Неготино', 'Новаци', 'Ново Село', - 'Осломеј', 'Охрид', 'Петровец', 'Пехчево', @@ -68,10 +64,9 @@ export default [ 'Росоман', 'Сарај', 'Свети Николе', - 'Скопје', 'Сопиште', - 'Струга', 'Старо Нагоричане', + 'Струга', 'Струмица', 'Студеничани', 'Теарце', diff --git a/src/locales/mk/location/index.ts b/src/locales/mk/location/index.ts index fcdecf805c7..8ae8c6076f9 100644 --- a/src/locales/mk/location/index.ts +++ b/src/locales/mk/location/index.ts @@ -10,6 +10,7 @@ import country from './country'; import default_country from './default_country'; import postcode from './postcode'; import secondary_address from './secondary_address'; +import state from './state'; import street_address from './street_address'; import street_name from './street_name'; import street_pattern from './street_pattern'; @@ -22,6 +23,7 @@ const location: LocationDefinition = { default_country, postcode, secondary_address, + state, street_address, street_name, street_pattern, diff --git a/src/locales/mk/location/state.ts b/src/locales/mk/location/state.ts new file mode 100644 index 00000000000..3fa6f97ff19 --- /dev/null +++ b/src/locales/mk/location/state.ts @@ -0,0 +1,82 @@ +export default [ + 'Аеродром', + 'Арачиново', + 'Берово', + 'Битола', + 'Богданци', + 'Боговиње', + 'Босилово', + 'Брвеница', + 'Бутел', + 'Валандово', + 'Василево', + 'Вевчани', + 'Велес', + 'Виница', + 'Врапчиште', + 'Гази Баба', + 'Гевгелија', + 'Гостивар', + 'Градско', + 'Дебар', + 'Дебрца', + 'Делчево', + 'Демир Капија', + 'Демир Хисар', + 'Дојран', + 'Долнени', + 'Ѓорче Петров', + 'Желино', + 'Зелениково', + 'Зрновци', + 'Илинден', + 'Јегуновце', + 'Кавадарци', + 'Карбинци', + 'Карпош', + 'Кисела Вода', + 'Кичево', + 'Конче', + 'Кочани', + 'Кратово', + 'Крива Паланка', + 'Кривогаштани', + 'Крушево', + 'Куманово', + 'Липково', + 'Лозово', + 'Маврово и Ростуше', + 'Македонска Каменица', + 'Македонски Брод', + 'Могила', + 'Неготино', + 'Новаци', + 'Ново Село', + 'Охрид', + 'Петровец', + 'Пехчево', + 'Пласница', + 'Прилеп', + 'Пробиштип', + 'Радовиш', + 'Ранковце', + 'Ресен', + 'Росоман', + 'Сарај', + 'Свети Николе', + 'Сопиште', + 'Старо Нагоричане', + 'Струга', + 'Струмица', + 'Студеничани', + 'Теарце', + 'Тетово', + 'Центар', + 'Центар Жупа', + 'Чаир', + 'Чашка', + 'Чешиново-Облешево', + 'Чучер-Сандево', + 'Штип', + 'Шуто Оризари', +]; diff --git a/src/locales/pt_PT/location/index.ts b/src/locales/pt_PT/location/index.ts index 656d03c46eb..df90e11c410 100644 --- a/src/locales/pt_PT/location/index.ts +++ b/src/locales/pt_PT/location/index.ts @@ -13,6 +13,7 @@ import default_country from './default_country'; import direction from './direction'; import postcode from './postcode'; import secondary_address from './secondary_address'; +import state from './state'; import street_address from './street_address'; import street_pattern from './street_pattern'; import street_prefix from './street_prefix'; @@ -28,6 +29,7 @@ const location: LocationDefinition = { direction, postcode, secondary_address, + state, street_address, street_pattern, street_prefix, diff --git a/src/locales/pt_PT/location/state.ts b/src/locales/pt_PT/location/state.ts new file mode 100644 index 00000000000..da1359b58d2 --- /dev/null +++ b/src/locales/pt_PT/location/state.ts @@ -0,0 +1,22 @@ +export default [ + 'Azores', + 'Aveiro', + 'Beja', + 'Braga', + 'Bragança', + 'Castelo Branco', + 'Coimbra', + 'Évora', + 'Faro', + 'Guarda', + 'Leiria', + 'Lisbon', + 'Madeira', + 'Portalegre', + 'Porto', + 'Santarém', + 'Setúbal', + 'Viana do Castelo', + 'Vila Real', + 'Viseu', +]; diff --git a/src/locales/vi/location/city_name.ts b/src/locales/vi/location/city_name.ts index 46d1817dc73..7474a59344e 100644 --- a/src/locales/vi/location/city_name.ts +++ b/src/locales/vi/location/city_name.ts @@ -1,65 +1,32 @@ export default [ - 'An Giang', - 'Bà Rịa-Vũng Tàu', - 'Bạc Liêu', - 'Bắc Kạn', - 'Bắc Giang', + 'An Nhơn', + 'Biên Hòa', + 'Buôn Ma Thuột', 'Bắc Ninh', - 'Bến Tre', - 'Bình Dương', - 'Bình Định', - 'Bình Phước', - 'Bình Thuận', 'Cà Mau', - 'Cao Bằng', 'Cần Thơ', - 'Đà Nẵng', - 'Đắk Lắk', - 'Đắk Nông', - 'Điện Biên', - 'Đồng Nai', - 'Đồng Tháp', - 'Gia Lai', - 'Hà Giang', - 'Hà Nam', - 'Hà Nội', - 'Hà Tĩnh', + 'Haiphong', + 'Hanoi', + 'Ho Chi Minh City', + 'Huế', 'Hải Dương', - 'Hải Phòng', - 'Hậu Giang', - 'Hòa Bình', - 'TP. Hồ Chí Minh', - 'Hưng Yên', - 'Khánh Hoà', - 'Kiên Giang', - 'Kon Tum', - 'Lai Châu', - 'Lạng Sơn', - 'Lào Cai', - 'Lâm Đồng', - 'Long An', + 'Long Xuyên', + 'Mỹ Tho', 'Nam Định', - 'Nghệ An', - 'Ninh Bình', - 'Ninh Thuận', - 'Phú Thọ', - 'Phú Yên', - 'Quảng Bình', - 'Quảng Nam', - 'Quảng Ngãi', - 'Quảng Ninh', - 'Quảng Trị', + 'Nghi Sơn', + 'Nha Trang', + 'Phan Thiết', + 'Quy Nhơn', + 'Quảng Hà', 'Sóc Trăng', - 'Sơn La', - 'Tây Ninh', + 'Thanh Hóa', 'Thái Bình', 'Thái Nguyên', - 'Thanh Hoá', - 'Thừa Thiên-Huế', - 'Tiền Giang', - 'Trà Vinh', - 'Tuyên Quang', - 'Vĩnh Long', - 'Vĩnh Phúc', - 'Yên Bái', + 'Thủ Dầu Một', + 'Thủ Đức', + 'Tân An', + 'Tân Uyên', + 'Vinh', + 'Việt Trì', + 'Vũng Tàu', ]; diff --git a/src/locales/vi/location/index.ts b/src/locales/vi/location/index.ts index 90cbe44f567..c2426c48a9c 100644 --- a/src/locales/vi/location/index.ts +++ b/src/locales/vi/location/index.ts @@ -8,6 +8,7 @@ import city_pattern from './city_pattern'; import country from './country'; import default_country from './default_country'; import postcode from './postcode'; +import state from './state'; import street_pattern from './street_pattern'; const location: LocationDefinition = { @@ -16,6 +17,7 @@ const location: LocationDefinition = { country, default_country, postcode, + state, street_pattern, }; diff --git a/src/locales/vi/location/state.ts b/src/locales/vi/location/state.ts new file mode 100644 index 00000000000..a964c5d988a --- /dev/null +++ b/src/locales/vi/location/state.ts @@ -0,0 +1,66 @@ +export default [ + 'An Giang', + 'Bà Rịa-Vũng Tàu', + 'Bắc Giang', + 'Bắc Kạn', + 'Bạc Liêu', + 'Bắc Ninh', + 'Bến Tre', + 'Bình Định', + 'Bình Dương', + 'Bình Phước', + 'Bình Thuận', + 'Cà Mau', + 'Cần Thơ', + 'Cao Bằng', + 'Đà Nẵng', + 'Đắk Lắk', + 'Đắk Nông', + 'Điện Biên', + 'Đồng Nai', + 'Đồng Tháp', + 'Gia Lai', + 'Hà Giang', + 'Hà Nam', + 'Hà Tây', + 'Hà Tĩnh', + 'Hải Dương', + 'Hải Phòng', + 'Hà Nội', + 'Hậu Giang', + 'Hồ Chí Minh', + 'Hòa Bình', + 'Hưng Yên', + 'Khánh Hòa', + 'Kiên Giang', + 'Kon Tum', + 'Lai Châu', + 'Lâm Đồng', + 'Lạng Sơn', + 'Lào Cai', + 'Long An', + 'Nam Định', + 'Nghệ An', + 'Ninh Bình', + 'Ninh Thuận', + 'Phú Thọ', + 'Phú Yên', + 'Quảng Bình', + 'Quảng Nam', + 'Quảng Ngãi', + 'Quảng Ninh', + 'Quảng Trị', + 'Sóc Trăng', + 'Sơn La', + 'Tây Ninh', + 'Thái Bình', + 'Thái Nguyên', + 'Thanh Hóa', + 'Thừa Thiên-Huế', + 'Tiền Giang', + 'Trà Vinh', + 'Tuyên Quang', + 'Vĩnh Long', + 'Vĩnh Phúc', + 'Yên Bái', +]; diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index 92647942678..28c63693383 100644 --- a/src/modules/helpers/index.ts +++ b/src/modules/helpers/index.ts @@ -649,6 +649,11 @@ export class HelpersModule { * and outputs a unique array of strings based on that source. * This method does not store the unique state between invocations. * + * If there are not enough unique values to satisfy the length, if + * the source is an array, it will only return as many items as are + * in the array. If the source is a function, it will return after + * a maximum number of attempts has been reached. + * * @template T The type of the elements. * * @param source The strings to choose from or a function that generates a string. @@ -671,8 +676,11 @@ export class HelpersModule { const set = new Set(); try { if (typeof source === 'function') { - while (set.size < length) { + const maxAttempts = 1000 * length; + let attempts = 0; + while (set.size < length && attempts < maxAttempts) { set.add(source()); + attempts++; } } } catch { diff --git a/test/__snapshots__/unique.spec.ts.snap b/test/__snapshots__/unique.spec.ts.snap deleted file mode 100644 index d6ce5e55060..00000000000 --- a/test/__snapshots__/unique.spec.ts.snap +++ /dev/null @@ -1,25 +0,0 @@ -// Vitest Snapshot v1 - -exports[`unique > seed: 42 > unique(() => number) 1`] = `37454`; - -exports[`unique > seed: 42 > unique(() => number), args) 1`] = `19`; - -exports[`unique > seed: 42 > unique(customMethod) 1`] = `"Test-188"`; - -exports[`unique > seed: 42 > unique(customMethod, args) 1`] = `"prefix-1-Test-188"`; - -exports[`unique > seed: 1211 > unique(() => number) 1`] = `92852`; - -exports[`unique > seed: 1211 > unique(() => number), args) 1`] = `47`; - -exports[`unique > seed: 1211 > unique(customMethod) 1`] = `"Test-465"`; - -exports[`unique > seed: 1211 > unique(customMethod, args) 1`] = `"prefix-1-Test-465"`; - -exports[`unique > seed: 1337 > unique(() => number) 1`] = `26202`; - -exports[`unique > seed: 1337 > unique(() => number), args) 1`] = `13`; - -exports[`unique > seed: 1337 > unique(customMethod) 1`] = `"Test-132"`; - -exports[`unique > seed: 1337 > unique(customMethod, args) 1`] = `"prefix-1-Test-132"`; diff --git a/test/__snapshots__/airline.spec.ts.snap b/test/modules/__snapshots__/airline.spec.ts.snap similarity index 100% rename from test/__snapshots__/airline.spec.ts.snap rename to test/modules/__snapshots__/airline.spec.ts.snap diff --git a/test/__snapshots__/animal.spec.ts.snap b/test/modules/__snapshots__/animal.spec.ts.snap similarity index 100% rename from test/__snapshots__/animal.spec.ts.snap rename to test/modules/__snapshots__/animal.spec.ts.snap diff --git a/test/__snapshots__/color.spec.ts.snap b/test/modules/__snapshots__/color.spec.ts.snap similarity index 100% rename from test/__snapshots__/color.spec.ts.snap rename to test/modules/__snapshots__/color.spec.ts.snap diff --git a/test/__snapshots__/commerce.spec.ts.snap b/test/modules/__snapshots__/commerce.spec.ts.snap similarity index 100% rename from test/__snapshots__/commerce.spec.ts.snap rename to test/modules/__snapshots__/commerce.spec.ts.snap diff --git a/test/__snapshots__/company.spec.ts.snap b/test/modules/__snapshots__/company.spec.ts.snap similarity index 100% rename from test/__snapshots__/company.spec.ts.snap rename to test/modules/__snapshots__/company.spec.ts.snap diff --git a/test/__snapshots__/database.spec.ts.snap b/test/modules/__snapshots__/database.spec.ts.snap similarity index 100% rename from test/__snapshots__/database.spec.ts.snap rename to test/modules/__snapshots__/database.spec.ts.snap diff --git a/test/__snapshots__/datatype.spec.ts.snap b/test/modules/__snapshots__/datatype.spec.ts.snap similarity index 100% rename from test/__snapshots__/datatype.spec.ts.snap rename to test/modules/__snapshots__/datatype.spec.ts.snap diff --git a/test/__snapshots__/date.spec.ts.snap b/test/modules/__snapshots__/date.spec.ts.snap similarity index 100% rename from test/__snapshots__/date.spec.ts.snap rename to test/modules/__snapshots__/date.spec.ts.snap diff --git a/test/__snapshots__/finance.spec.ts.snap b/test/modules/__snapshots__/finance.spec.ts.snap similarity index 100% rename from test/__snapshots__/finance.spec.ts.snap rename to test/modules/__snapshots__/finance.spec.ts.snap diff --git a/test/__snapshots__/git.spec.ts.snap b/test/modules/__snapshots__/git.spec.ts.snap similarity index 100% rename from test/__snapshots__/git.spec.ts.snap rename to test/modules/__snapshots__/git.spec.ts.snap diff --git a/test/__snapshots__/hacker.spec.ts.snap b/test/modules/__snapshots__/hacker.spec.ts.snap similarity index 100% rename from test/__snapshots__/hacker.spec.ts.snap rename to test/modules/__snapshots__/hacker.spec.ts.snap diff --git a/test/__snapshots__/helpers.spec.ts.snap b/test/modules/__snapshots__/helpers.spec.ts.snap similarity index 100% rename from test/__snapshots__/helpers.spec.ts.snap rename to test/modules/__snapshots__/helpers.spec.ts.snap diff --git a/test/__snapshots__/image.spec.ts.snap b/test/modules/__snapshots__/image.spec.ts.snap similarity index 100% rename from test/__snapshots__/image.spec.ts.snap rename to test/modules/__snapshots__/image.spec.ts.snap diff --git a/test/__snapshots__/internet.spec.ts.snap b/test/modules/__snapshots__/internet.spec.ts.snap similarity index 100% rename from test/__snapshots__/internet.spec.ts.snap rename to test/modules/__snapshots__/internet.spec.ts.snap diff --git a/test/__snapshots__/location.spec.ts.snap b/test/modules/__snapshots__/location.spec.ts.snap similarity index 100% rename from test/__snapshots__/location.spec.ts.snap rename to test/modules/__snapshots__/location.spec.ts.snap diff --git a/test/__snapshots__/lorem.spec.ts.snap b/test/modules/__snapshots__/lorem.spec.ts.snap similarity index 100% rename from test/__snapshots__/lorem.spec.ts.snap rename to test/modules/__snapshots__/lorem.spec.ts.snap diff --git a/test/__snapshots__/music.spec.ts.snap b/test/modules/__snapshots__/music.spec.ts.snap similarity index 100% rename from test/__snapshots__/music.spec.ts.snap rename to test/modules/__snapshots__/music.spec.ts.snap diff --git a/test/__snapshots__/number.spec.ts.snap b/test/modules/__snapshots__/number.spec.ts.snap similarity index 100% rename from test/__snapshots__/number.spec.ts.snap rename to test/modules/__snapshots__/number.spec.ts.snap diff --git a/test/__snapshots__/person.spec.ts.snap b/test/modules/__snapshots__/person.spec.ts.snap similarity index 100% rename from test/__snapshots__/person.spec.ts.snap rename to test/modules/__snapshots__/person.spec.ts.snap diff --git a/test/__snapshots__/phone.spec.ts.snap b/test/modules/__snapshots__/phone.spec.ts.snap similarity index 100% rename from test/__snapshots__/phone.spec.ts.snap rename to test/modules/__snapshots__/phone.spec.ts.snap diff --git a/test/__snapshots__/random.spec.ts.snap b/test/modules/__snapshots__/random.spec.ts.snap similarity index 100% rename from test/__snapshots__/random.spec.ts.snap rename to test/modules/__snapshots__/random.spec.ts.snap diff --git a/test/__snapshots__/science.spec.ts.snap b/test/modules/__snapshots__/science.spec.ts.snap similarity index 100% rename from test/__snapshots__/science.spec.ts.snap rename to test/modules/__snapshots__/science.spec.ts.snap diff --git a/test/__snapshots__/string.spec.ts.snap b/test/modules/__snapshots__/string.spec.ts.snap similarity index 100% rename from test/__snapshots__/string.spec.ts.snap rename to test/modules/__snapshots__/string.spec.ts.snap diff --git a/test/__snapshots__/system.spec.ts.snap b/test/modules/__snapshots__/system.spec.ts.snap similarity index 100% rename from test/__snapshots__/system.spec.ts.snap rename to test/modules/__snapshots__/system.spec.ts.snap diff --git a/test/__snapshots__/vehicle.spec.ts.snap b/test/modules/__snapshots__/vehicle.spec.ts.snap similarity index 100% rename from test/__snapshots__/vehicle.spec.ts.snap rename to test/modules/__snapshots__/vehicle.spec.ts.snap diff --git a/test/__snapshots__/word.spec.ts.snap b/test/modules/__snapshots__/word.spec.ts.snap similarity index 100% rename from test/__snapshots__/word.spec.ts.snap rename to test/modules/__snapshots__/word.spec.ts.snap diff --git a/test/airline.spec.ts b/test/modules/airline.spec.ts similarity index 98% rename from test/airline.spec.ts rename to test/modules/airline.spec.ts index 3f17d1a6814..2cbb47c3a14 100644 --- a/test/airline.spec.ts +++ b/test/modules/airline.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { Aircraft, faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { Aircraft, faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/animal.spec.ts b/test/modules/animal.spec.ts similarity index 85% rename from test/animal.spec.ts rename to test/modules/animal.spec.ts index 210fc5fb324..26344302f63 100644 --- a/test/animal.spec.ts +++ b/test/modules/animal.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/color.spec.ts b/test/modules/color.spec.ts similarity index 98% rename from test/color.spec.ts rename to test/modules/color.spec.ts index 30c81f9419d..4f24fcc33d2 100644 --- a/test/color.spec.ts +++ b/test/modules/color.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { CssFunction, CssSpace, faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { CssFunction, CssSpace, faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/commerce.spec.ts b/test/modules/commerce.spec.ts similarity index 97% rename from test/commerce.spec.ts rename to test/modules/commerce.spec.ts index 743aa58b38d..15ad7aee857 100644 --- a/test/commerce.spec.ts +++ b/test/modules/commerce.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/company.spec.ts b/test/modules/company.spec.ts similarity index 97% rename from test/company.spec.ts rename to test/modules/company.spec.ts index 9811710d3ce..d122238c877 100644 --- a/test/company.spec.ts +++ b/test/modules/company.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/database.spec.ts b/test/modules/database.spec.ts similarity index 93% rename from test/database.spec.ts rename to test/modules/database.spec.ts index 2d58930d3c9..a94012e6694 100644 --- a/test/database.spec.ts +++ b/test/modules/database.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/datatype.spec.ts b/test/modules/datatype.spec.ts similarity index 99% rename from test/datatype.spec.ts rename to test/modules/datatype.spec.ts index 55e81412e37..e3e052ef994 100644 --- a/test/datatype.spec.ts +++ b/test/modules/datatype.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker, FakerError } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker, FakerError } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 25; diff --git a/test/date.spec.ts b/test/modules/date.spec.ts similarity index 99% rename from test/date.spec.ts rename to test/modules/date.spec.ts index 2e48e632145..e3f7a109a01 100644 --- a/test/date.spec.ts +++ b/test/modules/date.spec.ts @@ -1,7 +1,7 @@ import { afterEach, describe, expect, it } from 'vitest'; -import { faker, fakerAZ, FakerError } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker, fakerAZ, FakerError } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const converterMap = [ (d: Date) => d, diff --git a/test/finance.spec.ts b/test/modules/finance.spec.ts similarity index 98% rename from test/finance.spec.ts rename to test/modules/finance.spec.ts index 8437e748713..c5c38a58caf 100644 --- a/test/finance.spec.ts +++ b/test/modules/finance.spec.ts @@ -1,11 +1,11 @@ import isValidBtcAddress from 'validator/lib/isBtcAddress'; import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { FakerError } from '../src/errors/faker-error'; -import ibanLib from '../src/modules/finance/iban'; -import { luhnCheck } from '../src/modules/helpers/luhn-check'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { FakerError } from '../../src/errors/faker-error'; +import ibanLib from '../../src/modules/finance/iban'; +import { luhnCheck } from '../../src/modules/helpers/luhn-check'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/finance_iban.spec.ts b/test/modules/finance_iban.spec.ts similarity index 98% rename from test/finance_iban.spec.ts rename to test/modules/finance_iban.spec.ts index c8462cbe031..5c32fed384c 100644 --- a/test/finance_iban.spec.ts +++ b/test/modules/finance_iban.spec.ts @@ -1,8 +1,8 @@ import validator from 'validator'; import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import ibanLib from '../src/modules/finance/iban'; -import { times } from './support/times'; +import { faker } from '../../src'; +import ibanLib from '../../src/modules/finance/iban'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 25; diff --git a/test/git.spec.ts b/test/modules/git.spec.ts similarity index 97% rename from test/git.spec.ts rename to test/modules/git.spec.ts index 4000e71d413..2b721e8bf71 100644 --- a/test/git.spec.ts +++ b/test/modules/git.spec.ts @@ -1,8 +1,8 @@ import validator from 'validator'; import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/hacker.spec.ts b/test/modules/hacker.spec.ts similarity index 94% rename from test/hacker.spec.ts rename to test/modules/hacker.spec.ts index e6bbcb25968..62821283e0a 100644 --- a/test/hacker.spec.ts +++ b/test/modules/hacker.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/helpers.spec.ts b/test/modules/helpers.spec.ts similarity index 98% rename from test/helpers.spec.ts rename to test/modules/helpers.spec.ts index 67a2de3d1fa..7b709373f24 100644 --- a/test/helpers.spec.ts +++ b/test/modules/helpers.spec.ts @@ -1,9 +1,9 @@ import { describe, expect, it } from 'vitest'; -import { faker, FakerError } from '../src'; -import { luhnCheck } from '../src/modules/helpers/luhn-check'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; -import './vitest-extensions'; +import { faker, FakerError } from '../../src'; +import { luhnCheck } from '../../src/modules/helpers/luhn-check'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; +import './../vitest-extensions'; const NON_SEEDED_BASED_RUN = 5; @@ -806,6 +806,14 @@ describe('helpers', () => { expect(unique).toHaveLength(input.length); }); + it('function with length longer than possible values returns', () => { + const fn = () => faker.helpers.arrayElement(['a', 'b']); + const length = 3; + const unique = faker.helpers.uniqueArray(fn, length); + expect(unique).not.toContainDuplicates(); + expect(unique).toHaveLength(2); + }); + it('works as expected when seeded', () => { const input = ['a', 'a', 'a', 'a', 'a', 'f', 'g', 'h', 'i', 'j']; const length = 5; diff --git a/test/image.spec.ts b/test/modules/image.spec.ts similarity index 99% rename from test/image.spec.ts rename to test/modules/image.spec.ts index 2201e4fdb7e..7cb6aa77d29 100644 --- a/test/image.spec.ts +++ b/test/modules/image.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { seededTests } from './support/seededRuns'; +import { faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; describe('image', () => { seededTests(faker, 'image', (t) => { diff --git a/test/internet.spec.ts b/test/modules/internet.spec.ts similarity index 99% rename from test/internet.spec.ts rename to test/modules/internet.spec.ts index 54b92075698..8ed65bc0261 100644 --- a/test/internet.spec.ts +++ b/test/modules/internet.spec.ts @@ -1,8 +1,8 @@ import validator from 'validator'; import { describe, expect, it } from 'vitest'; -import { allFakers, faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { allFakers, faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/location.spec.ts b/test/modules/location.spec.ts similarity index 98% rename from test/location.spec.ts rename to test/modules/location.spec.ts index 578b91d4cfc..d9ce9c7ffb9 100644 --- a/test/location.spec.ts +++ b/test/modules/location.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker, fakerEN_CA, fakerEN_US, FakerError } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker, fakerEN_CA, fakerEN_US, FakerError } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; function degreesToRadians(degrees: number) { return degrees * (Math.PI / 180.0); diff --git a/test/lorem.spec.ts b/test/modules/lorem.spec.ts similarity index 98% rename from test/lorem.spec.ts rename to test/modules/lorem.spec.ts index ecb2bc34750..08a209c655b 100644 --- a/test/lorem.spec.ts +++ b/test/modules/lorem.spec.ts @@ -1,8 +1,8 @@ import validator from 'validator'; import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/music.spec.ts b/test/modules/music.spec.ts similarity index 87% rename from test/music.spec.ts rename to test/modules/music.spec.ts index f2600b4b423..6f12734be2e 100644 --- a/test/music.spec.ts +++ b/test/modules/music.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/number.spec.ts b/test/modules/number.spec.ts similarity index 99% rename from test/number.spec.ts rename to test/modules/number.spec.ts index c0bdf609de6..19bd8f393d2 100644 --- a/test/number.spec.ts +++ b/test/modules/number.spec.ts @@ -1,7 +1,7 @@ import validator from 'validator'; import { describe, expect, it } from 'vitest'; -import { faker, FakerError } from '../src'; -import { seededTests } from './support/seededRuns'; +import { faker, FakerError } from '../../src'; +import { seededTests } from './../support/seededRuns'; describe('number', () => { seededTests(faker, 'number', (t) => { diff --git a/test/person.spec.ts b/test/modules/person.spec.ts similarity index 98% rename from test/person.spec.ts rename to test/modules/person.spec.ts index 1d4b2ffeac4..7b32af9d05f 100644 --- a/test/person.spec.ts +++ b/test/modules/person.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker, fakerAZ, fakerMK, fakerUK, Sex } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker, fakerAZ, fakerMK, fakerUK, Sex } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/phone.spec.ts b/test/modules/phone.spec.ts similarity index 84% rename from test/phone.spec.ts rename to test/modules/phone.spec.ts index 884cb17804a..ec561acf222 100644 --- a/test/phone.spec.ts +++ b/test/modules/phone.spec.ts @@ -1,8 +1,8 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { luhnCheck } from '../src/modules/helpers/luhn-check'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { luhnCheck } from '../../src/modules/helpers/luhn-check'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 25; diff --git a/test/random.spec.ts b/test/modules/random.spec.ts similarity index 98% rename from test/random.spec.ts rename to test/modules/random.spec.ts index dbdb724d460..21200c3a8f1 100644 --- a/test/random.spec.ts +++ b/test/modules/random.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { Faker, faker, FakerError, fakerZH_CN } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { Faker, faker, FakerError, fakerZH_CN } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/science.spec.ts b/test/modules/science.spec.ts similarity index 95% rename from test/science.spec.ts rename to test/modules/science.spec.ts index bd32e67615c..8ca6d9f5c41 100644 --- a/test/science.spec.ts +++ b/test/modules/science.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/string.spec.ts b/test/modules/string.spec.ts similarity index 99% rename from test/string.spec.ts rename to test/modules/string.spec.ts index f9e7b6c75ac..4b885a3ab5d 100644 --- a/test/string.spec.ts +++ b/test/modules/string.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker, FakerError } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker, FakerError } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/system.spec.ts b/test/modules/system.spec.ts similarity index 98% rename from test/system.spec.ts rename to test/modules/system.spec.ts index fe67dcae7ce..c75e09f55ee 100644 --- a/test/system.spec.ts +++ b/test/modules/system.spec.ts @@ -1,8 +1,8 @@ import validator from 'validator'; import { describe, expect, it } from 'vitest'; -import { faker, fakerSK } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker, fakerSK } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/vehicle.spec.ts b/test/modules/vehicle.spec.ts similarity index 96% rename from test/vehicle.spec.ts rename to test/modules/vehicle.spec.ts index 5136978b609..f691a1fa441 100644 --- a/test/vehicle.spec.ts +++ b/test/modules/vehicle.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/word.spec.ts b/test/modules/word.spec.ts similarity index 96% rename from test/word.spec.ts rename to test/modules/word.spec.ts index 58123a09c62..08fbca4d3c4 100644 --- a/test/word.spec.ts +++ b/test/modules/word.spec.ts @@ -1,8 +1,8 @@ import { describe, expect, it } from 'vitest'; -import { faker } from '../src'; -import { filterWordListByLength } from '../src/modules/word/filterWordListByLength'; -import { seededTests } from './support/seededRuns'; -import { times } from './support/times'; +import { faker } from '../../src'; +import { filterWordListByLength } from '../../src/modules/word/filterWordListByLength'; +import { seededTests } from './../support/seededRuns'; +import { times } from './../support/times'; const NON_SEEDED_BASED_RUN = 5; diff --git a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts index 1e8fc55e2b0..7123a15060d 100644 --- a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts +++ b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts @@ -117,7 +117,9 @@ describe('verify JSDoc tags', () => { mkdirSync(dir, { recursive: true }); const path = resolvePathToMethodFile(moduleName, methodName); - const imports = [...new Set(examples.match(/faker[^\.]*(?=\.)/g))]; + const imports = [ + ...new Set(examples.match(/(?