diff --git a/README.md b/README.md index b6dbd6b89d6..6ee3000570a 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ const { faker } = require('@faker-js/faker'); export function createRandomUser(): User { return { - userId: faker.datatype.uuid(), + userId: faker.string.uuid(), username: faker.internet.userName(), email: faker.internet.email(), avatar: faker.image.avatar(), diff --git a/docs/guide/usage.md b/docs/guide/usage.md index 452e415c269..0cdfb9c44c8 100644 --- a/docs/guide/usage.md +++ b/docs/guide/usage.md @@ -166,7 +166,7 @@ interface User { ... } function createRandomUser(): User { return { - _id: faker.datatype.uuid(), + _id: faker.string.uuid(), avatar: faker.image.avatar(), birthday: faker.date.birthdate(), email: faker.internet.email(), @@ -198,7 +198,7 @@ function createRandomUser(): User { const email = faker.internet.email({ firstName, lastName }); return { - _id: faker.datatype.uuid(), + _id: faker.string.uuid(), avatar: faker.image.avatar(), birthday: faker.date.birthdate(), email, @@ -238,7 +238,7 @@ function createRandomUser(): User { ]); return { - _id: faker.datatype.uuid(), + _id: faker.string.uuid(), avatar: faker.image.avatar(), birthday: faker.date.birthdate(), email, diff --git a/package.json b/package.json index 3e01318d179..a9fd11dd284 100644 --- a/package.json +++ b/package.json @@ -96,26 +96,26 @@ "@algolia/client-search": "~4.17.1", "@types/markdown-it": "~12.2.3", "@types/node": "~20.2.5", - "@types/prettier": "~2.7.2", - "@types/react": "~18.2.7", + "@types/prettier": "~2.7.3", + "@types/react": "~18.2.8", "@types/sanitize-html": "~2.9.0", "@types/semver": "~7.5.0", "@types/validator": "~13.7.17", - "@typescript-eslint/eslint-plugin": "~5.59.7", - "@typescript-eslint/parser": "~5.59.7", - "@vitest/coverage-c8": "~0.31.1", - "@vitest/ui": "~0.31.1", + "@typescript-eslint/eslint-plugin": "~5.59.8", + "@typescript-eslint/parser": "~5.59.8", + "@vitest/coverage-c8": "~0.31.4", + "@vitest/ui": "~0.31.4", "@vueuse/core": "~10.1.2", "c8": "~7.14.0", "conventional-changelog-cli": "~2.2.2", "cypress": "~12.13.0", "esbuild": "~0.17.19", - "eslint": "~8.41.0", + "eslint": "~8.42.0", "eslint-config-prettier": "~8.8.0", "eslint-define-config": "~1.20.0", "eslint-gitignore": "~0.1.0", "eslint-plugin-deprecation": "~1.4.1", - "eslint-plugin-jsdoc": "~45.0.0", + "eslint-plugin-jsdoc": "~46.2.4", "eslint-plugin-prettier": "~4.2.1", "eslint-plugin-vitest": "~0.2.5", "glob": "~10.2.6", @@ -130,12 +130,12 @@ "semver": "~7.5.1", "standard-version": "~9.5.0", "tsx": "~3.12.7", - "typedoc": "~0.24.7", + "typedoc": "~0.24.8", "typescript": "~4.9.5", "validator": "~13.9.0", "vite": "~4.3.9", "vitepress": "1.0.0-beta.1", - "vitest": "~0.31.1", + "vitest": "~0.31.4", "vue": "~3.3.4" }, "packageManager": "pnpm@8.5.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8acd4513b5d..9c7206760fb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,11 +14,11 @@ devDependencies: specifier: ~20.2.5 version: 20.2.5 '@types/prettier': - specifier: ~2.7.2 - version: 2.7.2 + specifier: ~2.7.3 + version: 2.7.3 '@types/react': - specifier: ~18.2.7 - version: 18.2.7 + specifier: ~18.2.8 + version: 18.2.8 '@types/sanitize-html': specifier: ~2.9.0 version: 2.9.0 @@ -29,17 +29,17 @@ devDependencies: specifier: ~13.7.17 version: 13.7.17 '@typescript-eslint/eslint-plugin': - specifier: ~5.59.7 - version: 5.59.7(@typescript-eslint/parser@5.59.7)(eslint@8.41.0)(typescript@4.9.5) + specifier: ~5.59.8 + version: 5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.42.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: ~5.59.7 - version: 5.59.7(eslint@8.41.0)(typescript@4.9.5) + specifier: ~5.59.8 + version: 5.59.8(eslint@8.42.0)(typescript@4.9.5) '@vitest/coverage-c8': - specifier: ~0.31.1 - version: 0.31.1(vitest@0.31.1) + specifier: ~0.31.4 + version: 0.31.4(vitest@0.31.4) '@vitest/ui': - specifier: ~0.31.1 - version: 0.31.1(vitest@0.31.1) + specifier: ~0.31.4 + version: 0.31.4(vitest@0.31.4) '@vueuse/core': specifier: ~10.1.2 version: 10.1.2(vue@3.3.4) @@ -56,29 +56,29 @@ devDependencies: specifier: ~0.17.19 version: 0.17.19 eslint: - specifier: ~8.41.0 - version: 8.41.0 + specifier: ~8.42.0 + version: 8.42.0 eslint-config-prettier: specifier: ~8.8.0 - version: 8.8.0(eslint@8.41.0) + version: 8.8.0(eslint@8.42.0) eslint-define-config: specifier: ~1.20.0 version: 1.20.0 eslint-gitignore: specifier: ~0.1.0 - version: 0.1.0(eslint@8.41.0) + version: 0.1.0(eslint@8.42.0) eslint-plugin-deprecation: specifier: ~1.4.1 - version: 1.4.1(eslint@8.41.0)(typescript@4.9.5) + version: 1.4.1(eslint@8.42.0)(typescript@4.9.5) eslint-plugin-jsdoc: - specifier: ~45.0.0 - version: 45.0.0(eslint@8.41.0) + specifier: ~46.2.4 + version: 46.2.4(eslint@8.42.0) eslint-plugin-prettier: specifier: ~4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.8) + version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.42.0)(prettier@2.8.8) eslint-plugin-vitest: specifier: ~0.2.5 - version: 0.2.5(eslint@8.41.0)(typescript@4.9.5) + version: 0.2.5(eslint@8.42.0)(typescript@4.9.5) glob: specifier: ~10.2.6 version: 10.2.6 @@ -116,8 +116,8 @@ devDependencies: specifier: ~3.12.7 version: 3.12.7 typedoc: - specifier: ~0.24.7 - version: 0.24.7(typescript@4.9.5) + specifier: ~0.24.8 + version: 0.24.8(typescript@4.9.5) typescript: specifier: ~4.9.5 version: 4.9.5 @@ -129,10 +129,10 @@ devDependencies: version: 4.3.9(@types/node@20.2.5) vitepress: specifier: 1.0.0-beta.1 - version: 1.0.0-beta.1(@algolia/client-search@4.17.1)(@types/node@20.2.5)(@types/react@18.2.7)(react-dom@18.2.0)(react@18.2.0) + version: 1.0.0-beta.1(@algolia/client-search@4.17.1)(@types/node@20.2.5)(@types/react@18.2.8)(react-dom@18.2.0)(react@18.2.0) vitest: - specifier: ~0.31.1 - version: 0.31.1(@vitest/ui@0.31.1) + specifier: ~0.31.4 + version: 0.31.4(@vitest/ui@0.31.4) vue: specifier: ~3.3.4 version: 3.3.4 @@ -366,10 +366,10 @@ packages: resolution: {integrity: sha512-Hg8Xfma+rFwRi6Y/pfei4FJoQ1hdVURmmNs/XPoMTCPAImU+d5yxj+M+qdLtNjWRpfWziU4dQcqY94xgFBn2dg==} dev: true - /@docsearch/js@3.4.0(@algolia/client-search@4.17.1)(@types/react@18.2.7)(react-dom@18.2.0)(react@18.2.0): + /@docsearch/js@3.4.0(@algolia/client-search@4.17.1)(@types/react@18.2.8)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-uOtOHZJv+5PQmL68+srVzlGhLejnEBJgZl1bR87Zh/uK5RUI7p6el1R8hGTl2F8K2tCloNRxTMtXyYUNbMV+qw==} dependencies: - '@docsearch/react': 3.4.0(@algolia/client-search@4.17.1)(@types/react@18.2.7)(react-dom@18.2.0)(react@18.2.0) + '@docsearch/react': 3.4.0(@algolia/client-search@4.17.1)(@types/react@18.2.8)(react-dom@18.2.0)(react@18.2.0) preact: 10.15.1 transitivePeerDependencies: - '@algolia/client-search' @@ -378,7 +378,7 @@ packages: - react-dom dev: true - /@docsearch/react@3.4.0(@algolia/client-search@4.17.1)(@types/react@18.2.7)(react-dom@18.2.0)(react@18.2.0): + /@docsearch/react@3.4.0(@algolia/client-search@4.17.1)(@types/react@18.2.8)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-ufrp5879XYGojgS30ZAp8H4qIMbahRHB9M85VDBP36Xgz5QjYM54i1URKj5e219F7gqTtOivfztFTij6itc0MQ==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' @@ -395,7 +395,7 @@ packages: '@algolia/autocomplete-core': 1.8.2 '@algolia/autocomplete-preset-algolia': 1.8.2(@algolia/client-search@4.17.1)(algoliasearch@4.17.1) '@docsearch/css': 3.4.0 - '@types/react': 18.2.7 + '@types/react': 18.2.8 algoliasearch: 4.17.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -631,13 +631,13 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.41.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.42.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} 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.42.0 eslint-visitor-keys: 3.4.1 dev: true @@ -663,13 +663,13 @@ packages: - supports-color dev: true - /@eslint/js@8.41.0: - resolution: {integrity: sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==} + /@eslint/js@8.42.0: + resolution: {integrity: sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@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 @@ -913,16 +913,16 @@ packages: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true - /@types/prettier@2.7.2: - resolution: {integrity: sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==} + /@types/prettier@2.7.3: + resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} dev: true /@types/prop-types@15.7.5: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} dev: true - /@types/react@18.2.7: - resolution: {integrity: sha512-ojrXpSH2XFCmHm7Jy3q44nXDyN54+EYKP2lBhJ2bqfyPj6cIUW/FZW/Csdia34NQgq7KYcAlHi5184m4X88+yw==} + /@types/react@18.2.8: + resolution: {integrity: sha512-lTyWUNrd8ntVkqycEEplasWy2OxNlShj3zqS0LuB1ENUGis5HodmhM7DtCoUGbxj3VW/WsGA0DUhpG6XrM7gPA==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.3 @@ -967,8 +967,8 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin@5.59.7(@typescript-eslint/parser@5.59.7)(eslint@8.41.0)(typescript@4.9.5): - resolution: {integrity: sha512-BL+jYxUFIbuYwy+4fF86k5vdT9lT0CNJ6HtwrIvGh0PhH8s0yy5rjaKH2fDCrz5ITHy07WCzVGNvAmjJh4IJFA==} + /@typescript-eslint/eslint-plugin@5.59.8(@typescript-eslint/parser@5.59.8)(eslint@8.42.0)(typescript@4.9.5): + resolution: {integrity: sha512-JDMOmhXteJ4WVKOiHXGCoB96ADWg9q7efPWHRViT/f09bA8XOMLAVHHju3l0MkZnG1izaWXYmgvQcUjTRcpShQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -979,12 +979,12 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.7(eslint@8.41.0)(typescript@4.9.5) - '@typescript-eslint/scope-manager': 5.59.7 - '@typescript-eslint/type-utils': 5.59.7(eslint@8.41.0)(typescript@4.9.5) - '@typescript-eslint/utils': 5.59.7(eslint@8.41.0)(typescript@4.9.5) + '@typescript-eslint/parser': 5.59.8(eslint@8.42.0)(typescript@4.9.5) + '@typescript-eslint/scope-manager': 5.59.8 + '@typescript-eslint/type-utils': 5.59.8(eslint@8.42.0)(typescript@4.9.5) + '@typescript-eslint/utils': 5.59.8(eslint@8.42.0)(typescript@4.9.5) debug: 4.3.4(supports-color@8.1.1) - eslint: 8.41.0 + eslint: 8.42.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -995,8 +995,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@5.59.7(eslint@8.41.0)(typescript@4.9.5): - resolution: {integrity: sha512-VhpsIEuq/8i5SF+mPg9jSdIwgMBBp0z9XqjiEay+81PYLJuroN+ET1hM5IhkiYMJd9MkTz8iJLt7aaGAgzWUbQ==} + /@typescript-eslint/parser@5.59.8(eslint@8.42.0)(typescript@4.9.5): + resolution: {integrity: sha512-AnR19RjJcpjoeGojmwZtCwBX/RidqDZtzcbG3xHrmz0aHHoOcbWnpDllenRDmDvsV0RQ6+tbb09/kyc+UT9Orw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1005,11 +1005,11 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.59.7 - '@typescript-eslint/types': 5.59.7 - '@typescript-eslint/typescript-estree': 5.59.7(typescript@4.9.5) + '@typescript-eslint/scope-manager': 5.59.8 + '@typescript-eslint/types': 5.59.8 + '@typescript-eslint/typescript-estree': 5.59.8(typescript@4.9.5) debug: 4.3.4(supports-color@8.1.1) - eslint: 8.41.0 + eslint: 8.42.0 typescript: 4.9.5 transitivePeerDependencies: - supports-color @@ -1023,8 +1023,16 @@ packages: '@typescript-eslint/visitor-keys': 5.59.7 dev: true - /@typescript-eslint/type-utils@5.59.7(eslint@8.41.0)(typescript@4.9.5): - resolution: {integrity: sha512-ozuz/GILuYG7osdY5O5yg0QxXUAEoI4Go3Do5xeu+ERH9PorHBPSdvD3Tjp2NN2bNLh1NJQSsQu2TPu/Ly+HaQ==} + /@typescript-eslint/scope-manager@5.59.8: + resolution: {integrity: sha512-/w08ndCYI8gxGf+9zKf1vtx/16y8MHrZs5/tnjHhMLNSixuNcJavSX4wAiPf4aS5x41Es9YPCn44MIe4cxIlig==} + 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 + dev: true + + /@typescript-eslint/type-utils@5.59.8(eslint@8.42.0)(typescript@4.9.5): + resolution: {integrity: sha512-+5M518uEIHFBy3FnyqZUF3BMP+AXnYn4oyH8RF012+e7/msMY98FhGL5SrN29NQ9xDgvqCgYnsOiKp1VjZ/fpA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -1033,10 +1041,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.59.7(typescript@4.9.5) - '@typescript-eslint/utils': 5.59.7(eslint@8.41.0)(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 5.59.8(typescript@4.9.5) + '@typescript-eslint/utils': 5.59.8(eslint@8.42.0)(typescript@4.9.5) debug: 4.3.4(supports-color@8.1.1) - eslint: 8.41.0 + eslint: 8.42.0 tsutils: 3.21.0(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: @@ -1048,6 +1056,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@typescript-eslint/types@5.59.8: + resolution: {integrity: sha512-+uWuOhBTj/L6awoWIg0BlWy0u9TyFpCHrAuQ5bNfxDaZ1Ppb3mx6tUigc74LHcbHpOHuOTOJrBoAnhdHdaea1w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + /@typescript-eslint/typescript-estree@5.59.7(typescript@4.9.5): resolution: {integrity: sha512-4A1NtZ1I3wMN2UGDkU9HMBL+TIQfbrh4uS0WDMMpf3xMRursDbqEf1ahh6vAAe3mObt8k3ZATnezwG4pdtWuUQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1069,19 +1082,60 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@5.59.7(eslint@8.41.0)(typescript@4.9.5): + /@typescript-eslint/typescript-estree@5.59.8(typescript@4.9.5): + resolution: {integrity: sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 5.59.8 + '@typescript-eslint/visitor-keys': 5.59.8 + debug: 4.3.4(supports-color@8.1.1) + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.1 + tsutils: 3.21.0(typescript@4.9.5) + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils@5.59.7(eslint@8.42.0)(typescript@4.9.5): resolution: {integrity: sha512-yCX9WpdQKaLufz5luG4aJbOpdXf/fjwGMcLFXZVPUz3QqLirG5QcwwnIHNf8cjLjxK4qtzTO8udUtMQSAToQnQ==} 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.4.0(eslint@8.41.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.42.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 5.59.7 '@typescript-eslint/types': 5.59.7 '@typescript-eslint/typescript-estree': 5.59.7(typescript@4.9.5) - eslint: 8.41.0 + eslint: 8.42.0 + eslint-scope: 5.1.1 + semver: 7.5.1 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/utils@5.59.8(eslint@8.42.0)(typescript@4.9.5): + resolution: {integrity: sha512-Tr65630KysnNn9f9G7ROF3w1b5/7f6QVCJ+WK9nhIocWmx9F+TmCAcglF26Vm7z8KCTwoKcNEBZrhlklla3CKg==} + 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.4.0(eslint@8.42.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.0 + '@typescript-eslint/scope-manager': 5.59.8 + '@typescript-eslint/types': 5.59.8 + '@typescript-eslint/typescript-estree': 5.59.8(typescript@4.9.5) + eslint: 8.42.0 eslint-scope: 5.1.1 semver: 7.5.1 transitivePeerDependencies: @@ -1097,6 +1151,14 @@ packages: eslint-visitor-keys: 3.4.1 dev: true + /@typescript-eslint/visitor-keys@5.59.8: + resolution: {integrity: sha512-pJhi2ms0x0xgloT7xYabil3SGGlojNNKjK/q6dB3Ey0uJLMjK2UDGJvHieiyJVW/7C3KI+Z4Q3pEHkm4ejA+xQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.59.8 + eslint-visitor-keys: 3.4.1 + dev: true + /@vitejs/plugin-vue@4.2.3(vite@4.3.9)(vue@3.3.4): resolution: {integrity: sha512-R6JDUfiZbJA9cMiguQ7jxALsgiprjBeHL5ikpXfJCH62pPHtI+JdJ5xWj6Ev73yXSlYl86+blXn1kZHQ7uElxw==} engines: {node: ^14.18.0 || >=16.0.0} @@ -1108,8 +1170,8 @@ packages: vue: 3.3.4 dev: true - /@vitest/coverage-c8@0.31.1(vitest@0.31.1): - resolution: {integrity: sha512-6TkjQpmgYez7e3dbAUoYdRXxWN81BojCmUILJwgCy39uZFG33DsQ0rSRSZC9beAEdCZTpxR63nOvd9hxDQcJ0g==} + /@vitest/coverage-c8@0.31.4(vitest@0.31.4): + resolution: {integrity: sha512-VPx368m4DTcpA/P0v3YdVxl4QOSh1DbUcXURLRvDShrIB5KxOgfzw4Bn2R8AhAe/GyiWW/FIsJ/OJdYXCCiC1w==} peerDependencies: vitest: '>=0.30.0 <1' dependencies: @@ -1118,57 +1180,57 @@ packages: magic-string: 0.30.0 picocolors: 1.0.0 std-env: 3.3.3 - vitest: 0.31.1(@vitest/ui@0.31.1) + vitest: 0.31.4(@vitest/ui@0.31.4) dev: true - /@vitest/expect@0.31.1: - resolution: {integrity: sha512-BV1LyNvhnX+eNYzJxlHIGPWZpwJFZaCcOIzp2CNG0P+bbetenTupk6EO0LANm4QFt0TTit+yqx7Rxd1qxi/SQA==} + /@vitest/expect@0.31.4: + resolution: {integrity: sha512-tibyx8o7GUyGHZGyPgzwiaPaLDQ9MMuCOrc03BYT0nryUuhLbL7NV2r/q98iv5STlwMgaKuFJkgBW/8iPKwlSg==} dependencies: - '@vitest/spy': 0.31.1 - '@vitest/utils': 0.31.1 + '@vitest/spy': 0.31.4 + '@vitest/utils': 0.31.4 chai: 4.3.7 dev: true - /@vitest/runner@0.31.1: - resolution: {integrity: sha512-imWuc82ngOtxdCUpXwtEzZIuc1KMr+VlQ3Ondph45VhWoQWit5yvG/fFcldbnCi8DUuFi+NmNx5ehMUw/cGLUw==} + /@vitest/runner@0.31.4: + resolution: {integrity: sha512-Wgm6UER+gwq6zkyrm5/wbpXGF+g+UBB78asJlFkIOwyse0pz8lZoiC6SW5i4gPnls/zUcPLWS7Zog0LVepXnpg==} dependencies: - '@vitest/utils': 0.31.1 + '@vitest/utils': 0.31.4 concordance: 5.0.4 p-limit: 4.0.0 pathe: 1.1.0 dev: true - /@vitest/snapshot@0.31.1: - resolution: {integrity: sha512-L3w5uU9bMe6asrNzJ8WZzN+jUTX4KSgCinEJPXyny0o90fG4FPQMV0OWsq7vrCWfQlAilMjDnOF9nP8lidsJ+g==} + /@vitest/snapshot@0.31.4: + resolution: {integrity: sha512-LemvNumL3NdWSmfVAMpXILGyaXPkZbG5tyl6+RQSdcHnTj6hvA49UAI8jzez9oQyE/FWLKRSNqTGzsHuk89LRA==} dependencies: magic-string: 0.30.0 pathe: 1.1.0 pretty-format: 27.5.1 dev: true - /@vitest/spy@0.31.1: - resolution: {integrity: sha512-1cTpt2m9mdo3hRLDyCG2hDQvRrePTDgEJBFQQNz1ydHHZy03EiA6EpFxY+7ODaY7vMRCie+WlFZBZ0/dQWyssQ==} + /@vitest/spy@0.31.4: + resolution: {integrity: sha512-3ei5ZH1s3aqbEyftPAzSuunGICRuhE+IXOmpURFdkm5ybUADk+viyQfejNk6q8M5QGX8/EVKw+QWMEP3DTJDag==} dependencies: tinyspy: 2.1.0 dev: true - /@vitest/ui@0.31.1(vitest@0.31.1): - resolution: {integrity: sha512-+JJ2+rvRPAVxFLNE+WJOMzOjxqYPn7V2hl00uNwid6kquD+UHTa716Z7szfNeZMLnHOHv+fxq1UgLCymvVpE5w==} + /@vitest/ui@0.31.4(vitest@0.31.4): + resolution: {integrity: sha512-sKM16ITX6HrNFF+lNZ2AQAen4/6Bx2i6KlBfIvkUjcTgc5YII/j2ltcX14oCUv4EA0OTWGQuGhO3zDoAsTENGA==} peerDependencies: vitest: '>=0.30.1 <1' dependencies: - '@vitest/utils': 0.31.1 + '@vitest/utils': 0.31.4 fast-glob: 3.2.12 fflate: 0.7.4 flatted: 3.2.7 pathe: 1.1.0 picocolors: 1.0.0 sirv: 2.0.3 - vitest: 0.31.1(@vitest/ui@0.31.1) + vitest: 0.31.4(@vitest/ui@0.31.4) dev: true - /@vitest/utils@0.31.1: - resolution: {integrity: sha512-yFyRD5ilwojsZfo3E0BnH72pSVSuLg2356cN1tCEe/0RtDzxTPYwOomIC+eQbot7m6DRy4tPZw+09mB7NkbMmA==} + /@vitest/utils@0.31.4: + resolution: {integrity: sha512-DobZbHacWznoGUfYU8XDPY78UubJxXfMNY1+SUdOp1NsI34eopSA6aZMeaGu10waSOeYwE8lxrd/pLfT0RMxjQ==} dependencies: concordance: 5.0.4 loupe: 2.3.6 @@ -1808,7 +1870,7 @@ packages: dev: true /concat-map@0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true /concat-stream@2.0.0: @@ -2414,13 +2476,13 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-prettier@8.8.0(eslint@8.41.0): + /eslint-config-prettier@8.8.0(eslint@8.42.0): resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.41.0 + eslint: 8.42.0 dev: true /eslint-define-config@1.20.0: @@ -2428,7 +2490,7 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13', pnpm: '>= 7.0.0'} dev: true - /eslint-gitignore@0.1.0(eslint@8.41.0): + /eslint-gitignore@0.1.0(eslint@8.42.0): resolution: {integrity: sha512-VFvY5Wyjuz5xXDC/NeONHzsh4YQNok2Gzg4SftAAuhkbrdHv5CChjfiFyLKhRlgOdCJr5kBquaLXHtuDBTW2/Q==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -2436,20 +2498,20 @@ packages: dependencies: array.prototype.flatmap: 1.3.1 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.41.0 + eslint: 8.42.0 fast-glob: 3.2.12 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-deprecation@1.4.1(eslint@8.41.0)(typescript@4.9.5): + /eslint-plugin-deprecation@1.4.1(eslint@8.42.0)(typescript@4.9.5): resolution: {integrity: sha512-4vxTghWzxsBukPJVQupi6xlTuDc8Pyi1QlRCrFiLgwLPMJQW3cJCNaehJUKQqQFvuue5m4W27e179Y3Qjzeghg==} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 typescript: ^3.7.5 || ^4.0.0 || ^5.0.0 dependencies: - '@typescript-eslint/utils': 5.59.7(eslint@8.41.0)(typescript@4.9.5) - eslint: 8.41.0 + '@typescript-eslint/utils': 5.59.7(eslint@8.42.0)(typescript@4.9.5) + eslint: 8.42.0 tslib: 2.5.2 tsutils: 3.21.0(typescript@4.9.5) typescript: 4.9.5 @@ -2457,8 +2519,8 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc@45.0.0(eslint@8.41.0): - resolution: {integrity: sha512-l2+Jcs/Ps7oFA+SWY+0sweU/e5LgricnEl6EsDlyRTF5y0+NWL1y9Qwz9PHwHAxtdJq6lxPjEQWmYLMkvhzD4g==} + /eslint-plugin-jsdoc@46.2.4(eslint@8.42.0): + resolution: {integrity: sha512-QVURyOFEqkUswFOou0w1rfHshRfah7EeTd9laVllO6tb/+ymjPY1IkP16e24yX0BB7jRy8krJi99jHG2UWAPog==} engines: {node: '>=16'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -2468,7 +2530,7 @@ packages: comment-parser: 1.3.1 debug: 4.3.4(supports-color@8.1.1) escape-string-regexp: 4.0.0 - eslint: 8.41.0 + eslint: 8.42.0 esquery: 1.5.0 semver: 7.5.1 spdx-expression-parse: 3.0.1 @@ -2476,7 +2538,7 @@ packages: - supports-color dev: true - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.8.0)(eslint@8.41.0)(prettier@2.8.8): + /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.8.0)(eslint@8.42.0)(prettier@2.8.8): resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -2487,20 +2549,20 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.41.0 - eslint-config-prettier: 8.8.0(eslint@8.41.0) + eslint: 8.42.0 + eslint-config-prettier: 8.8.0(eslint@8.42.0) prettier: 2.8.8 prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-vitest@0.2.5(eslint@8.41.0)(typescript@4.9.5): + /eslint-plugin-vitest@0.2.5(eslint@8.42.0)(typescript@4.9.5): resolution: {integrity: sha512-b15PJg7pzGd2X/RK6yRIHhA0sPJnjwNHytMFpqL8Xhil4C7sMz3bVhsTSisBsZR7AvYcJZotVgwQoVGgk8Sm3Q==} engines: {node: 14.x || >= 16} peerDependencies: eslint: '>=8.0.0' dependencies: - '@typescript-eslint/utils': 5.59.7(eslint@8.41.0)(typescript@4.9.5) - eslint: 8.41.0 + '@typescript-eslint/utils': 5.59.7(eslint@8.42.0)(typescript@4.9.5) + eslint: 8.42.0 transitivePeerDependencies: - supports-color - typescript @@ -2527,16 +2589,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.42.0: + resolution: {integrity: sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.41.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.42.0) '@eslint-community/regexpp': 4.5.1 '@eslint/eslintrc': 2.0.3 - '@eslint/js': 8.41.0 - '@humanwhocodes/config-array': 0.11.8 + '@eslint/js': 8.42.0 + '@humanwhocodes/config-array': 0.11.10 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 @@ -4994,12 +5056,12 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true - /typedoc@0.24.7(typescript@4.9.5): - resolution: {integrity: sha512-zzfKDFIZADA+XRIp2rMzLe9xZ6pt12yQOhCr7cD7/PBTjhPmMyMvGrkZ2lPNJitg3Hj1SeiYFNzCsSDrlpxpKw==} + /typedoc@0.24.8(typescript@4.9.5): + resolution: {integrity: sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==} engines: {node: '>= 14.14'} hasBin: true peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x dependencies: lunr: 2.3.9 marked: 4.3.0 @@ -5100,8 +5162,8 @@ packages: extsprintf: 1.3.0 dev: true - /vite-node@0.31.1(@types/node@20.2.5): - resolution: {integrity: sha512-BajE/IsNQ6JyizPzu9zRgHrBwczkAs0erQf/JRpgTIESpKvNj9/Gd0vxX905klLkb0I0SJVCKbdrl5c6FnqYKA==} + /vite-node@0.31.4(@types/node@20.2.5): + resolution: {integrity: sha512-uzL377GjJtTbuc5KQxVbDu2xfU/x0wVjUtXQR2ihS21q/NK6ROr4oG0rsSkBBddZUVCwzfx22in76/0ZZHXgkQ==} engines: {node: '>=v14.18.0'} hasBin: true dependencies: @@ -5154,12 +5216,12 @@ packages: fsevents: 2.3.2 dev: true - /vitepress@1.0.0-beta.1(@algolia/client-search@4.17.1)(@types/node@20.2.5)(@types/react@18.2.7)(react-dom@18.2.0)(react@18.2.0): + /vitepress@1.0.0-beta.1(@algolia/client-search@4.17.1)(@types/node@20.2.5)(@types/react@18.2.8)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-V2yyCwQ+v9fh7rbnGDLp8M7vHa9sLElexXf/JHtBOsOwv7ed9wt1QI4WUagYgKR3TeoJT9v2s6f0UaQSne0EvQ==} hasBin: true dependencies: '@docsearch/css': 3.4.0 - '@docsearch/js': 3.4.0(@algolia/client-search@4.17.1)(@types/react@18.2.7)(react-dom@18.2.0)(react@18.2.0) + '@docsearch/js': 3.4.0(@algolia/client-search@4.17.1)(@types/react@18.2.8)(react-dom@18.2.0)(react@18.2.0) '@vitejs/plugin-vue': 4.2.3(vite@4.3.9)(vue@3.3.4) '@vue/devtools-api': 6.5.0 '@vueuse/core': 10.1.2(vue@3.3.4) @@ -5196,8 +5258,8 @@ packages: - universal-cookie dev: true - /vitest@0.31.1(@vitest/ui@0.31.1): - resolution: {integrity: sha512-/dOoOgzoFk/5pTvg1E65WVaobknWREN15+HF+0ucudo3dDG/vCZoXTQrjIfEaWvQXmqScwkRodrTbM/ScMpRcQ==} + /vitest@0.31.4(@vitest/ui@0.31.4): + resolution: {integrity: sha512-GoV0VQPmWrUFOZSg3RpQAPN+LPmHg2/gxlMNJlyxJihkz6qReHDV6b0pPDcqFLNEPya4tWJ1pgwUNP9MLmUfvQ==} engines: {node: '>=v14.18.0'} hasBin: true peerDependencies: @@ -5230,12 +5292,12 @@ packages: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 '@types/node': 20.2.5 - '@vitest/expect': 0.31.1 - '@vitest/runner': 0.31.1 - '@vitest/snapshot': 0.31.1 - '@vitest/spy': 0.31.1 - '@vitest/ui': 0.31.1(vitest@0.31.1) - '@vitest/utils': 0.31.1 + '@vitest/expect': 0.31.4 + '@vitest/runner': 0.31.4 + '@vitest/snapshot': 0.31.4 + '@vitest/spy': 0.31.4 + '@vitest/ui': 0.31.4(vitest@0.31.4) + '@vitest/utils': 0.31.4 acorn: 8.8.2 acorn-walk: 8.2.0 cac: 6.7.14 @@ -5251,7 +5313,7 @@ packages: tinybench: 2.5.0 tinypool: 0.5.0 vite: 4.3.9(@types/node@20.2.5) - vite-node: 0.31.1(@types/node@20.2.5) + vite-node: 0.31.4(@types/node@20.2.5) why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/src/faker.ts b/src/faker.ts index f227643edcf..cb56ea61d66 100644 --- a/src/faker.ts +++ b/src/faker.ts @@ -1,4 +1,4 @@ -import type { LocaleDefinition } from './definitions'; +import type { LocaleDefinition, MetadataDefinition } from './definitions'; import { FakerError } from './errors/faker-error'; import { deprecated } from './internal/deprecated'; import type { Mersenne } from './internal/mersenne/mersenne'; @@ -458,6 +458,19 @@ export class Faker { return seed; } + /** + * Returns an object with metadata about the current locale. + * + * @example + * import { faker, fakerES_MX } from '@faker-js/faker'; + * // const { faker, fakerES_MX } = require("@faker-js/faker") + * faker.getMetadata(); // { title: 'English', code: 'en', language: 'en', endonym: 'English', dir: 'ltr', script: 'Latn' } + * fakerES_MX.getMetadata(); // { title: 'Spanish (Mexico)', code: 'es_MX', language: 'es', endonym: 'Español (México)', dir: 'ltr', script: 'Latn', country: 'MX' } + */ + getMetadata(): MetadataDefinition { + return this.rawDefinitions.metadata ?? {}; + } + // Pure JS backwards compatibility /** diff --git a/src/locales/fa/index.ts b/src/locales/fa/index.ts index b169a6f4fe4..910711bea5f 100644 --- a/src/locales/fa/index.ts +++ b/src/locales/fa/index.ts @@ -13,9 +13,11 @@ import internet from './internet'; import location from './location'; import lorem from './lorem'; import metadata from './metadata'; +import music from './music'; import person from './person'; import phone_number from './phone_number'; import vehicle from './vehicle'; +import word from './word'; const fa: LocaleDefinition = { cell_phone, @@ -28,9 +30,11 @@ const fa: LocaleDefinition = { location, lorem, metadata, + music, person, phone_number, vehicle, + word, }; export default fa; diff --git a/src/locales/fa/music/genre.ts b/src/locales/fa/music/genre.ts new file mode 100644 index 00000000000..0d80c874feb --- /dev/null +++ b/src/locales/fa/music/genre.ts @@ -0,0 +1,19 @@ +export default [ + 'راک', + 'متال', + 'پاپ', + 'الکترونیک', + 'محلی', + 'جهانی', + 'کانتری', + 'جاز', + 'فانک', + 'سول', + 'هیپ هاپ', + 'کلاسیک', + 'لاتین', + 'رگه', + 'بلوز', + 'غیرموسیقی', + 'رپ', +]; diff --git a/src/locales/fa/music/index.ts b/src/locales/fa/music/index.ts new file mode 100644 index 00000000000..a2e4a3b6c54 --- /dev/null +++ b/src/locales/fa/music/index.ts @@ -0,0 +1,12 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ +import type { MusicDefinition } from '../../..'; +import genre from './genre'; + +const music: MusicDefinition = { + genre, +}; + +export default music; diff --git a/src/locales/fa/word/adjective.ts b/src/locales/fa/word/adjective.ts new file mode 100644 index 00000000000..53f6142a605 --- /dev/null +++ b/src/locales/fa/word/adjective.ts @@ -0,0 +1,97 @@ +export default [ + 'زیبا', + 'بزرگ', + 'کوچک', + 'قدیمی', + 'جدید', + 'خوب', + 'بد', + 'داغ', + 'سریع', + 'کند', + 'پر', + 'خالی', + 'پرت', + 'خوشحال', + 'غمگین', + 'خسته', + 'شاد', + 'تاریک', + 'روشن', + 'نرم', + 'سخت', + 'دشوار', + 'آسان', + 'پایین', + 'بالا', + 'ضعیف', + 'قوی', + 'نازک', + 'ضخیم', + 'تنگ', + 'گشاد', + 'بارانی', + 'خشک', + 'زنده', + 'مرده', + 'نزدیک', + 'دور', + 'ساده', + 'پیچیده', + 'فوق‌العاده', + 'عادی', + 'گرم', + 'سرد', + 'پوشیده', + 'باز', + 'بسته', + 'بلند', + 'کوتاه', + 'دقیق', + 'نامرئی', + 'مشهور', + 'ناشناخته', + 'پرنده', + 'خیابانی', + 'روستایی', + 'شهری', + 'دانشجویی', + 'کارمندی', + 'تولیدی', + 'ساحلی', + 'کوهستانی', + 'کشاورزی', + 'فنی', + 'علمی', + 'خبری', + 'ورزشی', + 'هنری', + 'شیرین', + 'تلخ', + 'شور', + 'بوییده', + 'بی‌بو', + 'تازه', + 'خراب', + 'شکسته', + 'مناسب', + 'نامناسب', + 'عالی', + 'خام', + 'کامل', + 'ناقص', + 'موفق', + 'ناموفق', + 'سرگرم‌کننده', + 'خسته‌کننده', + 'آشنا', + 'ناشنا', + 'اصلی', + 'ثانوی', + 'محلی', + 'بین‌المللی', + 'فارسی', + 'انگلیسی', + 'مفید', + 'بی‌فایده', +]; diff --git a/src/locales/fa/word/conjunction.ts b/src/locales/fa/word/conjunction.ts new file mode 100644 index 00000000000..ff67ed43bb1 --- /dev/null +++ b/src/locales/fa/word/conjunction.ts @@ -0,0 +1,15 @@ +export default [ + 'و', + 'یا', + 'اما', + 'بلکه', + 'لیکن', + 'زیرا', + 'چون', + 'هر چند', + 'تا', + 'همچنین', + 'بنابراین', + 'اگرچه', + 'همچون', +]; diff --git a/src/locales/fa/word/index.ts b/src/locales/fa/word/index.ts new file mode 100644 index 00000000000..6a1bcd2d274 --- /dev/null +++ b/src/locales/fa/word/index.ts @@ -0,0 +1,22 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ +import type { WordDefinition } from '../../..'; +import adjective from './adjective'; +import conjunction from './conjunction'; +import interjection from './interjection'; +import noun from './noun'; +import preposition from './preposition'; +import verb from './verb'; + +const word: WordDefinition = { + adjective, + conjunction, + interjection, + noun, + preposition, + verb, +}; + +export default word; diff --git a/src/locales/fa/word/interjection.ts b/src/locales/fa/word/interjection.ts new file mode 100644 index 00000000000..506f167eb9b --- /dev/null +++ b/src/locales/fa/word/interjection.ts @@ -0,0 +1,14 @@ +export default [ + 'آه', + 'وای', + 'اوه', + 'اوف', + 'اَخ', + 'آهان', + 'اِی وای', + 'وایسا', + 'آفرین', + 'هورا', + 'واو', + 'یاالله', +]; diff --git a/src/locales/fa/word/noun.ts b/src/locales/fa/word/noun.ts new file mode 100644 index 00000000000..31c1a8d8449 --- /dev/null +++ b/src/locales/fa/word/noun.ts @@ -0,0 +1,108 @@ +export default [ + 'میوه', + 'گل', + 'کتاب', + 'خانه', + 'ماشین', + 'دست', + 'پدر', + 'مادر', + 'بچه', + 'دختر', + 'پسر', + 'مرد', + 'زن', + 'دوست', + 'خواب', + 'آسمان', + 'دریا', + 'شیر', + 'گربه', + 'سگ', + 'میز', + 'صندلی', + 'پنجره', + 'در', + 'روز', + 'ماه', + 'سال', + 'صبح', + 'شب', + 'کوه', + 'درخت', + 'باغ', + 'رنگ', + 'آب', + 'آتش', + 'خورشید', + 'ماهی', + 'پرنده', + 'حیوان', + 'مرغ', + 'میمون', + 'گوش', + 'چشم', + 'زبان', + 'دندان', + 'صدا', + 'خنده', + 'گریه', + 'خیابان', + 'شهر', + 'روستا', + 'مدرسه', + 'دانشگاه', + 'پزشک', + 'دندانپزشک', + 'مهندس', + 'آهنگ', + 'فیلم', + 'تئاتر', + 'نقاشی', + 'عکس', + 'خبر', + 'روزنامه', + 'مجله', + 'تلویزیون', + 'رادیو', + 'موسیقی', + 'رقص', + 'ورزش', + 'فوتبال', + 'بسکتبال', + 'والیبال', + 'شنا', + 'تنیس', + 'بیسبال', + 'هنر', + 'نقش', + 'خواننده', + 'هنرمند', + 'نویسنده', + 'شاعر', + 'کارگر', + 'مدیر', + 'رئیس', + 'کشاورز', + 'فروشنده', + 'مشتری', + 'کامپیوتر', + 'تلفن', + 'اینترنت', + 'موبایل', + 'تبلت', + 'دوربین', + 'نظارت', + 'ساعت', + 'کیف', + 'کفش', + 'لباس', + 'شلوار', + 'پیراهن', + 'دستکش', + 'شال', + 'کلاه', + 'عینک', + 'شامپو', + 'صابون', +]; diff --git a/src/locales/fa/word/preposition.ts b/src/locales/fa/word/preposition.ts new file mode 100644 index 00000000000..edf37015444 --- /dev/null +++ b/src/locales/fa/word/preposition.ts @@ -0,0 +1,59 @@ +export default [ + 'با', + 'بدون', + 'برای', + 'درباره', + 'بین', + 'از', + 'تا', + 'روی', + 'به‌وسیله', + 'در', + 'علی‌رغم', + 'بعد از', + 'قبل از', + 'بالا', + 'پایین', + 'در جلوی', + 'پشت', + 'در کنار', + 'در دسترس', + 'در ضد', + 'نزد', + 'در عین حال', + 'برابر با', + 'میان', + 'در عوض', + 'به دلیل', + 'نزدیک', + 'دور', + 'با توجه به', + 'به عنوان', + 'علاوه بر', + 'با هم', + 'با احترام به', + 'برخلاف', + 'به‌روز', + 'تحت', + 'به طوری که', + 'به صورت', + 'به عنوان مثال', + 'علاوه بر آن', + 'با توجه به این که', + 'تا حدودی', + 'با اطمینان', + 'با هر شک', + 'با استفاده از', + 'بدون توجه به', + 'تا حد امکان', + 'به طور عمده', + 'به نسبت', + 'به تناسب', + 'به نظر', + 'به طور کامل', + 'در برابر', + 'به هیچ وجه', + 'در مقابل', + 'به نوعی', + 'به ترتیب', +]; diff --git a/src/locales/fa/word/verb.ts b/src/locales/fa/word/verb.ts new file mode 100644 index 00000000000..a8233ae5663 --- /dev/null +++ b/src/locales/fa/word/verb.ts @@ -0,0 +1,73 @@ +export default [ + 'رفتن', + 'آمدن', + 'خوردن', + 'نوشیدن', + 'خواندن', + 'نوشتن', + 'دیدن', + 'شنیدن', + 'گفتن', + 'بودن', + 'داشتن', + 'آغاز کردن', + 'پایان دادن', + 'شروع کردن', + 'تمام کردن', + 'کمک کردن', + 'انجام دادن', + 'فهمیدن', + 'تلاش کردن', + 'بازی کردن', + 'درک کردن', + 'انتظار داشتن', + 'احساس کردن', + 'مشاهده کردن', + 'باختن', + 'برنده شدن', + 'می‌دانستن', + 'فکر کردن', + 'علاقه داشتن', + 'خواستن', + 'امیدوار بودن', + 'باور کردن', + 'پیشنهاد دادن', + 'قبول کردن', + 'رد کردن', + 'راه انداختن', + 'پیروی کردن', + 'واکنش نشان دادن', + 'گذاشتن', + 'دریافت کردن', + 'دست یافتن', + 'مجبور کردن', + 'می‌خواستن', + 'نشان دادن', + 'پشتیبانی کردن', + 'رسیدن', + 'فراموش کردن', + 'انتخاب کردن', + 'ترجیح دادن', + 'تصمیم گرفتن', + 'تشویق کردن', + 'رهبری کردن', + 'درست کردن', + 'گم شدن', + 'ساختن', + 'سفارش دادن', + 'سازماندهی کردن', + 'توجه داشتن', + 'خوابیدن', + 'سرگرم شدن', + 'جواب دادن', + 'عکس العمل نشان دادن', + 'درخواست کردن', + 'تسلط داشتن', + 'شک کردن', + 'اطمینان داشتن', + 'باور نکردن', + 'آرام کردن', + 'نیاز داشتن', + 'عوض کردن', + 'تغییر دادن', +]; diff --git a/src/locales/hu/commerce/color.ts b/src/locales/hu/color/human.ts similarity index 100% rename from src/locales/hu/commerce/color.ts rename to src/locales/hu/color/human.ts diff --git a/src/locales/hu/color/index.ts b/src/locales/hu/color/index.ts new file mode 100644 index 00000000000..e7cf1e89436 --- /dev/null +++ b/src/locales/hu/color/index.ts @@ -0,0 +1,12 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ +import type { ColorDefinition } from '../../..'; +import human from './human'; + +const color: ColorDefinition = { + human, +}; + +export default color; diff --git a/src/locales/hu/commerce/index.ts b/src/locales/hu/commerce/index.ts index cc7c4e7b1a1..29c9eeb2006 100644 --- a/src/locales/hu/commerce/index.ts +++ b/src/locales/hu/commerce/index.ts @@ -3,13 +3,11 @@ * Run 'pnpm run generate:locales' to update. */ import type { CommerceDefinition } from '../../..'; -import color from './color'; import department from './department'; import product_description from './product_description'; import product_name from './product_name'; const commerce: CommerceDefinition = { - color, department, product_description, product_name, diff --git a/src/locales/hu/index.ts b/src/locales/hu/index.ts index 9e4387810b0..8ae89f488c8 100644 --- a/src/locales/hu/index.ts +++ b/src/locales/hu/index.ts @@ -4,6 +4,7 @@ */ import type { LocaleDefinition } from '../..'; import animal from './animal'; +import color from './color'; import commerce from './commerce'; import company from './company'; import date from './date'; @@ -17,6 +18,7 @@ import word from './word'; const hu: LocaleDefinition = { animal, + color, commerce, company, date, diff --git a/src/locales/ja/location/country.ts b/src/locales/ja/location/country.ts index 68582948855..49f94fcdcfc 100644 --- a/src/locales/ja/location/country.ts +++ b/src/locales/ja/location/country.ts @@ -1,21 +1,11 @@ export default [ - 'アフリカ', - '南極大陸', - 'アジア', - 'ヨーロッパ', - '北アメリカ', - '南アメリカ', - '南極', - '北極', 'アフガニスタン', 'アルバニア', 'アルジェリア', 'アメリカ', - '米国', 'アンゴラ', 'アルゼンチン', 'オーストラリア', - '濠洲', 'オーストリア', 'バハマ', 'バーレーン', @@ -59,7 +49,6 @@ export default [ 'ガンビア', 'ドイツ', 'ガーナ', - '英国', 'イギリス', 'ギリシャ', 'グリーンランド', @@ -103,7 +92,6 @@ export default [ 'メキシコ', 'モルドバ', 'モナコ', - '蒙古', 'モンゴル', 'モロッコ', 'モザンビーク', diff --git a/src/locales/ja/location/direction.ts b/src/locales/ja/location/direction.ts new file mode 100644 index 00000000000..cefead57aa1 --- /dev/null +++ b/src/locales/ja/location/direction.ts @@ -0,0 +1 @@ +export default ['北', '東', '南', '西', '北東', '北西', '南東', '南西']; diff --git a/src/locales/ja/location/index.ts b/src/locales/ja/location/index.ts index a4dfdd5567a..7f5d9e6564a 100644 --- a/src/locales/ja/location/index.ts +++ b/src/locales/ja/location/index.ts @@ -7,6 +7,7 @@ import city_pattern from './city_pattern'; import city_prefix from './city_prefix'; import city_suffix from './city_suffix'; import country from './country'; +import direction from './direction'; import postcode from './postcode'; import state from './state'; import state_abbr from './state_abbr'; @@ -17,6 +18,7 @@ const location: LocationDefinition = { city_prefix, city_suffix, country, + direction, postcode, state, state_abbr, diff --git a/src/locales/ja/person/first_name.ts b/src/locales/ja/person/first_name.ts index 1f99283dd9c..40a647ec054 100644 --- a/src/locales/ja/person/first_name.ts +++ b/src/locales/ja/person/first_name.ts @@ -1,23 +1,8 @@ -export default [ - '大翔', - '蓮', - '颯太', - '樹', - '大和', - '陽翔', - '陸斗', - '太一', - '海翔', - '蒼空', - '翼', - '陽菜', - '結愛', - '結衣', - '杏', - '莉子', - '美羽', - '結菜', - '心愛', - '愛菜', - '美咲', -]; +// We don't have a generic first name list for this locale +// So simply concatenate male and female lists and remove any duplicates +// This avoids falling back to fallback locale +import { mergeArrays } from './../../../internal/merge'; +import female_first_name from './female_first_name'; +import male_first_name from './male_first_name'; + +export default mergeArrays(female_first_name, male_first_name); diff --git a/src/locales/ne/location/index.ts b/src/locales/ne/location/index.ts index 6939f44e661..4fd0e9be7c6 100644 --- a/src/locales/ne/location/index.ts +++ b/src/locales/ne/location/index.ts @@ -6,6 +6,7 @@ import type { LocationDefinition } from '../../..'; import city_name from './city_name'; import city_pattern from './city_pattern'; import default_country from './default_country'; +import postcode from './postcode'; import state from './state'; import street_pattern from './street_pattern'; @@ -13,6 +14,7 @@ const location: LocationDefinition = { city_name, city_pattern, default_country, + postcode, state, street_pattern, }; diff --git a/src/locales/ne/location/postcode.ts b/src/locales/ne/location/postcode.ts new file mode 100644 index 00000000000..b05a8a69846 --- /dev/null +++ b/src/locales/ne/location/postcode.ts @@ -0,0 +1,2 @@ +// https://www.gpo.gov.np/Home/Postalcode +export default ['1####', '2####', '3####', '4####', '5####']; diff --git a/src/locales/zh_CN/company/category.ts b/src/locales/zh_CN/company/category.ts new file mode 100644 index 00000000000..c58bbcb744f --- /dev/null +++ b/src/locales/zh_CN/company/category.ts @@ -0,0 +1,16 @@ +export default [ + '水产', + '林业', + '矿业', + '建设', + '食品', + '印刷', + '电力', + '燃气', + '网络科技', + '物流', + '保险', + '旅游发展', + '传媒', + '运输', +]; diff --git a/src/locales/zh_CN/company/index.ts b/src/locales/zh_CN/company/index.ts new file mode 100644 index 00000000000..290ceacffa8 --- /dev/null +++ b/src/locales/zh_CN/company/index.ts @@ -0,0 +1,16 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ +import type { CompanyDefinition } from '../../..'; +import category from './category'; +import name_pattern from './name_pattern'; +import type_ from './type'; + +const company: CompanyDefinition = { + category, + name_pattern, + type: type_, +}; + +export default company; diff --git a/src/locales/zh_CN/company/name_pattern.ts b/src/locales/zh_CN/company/name_pattern.ts new file mode 100644 index 00000000000..4877a982f73 --- /dev/null +++ b/src/locales/zh_CN/company/name_pattern.ts @@ -0,0 +1,4 @@ +export default [ + '{{location.state}}{{person.first_name}}{{company.category}}{{company.type}}', + '{{location.city}}{{person.first_name}}{{company.category}}{{company.type}}', +]; diff --git a/src/locales/zh_CN/company/type.ts b/src/locales/zh_CN/company/type.ts new file mode 100644 index 00000000000..b40e55cf86e --- /dev/null +++ b/src/locales/zh_CN/company/type.ts @@ -0,0 +1,9 @@ +export default [ + '有限责任公司', + '股份有限公司', + '有限公司', + '(集团)有限公司', + '集团有限公司', + '无限公司', + '无限责任公司', +]; diff --git a/src/locales/zh_CN/index.ts b/src/locales/zh_CN/index.ts index f5180eef04d..91cd9e55e1e 100644 --- a/src/locales/zh_CN/index.ts +++ b/src/locales/zh_CN/index.ts @@ -3,6 +3,7 @@ * Run 'pnpm run generate:locales' to update. */ import type { LocaleDefinition } from '../..'; +import company from './company'; import internet from './internet'; import location from './location'; import metadata from './metadata'; @@ -10,6 +11,7 @@ import person from './person'; import phone_number from './phone_number'; const zh_CN: LocaleDefinition = { + company, internet, location, metadata, diff --git a/test/faker.spec.ts b/test/faker.spec.ts index 207dac4a7a3..7a305c94788 100644 --- a/test/faker.spec.ts +++ b/test/faker.spec.ts @@ -30,6 +30,14 @@ describe('faker', () => { } }); + describe('getMetadata()', () => { + it('should return metadata for the locale', () => { + expect(faker.getMetadata()).toBeDefined(); + expect(faker.getMetadata().title).toBeTypeOf('string'); + // Not all properties are tested here, see locale-imports.spec.ts for full tests + }); + }); + describe('rawDefinitions', () => { it('locale rawDefinition accessibility', () => { // Metadata