diff --git a/.eslintrc.js b/.eslintrc.js index 5a69444ee80..f4bb960d373 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,6 +2,12 @@ const { defineConfig } = require('eslint-define-config'); const { readGitignoreFiles } = require('eslint-gitignore'); +/// +/// +/// +/// +/// + module.exports = defineConfig({ ignorePatterns: [ ...readGitignoreFiles(), @@ -15,7 +21,7 @@ module.exports = defineConfig({ reportUnusedDisableDirectives: true, extends: [ 'eslint:recommended', - 'plugin:@typescript-eslint/recommended-type-checked', + 'plugin:@typescript-eslint/strict-type-checked', 'plugin:prettier/recommended', 'plugin:deprecation/recommended', 'plugin:jsdoc/recommended-typescript-error', @@ -29,6 +35,7 @@ module.exports = defineConfig({ eqeqeq: ['error', 'always', { null: 'ignore' }], 'no-else-return': 'error', 'no-restricted-globals': ['error', 'Intl'], + 'prefer-exponentiation-operator': 'error', 'prefer-template': 'error', 'unicorn/no-nested-ternary': 'off', // incompatible with prettier @@ -50,16 +57,11 @@ module.exports = defineConfig({ 'unicorn/consistent-function-scoping': 'off', 'unicorn/import-style': 'off', 'unicorn/no-array-callback-reference': 'off', - 'unicorn/no-array-reduce': 'off', 'unicorn/no-await-expression-member': 'off', - 'unicorn/no-negated-condition': 'off', 'unicorn/no-object-as-default-parameter': 'off', 'unicorn/no-useless-switch-case': 'off', 'unicorn/numeric-separators-style': 'off', - 'unicorn/prefer-code-point': 'off', 'unicorn/prefer-export-from': 'off', - 'unicorn/prefer-module': 'off', - 'unicorn/prefer-negative-index': 'off', 'unicorn/prefer-string-slice': 'off', 'unicorn/prevent-abbreviations': 'off', 'unicorn/require-array-join-separator': 'off', @@ -91,6 +93,7 @@ module.exports = defineConfig({ 'error', { ignoreParameters: true }, ], + '@typescript-eslint/no-unnecessary-condition': 'off', // requires `strictNullChecks` to be enabled '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', @@ -103,7 +106,16 @@ module.exports = defineConfig({ 'error', { allowNumber: true, allowBoolean: true }, ], + '@typescript-eslint/switch-exhaustiveness-check': [ + 'error', + { requireDefaultForNonUnion: true }, + ], '@typescript-eslint/unbound-method': 'off', + '@typescript-eslint/unified-signatures': 'off', // incompatible with our api docs generation + + // TODO @ST-DDT 2023-10-10: The following rules currently conflict with our code. + // Each rule should be checked whether it should be enabled/configured and the problems fixed, or stay disabled permanently. + '@typescript-eslint/no-confusing-void-expression': 'off', 'jsdoc/require-jsdoc': 'off', // Enabled only for src/**/*.ts 'jsdoc/require-returns': 'off', diff --git a/.github/workflows/comment-issue.yml b/.github/workflows/comment-issue.yml index 4bf1bc2f4fc..045b377a2f0 100644 --- a/.github/workflows/comment-issue.yml +++ b/.github/workflows/comment-issue.yml @@ -13,7 +13,7 @@ jobs: issues: write steps: - name: Add Comment For User Interest - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: script: | github.rest.issues.createComment({ @@ -49,7 +49,7 @@ jobs: }) - name: React to Issue - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: script: | github.rest.reactions.createForIssue({ diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 604befa794e..816f4a0c337 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -53,7 +53,7 @@ jobs: run: pnpm exec tsc .github/workflows/commentCodeGeneration.ts --outDir .github/workflows - name: Comment - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: script: | const script = require('${{ github.workspace }}/.github/workflows/commentCodeGeneration.js') diff --git a/.prettierrc.d.ts b/.prettierrc.d.ts new file mode 100644 index 00000000000..806a7063dff --- /dev/null +++ b/.prettierrc.d.ts @@ -0,0 +1,4 @@ +import type { Options } from 'prettier'; + +declare const options: Options; +export = options; diff --git a/CHANGELOG.md b/CHANGELOG.md index 98cfc8b2cd2..667b725e798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,40 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [8.3.1](https://github.com/faker-js/faker/compare/v8.3.0...v8.3.1) (2023-11-14) + + +### Bug Fixes + +* remove `[@internal](https://github.com/internal)` from module parent classes ([#2548](https://github.com/faker-js/faker/issues/2548)) ([77f54ad](https://github.com/faker-js/faker/commit/77f54ad78f9d7952b3b315f72878267f18ed1e69)) + +## [8.3.0](https://github.com/faker-js/faker/compare/v8.2.0...v8.3.0) (2023-11-14) + + +### Features + +* **person:** use fake patterns for jobTitle ([#2528](https://github.com/faker-js/faker/issues/2528)) ([b40ad45](https://github.com/faker-js/faker/commit/b40ad45ad3cca6769968a63264e6d925bf4b328a)) + + +### Bug Fixes + +* **date:** ensures correct range for birthdate ([#2535](https://github.com/faker-js/faker/issues/2535)) ([7ce8c28](https://github.com/faker-js/faker/commit/7ce8c285cb5b2d13e95a17be78ecbd52f3c7d9db)) +* **finance:** maskedNumber has incorrect defaults ([#2494](https://github.com/faker-js/faker/issues/2494)) ([e0ba50b](https://github.com/faker-js/faker/commit/e0ba50b37e438503ed1899bff35afc92b4f8f49c)) +* **locale:** improve Swedish phone numbers format ([#2520](https://github.com/faker-js/faker/issues/2520)) ([e4865df](https://github.com/faker-js/faker/commit/e4865df199359797397cc3c5455f3a1a9c179f93)) + + +### Changed Locales + +* **locale:** remove fr_CH data which is identical to fr ([#2526](https://github.com/faker-js/faker/issues/2526)) ([fafcba4](https://github.com/faker-js/faker/commit/fafcba473f8a91eeb8230ebdc1ad5039b25091e1)) + + +### New Locales + +* **locale:** add person to fr_SN ([#2537](https://github.com/faker-js/faker/issues/2537)) ([ef965da](https://github.com/faker-js/faker/commit/ef965da48a8089e6bb19bcf260bfcd8af1a43799)) +* **locale:** add Senegal locale ([#2525](https://github.com/faker-js/faker/issues/2525)) ([6df70bc](https://github.com/faker-js/faker/commit/6df70bce16500ab74a37f932f2e17a08f297430b)) +* **locale:** add streets to location fr_SN ([#2536](https://github.com/faker-js/faker/issues/2536)) ([36fc517](https://github.com/faker-js/faker/commit/36fc517d17591c8ea1d5135d9a93c7591e3d1f74)) +* **locale:** and location to fr_SN ([#2533](https://github.com/faker-js/faker/issues/2533)) ([f730125](https://github.com/faker-js/faker/commit/f730125ffb941fe936d6a18c775cbe3a99b312dc)) + ## [8.2.0](https://github.com/faker-js/faker/compare/v8.1.0...v8.2.0) (2023-10-14) diff --git a/LICENSE b/LICENSE index b0ade127db6..06104afe95e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Faker - Copyright (c) 2022-2023 +Faker - Copyright (c) 2022-2024 This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history diff --git a/cypress/e2e/api.cy.ts b/cypress/e2e/api.cy.ts index be61f5dfc5b..e87ea856f50 100644 --- a/cypress/e2e/api.cy.ts +++ b/cypress/e2e/api.cy.ts @@ -34,7 +34,7 @@ describe('API Test', () => { cy.get('.api-group li').each(($el) => { const anchor = $el.find('a'); const text = anchor.text(); - const link = anchor.attr('href').split('#')[0]; + const link = anchor.attr('href')?.split('#')[0] ?? 'MISSING'; if (checked.has(link)) { return; } diff --git a/docs/.vitepress/api-pages.ts b/docs/.vitepress/api-pages.ts index dad86954967..c23e6cfc466 100644 --- a/docs/.vitepress/api-pages.ts +++ b/docs/.vitepress/api-pages.ts @@ -4,32 +4,37 @@ export const apiPages = [ { text: 'Overview', link: '/api/' }, { text: 'Faker', link: '/api/faker.html' }, { text: 'SimpleFaker', link: '/api/simpleFaker.html' }, - { text: 'Airline', link: '/api/airline.html' }, - { text: 'Animal', link: '/api/animal.html' }, - { text: 'Color', link: '/api/color.html' }, - { text: 'Commerce', link: '/api/commerce.html' }, - { text: 'Company', link: '/api/company.html' }, - { text: 'Database', link: '/api/database.html' }, - { text: 'Datatype', link: '/api/datatype.html' }, - { text: 'Date', link: '/api/date.html' }, - { text: 'Finance', link: '/api/finance.html' }, - { text: 'Git', link: '/api/git.html' }, - { text: 'Hacker', link: '/api/hacker.html' }, - { text: 'Helpers', link: '/api/helpers.html' }, - { text: 'Image', link: '/api/image.html' }, - { text: 'Internet', link: '/api/internet.html' }, - { text: 'Location', link: '/api/location.html' }, - { text: 'Lorem', link: '/api/lorem.html' }, - { text: 'Music', link: '/api/music.html' }, - { text: 'Number', link: '/api/number.html' }, - { text: 'Person', link: '/api/person.html' }, - { text: 'Phone', link: '/api/phone.html' }, - { text: 'Random', link: '/api/random.html' }, - { text: 'Science', link: '/api/science.html' }, - { text: 'String', link: '/api/string.html' }, - { text: 'System', link: '/api/system.html' }, - { text: 'Vehicle', link: '/api/vehicle.html' }, - { text: 'Word', link: '/api/word.html' }, { text: 'Randomizer', link: '/api/randomizer.html' }, { text: 'Utilities', link: '/api/utils.html' }, + { + text: 'Modules', + items: [ + { text: 'Airline', link: '/api/airline.html' }, + { text: 'Animal', link: '/api/animal.html' }, + { text: 'Color', link: '/api/color.html' }, + { text: 'Commerce', link: '/api/commerce.html' }, + { text: 'Company', link: '/api/company.html' }, + { text: 'Database', link: '/api/database.html' }, + { text: 'Datatype', link: '/api/datatype.html' }, + { text: 'Date', link: '/api/date.html' }, + { text: 'Finance', link: '/api/finance.html' }, + { text: 'Git', link: '/api/git.html' }, + { text: 'Hacker', link: '/api/hacker.html' }, + { text: 'Helpers', link: '/api/helpers.html' }, + { text: 'Image', link: '/api/image.html' }, + { text: 'Internet', link: '/api/internet.html' }, + { text: 'Location', link: '/api/location.html' }, + { text: 'Lorem', link: '/api/lorem.html' }, + { text: 'Music', link: '/api/music.html' }, + { text: 'Number', link: '/api/number.html' }, + { text: 'Person', link: '/api/person.html' }, + { text: 'Phone', link: '/api/phone.html' }, + { text: 'Random', link: '/api/random.html' }, + { text: 'Science', link: '/api/science.html' }, + { text: 'String', link: '/api/string.html' }, + { text: 'System', link: '/api/system.html' }, + { text: 'Vehicle', link: '/api/vehicle.html' }, + { text: 'Word', link: '/api/word.html' }, + ], + }, ]; diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 12fea107d34..eaf99abd5c0 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,7 +1,12 @@ -import { defineConfig } from 'vitepress'; -import { DefaultTheme } from 'vitepress/theme'; +import type { UserConfig } from 'vitepress'; +import type { DefaultTheme } from 'vitepress/theme'; import { apiPages } from './api-pages'; -import { currentVersion, oldVersions, versionBannerInfix } from './versions'; +import { + algoliaIndex, + currentVersion, + oldVersions, + versionBannerInfix, +} from './versions'; type SidebarItem = DefaultTheme.SidebarItem; @@ -55,7 +60,8 @@ function extendSideNav(current: SidebarItem): SidebarItem[] { return links; } -const config = defineConfig({ +// TODO @Shinigami92 2023-12-28: reuse `defineConfig` from vitepress, when we can go esm-only +const config: UserConfig = { title: 'Faker', description, @@ -121,11 +127,14 @@ const config = defineConfig({ { icon: 'github', link: 'https://github.com/faker-js/faker' }, ], - algolia: { - apiKey: process.env.API_KEY, - appId: process.env.APP_ID, - indexName: 'fakerjs', - }, + algolia: + process.env.API_KEY == null || process.env.APP_ID == null + ? undefined + : { + apiKey: process.env.API_KEY, + appId: process.env.APP_ID, + indexName: algoliaIndex, + }, footer: { message: 'Released under the MIT License.', @@ -140,7 +149,7 @@ const config = defineConfig({ link: '/api/', }, { - text: 'Ecosystem', + text: 'Try it', items: [{ text: 'StackBlitz ', link: 'https://fakerjs.dev/new' }], }, { @@ -256,7 +265,7 @@ const config = defineConfig({ __BANNER__: versionBannerInfix ?? false, }, }, -}); +}; if (versionBannerInfix) { config.head?.push([ diff --git a/docs/.vitepress/theme/index.css b/docs/.vitepress/theme/index.css index f6981bb9eaf..0d8e1853738 100644 --- a/docs/.vitepress/theme/index.css +++ b/docs/.vitepress/theme/index.css @@ -15,6 +15,6 @@ table td ul li { } .VPHero .action:not(:last-child) a.VPButton.alt { - border-color: var(--vp-button-brand-border) !important; - color: var(--vp-button-brand-border) !important; + border-color: var(--vp-button-brand-bg) !important; + color: var(--vp-button-brand-text) !important; } diff --git a/docs/.vitepress/versions.ts b/docs/.vitepress/versions.ts index 2964557cee9..a44b65c39ba 100644 --- a/docs/.vitepress/versions.ts +++ b/docs/.vitepress/versions.ts @@ -14,18 +14,23 @@ function readOtherLatestReleaseTagNames(): string[] { .toString('utf8') .split('\n') .filter((tag) => semver.valid(tag)) - .reduce>((acc, tag) => { - const majorVersion = semver.major(tag); + .filter((tag) => { // Only consider tags for our deployed website versions, // excluding the current major version. - if (majorVersion >= 6 && majorVersion !== currentMajorVersion) { - (acc[majorVersion] = acc[majorVersion] ?? []).push(tag); + const majorVersion = semver.major(tag); + return majorVersion >= 6 && majorVersion !== currentMajorVersion; + }) + .reduce>((latestTagByMajor, tag) => { + const majorVersion = semver.major(tag); + + const latestTag = latestTagByMajor[majorVersion]; + if (latestTag == null || semver.lt(latestTag, tag)) { + latestTagByMajor[majorVersion] = tag; } - return acc; + + return latestTagByMajor; }, {}); - return Object.entries(latestReleaseTagNames) - .map(([major, tags]) => semver.maxSatisfying(tags, `^${major}`)) - .sort(semver.rcompare); + return Object.values(latestReleaseTagNames).sort(semver.rcompare); } // Set by netlify @@ -69,3 +74,7 @@ export const oldVersions = [ link: `https://v${semver.major(version)}.fakerjs.dev/`, })), ].filter(({ link }) => link !== hiddenLink); + +export const algoliaIndex = isReleaseBranch + ? `fakerjs-v${semver.major(version)}` + : 'fakerjs-next'; diff --git a/docs/api/ApiIndex.vue b/docs/api/ApiIndex.vue index 7ef64a802dc..3d2130cd83e 100644 --- a/docs/api/ApiIndex.vue +++ b/docs/api/ApiIndex.vue @@ -120,7 +120,7 @@ h2 { h3 { letter-spacing: -0.01em; - color: var(--vp-c-green); + color: var(--vp-c-brand-1); font-size: 18px; margin-bottom: 1em; transition: color 0.5s; @@ -147,7 +147,7 @@ h3 { } .api-groups ul a:hover { - color: var(--vp-c-green); + color: var(--vp-c-brand-1); transition: none; } @@ -181,7 +181,7 @@ h3 { } .api-filter:focus { - border-color: var(--vp-c-green-light); + border-color: var(--vp-c-brand-2); } .no-match { diff --git a/docs/guide/frameworks.md b/docs/guide/frameworks.md index 4dec853f717..3b0cd6f39c1 100644 --- a/docs/guide/frameworks.md +++ b/docs/guide/frameworks.md @@ -98,3 +98,39 @@ describe('Testing the application', () => { }); }); ``` + +## Playwright + +Integration with [Playwright](https://playwright.dev/) is also easy: + +```ts +import { faker } from '@faker-js/faker/locale/en'; +import { expect, test } from '@playwright/test'; + +test.describe('Testing the application', () => { + test('should create an account with username and password', async ({ + page, + }) => { + const username = faker.internet.userName(); + const password = faker.internet.password(); + const email = faker.internet.exampleEmail(); + + // Visit the webpage and create an account. + await page.goto('https://www.example.com/register'); + await page.getByLabel('email').fill(email); + await page.getByLabel('username').fill(username); + await page.getByLabel('password', { exact: true }).fill(password); + await page.getByLabel('confirm password').fill(password); + await page.getByRole('button', { name: 'Register' }).click(); + + // Now, we try to login with these credentials. + await page.goto('https://www.example.com/login'); + await page.getByLabel('email').fill(email); + await page.getByLabel('password').fill(password); + await page.getByRole('button', { name: 'Login' }).click(); + + // We should have logged in successfully to the dashboard page. + await expect(page).toHaveURL(/.*dashboard/); + }); +}); +``` diff --git a/docs/guide/localization.md b/docs/guide/localization.md index 44f5f2fe034..8f8c1333d5b 100644 --- a/docs/guide/localization.md +++ b/docs/guide/localization.md @@ -108,6 +108,7 @@ In this example there are 5 locales. Each of these is checked in order, and the | `fr_CA` | French (Canada) | `fakerFR_CA` | | `fr_CH` | French (Switzerland) | `fakerFR_CH` | | `fr_LU` | French (Luxembourg) | `fakerFR_LU` | +| `fr_SN` | French (Senegal) | `fakerFR_SN` | | `he` | Hebrew | `fakerHE` | | `hr` | Croatian | `fakerHR` | | `hu` | Hungarian | `fakerHU` | diff --git a/package.json b/package.json index 7586c57c06a..cc2e1b212f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@faker-js/faker", - "version": "8.2.0", + "version": "8.3.1", "description": "Generate massive amounts of fake contextual data", "keywords": [ "faker", @@ -88,45 +88,50 @@ }, "devDependencies": { "@actions/github": "~6.0.0", - "@algolia/client-search": "~4.19.1", - "@types/markdown-it": "~13.0.4", - "@types/node": "~20.8.7", - "@types/sanitize-html": "~2.9.3", - "@types/semver": "~7.5.4", - "@types/validator": "~13.11.5", - "@typescript-eslint/eslint-plugin": "~6.9.0", - "@typescript-eslint/parser": "~6.9.0", + "@algolia/client-search": "~4.22.0", + "@eslint-types/deprecation": "2.0.0-1", + "@eslint-types/jsdoc": "~46.9.1", + "@eslint-types/prettier": "5.1.2", + "@eslint-types/typescript-eslint": "~6.17.0", + "@eslint-types/unicorn": "~49.0.0", + "@types/markdown-it": "~13.0.7", + "@types/node": "~20.10.7", + "@types/sanitize-html": "~2.9.5", + "@types/semver": "~7.5.6", + "@types/validator": "~13.11.7", + "@typescript-eslint/eslint-plugin": "~6.18.0", + "@typescript-eslint/parser": "~6.18.0", "@vitest/coverage-v8": "~0.34.6", "@vitest/ui": "~0.34.7", - "@vueuse/core": "~10.5.0", + "@vueuse/core": "~10.7.1", "conventional-changelog-cli": "~4.1.0", - "cypress": "~13.3.2", - "esbuild": "~0.19.5", - "eslint": "~8.52.0", - "eslint-config-prettier": "~9.0.0", - "eslint-define-config": "~1.24.1", + "cypress": "~13.6.2", + "esbuild": "~0.19.11", + "eslint": "~8.56.0", + "eslint-config-prettier": "~9.1.0", + "eslint-define-config": "~2.1.0", "eslint-gitignore": "~0.1.0", "eslint-plugin-deprecation": "~2.0.0", - "eslint-plugin-jsdoc": "~46.8.2", - "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-jsdoc": "~46.10.1", + "eslint-plugin-prettier": "~5.1.2", "eslint-plugin-unicorn": "~49.0.0", - "eslint-plugin-vitest": "~0.3.8", + "eslint-plugin-vitest": "~0.3.20", "glob": "~10.3.10", "npm-run-all": "~4.1.5", - "prettier": "3.0.3", - "prettier-plugin-organize-imports": "~3.2.3", + "prettier": "3.1.1", + "prettier-plugin-organize-imports": "~3.2.4", "rimraf": "~5.0.5", "sanitize-html": "~2.11.0", "semver": "~7.5.4", "standard-version": "~9.5.0", "tsx": "~3.13.0", - "typedoc": "~0.24.8", + "typedoc": "~0.25.7", "typescript": "~4.9.5", "validator": "~13.11.0", - "vite": "~4.5.0", - "vitepress": "1.0.0-beta.7", + "vite": "~4.5.1", + "vitepress": "1.0.0-rc.36", "vitest": "~0.34.6", - "vue": "~3.3.6" + "vue": "~3.4.5" }, "packageManager": "pnpm@8.5.1", "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index de3a7149376..b55917a4a46 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,29 +5,44 @@ devDependencies: specifier: ~6.0.0 version: 6.0.0 '@algolia/client-search': - specifier: ~4.19.1 - version: 4.19.1 + specifier: ~4.22.0 + version: 4.22.0 + '@eslint-types/deprecation': + specifier: 2.0.0-1 + version: 2.0.0-1 + '@eslint-types/jsdoc': + specifier: ~46.9.1 + version: 46.9.1 + '@eslint-types/prettier': + specifier: 5.1.2 + version: 5.1.2 + '@eslint-types/typescript-eslint': + specifier: ~6.17.0 + version: 6.17.0 + '@eslint-types/unicorn': + specifier: ~49.0.0 + version: 49.0.0 '@types/markdown-it': - specifier: ~13.0.4 - version: 13.0.4 + specifier: ~13.0.7 + version: 13.0.7 '@types/node': - specifier: ~20.8.7 - version: 20.8.7 + specifier: ~20.10.7 + version: 20.10.7 '@types/sanitize-html': - specifier: ~2.9.3 - version: 2.9.3 + specifier: ~2.9.5 + version: 2.9.5 '@types/semver': - specifier: ~7.5.4 - version: 7.5.4 + specifier: ~7.5.6 + version: 7.5.6 '@types/validator': - specifier: ~13.11.5 - version: 13.11.5 + specifier: ~13.11.7 + version: 13.11.7 '@typescript-eslint/eslint-plugin': - specifier: ~6.9.0 - version: 6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@4.9.5) + specifier: ~6.18.0 + version: 6.18.0(@typescript-eslint/parser@6.18.0)(eslint@8.56.0)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: ~6.9.0 - version: 6.9.0(eslint@8.52.0)(typescript@4.9.5) + specifier: ~6.18.0 + version: 6.18.0(eslint@8.56.0)(typescript@4.9.5) '@vitest/coverage-v8': specifier: ~0.34.6 version: 0.34.6(vitest@0.34.6) @@ -35,44 +50,44 @@ devDependencies: specifier: ~0.34.7 version: 0.34.7(vitest@0.34.6) '@vueuse/core': - specifier: ~10.5.0 - version: 10.5.0(vue@3.3.6) + specifier: ~10.7.1 + version: 10.7.1(vue@3.4.5) conventional-changelog-cli: specifier: ~4.1.0 version: 4.1.0 cypress: - specifier: ~13.3.2 - version: 13.3.2 + specifier: ~13.6.2 + version: 13.6.2 esbuild: - specifier: ~0.19.5 - version: 0.19.5 + specifier: ~0.19.11 + version: 0.19.11 eslint: - specifier: ~8.52.0 - version: 8.52.0 + specifier: ~8.56.0 + version: 8.56.0 eslint-config-prettier: - specifier: ~9.0.0 - version: 9.0.0(eslint@8.52.0) + specifier: ~9.1.0 + version: 9.1.0(eslint@8.56.0) eslint-define-config: - specifier: ~1.24.1 - version: 1.24.1 + specifier: ~2.1.0 + version: 2.1.0 eslint-gitignore: specifier: ~0.1.0 - version: 0.1.0(eslint@8.52.0) + version: 0.1.0(eslint@8.56.0) eslint-plugin-deprecation: specifier: ~2.0.0 - version: 2.0.0(eslint@8.52.0)(typescript@4.9.5) + version: 2.0.0(eslint@8.56.0)(typescript@4.9.5) eslint-plugin-jsdoc: - specifier: ~46.8.2 - version: 46.8.2(eslint@8.52.0) + specifier: ~46.10.1 + version: 46.10.1(eslint@8.56.0) eslint-plugin-prettier: - specifier: ~5.0.1 - version: 5.0.1(eslint-config-prettier@9.0.0)(eslint@8.52.0)(prettier@3.0.3) + specifier: ~5.1.2 + version: 5.1.2(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1) eslint-plugin-unicorn: specifier: ~49.0.0 - version: 49.0.0(eslint@8.52.0) + version: 49.0.0(eslint@8.56.0) eslint-plugin-vitest: - specifier: ~0.3.8 - version: 0.3.8(@typescript-eslint/eslint-plugin@6.9.0)(eslint@8.52.0)(typescript@4.9.5)(vitest@0.34.6) + specifier: ~0.3.20 + version: 0.3.20(@typescript-eslint/eslint-plugin@6.18.0)(eslint@8.56.0)(typescript@4.9.5)(vitest@0.34.6) glob: specifier: ~10.3.10 version: 10.3.10 @@ -80,11 +95,11 @@ devDependencies: specifier: ~4.1.5 version: 4.1.5 prettier: - specifier: 3.0.3 - version: 3.0.3 + specifier: 3.1.1 + version: 3.1.1 prettier-plugin-organize-imports: - specifier: ~3.2.3 - version: 3.2.3(prettier@3.0.3)(typescript@4.9.5) + specifier: ~3.2.4 + version: 3.2.4(prettier@3.1.1)(typescript@4.9.5) rimraf: specifier: ~5.0.5 version: 5.0.5 @@ -101,8 +116,8 @@ devDependencies: specifier: ~3.13.0 version: 3.13.0 typedoc: - specifier: ~0.24.8 - version: 0.24.8(typescript@4.9.5) + specifier: ~0.25.7 + version: 0.25.7(typescript@4.9.5) typescript: specifier: ~4.9.5 version: 4.9.5 @@ -110,17 +125,17 @@ devDependencies: specifier: ~13.11.0 version: 13.11.0 vite: - specifier: ~4.5.0 - version: 4.5.0(@types/node@20.8.7) + specifier: ~4.5.1 + version: 4.5.1(@types/node@20.10.7) vitepress: - specifier: 1.0.0-beta.7 - version: 1.0.0-beta.7(@algolia/client-search@4.19.1)(@types/node@20.8.7)(search-insights@2.9.0)(typescript@4.9.5) + specifier: 1.0.0-rc.36 + version: 1.0.0-rc.36(@algolia/client-search@4.22.0)(@types/node@20.10.7)(search-insights@2.13.0)(typescript@4.9.5) vitest: specifier: ~0.34.6 version: 0.34.6(@vitest/ui@0.34.7) vue: - specifier: ~3.3.6 - version: 3.3.6(typescript@4.9.5) + specifier: ~3.4.5 + version: 3.4.5(typescript@4.9.5) packages: @@ -133,185 +148,150 @@ packages: resolution: {integrity: sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==} dependencies: '@actions/http-client': 2.2.0 - '@octokit/core': 5.0.1 - '@octokit/plugin-paginate-rest': 9.0.0(@octokit/core@5.0.1) - '@octokit/plugin-rest-endpoint-methods': 10.0.1(@octokit/core@5.0.1) + '@octokit/core': 5.0.2 + '@octokit/plugin-paginate-rest': 9.1.5(@octokit/core@5.0.2) + '@octokit/plugin-rest-endpoint-methods': 10.2.0(@octokit/core@5.0.2) dev: true /@actions/http-client@2.2.0: resolution: {integrity: sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==} dependencies: tunnel: 0.0.6 - undici: 5.26.3 + undici: 5.28.2 dev: true - /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.20.0)(search-insights@2.9.0): + /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0)(search-insights@2.13.0): resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.20.0)(search-insights@2.9.0) - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.20.0) + '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0)(search-insights@2.13.0) + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights dev: true - /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.20.0)(search-insights@2.9.0): + /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0)(search-insights@2.13.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.19.1)(algoliasearch@4.20.0) - search-insights: 2.9.0 + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0) + search-insights: 2.13.0 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch dev: true - /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.20.0): + /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0): 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.19.1)(algoliasearch@4.20.0) - '@algolia/client-search': 4.19.1 - algoliasearch: 4.20.0 + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0) + '@algolia/client-search': 4.22.0 + algoliasearch: 4.22.0 dev: true - /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.20.0): + /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0): resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: - '@algolia/client-search': 4.19.1 - algoliasearch: 4.20.0 + '@algolia/client-search': 4.22.0 + algoliasearch: 4.22.0 dev: true - /@algolia/cache-browser-local-storage@4.20.0: - resolution: {integrity: sha512-uujahcBt4DxduBTvYdwO3sBfHuJvJokiC3BP1+O70fglmE1ShkH8lpXqZBac1rrU3FnNYSUs4pL9lBdTKeRPOQ==} + /@algolia/cache-browser-local-storage@4.22.0: + resolution: {integrity: sha512-uZ1uZMLDZb4qODLfTSNHxSi4fH9RdrQf7DXEzW01dS8XK7QFtFh29N5NGKa9S+Yudf1vUMIF+/RiL4i/J0pWlQ==} dependencies: - '@algolia/cache-common': 4.20.0 + '@algolia/cache-common': 4.22.0 dev: true - /@algolia/cache-common@4.19.1: - resolution: {integrity: sha512-XGghi3l0qA38HiqdoUY+wvGyBsGvKZ6U3vTiMBT4hArhP3fOGLXpIINgMiiGjTe4FVlTa5a/7Zf2bwlIHfRqqg==} + /@algolia/cache-common@4.22.0: + resolution: {integrity: sha512-TPwUMlIGPN16eW67qamNQUmxNiGHg/WBqWcrOoCddhqNTqGDPVqmgfaM85LPbt24t3r1z0zEz/tdsmuq3Q6oaA==} dev: true - /@algolia/cache-common@4.20.0: - resolution: {integrity: sha512-vCfxauaZutL3NImzB2G9LjLt36vKAckc6DhMp05An14kVo8F1Yofb6SIl6U3SaEz8pG2QOB9ptwM5c+zGevwIQ==} - dev: true - - /@algolia/cache-in-memory@4.20.0: - resolution: {integrity: sha512-Wm9ak/IaacAZXS4mB3+qF/KCoVSBV6aLgIGFEtQtJwjv64g4ePMapORGmCyulCFwfePaRAtcaTbMcJF+voc/bg==} + /@algolia/cache-in-memory@4.22.0: + resolution: {integrity: sha512-kf4Cio9NpPjzp1+uXQgL4jsMDeck7MP89BYThSvXSjf2A6qV/0KeqQf90TL2ECS02ovLOBXkk98P7qVarM+zGA==} dependencies: - '@algolia/cache-common': 4.20.0 + '@algolia/cache-common': 4.22.0 dev: true - /@algolia/client-account@4.20.0: - resolution: {integrity: sha512-GGToLQvrwo7am4zVkZTnKa72pheQeez/16sURDWm7Seyz+HUxKi3BM6fthVVPUEBhtJ0reyVtuK9ArmnaKl10Q==} + /@algolia/client-account@4.22.0: + resolution: {integrity: sha512-Bjb5UXpWmJT+yGWiqAJL0prkENyEZTBzdC+N1vBuHjwIJcjLMjPB6j1hNBRbT12Lmwi55uzqeMIKS69w+0aPzA==} dependencies: - '@algolia/client-common': 4.20.0 - '@algolia/client-search': 4.20.0 - '@algolia/transporter': 4.20.0 + '@algolia/client-common': 4.22.0 + '@algolia/client-search': 4.22.0 + '@algolia/transporter': 4.22.0 dev: true - /@algolia/client-analytics@4.20.0: - resolution: {integrity: sha512-EIr+PdFMOallRdBTHHdKI3CstslgLORQG7844Mq84ib5oVFRVASuuPmG4bXBgiDbcsMLUeOC6zRVJhv1KWI0ug==} + /@algolia/client-analytics@4.22.0: + resolution: {integrity: sha512-os2K+kHUcwwRa4ArFl5p/3YbF9lN3TLOPkbXXXxOvDpqFh62n9IRZuzfxpHxMPKAQS3Et1s0BkKavnNP02E9Hg==} dependencies: - '@algolia/client-common': 4.20.0 - '@algolia/client-search': 4.20.0 - '@algolia/requester-common': 4.20.0 - '@algolia/transporter': 4.20.0 + '@algolia/client-common': 4.22.0 + '@algolia/client-search': 4.22.0 + '@algolia/requester-common': 4.22.0 + '@algolia/transporter': 4.22.0 dev: true - /@algolia/client-common@4.19.1: - resolution: {integrity: sha512-3kAIVqTcPrjfS389KQvKzliC559x+BDRxtWamVJt8IVp7LGnjq+aVAXg4Xogkur1MUrScTZ59/AaUd5EdpyXgA==} + /@algolia/client-common@4.22.0: + resolution: {integrity: sha512-BlbkF4qXVWuwTmYxVWvqtatCR3lzXwxx628p1wj1Q7QP2+LsTmGt1DiUYRuy9jG7iMsnlExby6kRMOOlbhv2Ag==} dependencies: - '@algolia/requester-common': 4.19.1 - '@algolia/transporter': 4.19.1 + '@algolia/requester-common': 4.22.0 + '@algolia/transporter': 4.22.0 dev: true - /@algolia/client-common@4.20.0: - resolution: {integrity: sha512-P3WgMdEss915p+knMMSd/fwiHRHKvDu4DYRrCRaBrsfFw7EQHon+EbRSm4QisS9NYdxbS04kcvNoavVGthyfqQ==} + /@algolia/client-personalization@4.22.0: + resolution: {integrity: sha512-pEOftCxeBdG5pL97WngOBi9w5Vxr5KCV2j2D+xMVZH8MuU/JX7CglDSDDb0ffQWYqcUN+40Ry+xtXEYaGXTGow==} dependencies: - '@algolia/requester-common': 4.20.0 - '@algolia/transporter': 4.20.0 + '@algolia/client-common': 4.22.0 + '@algolia/requester-common': 4.22.0 + '@algolia/transporter': 4.22.0 dev: true - /@algolia/client-personalization@4.20.0: - resolution: {integrity: sha512-N9+zx0tWOQsLc3K4PVRDV8GUeOLAY0i445En79Pr3zWB+m67V+n/8w4Kw1C5LlbHDDJcyhMMIlqezh6BEk7xAQ==} + /@algolia/client-search@4.22.0: + resolution: {integrity: sha512-bn4qQiIdRPBGCwsNuuqB8rdHhGKKWIij9OqidM1UkQxnSG8yzxHdb7CujM30pvp5EnV7jTqDZRbxacbjYVW20Q==} dependencies: - '@algolia/client-common': 4.20.0 - '@algolia/requester-common': 4.20.0 - '@algolia/transporter': 4.20.0 + '@algolia/client-common': 4.22.0 + '@algolia/requester-common': 4.22.0 + '@algolia/transporter': 4.22.0 dev: true - /@algolia/client-search@4.19.1: - resolution: {integrity: sha512-mBecfMFS4N+yK/p0ZbK53vrZbL6OtWMk8YmnOv1i0LXx4pelY8TFhqKoTit3NPVPwoSNN0vdSN9dTu1xr1XOVw==} - dependencies: - '@algolia/client-common': 4.19.1 - '@algolia/requester-common': 4.19.1 - '@algolia/transporter': 4.19.1 + /@algolia/logger-common@4.22.0: + resolution: {integrity: sha512-HMUQTID0ucxNCXs5d1eBJ5q/HuKg8rFVE/vOiLaM4Abfeq1YnTtGV3+rFEhOPWhRQxNDd+YHa4q864IMc0zHpQ==} dev: true - /@algolia/client-search@4.20.0: - resolution: {integrity: sha512-zgwqnMvhWLdpzKTpd3sGmMlr4c+iS7eyyLGiaO51zDZWGMkpgoNVmltkzdBwxOVXz0RsFMznIxB9zuarUv4TZg==} + /@algolia/logger-console@4.22.0: + resolution: {integrity: sha512-7JKb6hgcY64H7CRm3u6DRAiiEVXMvCJV5gRE672QFOUgDxo4aiDpfU61g6Uzy8NKjlEzHMmgG4e2fklELmPXhQ==} dependencies: - '@algolia/client-common': 4.20.0 - '@algolia/requester-common': 4.20.0 - '@algolia/transporter': 4.20.0 + '@algolia/logger-common': 4.22.0 dev: true - /@algolia/logger-common@4.19.1: - resolution: {integrity: sha512-i6pLPZW/+/YXKis8gpmSiNk1lOmYCmRI6+x6d2Qk1OdfvX051nRVdalRbEcVTpSQX6FQAoyeaui0cUfLYW5Elw==} - dev: true - - /@algolia/logger-common@4.20.0: - resolution: {integrity: sha512-xouigCMB5WJYEwvoWW5XDv7Z9f0A8VoXJc3VKwlHJw/je+3p2RcDXfksLI4G4lIVncFUYMZx30tP/rsdlvvzHQ==} - dev: true - - /@algolia/logger-console@4.20.0: - resolution: {integrity: sha512-THlIGG1g/FS63z0StQqDhT6bprUczBI8wnLT3JWvfAQDZX5P6fCg7dG+pIrUBpDIHGszgkqYEqECaKKsdNKOUA==} + /@algolia/requester-browser-xhr@4.22.0: + resolution: {integrity: sha512-BHfv1h7P9/SyvcDJDaRuIwDu2yrDLlXlYmjvaLZTtPw6Ok/ZVhBR55JqW832XN/Fsl6k3LjdkYHHR7xnsa5Wvg==} dependencies: - '@algolia/logger-common': 4.20.0 + '@algolia/requester-common': 4.22.0 dev: true - /@algolia/requester-browser-xhr@4.20.0: - resolution: {integrity: sha512-HbzoSjcjuUmYOkcHECkVTwAelmvTlgs48N6Owt4FnTOQdwn0b8pdht9eMgishvk8+F8bal354nhx/xOoTfwiAw==} - dependencies: - '@algolia/requester-common': 4.20.0 + /@algolia/requester-common@4.22.0: + resolution: {integrity: sha512-Y9cEH/cKjIIZgzvI1aI0ARdtR/xRrOR13g5psCxkdhpgRN0Vcorx+zePhmAa4jdQNqexpxtkUdcKYugBzMZJgQ==} dev: true - /@algolia/requester-common@4.19.1: - resolution: {integrity: sha512-BisRkcWVxrDzF1YPhAckmi2CFYK+jdMT60q10d7z3PX+w6fPPukxHRnZwooiTUrzFe50UBmLItGizWHP5bDzVQ==} - dev: true - - /@algolia/requester-common@4.20.0: - resolution: {integrity: sha512-9h6ye6RY/BkfmeJp7Z8gyyeMrmmWsMOCRBXQDs4mZKKsyVlfIVICpcSibbeYcuUdurLhIlrOUkH3rQEgZzonng==} - dev: true - - /@algolia/requester-node-http@4.20.0: - resolution: {integrity: sha512-ocJ66L60ABSSTRFnCHIEZpNHv6qTxsBwJEPfYaSBsLQodm0F9ptvalFkHMpvj5DfE22oZrcrLbOYM2bdPJRHng==} - dependencies: - '@algolia/requester-common': 4.20.0 - dev: true - - /@algolia/transporter@4.19.1: - resolution: {integrity: sha512-nkpvPWbpuzxo1flEYqNIbGz7xhfhGOKGAZS7tzC+TELgEmi7z99qRyTfNSUlW7LZmB3ACdnqAo+9A9KFBENviQ==} + /@algolia/requester-node-http@4.22.0: + resolution: {integrity: sha512-8xHoGpxVhz3u2MYIieHIB6MsnX+vfd5PS4REgglejJ6lPigftRhTdBCToe6zbwq4p0anZXjjPDvNWMlgK2+xYA==} dependencies: - '@algolia/cache-common': 4.19.1 - '@algolia/logger-common': 4.19.1 - '@algolia/requester-common': 4.19.1 + '@algolia/requester-common': 4.22.0 dev: true - /@algolia/transporter@4.20.0: - resolution: {integrity: sha512-Lsii1pGWOAISbzeyuf+r/GPhvHMPHSPrTDWNcIzOE1SG1inlJHICaVe2ikuoRjcpgxZNU54Jl+if15SUCsaTUg==} + /@algolia/transporter@4.22.0: + resolution: {integrity: sha512-ieO1k8x2o77GNvOoC+vAkFKppydQSVfbjM3YrSjLmgywiBejPTvU1R1nEvG59JIIUvtSLrZsLGPkd6vL14zopA==} dependencies: - '@algolia/cache-common': 4.20.0 - '@algolia/logger-common': 4.20.0 - '@algolia/requester-common': 4.20.0 + '@algolia/cache-common': 4.22.0 + '@algolia/logger-common': 4.22.0 + '@algolia/requester-common': 4.22.0 dev: true /@ampproject/remapping@2.2.1: @@ -319,19 +299,19 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.19 + '@jridgewell/trace-mapping': 0.3.20 dev: true - /@babel/code-frame@7.22.13: - resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} + /@babel/code-frame@7.23.5: + resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.20 + '@babel/highlight': 7.23.4 chalk: 2.4.2 dev: true - /@babel/helper-string-parser@7.22.5: - resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} + /@babel/helper-string-parser@7.23.4: + resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==} engines: {node: '>=6.9.0'} dev: true @@ -340,8 +320,8 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/highlight@7.22.20: - resolution: {integrity: sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==} + /@babel/highlight@7.23.4: + resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.22.20 @@ -349,19 +329,19 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/parser@7.23.0: - resolution: {integrity: sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==} + /@babel/parser@7.23.6: + resolution: {integrity: sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.23.0 + '@babel/types': 7.23.6 dev: true - /@babel/types@7.23.0: - resolution: {integrity: sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==} + /@babel/types@7.23.6: + resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-string-parser': 7.22.5 + '@babel/helper-string-parser': 7.23.4 '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 dev: true @@ -414,11 +394,11 @@ packages: resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} dev: true - /@docsearch/js@3.5.2(@algolia/client-search@4.19.1)(search-insights@2.9.0): + /@docsearch/js@3.5.2(@algolia/client-search@4.22.0)(search-insights@2.13.0): resolution: {integrity: sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==} dependencies: - '@docsearch/react': 3.5.2(@algolia/client-search@4.19.1)(search-insights@2.9.0) - preact: 10.18.1 + '@docsearch/react': 3.5.2(@algolia/client-search@4.22.0)(search-insights@2.13.0) + preact: 10.19.3 transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -427,7 +407,7 @@ packages: - search-insights dev: true - /@docsearch/react@3.5.2(@algolia/client-search@4.19.1)(search-insights@2.9.0): + /@docsearch/react@3.5.2(@algolia/client-search@4.22.0)(search-insights@2.13.0): resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' @@ -444,24 +424,33 @@ packages: search-insights: optional: true dependencies: - '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.20.0)(search-insights@2.9.0) - '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.19.1)(algoliasearch@4.20.0) + '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0)(search-insights@2.13.0) + '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.22.0) '@docsearch/css': 3.5.2 - algoliasearch: 4.20.0 - search-insights: 2.9.0 + algoliasearch: 4.22.0 + search-insights: 2.13.0 transitivePeerDependencies: - '@algolia/client-search' dev: true - /@es-joy/jsdoccomment@0.40.1: - resolution: {integrity: sha512-YORCdZSusAlBrFpZ77pJjc5r1bQs5caPWtAu+WWmiSo+8XaUzseapVrfAtiRFbQWnrBxxLLEwF6f6ZG/UgCQCg==} + /@es-joy/jsdoccomment@0.41.0: + resolution: {integrity: sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==} engines: {node: '>=16'} dependencies: - comment-parser: 1.4.0 + comment-parser: 1.4.1 esquery: 1.5.0 jsdoc-type-pratt-parser: 4.0.0 dev: true + /@esbuild/aix-ppc64@0.19.11: + resolution: {integrity: sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm64@0.18.20: resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} @@ -471,8 +460,8 @@ packages: dev: true optional: true - /@esbuild/android-arm64@0.19.5: - resolution: {integrity: sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==} + /@esbuild/android-arm64@0.19.11: + resolution: {integrity: sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -489,8 +478,8 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.19.5: - resolution: {integrity: sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==} + /@esbuild/android-arm@0.19.11: + resolution: {integrity: sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -507,8 +496,8 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.19.5: - resolution: {integrity: sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==} + /@esbuild/android-x64@0.19.11: + resolution: {integrity: sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -525,8 +514,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.19.5: - resolution: {integrity: sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==} + /@esbuild/darwin-arm64@0.19.11: + resolution: {integrity: sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -543,8 +532,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.19.5: - resolution: {integrity: sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==} + /@esbuild/darwin-x64@0.19.11: + resolution: {integrity: sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -561,8 +550,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.19.5: - resolution: {integrity: sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==} + /@esbuild/freebsd-arm64@0.19.11: + resolution: {integrity: sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -579,8 +568,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.19.5: - resolution: {integrity: sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==} + /@esbuild/freebsd-x64@0.19.11: + resolution: {integrity: sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -597,8 +586,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.19.5: - resolution: {integrity: sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==} + /@esbuild/linux-arm64@0.19.11: + resolution: {integrity: sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -615,8 +604,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.19.5: - resolution: {integrity: sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==} + /@esbuild/linux-arm@0.19.11: + resolution: {integrity: sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -633,8 +622,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.19.5: - resolution: {integrity: sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==} + /@esbuild/linux-ia32@0.19.11: + resolution: {integrity: sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -651,8 +640,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.19.5: - resolution: {integrity: sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==} + /@esbuild/linux-loong64@0.19.11: + resolution: {integrity: sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -669,8 +658,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.19.5: - resolution: {integrity: sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==} + /@esbuild/linux-mips64el@0.19.11: + resolution: {integrity: sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -687,8 +676,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.19.5: - resolution: {integrity: sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==} + /@esbuild/linux-ppc64@0.19.11: + resolution: {integrity: sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -705,8 +694,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.19.5: - resolution: {integrity: sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==} + /@esbuild/linux-riscv64@0.19.11: + resolution: {integrity: sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -723,8 +712,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.19.5: - resolution: {integrity: sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==} + /@esbuild/linux-s390x@0.19.11: + resolution: {integrity: sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -741,8 +730,8 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.19.5: - resolution: {integrity: sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==} + /@esbuild/linux-x64@0.19.11: + resolution: {integrity: sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -759,8 +748,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.19.5: - resolution: {integrity: sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==} + /@esbuild/netbsd-x64@0.19.11: + resolution: {integrity: sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -777,8 +766,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.19.5: - resolution: {integrity: sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==} + /@esbuild/openbsd-x64@0.19.11: + resolution: {integrity: sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -795,8 +784,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.19.5: - resolution: {integrity: sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==} + /@esbuild/sunos-x64@0.19.11: + resolution: {integrity: sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -813,8 +802,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.19.5: - resolution: {integrity: sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==} + /@esbuild/win32-arm64@0.19.11: + resolution: {integrity: sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -831,8 +820,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.19.5: - resolution: {integrity: sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==} + /@esbuild/win32-ia32@0.19.11: + resolution: {integrity: sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -849,8 +838,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.19.5: - resolution: {integrity: sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==} + /@esbuild/win32-x64@0.19.11: + resolution: {integrity: sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -858,30 +847,50 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.52.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.56.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.52.0 + eslint: 8.56.0 eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp@4.9.1: - resolution: {integrity: sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==} + /@eslint-community/regexpp@4.10.0: + resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@2.1.2: - resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} + /@eslint-types/deprecation@2.0.0-1: + resolution: {integrity: sha512-bsl7dssIW598hWQBIsnKMHQCguXkjI14117dXVpRhaaGBmzUAJxGpL9ClM36alal6NSbljrxJvzBadINVcWeoQ==} + dev: true + + /@eslint-types/jsdoc@46.9.1: + resolution: {integrity: sha512-oKH2l8HALyZ3bQzSecoWYsJSgdTLILAYlY8dprNBg3LzUZtnfcq0P8ixDmE7UdMCujGAmmGtmgYbzmUDRxSkzg==} + dev: true + + /@eslint-types/prettier@5.1.2: + resolution: {integrity: sha512-C81jbseWJUUjGAwmX7dwNSAen8Uq6il1+6uW5vyr/rOTNezU8BvZRo+wP1lw8gsjFhG1AQ4eqXhnLE9e2tv9kQ==} + dev: true + + /@eslint-types/typescript-eslint@6.17.0: + resolution: {integrity: sha512-fPwdc27nXbsn69obhmOujFMxheimgs+Hf0iHCyq0s1w48iPpd0PgA/UvAs/PRUY/H9GYvrZDSvBTxtHLqnzb3A==} + dev: true + + /@eslint-types/unicorn@49.0.0: + resolution: {integrity: sha512-NfXSZIsPFRD2fwTDZQj8SaXqS/rXjB5foxMraLovyrYGXiQK2y0780drDKYYSVbqvco29QIYoZNmnKTUkzZMvQ==} + dev: true + + /@eslint/eslintrc@2.1.4: + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 - globals: 13.23.0 - ignore: 5.2.4 + globals: 13.24.0 + ignore: 5.3.0 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -890,13 +899,13 @@ packages: - supports-color dev: true - /@eslint/js@8.52.0: - resolution: {integrity: sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==} + /@eslint/js@8.56.0: + resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@fastify/busboy@2.0.0: - resolution: {integrity: sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==} + /@fastify/busboy@2.1.0: + resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==} engines: {node: '>=14'} dev: true @@ -960,7 +969,7 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.19 + '@jridgewell/trace-mapping': 0.3.20 dev: true /@jridgewell/resolve-uri@3.1.1: @@ -977,8 +986,8 @@ packages: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true - /@jridgewell/trace-mapping@0.3.19: - resolution: {integrity: sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==} + /@jridgewell/trace-mapping@0.3.20: + resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} dependencies: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 @@ -1002,7 +1011,7 @@ packages: engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.15.0 + fastq: 1.16.0 dev: true /@octokit/auth-token@4.0.0: @@ -1010,85 +1019,83 @@ packages: engines: {node: '>= 18'} dev: true - /@octokit/core@5.0.1: - resolution: {integrity: sha512-lyeeeZyESFo+ffI801SaBKmCfsvarO+dgV8/0gD8u1d87clbEdWsP5yC+dSj3zLhb2eIf5SJrn6vDz9AheETHw==} + /@octokit/core@5.0.2: + resolution: {integrity: sha512-cZUy1gUvd4vttMic7C0lwPed8IYXWYp8kHIMatyhY8t8n3Cpw2ILczkV5pGMPqef7v0bLo0pOHrEHarsau2Ydg==} engines: {node: '>= 18'} dependencies: '@octokit/auth-token': 4.0.0 '@octokit/graphql': 7.0.2 - '@octokit/request': 8.1.4 + '@octokit/request': 8.1.6 '@octokit/request-error': 5.0.1 - '@octokit/types': 12.0.0 + '@octokit/types': 12.4.0 before-after-hook: 2.2.3 - universal-user-agent: 6.0.0 + universal-user-agent: 6.0.1 dev: true - /@octokit/endpoint@9.0.1: - resolution: {integrity: sha512-hRlOKAovtINHQPYHZlfyFwaM8OyetxeoC81lAkBy34uLb8exrZB50SQdeW3EROqiY9G9yxQTpp5OHTV54QD+vA==} + /@octokit/endpoint@9.0.4: + resolution: {integrity: sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==} engines: {node: '>= 18'} dependencies: - '@octokit/types': 12.0.0 - is-plain-object: 5.0.0 - universal-user-agent: 6.0.0 + '@octokit/types': 12.4.0 + universal-user-agent: 6.0.1 dev: true /@octokit/graphql@7.0.2: resolution: {integrity: sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==} engines: {node: '>= 18'} dependencies: - '@octokit/request': 8.1.4 - '@octokit/types': 12.0.0 - universal-user-agent: 6.0.0 + '@octokit/request': 8.1.6 + '@octokit/types': 12.4.0 + universal-user-agent: 6.0.1 dev: true - /@octokit/openapi-types@19.0.0: - resolution: {integrity: sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw==} + /@octokit/openapi-types@19.1.0: + resolution: {integrity: sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw==} dev: true - /@octokit/plugin-paginate-rest@9.0.0(@octokit/core@5.0.1): - resolution: {integrity: sha512-oIJzCpttmBTlEhBmRvb+b9rlnGpmFgDtZ0bB6nq39qIod6A5DP+7RkVLMOixIgRCYSHDTeayWqmiJ2SZ6xgfdw==} + /@octokit/plugin-paginate-rest@9.1.5(@octokit/core@5.0.2): + resolution: {integrity: sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==} engines: {node: '>= 18'} peerDependencies: '@octokit/core': '>=5' dependencies: - '@octokit/core': 5.0.1 - '@octokit/types': 12.0.0 + '@octokit/core': 5.0.2 + '@octokit/types': 12.4.0 dev: true - /@octokit/plugin-rest-endpoint-methods@10.0.1(@octokit/core@5.0.1): - resolution: {integrity: sha512-fgS6HPkPvJiz8CCliewLyym9qAx0RZ/LKh3sATaPfM41y/O2wQ4Z9MrdYeGPVh04wYmHFmWiGlKPC7jWVtZXQA==} + /@octokit/plugin-rest-endpoint-methods@10.2.0(@octokit/core@5.0.2): + resolution: {integrity: sha512-ePbgBMYtGoRNXDyKGvr9cyHjQ163PbwD0y1MkDJCpkO2YH4OeXX40c4wYHKikHGZcpGPbcRLuy0unPUuafco8Q==} engines: {node: '>= 18'} peerDependencies: '@octokit/core': '>=5' dependencies: - '@octokit/core': 5.0.1 - '@octokit/types': 12.0.0 + '@octokit/core': 5.0.2 + '@octokit/types': 12.4.0 dev: true /@octokit/request-error@5.0.1: resolution: {integrity: sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==} engines: {node: '>= 18'} dependencies: - '@octokit/types': 12.0.0 + '@octokit/types': 12.4.0 deprecation: 2.3.1 once: 1.4.0 dev: true - /@octokit/request@8.1.4: - resolution: {integrity: sha512-M0aaFfpGPEKrg7XoA/gwgRvc9MSXHRO2Ioki1qrPDbl1e9YhjIwVoHE7HIKmv/m3idzldj//xBujcFNqGX6ENA==} + /@octokit/request@8.1.6: + resolution: {integrity: sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==} engines: {node: '>= 18'} dependencies: - '@octokit/endpoint': 9.0.1 + '@octokit/endpoint': 9.0.4 '@octokit/request-error': 5.0.1 - '@octokit/types': 12.0.0 - is-plain-object: 5.0.0 - universal-user-agent: 6.0.0 + '@octokit/types': 12.4.0 + universal-user-agent: 6.0.1 dev: true - /@octokit/types@12.0.0: - resolution: {integrity: sha512-EzD434aHTFifGudYAygnFlS1Tl6KhbTynEWELQXIbTY8Msvb5nEqTZIm7sbPEt4mQYLZwu3zPKVdeIrw0g7ovg==} + /@octokit/types@12.4.0: + resolution: {integrity: sha512-FLWs/AvZllw/AGVs+nJ+ELCDZZJk+kY0zMen118xhL2zD0s1etIUHm1odgjP7epxYU1ln7SZxEUWYop5bhsdgQ==} dependencies: - '@octokit/openapi-types': 19.0.0 + '@octokit/openapi-types': 19.1.0 dev: true /@pkgjs/parseargs@0.11.0: @@ -1098,113 +1105,212 @@ packages: dev: true optional: true - /@pkgr/utils@2.4.2: - resolution: {integrity: sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==} + /@pkgr/core@0.1.0: + resolution: {integrity: sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - dependencies: - cross-spawn: 7.0.3 - fast-glob: 3.3.1 - is-glob: 4.0.3 - open: 9.1.0 - picocolors: 1.0.0 - tslib: 2.6.2 dev: true - /@polka/url@1.0.0-next.23: - resolution: {integrity: sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==} + /@polka/url@1.0.0-next.24: + resolution: {integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==} + dev: true + + /@rollup/rollup-android-arm-eabi@4.9.1: + resolution: {integrity: sha512-6vMdBZqtq1dVQ4CWdhFwhKZL6E4L1dV6jUjuBvsavvNJSppzi6dLBbuV+3+IyUREaj9ZFvQefnQm28v4OCXlig==} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm64@4.9.1: + resolution: {integrity: sha512-Jto9Fl3YQ9OLsTDWtLFPtaIMSL2kwGyGoVCmPC8Gxvym9TCZm4Sie+cVeblPO66YZsYH8MhBKDMGZ2NDxuk/XQ==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-arm64@4.9.1: + resolution: {integrity: sha512-LtYcLNM+bhsaKAIGwVkh5IOWhaZhjTfNOkGzGqdHvhiCUVuJDalvDxEdSnhFzAn+g23wgsycmZk1vbnaibZwwA==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-x64@4.9.1: + resolution: {integrity: sha512-KyP/byeXu9V+etKO6Lw3E4tW4QdcnzDG/ake031mg42lob5tN+5qfr+lkcT/SGZaH2PdW4Z1NX9GHEkZ8xV7og==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.9.1: + resolution: {integrity: sha512-Yqz/Doumf3QTKplwGNrCHe/B2p9xqDghBZSlAY0/hU6ikuDVQuOUIpDP/YcmoT+447tsZTmirmjgG3znvSCR0Q==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.9.1: + resolution: {integrity: sha512-u3XkZVvxcvlAOlQJ3UsD1rFvLWqu4Ef/Ggl40WAVCuogf4S1nJPHh5RTgqYFpCOvuGJ7H5yGHabjFKEZGExk5Q==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-musl@4.9.1: + resolution: {integrity: sha512-0XSYN/rfWShW+i+qjZ0phc6vZ7UWI8XWNz4E/l+6edFt+FxoEghrJHjX1EY/kcUGCnZzYYRCl31SNdfOi450Aw==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.9.1: + resolution: {integrity: sha512-LmYIO65oZVfFt9t6cpYkbC4d5lKHLYv5B4CSHRpnANq0VZUQXGcCPXHzbCXCz4RQnx7jvlYB1ISVNCE/omz5cw==} + cpu: [riscv64] + os: [linux] + requiresBuild: true dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.9.1: + resolution: {integrity: sha512-kr8rEPQ6ns/Lmr/hiw8sEVj9aa07gh1/tQF2Y5HrNCCEPiCBGnBUt9tVusrcBBiJfIt1yNaXN6r1CCmpbFEDpg==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.9.1: + resolution: {integrity: sha512-t4QSR7gN+OEZLG0MiCgPqMWZGwmeHhsM4AkegJ0Kiy6TnJ9vZ8dEIwHw1LcZKhbHxTY32hp9eVCMdR3/I8MGRw==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.9.1: + resolution: {integrity: sha512-7XI4ZCBN34cb+BH557FJPmh0kmNz2c25SCQeT9OiFWEgf8+dL6ZwJ8f9RnUIit+j01u07Yvrsuu1rZGxJCc51g==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.9.1: + resolution: {integrity: sha512-yE5c2j1lSWOH5jp+Q0qNL3Mdhr8WuqCNVjc6BxbVfS5cAS6zRmdiw7ktb8GNpDCEUJphILY6KACoFoRtKoqNQg==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.9.1: + resolution: {integrity: sha512-PyJsSsafjmIhVgaI1Zdj7m8BB8mMckFah/xbpplObyHfiXzKcI5UOUXRyOdHW7nz4DpMCuzLnF7v5IWHenCwYA==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@types/chai-subset@1.3.3: - resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} + /@types/chai-subset@1.3.5: + resolution: {integrity: sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==} dependencies: - '@types/chai': 4.3.8 + '@types/chai': 4.3.11 dev: true - /@types/chai@4.3.8: - resolution: {integrity: sha512-yW/qTM4mRBBcsA9Xw9FbcImYtFPY7sgr+G/O5RDYVmxiy9a+pE5FyoFUi8JYCZY5nicj8atrr1pcfPiYpeNGOA==} + /@types/chai@4.3.11: + resolution: {integrity: sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==} dev: true - /@types/istanbul-lib-coverage@2.0.4: - resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} + /@types/istanbul-lib-coverage@2.0.6: + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} dev: true - /@types/json-schema@7.0.13: - resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==} + /@types/json-schema@7.0.15: + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true - /@types/linkify-it@3.0.3: - resolution: {integrity: sha512-pTjcqY9E4nOI55Wgpz7eiI8+LzdYnw3qxXCfHyBDdPbYvbyLgWLJGh8EdPvqawwMK1Uo1794AUkkR38Fr0g+2g==} + /@types/linkify-it@3.0.5: + resolution: {integrity: sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==} dev: true - /@types/markdown-it@13.0.4: - resolution: {integrity: sha512-FAIUdEXrCDnQmAAmJC+UeW/3p0eCI4QZ/+W0lX/h83VD3v78IgTFYftjnAeXS8H0g4PFQCgipc51cQDA8tjgLw==} + /@types/markdown-it@13.0.7: + resolution: {integrity: sha512-U/CBi2YUUcTHBt5tjO2r5QV/x0Po6nsYwQU4Y04fBS6vfoImaiZ6f8bi3CjTCxBPQSO1LMyUqkByzi8AidyxfA==} dependencies: - '@types/linkify-it': 3.0.3 - '@types/mdurl': 1.0.3 + '@types/linkify-it': 3.0.5 + '@types/mdurl': 1.0.5 dev: true - /@types/mdurl@1.0.3: - resolution: {integrity: sha512-T5k6kTXak79gwmIOaDF2UUQXFbnBE0zBUzF20pz7wDYu0RQMzWg+Ml/Pz50214NsFHBITkoi5VtdjFZnJ2ijjA==} + /@types/mdurl@1.0.5: + resolution: {integrity: sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==} dev: true - /@types/minimist@1.2.3: - resolution: {integrity: sha512-ZYFzrvyWUNhaPomn80dsMNgMeXxNWZBdkuG/hWlUvXvbdUH8ZERNBGXnU87McuGcWDsyzX2aChCv/SVN348k3A==} + /@types/minimist@1.2.5: + resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} dev: true - /@types/node@18.18.5: - resolution: {integrity: sha512-4slmbtwV59ZxitY4ixUZdy1uRLf9eSIvBWPQxNjhHYWEtn0FryfKpyS2cvADYXTayWdKEIsJengncrVvkI4I6A==} + /@types/node@18.19.3: + resolution: {integrity: sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==} + dependencies: + undici-types: 5.26.5 dev: true - /@types/node@20.8.7: - resolution: {integrity: sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==} + /@types/node@20.10.7: + resolution: {integrity: sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==} dependencies: - undici-types: 5.25.3 + undici-types: 5.26.5 dev: true - /@types/normalize-package-data@2.4.2: - resolution: {integrity: sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==} + /@types/normalize-package-data@2.4.4: + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} dev: true - /@types/sanitize-html@2.9.3: - resolution: {integrity: sha512-1rsSdEJLV7utAG+Fms2uP+nSmmYmOhUUSSZvUz4wF2wlA0M5/A/gVgnpWZ7EKaPWsrrxWiSuNJqSBW8dh2isBA==} + /@types/sanitize-html@2.9.5: + resolution: {integrity: sha512-2Sr1vd8Dw+ypsg/oDDfZ57OMSG2Befs+l2CMyCC5bVSK3CpE7lTB2aNlbbWzazgVA+Qqfuholwom6x/mWd1qmw==} dependencies: htmlparser2: 8.0.2 dev: true - /@types/semver@7.5.4: - resolution: {integrity: sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==} + /@types/semver@7.5.6: + resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true /@types/sinonjs__fake-timers@8.1.1: resolution: {integrity: sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==} dev: true - /@types/sizzle@2.3.4: - resolution: {integrity: sha512-jA2llq2zNkg8HrALI7DtWzhALcVH0l7i89yhY3iBdOz6cBPeACoFq+fkQrjHA39t1hnSFOboZ7A/AY5MMZSlag==} + /@types/sizzle@2.3.8: + resolution: {integrity: sha512-0vWLNK2D5MT9dg0iOo8GlKguPAU02QjmZitPEsXRuJXU/OGIOt9vT9Fc26wtYuavLxtO45v9PGleoL9Z0k1LHg==} dev: true - /@types/validator@13.11.5: - resolution: {integrity: sha512-xW4qsT4UIYILu+7ZrBnfQdBYniZrMLYYK3wN9M/NdeIHgBN5pZI2/8Q7UfdWIcr5RLJv/OGENsx91JIpUUoC7Q==} + /@types/validator@13.11.7: + resolution: {integrity: sha512-q0JomTsJ2I5Mv7dhHhQLGjMvX0JJm5dyZ1DXQySIUzU1UlwzB8bt+R6+LODUbz0UDIOvEzGc28tk27gBJw2N8Q==} dev: true - /@types/web-bluetooth@0.0.18: - resolution: {integrity: sha512-v/ZHEj9xh82usl8LMR3GarzFY1IrbXJw5L4QfQhokjRV91q+SelFqxQWSep1ucXEZ22+dSTwLFkXeur25sPIbw==} + /@types/web-bluetooth@0.0.20: + resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} dev: true - /@types/yauzl@2.10.1: - resolution: {integrity: sha512-CHzgNU3qYBnp/O4S3yv2tXPlvMTq0YWSTVg2/JYLqWZGHwwgJGAwd00poay/11asPq8wLFwHzubyInqHIFmmiw==} + /@types/yauzl@2.10.3: + resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} requiresBuild: true dependencies: - '@types/node': 20.8.7 + '@types/node': 20.10.7 dev: true optional: true - /@typescript-eslint/eslint-plugin@6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@4.9.5): - resolution: {integrity: sha512-lgX7F0azQwRPB7t7WAyeHWVfW1YJ9NIgd9mvGhfQpRY56X6AVf8mwM8Wol+0z4liE7XX3QOt8MN1rUKCfSjRIA==} + /@typescript-eslint/eslint-plugin@6.18.0(@typescript-eslint/parser@6.18.0)(eslint@8.56.0)(typescript@4.9.5): + resolution: {integrity: sha512-3lqEvQUdCozi6d1mddWqd+kf8KxmGq2Plzx36BlkjuQe3rSTm/O98cLf0A4uDO+a5N1KD2SeEEl6fW97YHY+6w==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -1214,16 +1320,16 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.9.1 - '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@4.9.5) - '@typescript-eslint/scope-manager': 6.9.0 - '@typescript-eslint/type-utils': 6.9.0(eslint@8.52.0)(typescript@4.9.5) - '@typescript-eslint/utils': 6.9.0(eslint@8.52.0)(typescript@4.9.5) - '@typescript-eslint/visitor-keys': 6.9.0 + '@eslint-community/regexpp': 4.10.0 + '@typescript-eslint/parser': 6.18.0(eslint@8.56.0)(typescript@4.9.5) + '@typescript-eslint/scope-manager': 6.18.0 + '@typescript-eslint/type-utils': 6.18.0(eslint@8.56.0)(typescript@4.9.5) + '@typescript-eslint/utils': 6.18.0(eslint@8.56.0)(typescript@4.9.5) + '@typescript-eslint/visitor-keys': 6.18.0 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.52.0 + eslint: 8.56.0 graphemer: 1.4.0 - ignore: 5.2.4 + ignore: 5.3.0 natural-compare: 1.4.0 semver: 7.5.4 ts-api-utils: 1.0.3(typescript@4.9.5) @@ -1232,8 +1338,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.9.0(eslint@8.52.0)(typescript@4.9.5): - resolution: {integrity: sha512-GZmjMh4AJ/5gaH4XF2eXA8tMnHWP+Pm1mjQR2QN4Iz+j/zO04b9TOvJYOX2sCNIQHtRStKTxRY1FX7LhpJT4Gw==} + /@typescript-eslint/parser@6.18.0(eslint@8.56.0)(typescript@4.9.5): + resolution: {integrity: sha512-v6uR68SFvqhNQT41frCMCQpsP+5vySy6IdgjlzUWoo7ALCnpaWYcz/Ij2k4L8cEsL0wkvOviCMpjmtRtHNOKzA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1242,43 +1348,35 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.9.0 - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/typescript-estree': 6.9.0(typescript@4.9.5) - '@typescript-eslint/visitor-keys': 6.9.0 + '@typescript-eslint/scope-manager': 6.18.0 + '@typescript-eslint/types': 6.18.0 + '@typescript-eslint/typescript-estree': 6.18.0(typescript@4.9.5) + '@typescript-eslint/visitor-keys': 6.18.0 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.52.0 + eslint: 8.56.0 typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@6.7.5: - resolution: {integrity: sha512-GAlk3eQIwWOJeb9F7MKQ6Jbah/vx1zETSDw8likab/eFcqkjSD7BI75SDAeC5N2L0MmConMoPvTsmkrg71+B1A==} + /@typescript-eslint/scope-manager@6.16.0: + resolution: {integrity: sha512-0N7Y9DSPdaBQ3sqSCwlrm9zJwkpOuc6HYm7LpzLAPqBL7dmzAUimr4M29dMkOP/tEwvOCC/Cxo//yOfJD3HUiw==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.7.5 - '@typescript-eslint/visitor-keys': 6.7.5 + '@typescript-eslint/types': 6.16.0 + '@typescript-eslint/visitor-keys': 6.16.0 dev: true - /@typescript-eslint/scope-manager@6.8.0: - resolution: {integrity: sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==} + /@typescript-eslint/scope-manager@6.18.0: + resolution: {integrity: sha512-o/UoDT2NgOJ2VfHpfr+KBY2ErWvCySNUIX/X7O9g8Zzt/tXdpfEU43qbNk8LVuWUT2E0ptzTWXh79i74PP0twA==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.8.0 - '@typescript-eslint/visitor-keys': 6.8.0 + '@typescript-eslint/types': 6.18.0 + '@typescript-eslint/visitor-keys': 6.18.0 dev: true - /@typescript-eslint/scope-manager@6.9.0: - resolution: {integrity: sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw==} - engines: {node: ^16.0.0 || >=18.0.0} - dependencies: - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/visitor-keys': 6.9.0 - dev: true - - /@typescript-eslint/type-utils@6.9.0(eslint@8.52.0)(typescript@4.9.5): - resolution: {integrity: sha512-XXeahmfbpuhVbhSOROIzJ+b13krFmgtc4GlEuu1WBT+RpyGPIA4Y/eGnXzjbDj5gZLzpAXO/sj+IF/x2GtTMjQ==} + /@typescript-eslint/type-utils@6.18.0(eslint@8.56.0)(typescript@4.9.5): + resolution: {integrity: sha512-ZeMtrXnGmTcHciJN1+u2CigWEEXgy1ufoxtWcHORt5kGvpjjIlK9MUhzHm4RM8iVy6dqSaZA/6PVkX6+r+ChjQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1287,54 +1385,28 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.9.0(typescript@4.9.5) - '@typescript-eslint/utils': 6.9.0(eslint@8.52.0)(typescript@4.9.5) + '@typescript-eslint/typescript-estree': 6.18.0(typescript@4.9.5) + '@typescript-eslint/utils': 6.18.0(eslint@8.56.0)(typescript@4.9.5) debug: 4.3.4(supports-color@8.1.1) - eslint: 8.52.0 + eslint: 8.56.0 ts-api-utils: 1.0.3(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@6.7.5: - resolution: {integrity: sha512-WboQBlOXtdj1tDFPyIthpKrUb+kZf2VroLZhxKa/VlwLlLyqv/PwUNgL30BlTVZV1Wu4Asu2mMYPqarSO4L5ZQ==} - engines: {node: ^16.0.0 || >=18.0.0} - dev: true - - /@typescript-eslint/types@6.8.0: - resolution: {integrity: sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==} + /@typescript-eslint/types@6.16.0: + resolution: {integrity: sha512-hvDFpLEvTJoHutVl87+MG/c5C8I6LOgEx05zExTSJDEVU7hhR3jhV8M5zuggbdFCw98+HhZWPHZeKS97kS3JoQ==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/types@6.9.0: - resolution: {integrity: sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw==} + /@typescript-eslint/types@6.18.0: + resolution: {integrity: sha512-/RFVIccwkwSdW/1zeMx3hADShWbgBxBnV/qSrex6607isYjj05t36P6LyONgqdUrNLl5TYU8NIKdHUYpFvExkA==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.7.5(typescript@4.9.5): - resolution: {integrity: sha512-NhJiJ4KdtwBIxrKl0BqG1Ur+uw7FiOnOThcYx9DpOGJ/Abc9z2xNzLeirCG02Ig3vkvrc2qFLmYSSsaITbKjlg==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 6.7.5 - '@typescript-eslint/visitor-keys': 6.7.5 - debug: 4.3.4(supports-color@8.1.1) - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@4.9.5) - typescript: 4.9.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/typescript-estree@6.8.0(typescript@4.9.5): - resolution: {integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==} + /@typescript-eslint/typescript-estree@6.16.0(typescript@4.9.5): + resolution: {integrity: sha512-VTWZuixh/vr7nih6CfrdpmFNLEnoVBF1skfjdyGnNwXOH1SLeHItGdZDHhhAIzd3ACazyY2Fg76zuzOVTaknGA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -1342,11 +1414,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.8.0 - '@typescript-eslint/visitor-keys': 6.8.0 + '@typescript-eslint/types': 6.16.0 + '@typescript-eslint/visitor-keys': 6.16.0 debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 + minimatch: 9.0.3 semver: 7.5.4 ts-api-utils: 1.0.3(typescript@4.9.5) typescript: 4.9.5 @@ -1354,8 +1427,8 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@6.9.0(typescript@4.9.5): - resolution: {integrity: sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ==} + /@typescript-eslint/typescript-estree@6.18.0(typescript@4.9.5): + resolution: {integrity: sha512-klNvl+Ql4NsBNGB4W9TZ2Od03lm7aGvTbs0wYaFYsplVPhr+oeXjlPZCDI4U9jgJIDK38W1FKhacCFzCC+nbIg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -1363,11 +1436,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/visitor-keys': 6.9.0 + '@typescript-eslint/types': 6.18.0 + '@typescript-eslint/visitor-keys': 6.18.0 debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 + minimatch: 9.0.3 semver: 7.5.4 ts-api-utils: 1.0.3(typescript@4.9.5) typescript: 4.9.5 @@ -1375,84 +1449,57 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.7.5(eslint@8.52.0)(typescript@4.9.5): - resolution: {integrity: sha512-pfRRrH20thJbzPPlPc4j0UNGvH1PjPlhlCMq4Yx7EGjV7lvEeGX0U6MJYe8+SyFutWgSHsdbJ3BXzZccYggezA==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) - '@types/json-schema': 7.0.13 - '@types/semver': 7.5.4 - '@typescript-eslint/scope-manager': 6.7.5 - '@typescript-eslint/types': 6.7.5 - '@typescript-eslint/typescript-estree': 6.7.5(typescript@4.9.5) - eslint: 8.52.0 - semver: 7.5.4 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/utils@6.8.0(eslint@8.52.0)(typescript@4.9.5): - resolution: {integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==} + /@typescript-eslint/utils@6.16.0(eslint@8.56.0)(typescript@4.9.5): + resolution: {integrity: sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) - '@types/json-schema': 7.0.13 - '@types/semver': 7.5.4 - '@typescript-eslint/scope-manager': 6.8.0 - '@typescript-eslint/types': 6.8.0 - '@typescript-eslint/typescript-estree': 6.8.0(typescript@4.9.5) - eslint: 8.52.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.6 + '@typescript-eslint/scope-manager': 6.16.0 + '@typescript-eslint/types': 6.16.0 + '@typescript-eslint/typescript-estree': 6.16.0(typescript@4.9.5) + eslint: 8.56.0 semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@6.9.0(eslint@8.52.0)(typescript@4.9.5): - resolution: {integrity: sha512-5Wf+Jsqya7WcCO8me504FBigeQKVLAMPmUzYgDbWchINNh1KJbxCgVya3EQ2MjvJMVeXl3pofRmprqX6mfQkjQ==} + /@typescript-eslint/utils@6.18.0(eslint@8.56.0)(typescript@4.9.5): + resolution: {integrity: sha512-wiKKCbUeDPGaYEYQh1S580dGxJ/V9HI7K5sbGAVklyf+o5g3O+adnS4UNJajplF4e7z2q0uVBaTdT/yLb4XAVA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) - '@types/json-schema': 7.0.13 - '@types/semver': 7.5.4 - '@typescript-eslint/scope-manager': 6.9.0 - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/typescript-estree': 6.9.0(typescript@4.9.5) - eslint: 8.52.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.6 + '@typescript-eslint/scope-manager': 6.18.0 + '@typescript-eslint/types': 6.18.0 + '@typescript-eslint/typescript-estree': 6.18.0(typescript@4.9.5) + eslint: 8.56.0 semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@6.7.5: - resolution: {integrity: sha512-3MaWdDZtLlsexZzDSdQWsFQ9l9nL8B80Z4fImSpyllFC/KLqWQRdEcB+gGGO+N3Q2uL40EsG66wZLsohPxNXvg==} - engines: {node: ^16.0.0 || >=18.0.0} - dependencies: - '@typescript-eslint/types': 6.7.5 - eslint-visitor-keys: 3.4.3 - dev: true - - /@typescript-eslint/visitor-keys@6.8.0: - resolution: {integrity: sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==} + /@typescript-eslint/visitor-keys@6.16.0: + resolution: {integrity: sha512-QSFQLruk7fhs91a/Ep/LqRdbJCZ1Rq03rqBdKT5Ky17Sz8zRLUksqIe9DW0pKtg/Z35/ztbLQ6qpOCN6rOC11A==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/types': 6.16.0 eslint-visitor-keys: 3.4.3 dev: true - /@typescript-eslint/visitor-keys@6.9.0: - resolution: {integrity: sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg==} + /@typescript-eslint/visitor-keys@6.18.0: + resolution: {integrity: sha512-1wetAlSZpewRDb2h9p/Q8kRjdGuqdTAQbkJIOUMLug2LBLG+QOjiWoSj6/3B/hA9/tVTFFdtiKvAYoYnSRW/RA==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/types': 6.18.0 eslint-visitor-keys: 3.4.3 dev: true @@ -1460,15 +1507,15 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@vitejs/plugin-vue@4.4.0(vite@4.5.0)(vue@3.3.6): - resolution: {integrity: sha512-xdguqb+VUwiRpSg+nsc2HtbAUSGak25DXYvpQQi4RVU1Xq1uworyoH/md9Rfd8zMmPR/pSghr309QNcftUVseg==} - engines: {node: ^14.18.0 || >=16.0.0} + /@vitejs/plugin-vue@5.0.2(vite@5.0.11)(vue@3.4.5): + resolution: {integrity: sha512-kEjJHrLb5ePBvjD0SPZwJlw1QTRcjjCA9sB5VyfonoXVBxTS7TMnqL6EkLt1Eu61RDeiuZ/WN9Hf6PxXhPI2uA==} + engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: - vite: ^4.0.0 + vite: ^5.0.0 vue: ^3.2.25 dependencies: - vite: 4.5.0(@types/node@20.8.7) - vue: 3.3.6(typescript@4.9.5) + vite: 5.0.11(@types/node@20.10.7) + vue: 3.4.5(typescript@4.9.5) dev: true /@vitest/coverage-v8@0.34.6(vitest@0.34.6): @@ -1478,15 +1525,15 @@ packages: dependencies: '@ampproject/remapping': 2.2.1 '@bcoe/v8-coverage': 0.2.3 - istanbul-lib-coverage: 3.2.0 + istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 4.0.1 istanbul-reports: 3.1.6 magic-string: 0.30.5 picocolors: 1.0.0 - std-env: 3.4.3 + std-env: 3.7.0 test-exclude: 6.0.0 - v8-to-istanbul: 9.1.3 + v8-to-istanbul: 9.2.0 vitest: 0.34.6(@vitest/ui@0.34.7) transitivePeerDependencies: - supports-color @@ -1528,12 +1575,12 @@ packages: vitest: '>=0.30.1 <1' dependencies: '@vitest/utils': 0.34.7 - fast-glob: 3.3.1 + fast-glob: 3.3.2 fflate: 0.8.1 flatted: 3.2.9 pathe: 1.1.1 picocolors: 1.0.0 - sirv: 2.0.3 + sirv: 2.0.4 vitest: 0.34.6(@vitest/ui@0.34.7) dev: true @@ -1553,107 +1600,97 @@ packages: pretty-format: 29.7.0 dev: true - /@vue/compiler-core@3.3.6: - resolution: {integrity: sha512-2JNjemwaNwf+MkkatATVZi7oAH1Hx0B04DdPH3ZoZ8vKC1xZVP7nl4HIsk8XYd3r+/52sqqoz9TWzYc3yE9dqA==} + /@vue/compiler-core@3.4.5: + resolution: {integrity: sha512-Daka7P1z2AgKjzuueWXhwzIsKu0NkLB6vGbNVEV2iJ8GJTrzraZo/Sk4GWCMRtd/qVi3zwnk+Owbd/xSZbwHtQ==} dependencies: - '@babel/parser': 7.23.0 - '@vue/shared': 3.3.6 + '@babel/parser': 7.23.6 + '@vue/shared': 3.4.5 + entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.0.2 dev: true - /@vue/compiler-dom@3.3.6: - resolution: {integrity: sha512-1MxXcJYMHiTPexjLAJUkNs/Tw2eDf2tY3a0rL+LfuWyiKN2s6jvSwywH3PWD8bKICjfebX3GWx2Os8jkRDq3Ng==} + /@vue/compiler-dom@3.4.5: + resolution: {integrity: sha512-J8YlxknJVd90SXFJ4HwGANSAXsx5I0lK30sO/zvYV7s5gXf7gZR7r/1BmZ2ju7RGH1lnc6bpBc6nL61yW+PsAQ==} dependencies: - '@vue/compiler-core': 3.3.6 - '@vue/shared': 3.3.6 + '@vue/compiler-core': 3.4.5 + '@vue/shared': 3.4.5 dev: true - /@vue/compiler-sfc@3.3.6: - resolution: {integrity: sha512-/Kms6du2h1VrXFreuZmlvQej8B1zenBqIohP0690IUBkJjsFvJxY0crcvVRJ0UhMgSR9dewB+khdR1DfbpArJA==} + /@vue/compiler-sfc@3.4.5: + resolution: {integrity: sha512-jauvkDuSSUbP0ebhfNqljhShA90YEfX/0wZ+w40oZF43IjGyWYjqYaJbvMJwGOd+9+vODW6eSvnk28f0SGV7OQ==} dependencies: - '@babel/parser': 7.23.0 - '@vue/compiler-core': 3.3.6 - '@vue/compiler-dom': 3.3.6 - '@vue/compiler-ssr': 3.3.6 - '@vue/reactivity-transform': 3.3.6 - '@vue/shared': 3.3.6 + '@babel/parser': 7.23.6 + '@vue/compiler-core': 3.4.5 + '@vue/compiler-dom': 3.4.5 + '@vue/compiler-ssr': 3.4.5 + '@vue/shared': 3.4.5 estree-walker: 2.0.2 magic-string: 0.30.5 - postcss: 8.4.31 + postcss: 8.4.32 source-map-js: 1.0.2 dev: true - /@vue/compiler-ssr@3.3.6: - resolution: {integrity: sha512-QTIHAfDCHhjXlYGkUg5KH7YwYtdUM1vcFl/FxFDlD6d0nXAmnjizka3HITp8DGudzHndv2PjKVS44vqqy0vP4w==} + /@vue/compiler-ssr@3.4.5: + resolution: {integrity: sha512-DDdEcDzj2lWTMfUMMtEpLDhURai9LhM0zSZ219jCt7b2Vyl0/jy3keFgCPMitG0V1S1YG4Cmws3lWHWdxHQOpg==} dependencies: - '@vue/compiler-dom': 3.3.6 - '@vue/shared': 3.3.6 + '@vue/compiler-dom': 3.4.5 + '@vue/shared': 3.4.5 dev: true /@vue/devtools-api@6.5.1: resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==} dev: true - /@vue/reactivity-transform@3.3.6: - resolution: {integrity: sha512-RlJl4dHfeO7EuzU1iJOsrlqWyJfHTkJbvYz/IOJWqu8dlCNWtxWX377WI0VsbAgBizjwD+3ZjdnvSyyFW1YVng==} - dependencies: - '@babel/parser': 7.23.0 - '@vue/compiler-core': 3.3.6 - '@vue/shared': 3.3.6 - estree-walker: 2.0.2 - magic-string: 0.30.5 - dev: true - - /@vue/reactivity@3.3.6: - resolution: {integrity: sha512-gtChAumfQz5lSy5jZXfyXbKrIYPf9XEOrIr6rxwVyeWVjFhJwmwPLtV6Yis+M9onzX++I5AVE9j+iPH60U+B8Q==} + /@vue/reactivity@3.4.5: + resolution: {integrity: sha512-BcWkKvjdvqJwb7BhhFkXPLDCecX4d4a6GATvCduJQDLv21PkPowAE5GKuIE5p6RC07/Lp9FMkkq4AYCTVF5KlQ==} dependencies: - '@vue/shared': 3.3.6 + '@vue/shared': 3.4.5 dev: true - /@vue/runtime-core@3.3.6: - resolution: {integrity: sha512-qp7HTP1iw1UW2ZGJ8L3zpqlngrBKvLsDAcq5lA6JvEXHmpoEmjKju7ahM9W2p/h51h0OT5F2fGlP/gMhHOmbUA==} + /@vue/runtime-core@3.4.5: + resolution: {integrity: sha512-wh9ELIOQKeWT9SaUPdLrsxRkZv14jp+SJm9aiQGWio+/MWNM3Lib0wE6CoKEqQ9+SCYyGjDBhTOTtO47kCgbkg==} dependencies: - '@vue/reactivity': 3.3.6 - '@vue/shared': 3.3.6 + '@vue/reactivity': 3.4.5 + '@vue/shared': 3.4.5 dev: true - /@vue/runtime-dom@3.3.6: - resolution: {integrity: sha512-AoX3Cp8NqMXjLbIG9YR6n/pPLWE9TiDdk6wTJHFnl2GpHzDFH1HLBC9wlqqQ7RlnvN3bVLpzPGAAH00SAtOxHg==} + /@vue/runtime-dom@3.4.5: + resolution: {integrity: sha512-n5ewvOjyG3IEpqGBahdPXODFSpVlSz3H4LF76Sx0XAqpIOqyJ5bIb2PrdYuH2ogBMAQPh+o5tnoH4nJpBr8U0Q==} dependencies: - '@vue/runtime-core': 3.3.6 - '@vue/shared': 3.3.6 - csstype: 3.1.2 + '@vue/runtime-core': 3.4.5 + '@vue/shared': 3.4.5 + csstype: 3.1.3 dev: true - /@vue/server-renderer@3.3.6(vue@3.3.6): - resolution: {integrity: sha512-kgLoN43W4ERdZ6dpyy+gnk2ZHtcOaIr5Uc/WUP5DRwutgvluzu2pudsZGoD2b7AEJHByUVMa9k6Sho5lLRCykw==} + /@vue/server-renderer@3.4.5(vue@3.4.5): + resolution: {integrity: sha512-jOFc/VE87yvifQpNju12VcqimH8pBLxdcT+t3xMeiED1K6DfH9SORyhFEoZlW5TG2Vwfn3Ul5KE+1aC99xnSBg==} peerDependencies: - vue: 3.3.6 + vue: 3.4.5 dependencies: - '@vue/compiler-ssr': 3.3.6 - '@vue/shared': 3.3.6 - vue: 3.3.6(typescript@4.9.5) + '@vue/compiler-ssr': 3.4.5 + '@vue/shared': 3.4.5 + vue: 3.4.5(typescript@4.9.5) dev: true - /@vue/shared@3.3.6: - resolution: {integrity: sha512-Xno5pEqg8SVhomD0kTSmfh30ZEmV/+jZtyh39q6QflrjdJCXah5lrnOLi9KB6a5k5aAHXMXjoMnxlzUkCNfWLQ==} + /@vue/shared@3.4.5: + resolution: {integrity: sha512-6XptuzlMvN4l4cDnDw36pdGEV+9njYkQ1ZE0Q6iZLwrKefKaOJyiFmcP3/KBDHbt72cJZGtllAc1GaHe6XGAyg==} dev: true - /@vueuse/core@10.5.0(vue@3.3.6): - resolution: {integrity: sha512-z/tI2eSvxwLRjOhDm0h/SXAjNm8N5ld6/SC/JQs6o6kpJ6Ya50LnEL8g5hoYu005i28L0zqB5L5yAl8Jl26K3A==} + /@vueuse/core@10.7.1(vue@3.4.5): + resolution: {integrity: sha512-74mWHlaesJSWGp1ihg76vAnfVq9NTv1YT0SYhAQ6zwFNdBkkP+CKKJmVOEHcdSnLXCXYiL5e7MaewblfiYLP7g==} dependencies: - '@types/web-bluetooth': 0.0.18 - '@vueuse/metadata': 10.5.0 - '@vueuse/shared': 10.5.0(vue@3.3.6) - vue-demi: 0.14.6(vue@3.3.6) + '@types/web-bluetooth': 0.0.20 + '@vueuse/metadata': 10.7.1 + '@vueuse/shared': 10.7.1(vue@3.4.5) + vue-demi: 0.14.6(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - vue dev: true - /@vueuse/integrations@10.5.0(focus-trap@7.5.4)(vue@3.3.6): - resolution: {integrity: sha512-fm5sXLCK0Ww3rRnzqnCQRmfjDURaI4xMsx+T+cec0ngQqHx/JgUtm8G0vRjwtonIeTBsH1Q8L3SucE+7K7upJQ==} + /@vueuse/integrations@10.7.1(focus-trap@7.5.4)(vue@3.4.5): + resolution: {integrity: sha512-cKo5LEeKVHdBRBtMTOrDPdR0YNtrmN9IBfdcnY2P3m5LHVrsD0xiHUtAH1WKjHQRIErZG6rJUa6GA4tWZt89Og==} peerDependencies: async-validator: '*' axios: '*' @@ -1693,23 +1730,23 @@ packages: universal-cookie: optional: true dependencies: - '@vueuse/core': 10.5.0(vue@3.3.6) - '@vueuse/shared': 10.5.0(vue@3.3.6) + '@vueuse/core': 10.7.1(vue@3.4.5) + '@vueuse/shared': 10.7.1(vue@3.4.5) focus-trap: 7.5.4 - vue-demi: 0.14.6(vue@3.3.6) + vue-demi: 0.14.6(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - vue dev: true - /@vueuse/metadata@10.5.0: - resolution: {integrity: sha512-fEbElR+MaIYyCkeM0SzWkdoMtOpIwO72x8WsZHRE7IggiOlILttqttM69AS13nrDxosnDBYdyy3C5mR1LCxHsw==} + /@vueuse/metadata@10.7.1: + resolution: {integrity: sha512-jX8MbX5UX067DYVsbtrmKn6eG6KMcXxLRLlurGkZku5ZYT3vxgBjui2zajvUZ18QLIjrgBkFRsu7CqTAg18QFw==} dev: true - /@vueuse/shared@10.5.0(vue@3.3.6): - resolution: {integrity: sha512-18iyxbbHYLst9MqU1X1QNdMHIjks6wC7XTVf0KNOv5es/Ms6gjVFCAAWTVP2JStuGqydg3DT+ExpFORUEi9yhg==} + /@vueuse/shared@10.7.1(vue@3.4.5): + resolution: {integrity: sha512-v0jbRR31LSgRY/C5i5X279A/WQjD6/JsMzGa+eqt658oJ75IvQXAeONmwvEMrvJQKnRElq/frzBR7fhmWY5uLw==} dependencies: - vue-demi: 0.14.6(vue@3.3.6) + vue-demi: 0.14.6(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -1723,21 +1760,21 @@ packages: through: 2.3.8 dev: true - /acorn-jsx@5.3.2(acorn@8.10.0): + /acorn-jsx@5.3.2(acorn@8.11.2): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.10.0 + acorn: 8.11.2 dev: true - /acorn-walk@8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + /acorn-walk@8.3.1: + resolution: {integrity: sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==} engines: {node: '>=0.4.0'} dev: true - /acorn@8.10.0: - resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} + /acorn@8.11.2: + resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} engines: {node: '>=0.4.0'} hasBin: true dev: true @@ -1763,23 +1800,23 @@ packages: uri-js: 4.4.1 dev: true - /algoliasearch@4.20.0: - resolution: {integrity: sha512-y+UHEjnOItoNy0bYO+WWmLWBlPwDjKHW6mNHrPi0NkuhpQOOEbrkwQH/wgKFDLh7qlKjzoKeiRtlpewDPDG23g==} + /algoliasearch@4.22.0: + resolution: {integrity: sha512-gfceltjkwh7PxXwtkS8KVvdfK+TSNQAWUeNSxf4dA29qW5tf2EGwa8jkJujlT9jLm17cixMVoGNc+GJFO1Mxhg==} dependencies: - '@algolia/cache-browser-local-storage': 4.20.0 - '@algolia/cache-common': 4.20.0 - '@algolia/cache-in-memory': 4.20.0 - '@algolia/client-account': 4.20.0 - '@algolia/client-analytics': 4.20.0 - '@algolia/client-common': 4.20.0 - '@algolia/client-personalization': 4.20.0 - '@algolia/client-search': 4.20.0 - '@algolia/logger-common': 4.20.0 - '@algolia/logger-console': 4.20.0 - '@algolia/requester-browser-xhr': 4.20.0 - '@algolia/requester-common': 4.20.0 - '@algolia/requester-node-http': 4.20.0 - '@algolia/transporter': 4.20.0 + '@algolia/cache-browser-local-storage': 4.22.0 + '@algolia/cache-common': 4.22.0 + '@algolia/cache-in-memory': 4.22.0 + '@algolia/client-account': 4.22.0 + '@algolia/client-analytics': 4.22.0 + '@algolia/client-common': 4.22.0 + '@algolia/client-personalization': 4.22.0 + '@algolia/client-search': 4.22.0 + '@algolia/logger-common': 4.22.0 + '@algolia/logger-console': 4.22.0 + '@algolia/requester-browser-xhr': 4.22.0 + '@algolia/requester-common': 4.22.0 + '@algolia/requester-node-http': 4.22.0 + '@algolia/transporter': 4.22.0 dev: true /ansi-colors@4.1.3: @@ -1848,7 +1885,7 @@ packages: /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 is-array-buffer: 3.0.2 dev: true @@ -1865,10 +1902,10 @@ packages: resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 - es-shim-unscopables: 1.0.0 + es-abstract: 1.22.3 + es-shim-unscopables: 1.0.2 dev: true /arraybuffer.prototype.slice@1.0.2: @@ -1876,10 +1913,10 @@ packages: engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 - get-intrinsic: 1.2.1 + es-abstract: 1.22.3 + get-intrinsic: 1.2.2 is-array-buffer: 3.0.2 is-shared-array-buffer: 1.0.2 dev: true @@ -1909,8 +1946,8 @@ packages: engines: {node: '>=8'} dev: true - /async@3.2.4: - resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} + /async@3.2.5: + resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} dev: true /asynckit@0.4.0: @@ -1953,11 +1990,6 @@ packages: resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} dev: true - /big-integer@1.6.51: - resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==} - engines: {node: '>=0.6'} - dev: true - /blob-util@2.0.2: resolution: {integrity: sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==} dev: true @@ -1966,17 +1998,6 @@ packages: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} dev: true - /body-scroll-lock@4.0.0-beta.0: - resolution: {integrity: sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==} - dev: true - - /bplist-parser@0.2.0: - resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==} - engines: {node: '>= 5.10.0'} - dependencies: - big-integer: 1.6.51 - dev: true - /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -2017,13 +2038,6 @@ packages: engines: {node: '>=6'} dev: true - /bundle-name@3.0.0: - resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==} - engines: {node: '>=12'} - dependencies: - run-applescript: 5.0.0 - dev: true - /cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -2034,11 +2048,12 @@ packages: engines: {node: '>=6'} dev: true - /call-bind@1.0.2: - resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + /call-bind@1.0.5: + resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} dependencies: function-bind: 1.1.2 - get-intrinsic: 1.2.1 + get-intrinsic: 1.2.2 + set-function-length: 1.1.1 dev: true /callsites@3.1.0: @@ -2191,8 +2206,8 @@ packages: engines: {node: '>= 6'} dev: true - /comment-parser@1.4.0: - resolution: {integrity: sha512-QLyTNiZ2KDOibvFPlZ6ZngVsZ/0gYnE6uTXi5aoDg8ed3AkJAz4sEje3Y8a29hQ1s6A99MZXe47fLAXQ1rTqaw==} + /comment-parser@1.4.1: + resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} engines: {node: '>= 12.0.0'} dev: true @@ -2209,7 +2224,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: @@ -2548,21 +2563,21 @@ packages: which: 2.0.2 dev: true - /csstype@3.1.2: - resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} + /csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} dev: true - /cypress@13.3.2: - resolution: {integrity: sha512-ArLmZObcLC+xxCp7zJZZbhby9FUf5CueLej9dUM4+5j37FTS4iMSgHxQLDu01PydFUvDXcNoIVRCYrHHxD7Ybg==} + /cypress@13.6.2: + resolution: {integrity: sha512-TW3bGdPU4BrfvMQYv1z3oMqj71YI4AlgJgnrycicmPZAXtvywVFZW9DAToshO65D97rCWfG/kqMFsYB6Kp91gQ==} engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} hasBin: true requiresBuild: true dependencies: '@cypress/request': 3.0.1 '@cypress/xvfb': 1.2.4(supports-color@8.1.1) - '@types/node': 18.18.5 + '@types/node': 18.19.3 '@types/sinonjs__fake-timers': 8.1.1 - '@types/sizzle': 2.3.4 + '@types/sizzle': 2.3.8 arch: 2.2.0 blob-util: 2.0.2 bluebird: 3.7.2 @@ -2682,36 +2697,13 @@ packages: engines: {node: '>=0.10.0'} dev: true - /default-browser-id@3.0.0: - resolution: {integrity: sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==} - engines: {node: '>=12'} - dependencies: - bplist-parser: 0.2.0 - untildify: 4.0.0 - dev: true - - /default-browser@4.0.0: - resolution: {integrity: sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==} - engines: {node: '>=14.16'} - dependencies: - bundle-name: 3.0.0 - default-browser-id: 3.0.0 - execa: 7.2.0 - titleize: 3.0.0 - dev: true - /define-data-property@1.1.1: resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.1 + get-intrinsic: 1.2.2 gopd: 1.0.1 - has-property-descriptors: 1.0.0 - dev: true - - /define-lazy-prop@3.0.0: - resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} - engines: {node: '>=12'} + has-property-descriptors: 1.0.1 dev: true /define-properties@1.2.1: @@ -2719,7 +2711,7 @@ packages: engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.1 - has-property-descriptors: 1.0.0 + has-property-descriptors: 1.0.1 object-keys: 1.1.1 dev: true @@ -2847,26 +2839,26 @@ packages: is-arrayish: 0.2.1 dev: true - /es-abstract@1.22.2: - resolution: {integrity: sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==} + /es-abstract@1.22.3: + resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 arraybuffer.prototype.slice: 1.0.2 available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-set-tostringtag: 2.0.1 + call-bind: 1.0.5 + es-set-tostringtag: 2.0.2 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 - get-intrinsic: 1.2.1 + get-intrinsic: 1.2.2 get-symbol-description: 1.0.0 globalthis: 1.0.3 gopd: 1.0.1 - has: 1.0.4 - has-property-descriptors: 1.0.0 + has-property-descriptors: 1.0.1 has-proto: 1.0.1 has-symbols: 1.0.3 - internal-slot: 1.0.5 + hasown: 2.0.0 + internal-slot: 1.0.6 is-array-buffer: 3.0.2 is-callable: 1.2.7 is-negative-zero: 2.0.2 @@ -2875,9 +2867,9 @@ packages: is-string: 1.0.7 is-typed-array: 1.1.12 is-weakref: 1.0.2 - object-inspect: 1.12.3 + object-inspect: 1.13.1 object-keys: 1.1.1 - object.assign: 4.1.4 + object.assign: 4.1.5 regexp.prototype.flags: 1.5.1 safe-array-concat: 1.0.1 safe-regex-test: 1.0.0 @@ -2889,22 +2881,22 @@ packages: typed-array-byte-offset: 1.0.0 typed-array-length: 1.0.4 unbox-primitive: 1.0.2 - which-typed-array: 1.1.11 + which-typed-array: 1.1.13 dev: true - /es-set-tostringtag@2.0.1: - resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} + /es-set-tostringtag@2.0.2: + resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.1 - has: 1.0.4 + get-intrinsic: 1.2.2 has-tostringtag: 1.0.0 + hasown: 2.0.0 dev: true - /es-shim-unscopables@1.0.0: - resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} + /es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} dependencies: - has: 1.0.4 + hasown: 2.0.0 dev: true /es-to-primitive@1.2.1: @@ -2946,34 +2938,35 @@ packages: '@esbuild/win32-x64': 0.18.20 dev: true - /esbuild@0.19.5: - resolution: {integrity: sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==} + /esbuild@0.19.11: + resolution: {integrity: sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.19.5 - '@esbuild/android-arm64': 0.19.5 - '@esbuild/android-x64': 0.19.5 - '@esbuild/darwin-arm64': 0.19.5 - '@esbuild/darwin-x64': 0.19.5 - '@esbuild/freebsd-arm64': 0.19.5 - '@esbuild/freebsd-x64': 0.19.5 - '@esbuild/linux-arm': 0.19.5 - '@esbuild/linux-arm64': 0.19.5 - '@esbuild/linux-ia32': 0.19.5 - '@esbuild/linux-loong64': 0.19.5 - '@esbuild/linux-mips64el': 0.19.5 - '@esbuild/linux-ppc64': 0.19.5 - '@esbuild/linux-riscv64': 0.19.5 - '@esbuild/linux-s390x': 0.19.5 - '@esbuild/linux-x64': 0.19.5 - '@esbuild/netbsd-x64': 0.19.5 - '@esbuild/openbsd-x64': 0.19.5 - '@esbuild/sunos-x64': 0.19.5 - '@esbuild/win32-arm64': 0.19.5 - '@esbuild/win32-ia32': 0.19.5 - '@esbuild/win32-x64': 0.19.5 + '@esbuild/aix-ppc64': 0.19.11 + '@esbuild/android-arm': 0.19.11 + '@esbuild/android-arm64': 0.19.11 + '@esbuild/android-x64': 0.19.11 + '@esbuild/darwin-arm64': 0.19.11 + '@esbuild/darwin-x64': 0.19.11 + '@esbuild/freebsd-arm64': 0.19.11 + '@esbuild/freebsd-x64': 0.19.11 + '@esbuild/linux-arm': 0.19.11 + '@esbuild/linux-arm64': 0.19.11 + '@esbuild/linux-ia32': 0.19.11 + '@esbuild/linux-loong64': 0.19.11 + '@esbuild/linux-mips64el': 0.19.11 + '@esbuild/linux-ppc64': 0.19.11 + '@esbuild/linux-riscv64': 0.19.11 + '@esbuild/linux-s390x': 0.19.11 + '@esbuild/linux-x64': 0.19.11 + '@esbuild/netbsd-x64': 0.19.11 + '@esbuild/openbsd-x64': 0.19.11 + '@esbuild/sunos-x64': 0.19.11 + '@esbuild/win32-arm64': 0.19.11 + '@esbuild/win32-ia32': 0.19.11 + '@esbuild/win32-x64': 0.19.11 dev: true /escalade@3.1.1: @@ -2991,21 +2984,21 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-prettier@9.0.0(eslint@8.52.0): - resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} + /eslint-config-prettier@9.1.0(eslint@8.56.0): + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.52.0 + eslint: 8.56.0 dev: true - /eslint-define-config@1.24.1: - resolution: {integrity: sha512-o36vBhPSWyIQlHoMqGhhcGmOOm2A2ccBVIdLTG/AWdm9YmjpsLpf+5ntf9LlHR6dduLREgxtGwvwPwSt7vnXJg==} - engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>= 8.6.0'} + /eslint-define-config@2.1.0: + resolution: {integrity: sha512-QUp6pM9pjKEVannNAbSJNeRuYwW3LshejfyBBpjeMGaJjaDUpVps4C6KVR8R7dWZnD3i0synmrE36znjTkJvdQ==} + engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>=8.6.0'} dev: true - /eslint-gitignore@0.1.0(eslint@8.52.0): + /eslint-gitignore@0.1.0(eslint@8.56.0): resolution: {integrity: sha512-VFvY5Wyjuz5xXDC/NeONHzsh4YQNok2Gzg4SftAAuhkbrdHv5CChjfiFyLKhRlgOdCJr5kBquaLXHtuDBTW2/Q==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -3013,20 +3006,20 @@ packages: dependencies: array.prototype.flatmap: 1.3.2 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.52.0 - fast-glob: 3.3.1 + eslint: 8.56.0 + fast-glob: 3.3.2 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-deprecation@2.0.0(eslint@8.52.0)(typescript@4.9.5): + /eslint-plugin-deprecation@2.0.0(eslint@8.56.0)(typescript@4.9.5): resolution: {integrity: sha512-OAm9Ohzbj11/ZFyICyR5N6LbOIvQMp7ZU2zI7Ej0jIc8kiGUERXPNMfw2QqqHD1ZHtjMub3yPZILovYEYucgoQ==} peerDependencies: eslint: ^7.0.0 || ^8.0.0 typescript: ^4.2.4 || ^5.0.0 dependencies: - '@typescript-eslint/utils': 6.7.5(eslint@8.52.0)(typescript@4.9.5) - eslint: 8.52.0 + '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@4.9.5) + eslint: 8.56.0 tslib: 2.6.2 tsutils: 3.21.0(typescript@4.9.5) typescript: 4.9.5 @@ -3034,28 +3027,28 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc@46.8.2(eslint@8.52.0): - resolution: {integrity: sha512-5TSnD018f3tUJNne4s4gDWQflbsgOycIKEUBoCLn6XtBMgNHxQFmV8vVxUtiPxAQq8lrX85OaSG/2gnctxw9uQ==} + /eslint-plugin-jsdoc@46.10.1(eslint@8.56.0): + resolution: {integrity: sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==} engines: {node: '>=16'} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 dependencies: - '@es-joy/jsdoccomment': 0.40.1 + '@es-joy/jsdoccomment': 0.41.0 are-docs-informative: 0.0.2 - comment-parser: 1.4.0 + comment-parser: 1.4.1 debug: 4.3.4(supports-color@8.1.1) escape-string-regexp: 4.0.0 - eslint: 8.52.0 + eslint: 8.56.0 esquery: 1.5.0 is-builtin-module: 3.2.1 semver: 7.5.4 - spdx-expression-parse: 3.0.1 + spdx-expression-parse: 4.0.0 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-prettier@5.0.1(eslint-config-prettier@9.0.0)(eslint@8.52.0)(prettier@3.0.3): - resolution: {integrity: sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==} + /eslint-plugin-prettier@5.1.2(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1): + resolution: {integrity: sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: '@types/eslint': '>=8.0.0' @@ -3068,24 +3061,24 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.52.0 - eslint-config-prettier: 9.0.0(eslint@8.52.0) - prettier: 3.0.3 + eslint: 8.56.0 + eslint-config-prettier: 9.1.0(eslint@8.56.0) + prettier: 3.1.1 prettier-linter-helpers: 1.0.0 - synckit: 0.8.5 + synckit: 0.8.8 dev: true - /eslint-plugin-unicorn@49.0.0(eslint@8.52.0): + /eslint-plugin-unicorn@49.0.0(eslint@8.56.0): resolution: {integrity: sha512-0fHEa/8Pih5cmzFW5L7xMEfUTvI9WKeQtjmKpTUmY+BiFCDxkxrTdnURJOHKykhtwIeyYsxnecbGvDCml++z4Q==} engines: {node: '>=16'} peerDependencies: eslint: '>=8.52.0' dependencies: '@babel/helper-validator-identifier': 7.22.20 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) ci-info: 3.9.0 clean-regexp: 1.0.0 - eslint: 8.52.0 + eslint: 8.56.0 esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -3098,9 +3091,9 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-vitest@0.3.8(@typescript-eslint/eslint-plugin@6.9.0)(eslint@8.52.0)(typescript@4.9.5)(vitest@0.34.6): - resolution: {integrity: sha512-MYQJzg3i+nLkaIQgjnOhtqHYIt0W6nErqAOKI3LTSQ2aOgcNHGYTwOhpnwGC1IXTvGWjKgAwb7rHwLpcHWHSAQ==} - engines: {node: 14.x || >= 16} + /eslint-plugin-vitest@0.3.20(@typescript-eslint/eslint-plugin@6.18.0)(eslint@8.56.0)(typescript@4.9.5)(vitest@0.34.6): + resolution: {integrity: sha512-O05k4j9TGMOkkghj9dRgpeLDyOSiVIxQWgNDPfhYPm5ioJsehcYV/zkRLekQs+c8+RBCVXucSED3fYOyy2EoWA==} + engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: '@typescript-eslint/eslint-plugin': '*' eslint: '>=8.0.0' @@ -3108,10 +3101,12 @@ packages: peerDependenciesMeta: '@typescript-eslint/eslint-plugin': optional: true + vitest: + optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@4.9.5) - '@typescript-eslint/utils': 6.8.0(eslint@8.52.0)(typescript@4.9.5) - eslint: 8.52.0 + '@typescript-eslint/eslint-plugin': 6.18.0(@typescript-eslint/parser@6.18.0)(eslint@8.56.0)(typescript@4.9.5) + '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@4.9.5) + eslint: 8.56.0 vitest: 0.34.6(@vitest/ui@0.34.7) transitivePeerDependencies: - supports-color @@ -3131,15 +3126,15 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.52.0: - resolution: {integrity: sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==} + /eslint@8.56.0: + resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) - '@eslint-community/regexpp': 4.9.1 - '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.52.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@eslint-community/regexpp': 4.10.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.56.0 '@humanwhocodes/config-array': 0.11.13 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -3159,9 +3154,9 @@ packages: file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.23.0 + globals: 13.24.0 graphemer: 1.4.0 - ignore: 5.2.4 + ignore: 5.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -3182,8 +3177,8 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.10.0 - acorn-jsx: 5.3.2(acorn@8.10.0) + acorn: 8.11.2 + acorn-jsx: 5.3.2(acorn@8.11.2) eslint-visitor-keys: 3.4.3 dev: true @@ -3234,36 +3229,6 @@ packages: strip-final-newline: 2.0.0 dev: true - /execa@5.1.1: - resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} - engines: {node: '>=10'} - dependencies: - cross-spawn: 7.0.3 - get-stream: 6.0.1 - human-signals: 2.1.0 - is-stream: 2.0.1 - merge-stream: 2.0.0 - npm-run-path: 4.0.1 - onetime: 5.1.2 - signal-exit: 3.0.7 - strip-final-newline: 2.0.0 - dev: true - - /execa@7.2.0: - resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==} - engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} - dependencies: - cross-spawn: 7.0.3 - get-stream: 6.0.1 - human-signals: 4.3.1 - is-stream: 3.0.0 - merge-stream: 2.0.0 - npm-run-path: 5.1.0 - onetime: 6.0.0 - signal-exit: 3.0.7 - strip-final-newline: 3.0.0 - dev: true - /executable@4.1.1: resolution: {integrity: sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==} engines: {node: '>=4'} @@ -3284,7 +3249,7 @@ packages: get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: - '@types/yauzl': 2.10.1 + '@types/yauzl': 2.10.3 transitivePeerDependencies: - supports-color dev: true @@ -3302,8 +3267,8 @@ packages: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} dev: true - /fast-glob@3.3.1: - resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} + /fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3321,8 +3286,8 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true - /fastq@1.15.0: - resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + /fastq@1.16.0: + resolution: {integrity: sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==} dependencies: reusify: 1.0.4 dev: true @@ -3348,7 +3313,7 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flat-cache: 3.1.1 + flat-cache: 3.2.0 dev: true /fill-range@7.0.1: @@ -3396,9 +3361,9 @@ packages: path-exists: 5.0.0 dev: true - /flat-cache@3.1.1: - resolution: {integrity: sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==} - engines: {node: '>=12.0.0'} + /flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} dependencies: flatted: 3.2.9 keyv: 4.5.4 @@ -3449,7 +3414,7 @@ packages: at-least-node: 1.0.0 graceful-fs: 4.2.11 jsonfile: 6.1.0 - universalify: 2.0.0 + universalify: 2.0.1 dev: true /fs.realpath@1.0.0: @@ -3472,9 +3437,9 @@ packages: resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 + es-abstract: 1.22.3 functions-have-names: 1.2.3 dev: true @@ -3491,13 +3456,13 @@ packages: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} dev: true - /get-intrinsic@1.2.1: - resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + /get-intrinsic@1.2.2: + resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} dependencies: function-bind: 1.1.2 - has: 1.0.4 has-proto: 1.0.1 has-symbols: 1.0.3 + hasown: 2.0.0 dev: true /get-pkg-repo@4.2.1: @@ -3518,17 +3483,12 @@ packages: pump: 3.0.0 dev: true - /get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} - dev: true - /get-symbol-description@1.0.0: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 dev: true /get-tsconfig@4.7.2: @@ -3540,7 +3500,7 @@ packages: /getos@3.2.1: resolution: {integrity: sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==} dependencies: - async: 3.2.4 + async: 3.2.5 dev: true /getpass@0.1.7: @@ -3647,8 +3607,8 @@ packages: ini: 2.0.0 dev: true - /globals@13.23.0: - resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==} + /globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -3667,8 +3627,8 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.3.1 - ignore: 5.2.4 + fast-glob: 3.3.2 + ignore: 5.3.0 merge2: 1.4.1 slash: 3.0.0 dev: true @@ -3676,7 +3636,7 @@ packages: /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.2.1 + get-intrinsic: 1.2.2 dev: true /graceful-fs@4.2.11: @@ -3719,10 +3679,10 @@ packages: engines: {node: '>=8'} dev: true - /has-property-descriptors@1.0.0: - resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + /has-property-descriptors@1.0.1: + resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} dependencies: - get-intrinsic: 1.2.1 + get-intrinsic: 1.2.2 dev: true /has-proto@1.0.1: @@ -3742,9 +3702,11 @@ packages: has-symbols: 1.0.3 dev: true - /has@1.0.4: - resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==} - engines: {node: '>= 0.4.0'} + /hasown@2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 dev: true /hosted-git-info@2.8.9: @@ -3762,7 +3724,7 @@ packages: resolution: {integrity: sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==} engines: {node: ^16.14.0 || >=18.0.0} dependencies: - lru-cache: 10.0.1 + lru-cache: 10.1.0 dev: true /html-escaper@2.0.2: @@ -3784,7 +3746,7 @@ packages: dependencies: assert-plus: 1.0.0 jsprim: 2.0.2 - sshpk: 1.17.0 + sshpk: 1.18.0 dev: true /human-signals@1.1.1: @@ -3792,22 +3754,12 @@ packages: engines: {node: '>=8.12.0'} dev: true - /human-signals@2.1.0: - resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} - engines: {node: '>=10.17.0'} - dev: true - - /human-signals@4.3.1: - resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==} - engines: {node: '>=14.18.0'} - dev: true - /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: true - /ignore@5.2.4: - resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} + /ignore@5.3.0: + resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} engines: {node: '>= 4'} dev: true @@ -3849,20 +3801,20 @@ packages: engines: {node: '>=10'} dev: true - /internal-slot@1.0.5: - resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} + /internal-slot@1.0.6: + resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.1 - has: 1.0.4 + get-intrinsic: 1.2.2 + hasown: 2.0.0 side-channel: 1.0.4 dev: true /is-array-buffer@3.0.2: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 is-typed-array: 1.1.12 dev: true @@ -3880,7 +3832,7 @@ packages: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 has-tostringtag: 1.0.0 dev: true @@ -3903,10 +3855,10 @@ packages: ci-info: 3.9.0 dev: true - /is-core-module@2.13.0: - resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} + /is-core-module@2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} dependencies: - has: 1.0.4 + hasown: 2.0.0 dev: true /is-date-object@1.0.5: @@ -3916,18 +3868,6 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-docker@2.2.1: - resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} - engines: {node: '>=8'} - hasBin: true - dev: true - - /is-docker@3.0.0: - resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - hasBin: true - dev: true - /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -3945,14 +3885,6 @@ packages: is-extglob: 2.1.1 dev: true - /is-inside-container@1.0.0: - resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} - engines: {node: '>=14.16'} - hasBin: true - dependencies: - is-docker: 3.0.0 - dev: true - /is-installed-globally@0.4.0: resolution: {integrity: sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==} engines: {node: '>=10'} @@ -4002,14 +3934,14 @@ packages: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 has-tostringtag: 1.0.0 dev: true /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 dev: true /is-stream@2.0.1: @@ -4017,11 +3949,6 @@ packages: engines: {node: '>=8'} dev: true - /is-stream@3.0.0: - resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true - /is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -4054,7 +3981,7 @@ packages: resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} engines: {node: '>= 0.4'} dependencies: - which-typed-array: 1.1.11 + which-typed-array: 1.1.13 dev: true /is-typedarray@1.0.0: @@ -4069,14 +3996,7 @@ packages: /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: - call-bind: 1.0.2 - dev: true - - /is-wsl@2.2.0: - resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} - engines: {node: '>=8'} - dependencies: - is-docker: 2.2.1 + call-bind: 1.0.5 dev: true /isarray@1.0.0: @@ -4095,8 +4015,8 @@ packages: resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} dev: true - /istanbul-lib-coverage@3.2.0: - resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} + /istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} dev: true @@ -4104,7 +4024,7 @@ packages: resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} engines: {node: '>=10'} dependencies: - istanbul-lib-coverage: 3.2.0 + istanbul-lib-coverage: 3.2.2 make-dir: 4.0.0 supports-color: 7.2.0 dev: true @@ -4114,7 +4034,7 @@ packages: engines: {node: '>=10'} dependencies: debug: 4.3.4(supports-color@8.1.1) - istanbul-lib-coverage: 3.2.0 + istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: - supports-color @@ -4180,8 +4100,8 @@ packages: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true - /json-parse-even-better-errors@3.0.0: - resolution: {integrity: sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==} + /json-parse-even-better-errors@3.0.1: + resolution: {integrity: sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true @@ -4208,7 +4128,7 @@ packages: /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} dependencies: - universalify: 2.0.0 + universalify: 2.0.1 optionalDependencies: graceful-fs: 4.2.11 dev: true @@ -4256,8 +4176,8 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true - /lines-and-columns@2.0.3: - resolution: {integrity: sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==} + /lines-and-columns@2.0.4: + resolution: {integrity: sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true @@ -4373,8 +4293,8 @@ packages: get-func-name: 2.0.2 dev: true - /lru-cache@10.0.1: - resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} + /lru-cache@10.1.0: + resolution: {integrity: sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==} engines: {node: 14 || >=16.14} dev: true @@ -4437,7 +4357,7 @@ packages: resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} engines: {node: '>=10'} dependencies: - '@types/minimist': 1.2.3 + '@types/minimist': 1.2.5 camelcase-keys: 6.2.2 decamelize-keys: 1.1.1 hard-rejection: 2.1.0 @@ -4484,11 +4404,6 @@ packages: engines: {node: '>=6'} dev: true - /mimic-fn@4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} - dev: true - /min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -4525,17 +4440,17 @@ packages: engines: {node: '>=16 || 14 >=14.17'} dev: true - /minisearch@6.1.0: - resolution: {integrity: sha512-PNxA/X8pWk+TiqPbsoIYH0GQ5Di7m6326/lwU/S4mlo4wGQddIcf/V//1f9TB0V4j59b57b+HZxt8h3iMROGvg==} + /minisearch@6.3.0: + resolution: {integrity: sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==} dev: true /mlly@1.4.2: resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} dependencies: - acorn: 8.10.0 + acorn: 8.11.2 pathe: 1.1.1 pkg-types: 1.0.3 - ufo: 1.3.1 + ufo: 1.3.2 dev: true /modify-values@1.0.1: @@ -4543,8 +4458,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /mrmime@1.0.1: - resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} + /mrmime@2.0.0: + resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} engines: {node: '>=10'} dev: true @@ -4556,8 +4471,8 @@ packages: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true - /nanoid@3.3.6: - resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + /nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: true @@ -4588,7 +4503,7 @@ packages: engines: {node: '>=10'} dependencies: hosted-git-info: 4.1.0 - is-core-module: 2.13.0 + is-core-module: 2.13.1 semver: 7.5.4 validate-npm-package-license: 3.0.4 dev: true @@ -4598,7 +4513,7 @@ packages: engines: {node: ^16.14.0 || >=18.0.0} dependencies: hosted-git-info: 7.0.1 - is-core-module: 2.13.0 + is-core-module: 2.13.1 semver: 7.5.4 validate-npm-package-license: 3.0.4 dev: true @@ -4626,15 +4541,8 @@ packages: path-key: 3.1.1 dev: true - /npm-run-path@5.1.0: - resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - path-key: 4.0.0 - dev: true - - /object-inspect@1.12.3: - resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + /object-inspect@1.13.1: + resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} dev: true /object-keys@1.1.1: @@ -4642,11 +4550,11 @@ packages: engines: {node: '>= 0.4'} dev: true - /object.assign@4.1.4: - resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} + /object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 @@ -4665,23 +4573,6 @@ packages: mimic-fn: 2.1.0 dev: true - /onetime@6.0.0: - resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} - engines: {node: '>=12'} - dependencies: - mimic-fn: 4.0.0 - dev: true - - /open@9.1.0: - resolution: {integrity: sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==} - engines: {node: '>=14.16'} - dependencies: - default-browser: 4.0.0 - define-lazy-prop: 3.0.0 - is-inside-container: 1.0.0 - is-wsl: 2.2.0 - dev: true - /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} @@ -4797,20 +4688,20 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 dev: true - /parse-json@7.1.0: - resolution: {integrity: sha512-ihtdrgbqdONYD156Ap6qTcaGcGdkdAxodO1wLqQ/j7HP1u2sFYppINiq4jyC8F+Nm+4fVufylCV00QmkTHkSUg==} + /parse-json@7.1.1: + resolution: {integrity: sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==} engines: {node: '>=16'} dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 error-ex: 1.3.2 - json-parse-even-better-errors: 3.0.0 - lines-and-columns: 2.0.3 + json-parse-even-better-errors: 3.0.1 + lines-and-columns: 2.0.4 type-fest: 3.13.1 dev: true @@ -4848,11 +4739,6 @@ packages: engines: {node: '>=8'} dev: true - /path-key@4.0.0: - resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} - engines: {node: '>=12'} - dev: true - /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true @@ -4861,7 +4747,7 @@ packages: resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} dependencies: - lru-cache: 10.0.1 + lru-cache: 10.1.0 minipass: 7.0.4 dev: true @@ -4931,17 +4817,17 @@ packages: engines: {node: '>=4'} dev: true - /postcss@8.4.31: - resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + /postcss@8.4.32: + resolution: {integrity: sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==} engines: {node: ^10 || ^12 || >=14} dependencies: - nanoid: 3.3.6 + nanoid: 3.3.7 picocolors: 1.0.0 source-map-js: 1.0.2 dev: true - /preact@10.18.1: - resolution: {integrity: sha512-mKUD7RRkQQM6s7Rkmi7IFkoEHjuFqRQUaXamO61E6Nn7vqF/bo7EZCmSyrUnp2UWHw0O7XjZ2eeXis+m7tf4lg==} + /preact@10.19.3: + resolution: {integrity: sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==} dev: true /prelude-ls@1.2.1: @@ -4956,8 +4842,8 @@ packages: fast-diff: 1.3.0 dev: true - /prettier-plugin-organize-imports@3.2.3(prettier@3.0.3)(typescript@4.9.5): - resolution: {integrity: sha512-KFvk8C/zGyvUaE3RvxN2MhCLwzV6OBbFSkwZ2OamCrs9ZY4i5L77jQ/w4UmUr+lqX8qbaqVq6bZZkApn+IgJSg==} + /prettier-plugin-organize-imports@3.2.4(prettier@3.1.1)(typescript@4.9.5): + resolution: {integrity: sha512-6m8WBhIp0dfwu0SkgfOxJqh+HpdyfqSSLfKKRZSFbDuEQXDDndb8fTpRWkUrX/uBenkex3MgnVk0J3b3Y5byog==} peerDependencies: '@volar/vue-language-plugin-pug': ^1.0.4 '@volar/vue-typescript': ^1.0.4 @@ -4969,12 +4855,12 @@ packages: '@volar/vue-typescript': optional: true dependencies: - prettier: 3.0.3 + prettier: 3.1.1 typescript: 4.9.5 dev: true - /prettier@3.0.3: - resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} + /prettier@3.1.1: + resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} engines: {node: '>=14'} hasBin: true dev: true @@ -5017,8 +4903,8 @@ packages: once: 1.4.0 dev: true - /punycode@2.3.0: - resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} + /punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} dev: true @@ -5057,7 +4943,7 @@ packages: dependencies: find-up: 6.3.0 read-pkg: 8.1.0 - type-fest: 4.4.0 + type-fest: 4.9.0 dev: true /read-pkg-up@3.0.0: @@ -5090,7 +4976,7 @@ packages: resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} engines: {node: '>=8'} dependencies: - '@types/normalize-package-data': 2.4.2 + '@types/normalize-package-data': 2.4.4 normalize-package-data: 2.5.0 parse-json: 5.2.0 type-fest: 0.6.0 @@ -5100,10 +4986,10 @@ packages: resolution: {integrity: sha512-PORM8AgzXeskHO/WEv312k9U03B8K9JSiWF/8N9sUuFjBa+9SF2u6K7VClzXwDXab51jCd8Nd36CNM+zR97ScQ==} engines: {node: '>=16'} dependencies: - '@types/normalize-package-data': 2.4.2 + '@types/normalize-package-data': 2.4.4 normalize-package-data: 6.0.0 - parse-json: 7.1.0 - type-fest: 4.4.0 + parse-json: 7.1.1 + type-fest: 4.9.0 dev: true /readable-stream@2.3.8: @@ -5144,7 +5030,7 @@ packages: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 set-function-name: 2.0.1 dev: true @@ -5159,7 +5045,7 @@ packages: /request-progress@3.0.0: resolution: {integrity: sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==} dependencies: - throttleit: 1.0.0 + throttleit: 1.0.1 dev: true /require-directory@2.1.1: @@ -5184,7 +5070,7 @@ packages: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: - is-core-module: 2.13.0 + is-core-module: 2.13.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -5229,11 +5115,25 @@ packages: fsevents: 2.3.3 dev: true - /run-applescript@5.0.0: - resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} - engines: {node: '>=12'} - dependencies: - execa: 5.1.1 + /rollup@4.9.1: + resolution: {integrity: sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.9.1 + '@rollup/rollup-android-arm64': 4.9.1 + '@rollup/rollup-darwin-arm64': 4.9.1 + '@rollup/rollup-darwin-x64': 4.9.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.1 + '@rollup/rollup-linux-arm64-gnu': 4.9.1 + '@rollup/rollup-linux-arm64-musl': 4.9.1 + '@rollup/rollup-linux-riscv64-gnu': 4.9.1 + '@rollup/rollup-linux-x64-gnu': 4.9.1 + '@rollup/rollup-linux-x64-musl': 4.9.1 + '@rollup/rollup-win32-arm64-msvc': 4.9.1 + '@rollup/rollup-win32-ia32-msvc': 4.9.1 + '@rollup/rollup-win32-x64-msvc': 4.9.1 + fsevents: 2.3.3 dev: true /run-parallel@1.2.0: @@ -5252,8 +5152,8 @@ packages: resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} engines: {node: '>=0.4'} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 has-symbols: 1.0.3 isarray: 2.0.5 dev: true @@ -5269,8 +5169,8 @@ packages: /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 is-regex: 1.1.4 dev: true @@ -5286,11 +5186,11 @@ packages: htmlparser2: 8.0.2 is-plain-object: 5.0.0 parse-srcset: 1.0.2 - postcss: 8.4.31 + postcss: 8.4.32 dev: true - /search-insights@2.9.0: - resolution: {integrity: sha512-bkWW9nIHOFkLwjQ1xqVaMbjjO5vhP26ERsH9Y3pKr8imthofEFIxlnOabkmGcw6ksRj9jWidcI65vvjJH/nTGg==} + /search-insights@2.13.0: + resolution: {integrity: sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==} dev: true /semver@5.7.2: @@ -5311,13 +5211,23 @@ packages: lru-cache: 6.0.0 dev: true + /set-function-length@1.1.1: + resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.1 + get-intrinsic: 1.2.2 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + dev: true + /set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.1 functions-have-names: 1.2.3 - has-property-descriptors: 1.0.0 + has-property-descriptors: 1.0.1 dev: true /shebang-command@1.2.0: @@ -5348,8 +5258,8 @@ packages: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} dev: true - /shiki@0.14.5: - resolution: {integrity: sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw==} + /shiki@0.14.7: + resolution: {integrity: sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==} dependencies: ansi-sequence-parser: 1.1.1 jsonc-parser: 3.2.0 @@ -5357,12 +5267,28 @@ packages: vscode-textmate: 8.0.0 dev: true + /shikiji-core@0.9.17: + resolution: {integrity: sha512-r1FWTXk6SO2aYqfWgcsJ11MuVQ1ymPSdXzJjK7q8EXuyqu8yc2N5qrQy5+BL6gTVOaF4yLjbxFjF+KTRM1Sp8Q==} + dev: true + + /shikiji-transformers@0.9.17: + resolution: {integrity: sha512-2CCG9qSLS6Bn/jbeUTEuvC6YSuP8gm8VyX5VjmCvDKyCPGhlLJbH1k/kg9wfRt7cJqpYjhdMDgT5rkdYrOZnsA==} + dependencies: + shikiji: 0.9.17 + dev: true + + /shikiji@0.9.17: + resolution: {integrity: sha512-0z/1NfkhBkm3ijrfFeHg3G9yDNuHhXdAGbQm7tRxj4WQ5z2y0XDbnagFyKyuV2ebCTS1Mwy1I3n0Fzcc/4xdmw==} + dependencies: + shikiji-core: 0.9.17 + dev: true + /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - object-inspect: 1.12.3 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 + object-inspect: 1.13.1 dev: true /siginfo@2.0.0: @@ -5378,12 +5304,12 @@ packages: engines: {node: '>=14'} dev: true - /sirv@2.0.3: - resolution: {integrity: sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==} + /sirv@2.0.4: + resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} dependencies: - '@polka/url': 1.0.0-next.23 - mrmime: 1.0.1 + '@polka/url': 1.0.0-next.24 + mrmime: 2.0.0 totalist: 3.0.1 dev: true @@ -5445,6 +5371,13 @@ packages: spdx-license-ids: 3.0.16 dev: true + /spdx-expression-parse@4.0.0: + resolution: {integrity: sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==} + dependencies: + spdx-exceptions: 2.3.0 + spdx-license-ids: 3.0.16 + dev: true + /spdx-license-ids@3.0.16: resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==} dev: true @@ -5466,8 +5399,8 @@ packages: through: 2.3.8 dev: true - /sshpk@1.17.0: - resolution: {integrity: sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==} + /sshpk@1.18.0: + resolution: {integrity: sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==} engines: {node: '>=0.10.0'} hasBin: true dependencies: @@ -5507,8 +5440,8 @@ packages: yargs: 16.2.0 dev: true - /std-env@3.4.3: - resolution: {integrity: sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==} + /std-env@3.7.0: + resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} dev: true /string-width@4.2.3: @@ -5533,34 +5466,34 @@ packages: resolution: {integrity: sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 + es-abstract: 1.22.3 dev: true /string.prototype.trim@1.2.8: resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 + es-abstract: 1.22.3 dev: true /string.prototype.trimend@1.0.7: resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 + es-abstract: 1.22.3 dev: true /string.prototype.trimstart@1.0.7: resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.2 + es-abstract: 1.22.3 dev: true /string_decoder@1.1.1: @@ -5604,11 +5537,6 @@ packages: engines: {node: '>=6'} dev: true - /strip-final-newline@3.0.0: - resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} - engines: {node: '>=12'} - dev: true - /strip-indent@3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -5624,7 +5552,7 @@ packages: /strip-literal@1.3.0: resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} dependencies: - acorn: 8.10.0 + acorn: 8.11.2 dev: true /supports-color@5.5.0: @@ -5653,11 +5581,11 @@ packages: engines: {node: '>= 0.4'} dev: true - /synckit@0.8.5: - resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} + /synckit@0.8.8: + resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} engines: {node: ^14.18.0 || >=16.0.0} dependencies: - '@pkgr/utils': 2.4.2 + '@pkgr/core': 0.1.0 tslib: 2.6.2 dev: true @@ -5700,8 +5628,8 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true - /throttleit@1.0.0: - resolution: {integrity: sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==} + /throttleit@1.0.1: + resolution: {integrity: sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ==} dev: true /through2@2.0.5: @@ -5735,11 +5663,6 @@ packages: engines: {node: '>=14.0.0'} dev: true - /titleize@3.0.0: - resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} - engines: {node: '>=12'} - dev: true - /tmp@0.2.1: resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==} engines: {node: '>=8.17.0'} @@ -5769,7 +5692,7 @@ packages: engines: {node: '>=6'} dependencies: psl: 1.9.0 - punycode: 2.3.0 + punycode: 2.3.1 universalify: 0.2.0 url-parse: 1.5.10 dev: true @@ -5874,8 +5797,8 @@ packages: engines: {node: '>=14.16'} dev: true - /type-fest@4.4.0: - resolution: {integrity: sha512-HT3RRs7sTfY22KuPQJkD/XjbTbxgP2Je5HPt6H6JEGvcjHd5Lqru75EbrP3tb4FYjNJ+DjLp+MNQTFQU0mhXNw==} + /type-fest@4.9.0: + resolution: {integrity: sha512-KS/6lh/ynPGiHD/LnAobrEFq3Ad4pBzOlJ1wAnJx9N4EYoqFhMfLIBjUT2UEx4wg5ZE+cC1ob6DCSpppVo+rtg==} engines: {node: '>=16'} dev: true @@ -5883,8 +5806,8 @@ packages: resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 is-typed-array: 1.1.12 dev: true @@ -5892,7 +5815,7 @@ packages: resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 @@ -5903,7 +5826,7 @@ packages: engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.2 + call-bind: 1.0.5 for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 @@ -5912,7 +5835,7 @@ packages: /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 for-each: 0.3.3 is-typed-array: 1.1.12 dev: true @@ -5921,17 +5844,17 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true - /typedoc@0.24.8(typescript@4.9.5): - resolution: {integrity: sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==} - engines: {node: '>= 14.14'} + /typedoc@0.25.7(typescript@4.9.5): + resolution: {integrity: sha512-m6A6JjQRg39p2ZVRIN3NKXgrN8vzlHhOS+r9ymUYtcUP/TIQPvWSq7YgE5ZjASfv5Vd5BW5xrir6Gm2XNNcOow==} + engines: {node: '>= 16'} hasBin: true peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x dependencies: lunr: 2.3.9 marked: 4.3.0 minimatch: 9.0.3 - shiki: 0.14.5 + shiki: 0.14.7 typescript: 4.9.5 dev: true @@ -5941,8 +5864,8 @@ packages: hasBin: true dev: true - /ufo@1.3.1: - resolution: {integrity: sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==} + /ufo@1.3.2: + resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==} dev: true /uglify-js@3.17.4: @@ -5956,25 +5879,25 @@ packages: /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 dev: true - /undici-types@5.25.3: - resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==} + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true - /undici@5.26.3: - resolution: {integrity: sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==} + /undici@5.28.2: + resolution: {integrity: sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==} engines: {node: '>=14.0'} dependencies: - '@fastify/busboy': 2.0.0 + '@fastify/busboy': 2.1.0 dev: true - /universal-user-agent@6.0.0: - resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} + /universal-user-agent@6.0.1: + resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==} dev: true /universalify@0.2.0: @@ -5982,8 +5905,8 @@ packages: engines: {node: '>= 4.0.0'} dev: true - /universalify@2.0.0: - resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + /universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} dev: true @@ -5995,7 +5918,7 @@ packages: /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: - punycode: 2.3.0 + punycode: 2.3.1 dev: true /url-parse@1.5.10: @@ -6014,12 +5937,12 @@ packages: hasBin: true dev: true - /v8-to-istanbul@9.1.3: - resolution: {integrity: sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==} + /v8-to-istanbul@9.2.0: + resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} engines: {node: '>=10.12.0'} dependencies: - '@jridgewell/trace-mapping': 0.3.19 - '@types/istanbul-lib-coverage': 2.0.4 + '@jridgewell/trace-mapping': 0.3.20 + '@types/istanbul-lib-coverage': 2.0.6 convert-source-map: 2.0.0 dev: true @@ -6044,7 +5967,7 @@ packages: extsprintf: 1.3.0 dev: true - /vite-node@0.34.6(@types/node@20.8.7): + /vite-node@0.34.6(@types/node@20.10.7): resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -6054,7 +5977,7 @@ packages: mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.5.0(@types/node@20.8.7) + vite: 4.5.1(@types/node@20.10.7) transitivePeerDependencies: - '@types/node' - less @@ -6066,8 +5989,8 @@ packages: - terser dev: true - /vite@4.5.0(@types/node@20.8.7): - resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==} + /vite@4.5.1(@types/node@20.10.7): + resolution: {integrity: sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -6094,31 +6017,77 @@ packages: terser: optional: true dependencies: - '@types/node': 20.8.7 + '@types/node': 20.10.7 esbuild: 0.18.20 - postcss: 8.4.31 + postcss: 8.4.32 rollup: 3.29.4 optionalDependencies: fsevents: 2.3.3 dev: true - /vitepress@1.0.0-beta.7(@algolia/client-search@4.19.1)(@types/node@20.8.7)(search-insights@2.9.0)(typescript@4.9.5): - resolution: {integrity: sha512-P9Rw+FXatKIU4fVdtKxqwHl6fby8E/8zE3FIfep6meNgN4BxbWqoKJ6yfuuQQR9IrpQqwnyaBh4LSabyll6tWg==} + /vite@5.0.11(@types/node@20.10.7): + resolution: {integrity: sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 20.10.7 + esbuild: 0.19.11 + postcss: 8.4.32 + rollup: 4.9.1 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /vitepress@1.0.0-rc.36(@algolia/client-search@4.22.0)(@types/node@20.10.7)(search-insights@2.13.0)(typescript@4.9.5): + resolution: {integrity: sha512-2z4dpM9PplN/yvTifhavOIAazlCR6OJ5PvLoRbc+7LdcFeIlCsuDGENLX4HjMW18jQZF5/j7++PNqdBfeazxUA==} hasBin: true + peerDependencies: + markdown-it-mathjax3: ^4.3.2 + postcss: ^8.4.33 + peerDependenciesMeta: + markdown-it-mathjax3: + optional: true + postcss: + optional: true dependencies: '@docsearch/css': 3.5.2 - '@docsearch/js': 3.5.2(@algolia/client-search@4.19.1)(search-insights@2.9.0) - '@vitejs/plugin-vue': 4.4.0(vite@4.5.0)(vue@3.3.6) + '@docsearch/js': 3.5.2(@algolia/client-search@4.22.0)(search-insights@2.13.0) + '@types/markdown-it': 13.0.7 + '@vitejs/plugin-vue': 5.0.2(vite@5.0.11)(vue@3.4.5) '@vue/devtools-api': 6.5.1 - '@vueuse/core': 10.5.0(vue@3.3.6) - '@vueuse/integrations': 10.5.0(focus-trap@7.5.4)(vue@3.3.6) - body-scroll-lock: 4.0.0-beta.0 + '@vueuse/core': 10.7.1(vue@3.4.5) + '@vueuse/integrations': 10.7.1(focus-trap@7.5.4)(vue@3.4.5) focus-trap: 7.5.4 mark.js: 8.11.1 - minisearch: 6.1.0 - shiki: 0.14.5 - vite: 4.5.0(@types/node@20.8.7) - vue: 3.3.6(typescript@4.9.5) + minisearch: 6.3.0 + shikiji: 0.9.17 + shikiji-core: 0.9.17 + shikiji-transformers: 0.9.17 + vite: 5.0.11(@types/node@20.10.7) + vue: 3.4.5(typescript@4.9.5) transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -6178,17 +6147,17 @@ packages: webdriverio: optional: true dependencies: - '@types/chai': 4.3.8 - '@types/chai-subset': 1.3.3 - '@types/node': 20.8.7 + '@types/chai': 4.3.11 + '@types/chai-subset': 1.3.5 + '@types/node': 20.10.7 '@vitest/expect': 0.34.6 '@vitest/runner': 0.34.6 '@vitest/snapshot': 0.34.6 '@vitest/spy': 0.34.6 '@vitest/ui': 0.34.7(vitest@0.34.6) '@vitest/utils': 0.34.6 - acorn: 8.10.0 - acorn-walk: 8.2.0 + acorn: 8.11.2 + acorn-walk: 8.3.1 cac: 6.7.14 chai: 4.3.10 debug: 4.3.4(supports-color@8.1.1) @@ -6196,12 +6165,12 @@ packages: magic-string: 0.30.5 pathe: 1.1.1 picocolors: 1.0.0 - std-env: 3.4.3 + std-env: 3.7.0 strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.7.0 - vite: 4.5.0(@types/node@20.8.7) - vite-node: 0.34.6(@types/node@20.8.7) + vite: 4.5.1(@types/node@20.10.7) + vite-node: 0.34.6(@types/node@20.10.7) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -6221,7 +6190,7 @@ packages: resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} dev: true - /vue-demi@0.14.6(vue@3.3.6): + /vue-demi@0.14.6(vue@3.4.5): resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==} engines: {node: '>=12'} hasBin: true @@ -6233,22 +6202,22 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.3.6(typescript@4.9.5) + vue: 3.4.5(typescript@4.9.5) dev: true - /vue@3.3.6(typescript@4.9.5): - resolution: {integrity: sha512-jJIDETeWJnoY+gfn4ZtMPMS5KtbP4ax+CT4dcQFhTnWEk8xMupFyQ0JxL28nvT/M4+p4a0ptxaV2WY0LiIxvRg==} + /vue@3.4.5(typescript@4.9.5): + resolution: {integrity: sha512-VH6nHFhLPjgu2oh5vEBXoNZxsGHuZNr3qf4PHClwJWw6IDqw6B3x+4J+ABdoZ0aJuT8Zi0zf3GpGlLQCrGWHrw==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@vue/compiler-dom': 3.3.6 - '@vue/compiler-sfc': 3.3.6 - '@vue/runtime-dom': 3.3.6 - '@vue/server-renderer': 3.3.6(vue@3.3.6) - '@vue/shared': 3.3.6 + '@vue/compiler-dom': 3.4.5 + '@vue/compiler-sfc': 3.4.5 + '@vue/runtime-dom': 3.4.5 + '@vue/server-renderer': 3.4.5(vue@3.4.5) + '@vue/shared': 3.4.5 typescript: 4.9.5 dev: true @@ -6262,12 +6231,12 @@ packages: is-symbol: 1.0.4 dev: true - /which-typed-array@1.1.11: - resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} + /which-typed-array@1.1.13: + resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.2 + call-bind: 1.0.5 for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 diff --git a/scripts/apidoc.ts b/scripts/apidoc.ts index 8c7ac6b8046..d7c965aeded 100644 --- a/scripts/apidoc.ts +++ b/scripts/apidoc.ts @@ -8,4 +8,8 @@ async function build(): Promise { await generate(); } -build().catch(console.error); +build().catch((error) => { + // Workaround until top level await is available + console.error(error); + process.exit(1); +}); diff --git a/scripts/apidoc/diff.ts b/scripts/apidoc/diff.ts index 18b8e60fc4d..101200cd93b 100644 --- a/scripts/apidoc/diff.ts +++ b/scripts/apidoc/diff.ts @@ -12,9 +12,9 @@ async function loadRemote(url: string): Promise { throw new Error( `Failed to load remote diff index from ${url}: ${res.statusText}` ); - } else { - return res.json() as Promise; } + + return res.json() as Promise; }); } diff --git a/scripts/apidoc/faker-class.ts b/scripts/apidoc/faker-class.ts index 44648831142..a9acad3cb41 100644 --- a/scripts/apidoc/faker-class.ts +++ b/scripts/apidoc/faker-class.ts @@ -28,6 +28,10 @@ export async function processFakerRandomizer( .getChildrenByKind(ReflectionKind.Interface) .find((clazz) => clazz.name === 'Randomizer'); + if (randomizerClass == null) { + throw new Error('Randomizer class not found'); + } + return processClass(randomizerClass); } @@ -55,14 +59,15 @@ async function processClass( comment, examples, deprecated, - methods + methods, + '' ); } function hasConstructor(clazz: DeclarationReflection): boolean { return clazz .getChildrenByKind(ReflectionKind.Constructor) - .some((constructor) => constructor.signatures.length > 0); + .some((constructor) => (constructor.signatures?.length ?? 0) > 0); } async function processConstructor( diff --git a/scripts/apidoc/faker-utilities.ts b/scripts/apidoc/faker-utilities.ts index 0da03581283..ad1f74c3aa2 100644 --- a/scripts/apidoc/faker-utilities.ts +++ b/scripts/apidoc/faker-utilities.ts @@ -34,6 +34,7 @@ async function processUtilities( comment, undefined, undefined, - methods + methods, + '' ); } diff --git a/scripts/apidoc/generate.ts b/scripts/apidoc/generate.ts index 316757cc9b1..eb00cea461a 100644 --- a/scripts/apidoc/generate.ts +++ b/scripts/apidoc/generate.ts @@ -17,20 +17,22 @@ const pathOutputJson = resolve(pathOutputDir, 'typedoc.json'); * Generates the API documentation. */ export async function generate(): Promise { - const [app, project] = loadProject(); + const [app, project] = await loadProject(); // Useful for manually analyzing the content await app.generateJson(project, pathOutputJson); const pages = [ ...(await processFakerClasses(project)), + await processFakerRandomizer(project), + await processFakerUtilities(project), ...(await processModules(project)).sort((a, b) => a.text.localeCompare(b.text) ), - await processFakerRandomizer(project), - await processFakerUtilities(project), ]; - await writeApiPagesIndex(pages.map(({ text, link }) => ({ text, link }))); + await writeApiPagesIndex( + pages.map(({ text, link, category }) => ({ text, link, category })) + ); writeApiDiffIndex( Object.fromEntries(pages.map(({ text, diff }) => [text, diff])) ); diff --git a/scripts/apidoc/markdown.ts b/scripts/apidoc/markdown.ts index 88df01507b6..870b4201136 100644 --- a/scripts/apidoc/markdown.ts +++ b/scripts/apidoc/markdown.ts @@ -39,10 +39,15 @@ const htmlSanitizeOptions: sanitizeHtml.IOptions = { function comparableSanitizedHtml(html: string): string { return html + .replace(/&#x[0-9A-F]{2};/g, (x) => + String.fromCodePoint(Number.parseInt(x.slice(3, -1), 16)) + ) .replace(/>/g, '>') - .replace(/ /g, '') + .replace(/</g, '<') + .replace(/&/g, '&') .replace(/"/g, '"') - .replace(/'/g, "'"); + .replace(/=""/g, '') + .replace(/ /g, ''); } /** diff --git a/scripts/apidoc/module-methods.ts b/scripts/apidoc/module-methods.ts index 772a72360bc..c21ccf97268 100644 --- a/scripts/apidoc/module-methods.ts +++ b/scripts/apidoc/module-methods.ts @@ -57,7 +57,8 @@ async function processModule( comment, examples, deprecated, - methods + methods, + 'Modules' ); } diff --git a/scripts/apidoc/parameter-defaults.ts b/scripts/apidoc/parameter-defaults.ts index 34264b05b8f..c2eecdc27c9 100644 --- a/scripts/apidoc/parameter-defaults.ts +++ b/scripts/apidoc/parameter-defaults.ts @@ -58,7 +58,7 @@ function cleanParameterDefault(value?: string): string | undefined { } // Strip type casts: "'foobar' as unknown as T" => "'foobar'" - return value.replace(/ as unknown as [A-Za-z<>]+/, ''); + return value.replace(/( as unknown)? as [A-Za-z<>]+/, ''); } /** diff --git a/scripts/apidoc/signature.ts b/scripts/apidoc/signature.ts index 2cca92b99d9..82d4047ef7d 100644 --- a/scripts/apidoc/signature.ts +++ b/scripts/apidoc/signature.ts @@ -23,8 +23,8 @@ import { extractSeeAlsos, extractSince, extractSourcePath, + extractSummaryDefault, extractThrows, - joinTagParts, toBlock, } from './typedoc'; @@ -108,8 +108,7 @@ async function analyzeParameter(parameter: ParameterReflection): Promise<{ const name = parameter.name; const declarationName = name + (isOptional(parameter) ? '?' : ''); const type = parameter.type; - const commentDefault = extractDefaultFromComment(parameter.comment); - const defaultValue = parameter.defaultValue ?? commentDefault; + const defaultValue = extractDefaultFromParameter(parameter); let signatureText = ''; if (defaultValue) { @@ -136,6 +135,7 @@ async function analyzeParameter(parameter: ParameterReflection): Promise<{ }; } +// keep in sync with assertNestedParameterDefault async function analyzeParameterOptions( name: string, parameterType?: SomeType @@ -305,45 +305,47 @@ async function signatureTypeToText( await Promise.all( signature.parameters?.map( async (p) => `${p.name}: ${await typeToText(p.type)}` - ) + ) ?? [] ) ).join(', ')}) => ${await typeToText(signature.type)}`; } /** - * Extracts and removed the parameter default from the comments. + * Extracts and optionally removes the parameter default from the parameter. + * + * @param parameter The parameter to extract the default from. + * @param eraseDefault Whether to erase the default text from the parameter comment. + * + * @returns The extracted default value. + */ +function extractDefaultFromParameter( + parameter: ParameterReflection, + eraseDefault = true +): string | undefined { + const commentDefault = extractDefaultFromComment( + parameter.comment, + eraseDefault + ); + return parameter.defaultValue ?? commentDefault; +} + +/** + * Extracts and optionally removes the parameter default from the comments. * * @param comment The comment to extract the default from. + * @param eraseDefault Whether to erase the default text from the comment. * * @returns The extracted default value. */ -function extractDefaultFromComment(comment?: Comment): string | undefined { +function extractDefaultFromComment( + comment?: Comment, + eraseDefault = true +): string | undefined { if (!comment) { return; } - const defaultTag = comment.getTag('@default'); - if (defaultTag) { - return extractRawDefault({ comment }); - } - - const summary = comment.summary; - const text = joinTagParts(summary).trim(); - if (!text) { - return; - } - - const result = /^(.*)[ \n]Defaults to `([^`]+)`\.(.*)$/s.exec(text); - if (!result) { - return; - } - - if (result[3].trim()) { - throw new Error(`Found description text after the default value:\n${text}`); - } - - summary.splice(summary.length - 2, 2); - const lastSummaryPart = summary[summary.length - 1]; - lastSummaryPart.text = lastSummaryPart.text.replace(/[ \n]Defaults to $/, ''); - return result[2]; + const tagDefault = extractRawDefault({ comment }); + const summaryDefault = extractSummaryDefault(comment, eraseDefault); + return tagDefault || summaryDefault; } diff --git a/scripts/apidoc/typedoc.ts b/scripts/apidoc/typedoc.ts index 0d3799df62d..4d6a2b6c313 100644 --- a/scripts/apidoc/typedoc.ts +++ b/scripts/apidoc/typedoc.ts @@ -31,19 +31,17 @@ type CommentHolder = Pick; * * @returns The TypeDoc application and the project reflection. */ -export function loadProject( +export async function loadProject( options: Partial = { entryPoints: ['src/index.ts'], pretty: true, cleanOutputDir: true, tsconfig: 'tsconfig.build.json', } -): [Application, ProjectReflection] { - const app = newTypeDocApp(); +): Promise<[Application, ProjectReflection]> { + const app = await newTypeDocApp(options); - app.bootstrap(options); - - const project = app.convert(); + const project = await app.convert(); if (!project) { throw new Error('Failed to convert project'); @@ -56,13 +54,15 @@ export function loadProject( /** * Creates and configures a new typedoc application. + * + * @param options The options to use for the project. */ -function newTypeDocApp(): Application { - const app = new Application(); - - app.options.addReader(new TSConfigReader()); - // If you want TypeDoc to load typedoc.json files - //app.options.addReader(new TypeDoc.TypeDocReader()); +async function newTypeDocApp( + options?: Partial +): Promise { + const app = await Application.bootstrapWithPlugins(options, [ + new TSConfigReader(), + ]); // Read parameter defaults app.converter.on(Converter.EVENT_CREATE_DECLARATION, parameterDefaultReader); @@ -88,7 +88,8 @@ export function selectApiModules( .getChildrenByKind(ReflectionKind.Class) .filter( (module) => - faker[extractModuleFieldName(module)] != null || includeTestModules + faker[extractModuleFieldName(module) as keyof typeof faker] != null || + includeTestModules ); } @@ -219,7 +220,40 @@ export function extractTagContent( reflection?: CommentHolder, tagProcessor: (tag: CommentTag) => string[] = joinTagContent ): string[] { - return reflection?.comment?.getTags(tag).flatMap(tagProcessor) ?? []; + const tags = + reflection?.comment + ?.getTags(tag) + .flatMap(tagProcessor) + .map((tag) => tag.trim()) ?? []; + if (tags.some((tag) => tag.length === 0)) { + throw new Error(`Expected non-empty ${tag} tag.`); + } + + return tags; +} + +/** + * Extracts the text (md) from a single jsdoc tag. + * + * @param tag The tag to extract the text from. + * @param reflection The reflection to extract the text from. + * @param tagProcessor The function used to extract the text from the tag. + * + * @throws If there are multiple tags of that type. + */ +function extractSingleTagContent( + tag: `@${string}`, + reflection?: CommentHolder, + tagProcessor: (tag: CommentTag) => string[] = joinTagContent +): string | undefined { + const tags = extractTagContent(tag, reflection, tagProcessor); + if (tags.length === 0) { + return undefined; + } else if (tags.length === 1) { + return tags[0]; + } + + throw new Error(`Expected 1 ${tag} tag, but got ${tags.length}.`); } /** @@ -246,6 +280,49 @@ export function extractRawDefault(reflection?: CommentHolder): string { return extractRawCode('@default', reflection)[0] ?? ''; } +/** + * Extracts and optionally removes the default from the comment summary. + * + * @param comment The comment to extract the default from. + * @param eraseDefault Whether to erase the default text from the comment. + * + * @returns The extracted default value. + */ +export function extractSummaryDefault( + comment?: Comment, + eraseDefault = true +): string | undefined { + if (!comment) { + return; + } + + const summary = comment.summary; + const text = joinTagParts(summary).trim(); + if (!text) { + return; + } + + const result = /^(.*)[ \n]Defaults to `([^`]+)`\.(.*)$/s.exec(text); + if (!result) { + return; + } + + if (result[3].trim()) { + throw new Error(`Found description text after the default value:\n${text}`); + } + + if (eraseDefault) { + summary.splice(-2, 2); + const lastSummaryPart = summary[summary.length - 1]; + lastSummaryPart.text = lastSummaryPart.text.replace( + /[ \n]Defaults to $/, + '' + ); + } + + return result[2]; +} + /** * Extracts the examples from the jsdocs without the surrounding md code block. * @@ -315,8 +392,7 @@ export function joinTagParts(parts?: CommentDisplayPart[]): string | undefined { export function extractDeprecated( reflection?: CommentHolder ): string | undefined { - const deprecated = extractTagContent('@deprecated', reflection).join().trim(); - return deprecated.length === 0 ? undefined : deprecated; + return extractSingleTagContent('@deprecated', reflection); } /** @@ -327,8 +403,8 @@ export function extractDeprecated( * @returns The message explaining the conditions when this method throws. Or `undefined` if it does not throw. */ export function extractThrows(reflection?: CommentHolder): string | undefined { - const throws = extractTagContent('@throws', reflection).join().trim(); - return throws.length === 0 ? undefined : throws; + const content = extractTagContent('@throws', reflection).join('\n'); + return content.length === 0 ? undefined : content; } /** @@ -339,5 +415,5 @@ export function extractThrows(reflection?: CommentHolder): string | undefined { * @returns The contents of the `@since` tag. */ export function extractSince(reflection: CommentHolder): string { - return extractTagContent('@since', reflection).join().trim(); + return extractSingleTagContent('@since', reflection) || MISSING_DESCRIPTION; } diff --git a/scripts/apidoc/utils.ts b/scripts/apidoc/utils.ts index b6b533f6ce9..f26c6cdd5e2 100644 --- a/scripts/apidoc/utils.ts +++ b/scripts/apidoc/utils.ts @@ -1,10 +1,11 @@ import { createHash } from 'node:crypto'; -import { resolve } from 'node:path'; +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; import type { Method } from '../../docs/.vitepress/components/api-docs/method'; // Types -export type Page = { text: string; link: string }; +export type Page = { text: string; link: string; category: string }; export type ModuleSummary = Page & { methods: Method[]; @@ -31,7 +32,7 @@ export interface DocsApiDiff { // Paths -const pathRoot = resolve(__dirname, '..', '..'); +const pathRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..', '..'); export const pathDocsDir = resolve(pathRoot, 'docs'); const pathPublicDir = resolve(pathDocsDir, 'public'); export const nameDocsDiffIndexFile = 'api-diff-index.json'; diff --git a/scripts/apidoc/writer.ts b/scripts/apidoc/writer.ts index b5fa5806df6..67bf1d7a729 100644 --- a/scripts/apidoc/writer.ts +++ b/scripts/apidoc/writer.ts @@ -2,8 +2,10 @@ import { writeFileSync } from 'node:fs'; import { resolve } from 'node:path'; import type { ProjectReflection } from 'typedoc'; import { ReflectionKind } from 'typedoc'; +import type { DefaultTheme } from 'vitepress'; import type { Method } from '../../docs/.vitepress/components/api-docs/method'; import type { APIGroup } from '../../docs/api/api-types'; +import { groupBy } from '../../src/internal/group-by'; import { formatMarkdown, formatTypescript } from './format'; import { extractSourceBaseUrl } from './typedoc'; import type { DocsApiDiffIndex, ModuleSummary, Page } from './utils'; @@ -40,6 +42,7 @@ editLink: false * @param examples The example code. * @param deprecated The deprecation message. * @param methods The methods of the module. + * @param category The category of the module. */ export async function writeApiDocsModule( moduleName: string, @@ -47,7 +50,8 @@ export async function writeApiDocsModule( comment: string, examples: string | undefined, deprecated: string | undefined, - methods: Method[] + methods: Method[], + category: string ): Promise { await writeApiDocsModulePage( moduleName, @@ -63,20 +67,18 @@ export async function writeApiDocsModule( text: moduleName, link: `/api/${lowerModuleName}.html`, methods, - diff: methods.reduce( - (data, method) => ({ - ...data, - [method.name]: methodDiffHash(method), + category, + diff: { + moduleHash: diffHash({ + name: moduleName, + field: lowerModuleName, + deprecated, + comment, }), - { - moduleHash: diffHash({ - name: moduleName, - field: lowerModuleName, - deprecated, - comment, - }), - } - ), + ...Object.fromEntries( + methods.map((method) => [method.name, methodDiffHash(method)]) + ), + }, }; } @@ -167,13 +169,22 @@ function writeApiDocsModuleData( * @param pages The pages to write into the index. */ export async function writeApiPagesIndex(pages: Page[]): Promise { + const pagesByCategory: Record = groupBy( + pages, + (page) => page.category, + ({ text, link }) => ({ text, link }) + ); + const pageTree = Object.entries(pagesByCategory).flatMap( + ([category, items]) => (category ? [{ text: category, items }] : items) + ); + // Write api-pages.ts console.log('Updating api-pages.ts'); - pages.splice(0, 0, { text: 'Overview', link: '/api/' }); + pageTree.splice(0, 0, { text: 'Overview', link: '/api/' }); let apiPagesContent = ` // This file is automatically generated. // Run '${scriptCommand}' to update - export const apiPages = ${JSON.stringify(pages)}; + export const apiPages = ${JSON.stringify(pageTree)}; `.replace(/\n +/, '\n'); apiPagesContent = await formatTypescript(apiPagesContent); diff --git a/scripts/generate-locales.ts b/scripts/generate-locales.ts index d2e9513e1b0..4228cc91b3b 100644 --- a/scripts/generate-locales.ts +++ b/scripts/generate-locales.ts @@ -21,15 +21,15 @@ import { readFileSync, writeFileSync, } from 'node:fs'; -import { resolve } from 'node:path'; -import type { Options } from 'prettier'; -import { format } from 'prettier'; -import options from '../.prettierrc.js'; +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; import type { LocaleDefinition, MetadataDefinition } from '../src/definitions'; +import { keys } from '../src/internal/keys'; +import { formatMarkdown, formatTypescript } from './apidoc/format'; // Constants -const pathRoot = resolve(__dirname, '..'); +const pathRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..'); const pathLocale = resolve(pathRoot, 'src', 'locale'); const pathLocales = resolve(pathRoot, 'src', 'locales'); const pathLocaleIndex = resolve(pathLocale, 'index.ts'); @@ -77,9 +77,6 @@ const definitionsTypes: DefinitionType = { word: 'WordDefinition', }; -const prettierTsOptions: Options = { ...options, parser: 'typescript' }; -const prettierMdOptions: Options = { ...options, parser: 'markdown' }; - const scriptCommand = 'pnpm run generate:locales'; const autoGeneratedCommentHeader = `/* @@ -153,7 +150,7 @@ async function generateLocaleFile(locale: string): Promise { }); `; - content = await format(content, prettierTsOptions); + content = await formatTypescript(content); writeFileSync(resolve(pathLocale, `${locale}.ts`), content); } @@ -194,7 +191,7 @@ async function generateLocalesIndexFile( writeFileSync( resolve(path, 'index.ts'), - await format(content.join('\n'), prettierTsOptions) + await formatTypescript(content.join('\n')) ); } @@ -300,7 +297,7 @@ async function normalizeLocaleFile(filePath: string, definitionKey: string) { } const result = {} as T; - for (const key of Object.keys(localeData)) { + for (const key of keys(localeData)) { result[key] = normalizeDataRecursive(localeData[key]); } @@ -359,14 +356,14 @@ async function normalizeLocaleFile(filePath: string, definitionKey: string) { } const fileContentPreData = fileContent.substring(0, compareIndex); - // eslint-disable-next-line @typescript-eslint/no-var-requires - const localeData = normalizeDataRecursive(require(filePath).default); + const fileImport = await import(`file:${filePath}`); + const localeData = normalizeDataRecursive(fileImport.default); // We reattach the content before the actual data implementation to keep stuff like comments. // In the long term we should probably define a whether we want those in the files at all. const newContent = fileContentPreData + JSON.stringify(localeData); - writeFileSync(filePath, await format(newContent, prettierTsOptions)); + writeFileSync(filePath, await formatTypescript(newContent)); } // Start of actual logic @@ -388,8 +385,8 @@ async function main(): Promise { const pathMetadata = resolve(pathModules, 'metadata.ts'); let localeTitle = 'No title found'; try { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const metadata: MetadataDefinition = require(pathMetadata).default; + const metadataImport = await import(`file:${pathMetadata}`); + const metadata: MetadataDefinition = metadataImport.default; const { title } = metadata; if (!title) { throw new Error( @@ -443,7 +440,7 @@ async function main(): Promise { } as const; `; - localeIndexContent = await format(localeIndexContent, prettierTsOptions); + localeIndexContent = await formatTypescript(localeIndexContent); writeFileSync(pathLocaleIndex, localeIndexContent); // src/locales/index.ts @@ -454,12 +451,12 @@ async function main(): Promise { ${localesIndexExports} `; - localesIndexContent = await format(localesIndexContent, prettierTsOptions); + localesIndexContent = await formatTypescript(localesIndexContent); writeFileSync(pathLocalesIndex, localesIndexContent); // docs/guide/localization.md - localizationLocales = await format(localizationLocales, prettierMdOptions); + localizationLocales = await formatMarkdown(localizationLocales); let localizationContent = readFileSync(pathDocsGuideLocalization, 'utf8'); localizationContent = localizationContent.replace( diff --git a/src/definitions/date.ts b/src/definitions/date.ts index 16cfb28aa26..2265a0256cf 100644 --- a/src/definitions/date.ts +++ b/src/definitions/date.ts @@ -26,8 +26,9 @@ export interface DateEntryDefinition { /** * The short name/abbreviation of the entry. + * If null, the locale does not support a short name/abbreviation for the entry. */ - abbr: string[]; + abbr: string[] | null; /** * The wide name of the entry when used in context. If absent wide will be used instead. diff --git a/src/definitions/definitions.ts b/src/definitions/definitions.ts index ca495e3477a..c2a3b560099 100644 --- a/src/definitions/definitions.ts +++ b/src/definitions/definitions.ts @@ -50,4 +50,4 @@ export type LocaleDefinition = { system?: SystemDefinition; vehicle?: VehicleDefinition; word?: WordDefinition; -} & Record | undefined>; +} & Record>; diff --git a/src/definitions/finance.ts b/src/definitions/finance.ts index d98edd1a422..c82ac6e85ba 100644 --- a/src/definitions/finance.ts +++ b/src/definitions/finance.ts @@ -13,7 +13,7 @@ export type FinanceDefinition = LocaleEntry<{ * The pattern by (lowercase) issuer name used to generate credit card codes. * `L` will be replaced by the check bit. * - * @see faker.helpers.replaceCreditCardSymbols() + * @see faker.helpers.replaceCreditCardSymbols(): For more information about how the pattern is used. */ credit_card: { [issuer: string]: string[] }; diff --git a/src/definitions/hacker.ts b/src/definitions/hacker.ts index f3630100bd3..a5a2dc89eb9 100644 --- a/src/definitions/hacker.ts +++ b/src/definitions/hacker.ts @@ -29,7 +29,7 @@ export type HackerDefinition = LocaleEntry<{ * May use any of the HackerDefinition keys wrapped in double braces * (e.g. `I'm {{ingverb}} {{adjective}} {{noun}}`). * - * @see faker.helpers.mustache() + * @see faker.helpers.mustache(): For more information about how the phrases are generated. */ phrase: string[]; diff --git a/src/definitions/person.ts b/src/definitions/person.ts index 709d0cf34f1..e3eeb2758f0 100644 --- a/src/definitions/person.ts +++ b/src/definitions/person.ts @@ -41,6 +41,8 @@ export type PersonDefinition = LocaleEntry<{ title: PersonTitleDefinition; + job_title_pattern: string[]; + western_zodiac_sign: string[]; }>; diff --git a/src/definitions/phone_number.ts b/src/definitions/phone_number.ts index fd6a8baa47e..c6543c85772 100644 --- a/src/definitions/phone_number.ts +++ b/src/definitions/phone_number.ts @@ -10,7 +10,7 @@ export type PhoneNumberDefinition = LocaleEntry<{ * `!` will be replaced by a random digit (2-9). * (e.g. `!##-!##-####` -> 272-285-0453) * - * @see faker.helpers.replaceSymbolWithNumber(format) + * @see faker.helpers.replaceSymbolWithNumber(format): For more information about how the patterns are used. */ formats: string[]; }>; diff --git a/src/faker.ts b/src/faker.ts index e6b5889af36..f43b9c36259 100644 --- a/src/faker.ts +++ b/src/faker.ts @@ -146,7 +146,7 @@ export class Faker extends SimpleFaker { * The locale data to use for this instance. * If an array is provided, the first locale that has a definition for a given property will be used. * - * @see mergeLocales + * @see mergeLocales(): For more information about how the locales are merged. */ locale: LocaleDefinition | LocaleDefinition[]; @@ -218,7 +218,7 @@ export class Faker extends SimpleFaker { * The locale data to use for this instance. * If an array is provided, the first locale that has a definition for a given property will be used. * - * @see mergeLocales + * @see mergeLocales(): For more information about how the locales are merged. */ locale: LocaleDefinition | LocaleDefinition[]; diff --git a/src/internal/group-by.ts b/src/internal/group-by.ts new file mode 100644 index 00000000000..1fc86e8c607 --- /dev/null +++ b/src/internal/group-by.ts @@ -0,0 +1,54 @@ +/** + * Groups the values by the key function. + * + * @internal + * + * @param values The values to group. + * @param keyMapper The function to get the key from the value. + */ +export function groupBy( + values: ReadonlyArray, + keyMapper: (value: TValue) => string | number +): Record; +/** + * Groups the values by the key function and maps the values. + * + * @internal + * + * @param values The values to group. + * @param keyMapper The function to get the key from the value. + * @param valueMapper The function to get the value from the value. + */ +export function groupBy( + values: ReadonlyArray, + keyMapper: (value: TOriginalValue) => string | number, + valueMapper: (value: TOriginalValue) => TMappedValue +): Record; +/** + * Groups the values by the key function and maps the values. + * + * @internal + * + * @param values The values to group. + * @param keyMapper The function to get the key from the value. + * @param valueMapper The function to map the value. + */ +export function groupBy( + values: ReadonlyArray, + keyMapper: (value: TOriginalValue) => string | number, + valueMapper: (value: TOriginalValue) => TMappedValue = (value) => + value as unknown as TMappedValue +): Record { + const result: Record = {}; + + for (const value of values) { + const key = keyMapper(value); + if (result[key] === undefined) { + result[key] = []; + } + + result[key].push(valueMapper(value)); + } + + return result; +} diff --git a/src/internal/keys.ts b/src/internal/keys.ts new file mode 100644 index 00000000000..d67d32e7d82 --- /dev/null +++ b/src/internal/keys.ts @@ -0,0 +1,13 @@ +/** + * Specialized version of `Object.keys()` which preserves the type information of the keys. + * + * Please note that the type information might be inaccurate for subtypes of the argument type + * and thus should only be used to cover the property access of the object. + * + * @internal + * + * @param obj The object to get the keys of. + */ +export function keys(obj: T): Array { + return Object.keys(obj) as Array; +} diff --git a/src/internal/mersenne.ts b/src/internal/mersenne.ts index 6be5825d32c..2372e364d78 100644 --- a/src/internal/mersenne.ts +++ b/src/internal/mersenne.ts @@ -73,7 +73,7 @@ import type { Randomizer } from '../randomizer'; * * @internal */ -class MersenneTwister19937 { +export class MersenneTwister19937 { private readonly N = 624; private readonly M = 397; private readonly MATRIX_A = 0x9908b0df; // constant vector a diff --git a/src/internal/module-base.ts b/src/internal/module-base.ts new file mode 100644 index 00000000000..000084cbfa6 --- /dev/null +++ b/src/internal/module-base.ts @@ -0,0 +1,21 @@ +import type { Faker } from '../faker'; +import type { SimpleFaker } from '../simple-faker'; +import { bindThisToMemberFunctions } from './bind-this-to-member-functions'; + +/** + * Base class for all modules that use a `SimpleFaker` instance. + */ +export abstract class SimpleModuleBase { + constructor(protected readonly faker: SimpleFaker) { + bindThisToMemberFunctions(this); + } +} + +/** + * Base class for all modules that use a `Faker` instance. + */ +export abstract class ModuleBase extends SimpleModuleBase { + constructor(protected readonly faker: Faker) { + super(faker); + } +} diff --git a/src/locale-proxy.ts b/src/locale-proxy.ts index 67b29d473cc..e99ba655156 100644 --- a/src/locale-proxy.ts +++ b/src/locale-proxy.ts @@ -54,6 +54,30 @@ export function createLocaleProxy(locale: LocaleDefinition): LocaleProxy { }) as LocaleProxy; } +/** + * Checks that the value is not null or undefined and throws an error if it is. + * + * @param value The value to check. + * @param path The path to the locale data. + */ +export function assertLocaleData( + value: T, + ...path: string[] +): asserts value is NonNullable { + if (value === null) { + throw new FakerError( + `The locale data for '${path.join('.')}' aren't applicable to this locale. + If you think this is a bug, please report it at: https://github.com/faker-js/faker` + ); + } else if (value === undefined) { + throw new FakerError( + `The locale data for '${path.join('.')}' are missing in this locale. + Please contribute the missing data to the project or use a locale/Faker instance that has these data. + For more information see https://fakerjs.dev/guide/localization.html` + ); + } +} + /** * Creates a proxy for a category that throws an error when accessing an undefined property. * @@ -79,20 +103,10 @@ function createCategoryProxy< const value = target[entryName]; if (typeof entryName === 'symbol' || entryName === 'nodeType') { return value; - } else if (value === null) { - throw new FakerError( - `The locale data for '${categoryName}.${entryName.toString()}' aren't applicable to this locale. - If you think this is a bug, please report it at: https://github.com/faker-js/faker` - ); - } else if (value === undefined) { - throw new FakerError( - `The locale data for '${categoryName}.${entryName.toString()}' are missing in this locale. - Please contribute the missing data to the project or use a locale/Faker instance that has these data. - For more information see https://fakerjs.dev/guide/localization.html` - ); - } else { - return value; } + + assertLocaleData(value, categoryName, entryName.toString()); + return value; }, set: throwReadOnlyError, diff --git a/src/locale/fr_SN.ts b/src/locale/fr_SN.ts new file mode 100644 index 00000000000..13f50a4e715 --- /dev/null +++ b/src/locale/fr_SN.ts @@ -0,0 +1,14 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ + +import { Faker } from '../faker'; +import base from '../locales/base'; +import en from '../locales/en'; +import fr from '../locales/fr'; +import fr_SN from '../locales/fr_SN'; + +export const faker = new Faker({ + locale: [fr_SN, fr, en, base], +}); diff --git a/src/locale/index.ts b/src/locale/index.ts index 733e41dfeb9..b4c0799f257 100644 --- a/src/locale/index.ts +++ b/src/locale/index.ts @@ -37,6 +37,7 @@ import { faker as fakerFR_BE } from './fr_BE'; import { faker as fakerFR_CA } from './fr_CA'; import { faker as fakerFR_CH } from './fr_CH'; import { faker as fakerFR_LU } from './fr_LU'; +import { faker as fakerFR_SN } from './fr_SN'; import { faker as fakerHE } from './he'; import { faker as fakerHR } from './hr'; import { faker as fakerHU } from './hu'; @@ -106,6 +107,7 @@ export { fakerFR_CA, fakerFR_CH, fakerFR_LU, + fakerFR_SN, fakerHE, fakerHR, fakerHU, @@ -176,6 +178,7 @@ export const allFakers = { fr_CA: fakerFR_CA, fr_CH: fakerFR_CH, fr_LU: fakerFR_LU, + fr_SN: fakerFR_SN, he: fakerHE, hr: fakerHR, hu: fakerHU, diff --git a/src/locales/cs_CZ/person/index.ts b/src/locales/cs_CZ/person/index.ts index bf1b1484c96..91d426993ec 100644 --- a/src/locales/cs_CZ/person/index.ts +++ b/src/locales/cs_CZ/person/index.ts @@ -16,7 +16,6 @@ import male_prefix from './male_prefix'; import name_ from './name'; import prefix from './prefix'; import suffix from './suffix'; -import title from './title'; const person: PersonDefinition = { female_first_name, @@ -32,7 +31,6 @@ const person: PersonDefinition = { name: name_, prefix, suffix, - title, }; export default person; diff --git a/src/locales/cs_CZ/person/title.ts b/src/locales/cs_CZ/person/title.ts deleted file mode 100644 index 6372cc11839..00000000000 --- a/src/locales/cs_CZ/person/title.ts +++ /dev/null @@ -1,91 +0,0 @@ -export default { - descriptor: [ - 'Lead', - 'Senior', - 'Direct', - 'Corporate', - 'Dynamic', - 'Future', - 'Product', - 'National', - 'Regional', - 'District', - 'Central', - 'Global', - 'Customer', - 'Investor', - 'International', - 'Legacy', - 'Forward', - 'Internal', - 'Human', - 'Chief', - 'Principal', - ], - level: [ - 'Solutions', - 'Program', - 'Brand', - 'Security', - 'Research', - 'Marketing', - 'Directives', - 'Implementation', - 'Integration', - 'Functionality', - 'Response', - 'Paradigm', - 'Tactics', - 'Identity', - 'Markets', - 'Group', - 'Division', - 'Applications', - 'Optimization', - 'Operations', - 'Infrastructure', - 'Intranet', - 'Communications', - 'Web', - 'Branding', - 'Quality', - 'Assurance', - 'Mobility', - 'Accounts', - 'Data', - 'Creative', - 'Configuration', - 'Accountability', - 'Interactions', - 'Factors', - 'Usability', - 'Metrics', - ], - job: [ - 'Supervisor', - 'Associate', - 'Executive', - 'Liason', - 'Officer', - 'Manager', - 'Engineer', - 'Specialist', - 'Director', - 'Coordinator', - 'Administrator', - 'Architect', - 'Analyst', - 'Designer', - 'Planner', - 'Orchestrator', - 'Technician', - 'Developer', - 'Producer', - 'Consultant', - 'Assistant', - 'Facilitator', - 'Agent', - 'Representative', - 'Strategist', - ], -}; diff --git a/src/locales/en/person/index.ts b/src/locales/en/person/index.ts index 121aa20c0f4..0ba2bc1cf70 100644 --- a/src/locales/en/person/index.ts +++ b/src/locales/en/person/index.ts @@ -11,6 +11,7 @@ import female_middle_name from './female_middle_name'; import female_prefix from './female_prefix'; import first_name from './first_name'; import gender from './gender'; +import job_title_pattern from './job_title_pattern'; import last_name from './last_name'; import last_name_pattern from './last_name_pattern'; import male_first_name from './male_first_name'; @@ -33,6 +34,7 @@ const person: PersonDefinition = { female_prefix, first_name, gender, + job_title_pattern, last_name, last_name_pattern, male_first_name, diff --git a/src/locales/en/person/job_title_pattern.ts b/src/locales/en/person/job_title_pattern.ts new file mode 100644 index 00000000000..ec72ae485d3 --- /dev/null +++ b/src/locales/en/person/job_title_pattern.ts @@ -0,0 +1,3 @@ +export default [ + '{{person.jobDescriptor}} {{person.jobArea}} {{person.jobType}}', +]; diff --git a/src/locales/es/person/index.ts b/src/locales/es/person/index.ts index edb457f3ec2..ce35967e676 100644 --- a/src/locales/es/person/index.ts +++ b/src/locales/es/person/index.ts @@ -6,6 +6,7 @@ import type { PersonDefinition } from '../../..'; import female_first_name from './female_first_name'; import female_prefix from './female_prefix'; import first_name from './first_name'; +import job_title_pattern from './job_title_pattern'; import last_name from './last_name'; import last_name_pattern from './last_name_pattern'; import male_first_name from './male_first_name'; @@ -19,6 +20,7 @@ const person: PersonDefinition = { female_first_name, female_prefix, first_name, + job_title_pattern, last_name, last_name_pattern, male_first_name, diff --git a/src/locales/es/person/job_title_pattern.ts b/src/locales/es/person/job_title_pattern.ts new file mode 100644 index 00000000000..c5ae1366411 --- /dev/null +++ b/src/locales/es/person/job_title_pattern.ts @@ -0,0 +1,3 @@ +export default [ + '{{person.jobType}} de {{person.jobArea}} {{person.jobDescriptor}}', +]; diff --git a/src/locales/fr/person/index.ts b/src/locales/fr/person/index.ts index fd7e10d16df..72bc6c44489 100644 --- a/src/locales/fr/person/index.ts +++ b/src/locales/fr/person/index.ts @@ -6,6 +6,7 @@ import type { PersonDefinition } from '../../..'; import female_first_name from './female_first_name'; import female_prefix from './female_prefix'; import first_name from './first_name'; +import job_title_pattern from './job_title_pattern'; import last_name from './last_name'; import last_name_pattern from './last_name_pattern'; import male_first_name from './male_first_name'; @@ -19,6 +20,7 @@ const person: PersonDefinition = { female_first_name, female_prefix, first_name, + job_title_pattern, last_name, last_name_pattern, male_first_name, diff --git a/src/locales/fr/person/job_title_pattern.ts b/src/locales/fr/person/job_title_pattern.ts new file mode 100644 index 00000000000..17051bdfafe --- /dev/null +++ b/src/locales/fr/person/job_title_pattern.ts @@ -0,0 +1,3 @@ +export default [ + '{{person.jobType}} {{person.jobArea}} {{person.jobDescriptor}}', +]; diff --git a/src/locales/fr/person/title.ts b/src/locales/fr/person/title.ts index 85f235ff3c2..9a657e9a356 100644 --- a/src/locales/fr/person/title.ts +++ b/src/locales/fr/person/title.ts @@ -19,4 +19,56 @@ export default { 'Agent', 'Stagiaire', ], + descriptor: [ + 'central', + 'client', + 'direct', + 'futur', + 'humain', + 'international', + 'interne', + 'mondial', + 'national', + 'principal', + 'régional', + ], + level: [ + 'de configuration', + 'de division', + 'de groupe', + 'de la communication', + 'de la création', + 'de la marque', + 'de la mise en œuvre', + 'de la mobilité', + 'de la qualité', + 'de la réponse', + 'de la responsabilité', + 'de la sécurité', + 'de la tactique', + 'de marque', + 'de paradigme', + 'de programme', + 'de recherche', + 'des applications', + 'des comptes', + 'des directives', + 'des données', + 'des facteurs', + 'des fonctionnalités', + 'des infrastructures', + 'des interactions', + 'des marchés', + 'des métriques', + 'des opérations', + 'des solutions', + 'du marketing', + 'du web', + "de l'assurance", + "de l'identité", + "de l'intégration", + "de l'intranet", + "de l'optimisation", + "de l'utilisabilité", + ], }; diff --git a/src/locales/fr_BE/person/index.ts b/src/locales/fr_BE/person/index.ts index d502ed7890f..7e9203dc3c3 100644 --- a/src/locales/fr_BE/person/index.ts +++ b/src/locales/fr_BE/person/index.ts @@ -14,7 +14,6 @@ import male_prefix from './male_prefix'; import name_ from './name'; import prefix from './prefix'; import suffix from './suffix'; -import title from './title'; const person: PersonDefinition = { female_first_name, @@ -28,7 +27,6 @@ const person: PersonDefinition = { name: name_, prefix, suffix, - title, }; export default person; diff --git a/src/locales/fr_BE/person/title.ts b/src/locales/fr_BE/person/title.ts deleted file mode 100644 index 85f235ff3c2..00000000000 --- a/src/locales/fr_BE/person/title.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default { - job: [ - 'Superviseur', - 'Executif', - 'Manager', - 'Ingenieur', - 'Specialiste', - 'Directeur', - 'Coordinateur', - 'Administrateur', - 'Architecte', - 'Analyste', - 'Designer', - 'Technicien', - 'Developpeur', - 'Producteur', - 'Consultant', - 'Assistant', - 'Agent', - 'Stagiaire', - ], -}; diff --git a/src/locales/fr_CH/animal/bear.ts b/src/locales/fr_CH/animal/bear.ts deleted file mode 100644 index d6f0bac02c3..00000000000 --- a/src/locales/fr_CH/animal/bear.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default [ - 'Ours à collier', - 'Ours lippu', - 'Ours à lunettes', - 'Ours noir', - 'Ours brun', - 'Ours blanc', - 'Panda géant', -]; diff --git a/src/locales/fr_CH/animal/bird.ts b/src/locales/fr_CH/animal/bird.ts deleted file mode 100644 index ab1b5157544..00000000000 --- a/src/locales/fr_CH/animal/bird.ts +++ /dev/null @@ -1,1079 +0,0 @@ -export default [ - 'Accenteur à gorge noire', - 'Accenteur alpin', - 'Accenteur de Radde', - 'Accenteur montanelle', - 'Accenteur mouchet', - 'Agrobate roux', - 'Aigle botté', - 'Aigle criard', - 'Aigle de Bonelli', - 'Aigle des steppes', - 'Aigle ibérique', - 'Aigle impérial', - 'Aigle pomarin', - 'Aigle ravisseur', - 'Aigle royal', - 'Aigrette ardoisée', - 'Aigrette bleue', - 'Aigrette des récifs', - 'Aigrette à gorge blanche', - 'Aigrette garzette', - 'Aigrette neigeuse', - 'Aigrette tricolore', - 'Albatros à nez jaune', - 'Albatros à sourcils noirs', - 'Albatros de Tristan', - 'Albatros de Tristan da Cunha', - 'Albatros hurleur', - 'Alouette bilophe', - 'Alouette calandre', - 'Alouette calandrelle', - 'Alouette de Clot-Bey', - 'Alouette de Swinhoe', - 'Alouette des champs', - 'Alouette gulgule', - 'Alouette haussecol', - 'Alouette hausse-col', - 'Alouette leucoptère', - 'Alouette lulu', - 'Alouette monticole', - 'Alouette nègre', - 'Alouette pispolette', - 'Amadine cou-coupé', - 'Ammomane élégante', - 'Ammomane isabelline', - "Anhinga d'Afrique", - 'Arlequin plongeur', - 'Astrild à joues orange', - 'Astrild cendré', - 'Astrild ondulé', - 'Autour des palombes', - "Avocette d'Amérique", - 'Avocette élégante', - 'Balbuzard pêcheur', - 'Barge à queue noire', - 'Barge hudsonienne', - 'Barge rousse', - 'Bartramie des champs', - 'Maubèche des champs', - 'Bateleur des savanes', - 'Bec-croisé bifascié', - "Bec-croisé d'Ecosse", - "Bec-croisé d'Écosse", - 'Bec-croisé des sapins', - 'Bec-croisé perroquet', - 'Bec-en-ciseaux noir', - "Bécasse d'Amérique", - 'Bécasse des bois', - 'Bécasseau à cou roux', - 'Bécasseau à col roux', - 'Bécasseau à échasses', - 'Bécasseau à longs doigts', - 'Bécasseau à queue pointue', - 'Bécasseau cocorli', - "Bécasseau d'Alaska", - 'Bécasseau de Baird', - 'Bécasseau de Bonaparte', - 'Bécasseau à croupion blanc', - "Bécasseau de l'Anadyr", - 'Bécasseau de Temminck', - 'Bécasseau falcinelle', - 'Bécasseau maubèche', - 'Bécasseau minuscule', - 'Bécasseau minute', - 'Bécasseau rousset', - 'Bécasseau roussâtre', - 'Bécasseau sanderling', - 'Bécasseau semipalmé', - 'Bécasseau spatule', - 'Bécasseau tacheté', - 'Bécasseau à poitrine cendrée', - 'Bécasseau variable', - 'Bécasseau violet', - 'Bécassin à bec court', - 'Bécassin roux', - 'Bécassin à long bec', - 'Bécassine à queue pointue', - 'Bécassine de Swinhoe', - 'Bécassine de Wilson', - 'Bécassine des marais', - 'Bécassine double', - 'Bécassine sourde', - 'Bengali rouge', - 'Bergeronnette citrine', - 'Bergeronnette de Béringie', - 'Bergeronnette des ruisseaux', - 'Bergeronnette grise', - 'Bergeronnette printanière', - 'Bernache à cou roux', - 'Bernache cravant', - 'Bernache de Hutchins', - 'Bernache du Canada', - 'Bernache nonnette', - 'Bihoreau gris', - 'Bihoreau violacé', - 'Blongios de Sturm', - 'Blongios mandchou', - 'Blongios de Schrenck', - 'Blongios nain', - 'Bondrée apivore', - 'Bondrée orientale', - 'Bouscarle de Cetti', - 'Bouvreuil des Açores', - 'Bouvreuil pivoine', - 'Bruant à calotte blanche', - 'Bruant à cou gris', - 'Bruant à couronne blanche', - 'Bruant à gorge blanche', - 'Bruant à joues marron', - 'Bruant à oreillons', - 'Bruant à sourcils jaunes', - 'Bruant à tête rousse', - 'Bruant ardoisé', - 'Bruant auréole', - 'Bruant cendré', - 'Bruant cendrillard', - 'Bruant chanteur', - 'Bruant de Lincoln', - 'Bruant de Pallas', - 'Bruant des neiges', - 'Plectrophane des neiges', - 'Bruant des prés', - 'Bruant des roseaux', - 'Bruant du Sahara', - 'Bruant fauve', - 'Bruant fou', - 'Bruant fuligineux', - 'Bruant hudsonien', - 'Bruant jaune', - 'Bruant lapon', - 'Plectrophane lapon', - 'Bruant masqué', - 'Bruant mélanocéphale', - 'Bruant nain', - 'Bruant ortolan', - 'Bruant proyer', - 'Bruant roux', - 'Bruant rustique', - 'Bruant striolé', - 'Bruant zizi', - 'Bulbul à oreillons blancs', - 'Bulbul des jardins', - 'Bulbul orphée', - 'Busard cendré', - "Busard d'Amérique", - 'Busard des marais', - 'Busard des roseaux', - 'Busard pâle', - 'Busard Saint-Martin', - 'Buse de Chine', - 'Buse de Swainson', - 'Buse féroce', - 'Buse pattue', - 'Buse variable', - "Butor d'Amérique", - 'Butor étoilé', - 'Caille des blés', - 'Caille du Japon', - 'Canard à faucilles', - 'Canard à front blanc', - "Canard d'Amérique", - 'Canard carolin', - 'Canard branchu', - 'Canard chipeau', - 'Canard colvert', - 'Canard du Cap', - 'Canard mandarin', - 'Canard musqué', - 'Canard noir', - 'Canard pilet', - 'Canard siffleur', - 'Canard souchet', - 'Capucin à dos marron', - 'Capucin à tête noire', - "Capucin bec-d'argent", - 'Capucin bec-de-plomb', - 'Capucin damier', - 'Cardinal à poitrine rose', - 'Carouge à épaulettes', - 'Carouge à tête jaune', - 'Cassenoix moucheté', - 'Chardonneret élégant', - 'Chevalier à pattes jaunes', - 'Petit Chevalier', - 'Chevalier aboyeur', - 'Chevalier arlequin', - 'Chevalier bargette', - 'Chevalier criard', - 'Grand Chevalier', - 'Chevalier culblanc', - 'Chevalier cul-blanc', - 'Chevalier de Sibérie', - 'Chevalier gambette', - 'Chevalier grivelé', - 'Chevalier guignette', - 'Chevalier semipalmé', - 'Chevalier solitaire', - 'Chevalier stagnatile', - 'Chevalier sylvain', - "Chevêche d'Athéna", - "Chevêchette d'Europe", - 'Chionis blanc', - 'Chocard à bec jaune', - 'Choucador à oreillons bleus', - 'Choucas de Daourie', - 'Choucas des tours', - "Chouette de l'Oural", - 'Chouette de Tengmalm', - 'Nyctale de Tengmalm', - 'Chouette épervière', - 'Épervière boréale', - 'Chouette hulotte', - 'Chouette hulotte africaine', - 'Chouette hulotte (mauritanica)', - 'Chouette lapone', - 'Cigogne blanche', - 'Cigogne noire', - 'Cincle plongeur', - 'Circaète Jean-le-Blanc', - 'Cisticole des joncs', - 'Cochevis de Thékla', - 'Cochevis huppé', - 'Colin de Californie', - 'Colin de Virginie', - 'Combattant varié', - 'Conure à tête rouge', - 'Corbeau à queue courte', - 'Corbeau brun', - 'Corbeau familier', - 'Corbeau freux', - 'Corbeau pie', - 'Cormoran à aigrettes', - 'Cormoran à poitrine blanche', - 'Cormoran africain', - 'Cormoran huppé', - 'Cormoran pygmée', - 'Corneille mantelée', - 'Corneille noire', - 'Coucou de Chine', - "Coucou de l'Himalaya", - 'Coucou geai', - 'Coucou gris', - 'Coucou oriental', - 'Coulicou à bec jaune', - 'Coulicou à bec noir', - 'Courlis à bec grêle', - 'Courlis cendré', - 'Courlis corlieu', - 'Courlis esquimau', - 'Courlis hudsonien', - 'Courlis nain', - 'Courvite isabelle', - 'Crabier chevelu', - 'Crabier chinois', - 'Crabier de Gray', - 'Crave à bec rouge', - "Crécerelle d'Amérique", - 'Cygne chanteur', - 'Cygne de Bewick', - 'Cygne siffleur', - 'Cygne noir', - 'Cygne tuberculé', - 'Damier du Cap', - 'Dendrocygne fauve', - 'Dendrocygne veuf', - 'Diamant mandarin', - "Dickcissel d'Amérique", - 'Durbec des sapins', - 'Échasse blanche', - "Effraie d'Amérique", - 'Effraie des clochers', - 'Chouette effraie', - 'Eider à duvet', - 'Eider à lunettes', - 'Eider à tête grise', - 'Eider de Steller', - 'Élanion blanc', - 'Engoulevent à collier roux', - "Engoulevent d'Amérique", - "Engoulevent d'Europe", - 'Engoulevent du désert', - 'Épervier à pieds courts', - "Épervier d'Europe", - 'Érismature à tête blanche', - 'Érismature rousse', - 'Étourneau de Daourie', - 'Étourneau roselin', - 'Étourneau sansonnet', - 'Étourneau unicolore', - 'Euplecte vorabé', - 'Faisan de Colchide', - 'Faisan de Lady Amherst', - 'Faisan doré', - 'Faisan vénéré', - 'Faucon concolore', - 'Faucon crécerelle', - 'Faucon crécerellette', - "Faucon d'Éléonore", - "Faucon de l'Amour", - 'Faucon émerillon', - 'Faucon gerfaut', - 'Faucon hobereau', - 'Faucon kobez', - 'Faucon lanier', - 'Faucon pèlerin', - 'Faucon sacre', - 'Fauvette à lunettes', - 'Fauvette à tête noire', - 'Fauvette babillarde', - 'Fauvette de Chypre', - 'Fauvette de Hume', - "Fauvette de l'Atlas", - 'Fauvette de Ménétries', - 'Fauvette de Moltoni', - 'Fauvette de Rüppell', - 'Fauvette des Baléares', - 'Fauvette des Balkans', - 'Fauvette des jardins', - 'Fauvette du désert', - 'Fauvette épervière', - 'Fauvette grisette', - 'Fauvette mélanocéphale', - 'Fauvette minule', - 'Fauvette naine', - 'Fauvette orphéane', - 'Fauvette orphée', - 'Fauvette passerinette', - 'Fauvette pitchou', - 'Fauvette sarde', - 'Flamant des Caraïbes', - 'Flamant du Chili', - 'Flamant nain', - 'Flamant rose', - 'Fou à pieds rouges', - 'Fou brun', - 'Fou de Bassan', - 'Fou du Cap', - 'Fou masqué', - 'Foulque caronculée', - 'Foulque à crête', - "Foulque d'Amérique", - 'Foulque macroule', - "Francolin d'Erckel", - 'Francolin noir', - 'Frégate aigle-de-mer', - 'Frégate superbe', - 'Fuligule à bec cerclé', - 'Fuligule à collier', - 'Fuligule à dos blanc', - 'Fuligule à tête noire', - 'Petit Fuligule', - 'Fuligule à tête rouge', - 'Fuligule milouin', - 'Fuligule milouinan', - 'Fuligule morillon', - 'Fuligule nyroca', - 'Fulmar boréal', - 'Gallinule africaine', - "Gallinule d'Amérique", - "Gallinule poule-d'eau", - 'Ganga à ventre brun', - 'Ganga cata', - 'Ganga tacheté', - 'Ganga unibande', - "Garde-boeufs d'Asie", - "Gardeboeuf d'Asie", - "Garrot à oeil d'or", - 'Garrot albéole', - 'Petit Garrot', - "Garrot d'Islande", - 'Geai des chênes', - 'Gélinotte des bois', - 'Glaréole à ailes noires', - 'Glaréole à collier', - 'Glaréole orientale', - 'Gobemouche à collier', - 'Gobemouche à demi-collier', - 'Gobemouche brun', - "Gobemouche de l'Atlas", - 'Gobemouche de la taïga', - 'Gobemouche de Sibérie', - 'Gobemouche gris', - 'Gobemouche mugimaki', - 'Gobemouche nain', - 'Gobemouche noir', - 'Goéland à ailes blanches', - 'Goéland arctique', - 'Goéland à ailes grises', - 'Goéland à bec cerclé', - 'Goéland à iris blanc', - 'Goéland à manteau ardoisé', - 'Goéland à queue noire', - 'Goéland argenté', - 'Goéland bourgmestre', - 'Goéland brun', - 'Goéland cendré', - "Goéland d'Amérique", - 'Goéland hudsonien', - "Goéland d'Arménie", - "Goéland d'Audouin", - 'Goéland de la Véga', - 'Goéland dominicain', - 'Goéland ichthyaète', - 'Goéland leucophée', - 'Goéland marin', - 'Goéland pontique', - 'Goéland railleur', - 'Goglu des prés', - 'Gorgebleue à miroir', - 'Grand-duc ascalaphe', - "Grand-duc d'Europe", - 'Grand Corbeau', - 'Grand Cormoran', - 'Grand Gravelot', - 'Pluvier grand-gravelot', - 'Grand Grèbe', - 'Grand Héron', - 'Grand Labbe', - 'Grand Tétras', - 'Grande Aigrette', - 'Gravelot à collier interrompu', - 'Pluvier à collier interrompu', - 'Gravelot de Leschenault', - 'Pluvier de Leschenault', - 'Gravelot kildir', - 'Pluvier kildir', - 'Gravelot mongol', - 'Pluvier de Mongolie', - 'Gravelot neigeux', - 'Pluvier neigeux', - 'Gravelot oriental', - 'Pluvier oriental', - 'Gravelot pâtre', - 'Pluvier pâtre', - 'Gravelot semipalmé', - 'Pluvier semipalmé', - 'Grèbe à bec bigarré', - 'Grèbe à cou noir', - 'Grèbe castagneux', - 'Grèbe esclavon', - 'Grèbe huppé', - 'Grèbe jougris', - 'Grimpereau des bois', - 'Grimpereau des jardins', - 'Grive à ailes rousses', - 'Grive à collier', - 'Grive à dos olive', - 'Grive à gorge noire', - 'Grive à gorge rousse', - 'Grive à joues grises', - 'Grive dama', - 'Grive de Naumann', - 'Grive de Sibérie', - 'Grive des bois', - 'Grive dorée', - 'Grive draine', - 'Grive fauve', - 'Grive litorne', - 'Grive mauvis', - 'Grive musicienne', - 'Grive obscure', - 'Merle obscur', - 'Grive solitaire', - 'Grosbec casse-noyaux', - 'Gros-bec casse-noyaux', - 'Grosbec errant', - 'Gros-bec errant', - 'Grue cendrée', - 'Grue de Sibérie', - 'Grue demoiselle', - 'Grue du Canada', - 'Grue moine', - "Guêpier d'Europe", - "Guêpier d'Orient", - 'Guêpier de Perse', - 'Guifette leucoptère', - 'Guifette moustac', - 'Guifette noire', - 'Guillemot à cou blanc', - 'Guillemot à long bec', - 'Guillemot à miroir', - 'Guillemot colombin', - 'Guillemot de Brünnich', - 'Guillemot de Troïl', - 'Guillemot marmette', - 'Guiraca bleu', - 'Gypaète barbu', - 'Harelde boréale', - 'Harelde kakawi', - 'Harfang des neiges', - 'Harle bièvre', - 'Grand Harle', - 'Harle couronné', - 'Harle huppé', - 'Harle piette', - 'Héron cendré', - 'Héron garde-boeufs', - 'Héron intermédiaire', - 'Héron mélanocéphale', - 'Héron pourpré', - 'Héron strié', - 'Héron vert', - 'Hibou des marais', - 'Hibou du Cap', - 'Hibou moyen-duc', - 'Hirondelle à ailes hérissées', - 'Hirondelle à front blanc', - 'Hirondelle bicolore', - 'Hirondelle de Bonaparte', - 'Hirondelle de fenêtre', - 'Hirondelle de Pallas', - 'Hirondelle de rivage', - 'Hirondelle de rochers', - 'Hirondelle du désert', - 'Hirondelle isabelline', - 'Hirondelle noire', - 'Hirondelle pâle', - 'Hirondelle paludicole', - 'Hirondelle rousseline', - 'Hirondelle rustique', - "Huîtrier d'Amérique", - 'Huîtrier pie', - "Huppe d'Afrique", - 'Huppe fasciée', - 'Hypolaïs bottée', - "Hypolaïs d'Upcher", - 'Hypolaïs des oliviers', - 'Hypolaïs ictérine', - 'Hypolaïs obscure', - 'Hypolaïs pâle', - 'Hypolaïs polyglotte', - 'Hypolaïs rama', - 'Ibis chauve', - 'Ibis falcinelle', - 'Ibis sacré', - 'Inséparable de Fischer', - 'Iranie à gorge blanche', - 'Jaseur boréal', - "Jaseur d'Amérique", - 'Junco ardoisé', - 'Labbe à longue queue', - 'Labbe de McCormick', - 'Labbe parasite', - 'Labbe pomarin', - 'Lagopède alpin', - 'Lagopède des saules', - 'Léiothrix jaune', - 'Linotte à bec jaune', - 'Linotte mélodieuse', - 'Locustelle de Pallas', - 'Locustelle fasciée', - 'Locustelle fluviatile', - 'Locustelle lancéolée', - 'Locustelle luscinioïde', - 'Locustelle tachetée', - "Loriot d'Europe", - 'Lusciniole à moustaches', - 'Macareux cornu', - 'Macareux huppé', - 'Macareux moine', - 'Macreuse à ailes blanches', - 'Macreuse à bec jaune', - 'Macreuse à front blanc', - 'Macreuse brune', - 'Macreuse de Sibérie', - 'Macreuse noire', - "Marabout d'Afrique", - 'Marouette de Baillon', - 'Marouette de Caroline', - 'Marouette ponctuée', - 'Marouette poussin', - 'Marouette rayée', - 'Râle rayé', - 'Martin-chasseur de Smyrne', - "Martin-pêcheur d'Amérique", - "Martin-pêcheur d'Europe", - 'Martin-pêcheur pie', - 'Martin huppé', - 'Martin triste', - 'Martinet à ventre blanc', - 'Martinet cafre', - 'Martinet de Sibérie', - 'Martinet des maisons', - 'Martinet épineux', - 'Martinet noir', - 'Martinet pâle', - 'Martinet ramoneur', - 'Martinet unicolore', - 'Mergule nain', - 'Merle à plastron', - "Merle d'Amérique", - 'Merle noir', - 'Merle pâle', - 'Merle unicolore', - 'Mésange azurée', - 'Mésange bleue', - 'Mésange boréale', - 'Mésange charbonnière', - 'Mésange huppée', - 'Mésange lapone', - 'Mésange lugubre', - 'Mésange noire', - 'Mésange nonnette', - 'Mésange nord-africaine', - 'Mésangeai imitateur', - 'Milan à queue fourchue', - 'Naucler à queue fourchue', - 'Milan noir', - 'Milan royal', - 'Moineau blanc', - 'Moineau cisalpin', - 'Moineau de la mer Morte', - 'Moineau domestique', - 'Moineau espagnol', - 'Moineau friquet', - 'Moineau pâle', - 'Moineau soulcie', - 'Monticole bleu', - 'Monticole de roche', - 'Moqueur chat', - 'Moqueur polyglotte', - 'Moqueur roux', - 'Moucherolle à côtés olive', - 'Moucherolle à ventre jaune', - 'Moucherolle des aulnes', - 'Moucherolle des saules', - 'Moucherolle phébi', - 'Moucherolle tchébec', - 'Moucherolle vert', - 'Mouette à tête grise', - 'Mouette atricille', - 'Mouette blanche', - 'Mouette de Bonaparte', - 'Mouette de Franklin', - 'Mouette de Ross', - 'Mouette rosée', - 'Mouette de Sabine', - 'Mouette mélanocéphale', - 'Mouette pygmée', - 'Mouette relique', - 'Mouette rieuse', - 'Mouette tridactyle', - 'Nette rousse', - 'Ninoxe hirsute', - 'Niverolle alpine', - 'Noddi brun', - 'Nymphée fuligineuse', - 'Rougequeue fuligineux', - 'Océanite à ventre noir', - 'Océanite culblanc', - 'Océanite cul-blanc', - 'Océanite de Castro', - 'Océanite de Monteiro', - 'Océanite de Swinhoe', - 'Océanite de Wilson', - 'Océanite frégate', - 'Océanite tempête', - 'Oedicnème criard', - 'Oie à bec court', - 'Oie à tête barrée', - 'Oie cendrée', - 'Oie de la toundra', - 'Oie de Ross', - 'Oie des moissons', - 'Oie des neiges', - 'Oie empereur', - 'Oie naine', - 'Oie rieuse', - 'Oriole du Nord', - 'Oriole de Baltimore', - 'Orite à longue queue', - 'Mésange à longue queue', - "Ouette d'Égypte", - 'Outarde barbue', - 'Grande Outarde', - 'Outarde canepetière', - 'Outarde de Macqueen', - 'Outarde houbara', - 'Panure à moustaches', - 'Paon bleu', - 'Paradoxornis à gorge cendrée', - 'Paradoxornis de Webb', - 'Paruline à ailes bleues', - 'Paruline à ailes dorées', - 'Paruline à calotte noire', - 'Paruline à capuchon', - 'Paruline à collier', - 'Paruline à couronne rousse', - 'Paruline à croupion jaune', - 'Paruline à flancs marron', - 'Paruline à gorge grise', - 'Paruline à gorge jaune', - 'Paruline à gorge noire', - 'Paruline à gorge orangée', - 'Paruline à joues grises', - 'Paruline à poitrine baie', - 'Paruline à tête cendrée', - 'Paruline azurée', - 'Paruline bleue', - 'Paruline couronnée', - "Paruline d'Audubon", - 'Paruline des pins', - 'Paruline des prés', - 'Paruline des ruisseaux', - 'Paruline du Canada', - 'Paruline flamboyante', - 'Paruline hochequeue', - 'Paruline jaune', - 'Paruline des mangroves', - 'Paruline masquée', - 'Paruline noir et blanc', - 'Paruline obscure', - 'Paruline orangée', - 'Paruline polyglotte', - 'Ictérie polyglotte', - 'Paruline rayée', - 'Paruline tigrée', - 'Paruline triste', - 'Paruline verdâtre', - 'Passerin azuré', - 'Passerin indigo', - 'Pélican blanc', - 'Pélican frisé', - 'Pélican gris', - 'Perdrix bartavelle', - 'Perdrix choukar', - 'Perdrix de Daourie', - 'Perdrix gambra', - 'Perdrix grise', - 'Perdrix rouge', - 'Perriche veuve', - 'Conure veuve', - 'Perruche à collier', - 'Perruche alexandre', - 'Petit-duc scops', - 'Petit Blongios', - 'Petit Gravelot', - 'Pluvier petit-gravelot', - 'Petit Puffin du Cap-Vert', - 'Puffin de Boyd', - 'Petite Sterne', - 'Pétrel de Bulwer', - 'Pétrel de la Trinité', - 'Pétrel de Trindade', - 'Pétrel de Madère', - 'Pétrel de Schlegel', - 'Pétrel des Bermudes', - 'Pétrel des Kermadec', - 'Pétrel diablotin', - 'Pétrel du désert', - 'Pétrel des Desertas', - 'Pétrel géant', - 'Pétrel gongon', - 'Pétrel hérault', - 'Pétrel du Herald', - 'Pétrel noir', - 'Pétrel soyeux', - 'Phaéton à bec jaune', - 'Phaéton à bec rouge', - 'Phalarope à bec étroit', - 'Phalarope à bec large', - 'Phalarope de Wilson', - 'Phragmite aquatique', - 'Phragmite des joncs', - 'Pic à dos blanc', - 'Pic cendré', - 'Pic de Levaillant', - 'Pic de Sharpe', - 'Pic épeiche', - 'Pic épeichette', - 'Pic flamboyant', - 'Pic maculé', - 'Pic mar', - 'Pic noir', - 'Pic syriaque', - 'Pic tridactyle', - 'Pic vert', - 'Pie-grièche à poitrine rose', - 'Pie-grièche à tête rousse', - 'Pie-grièche boréale', - 'Pie-grièche brune', - 'Pie-grièche du Turkestan', - 'Pie-grièche écorcheur', - 'Pie-grièche grise', - 'Pie-grièche isabelle', - 'Pie-grièche masquée', - 'Pie-grièche méridionale', - 'Pie-grièche schach', - 'Pie bavarde', - 'Pie du Maghreb', - 'Pie ibérique', - 'Pie-bleue ibérique', - 'Pigeon biset', - 'Pigeon colombin', - 'Pigeon de Bolle', - 'Pigeon des lauriers', - 'Pigeon ramier', - 'Pigeon trocaz', - 'Pingouin torda', - 'Petit Pingouin', - 'Pinson bleu', - 'Pinson bleu de Grande Canarie', - 'Pinson de Grande Canarie', - 'Pinson des arbres', - 'Pinson du Nord', - 'Pintade de Numidie', - "Pioui de l'Est", - 'Pipit à dos olive', - 'Pipit à gorge rousse', - 'Pipit à long bec', - 'Pipit de Berthelot', - 'Pipit de Godlewski', - 'Pipit de la Petchora', - 'Pipit de Richard', - 'Pipit des arbres', - 'Pipit farlousane', - "Pipit d'Amérique", - 'Pipit farlouse', - 'Pipit maritime', - 'Pipit rousseline', - 'Pipit rousset', - 'Pipit spioncelle', - 'Plongeon à bec blanc', - 'Plongeon arctique', - 'Plongeon catmarin', - 'Plongeon du Pacifique', - 'Plongeon imbrin', - 'Plongeon huard', - 'Pluvian fluviatile', - 'Pluvier argenté', - 'Pluvier asiatique', - 'Pluvier bronzé', - 'Pluvier doré', - 'Pluvier fauve', - 'Pluvier guignard', - 'Pouillot à deux barres', - 'Pouillot à grands sourcils', - 'Pouillot à gros bec', - 'Pouillot à pattes claires', - 'Pouillot boréal', - 'Pouillot brun', - 'Pouillot de Bonelli', - 'Pouillot de Hume', - 'Pouillot de Pallas', - 'Pouillot de Schwarz', - 'Pouillot de Temminck', - 'Pouillot des Canaries', - 'Pouillot du Caucase', - 'Pouillot du Kamtchatka', - 'Pouillot fitis', - 'Pouillot griséole', - 'Pouillot ibérique', - 'Pouillot modeste', - 'Pouillot montagnard', - 'Pouillot oriental', - 'Pouillot siffleur', - 'Pouillot véloce', - 'Pouillot verdâtre', - 'Prinia gracile', - 'Puffin à bec grêle', - 'Puffin à menton blanc', - 'Puffin à pieds pâles', - 'Puffin boréal', - 'Puffin cendré', - "Puffin d'Audubon", - 'Puffin de Baillon', - 'Puffin de Macaronésie', - 'Puffin de Scopoli', - 'Puffin des Anglais', - 'Puffin des Baléares', - 'Puffin du Cap-Vert', - 'Puffin fuligineux', - 'Puffin majeur', - 'Puffin yelkouan', - 'Pygargue à queue blanche', - 'Pygargue à tête blanche', - 'Pygargue de Pallas', - 'Quiscale bronzé', - 'Quiscale rouilleux', - 'Râle à bec jaune', - 'Marouette à bec jaune', - 'Râle à crête', - "Râle d'eau", - 'Râle de Virginie', - 'Râle des genêts', - 'Râle des prés', - 'Rémiz penduline', - 'Rhynchée peinte', - 'Robin à flancs roux', - 'Roitelet à couronne rubis', - 'Roitelet de Madère', - 'Roitelet huppé', - 'Roitelet triple-bandeau', - "Rollier d'Abyssinie", - "Rollier d'Europe", - 'Roselin à ailes roses', - 'Roselin à tête grise', - 'Roselin cramoisi', - 'Roselin de Lichtenstein', - 'Roselin de Mongolie', - 'Roselin familier', - 'Roselin githagine', - 'Roselin rose', - 'Roselin tacheté', - 'Rossignol bleu', - 'Rossignol calliope', - 'Rossignol philomèle', - 'Rossignol progné', - 'Rossignol siffleur', - 'Rougegorge familier', - 'Rougequeue à front blanc', - "Rougequeue d'Eversmann", - 'Rougequeue de Moussier', - 'Rougequeue noir', - 'Rousserolle à gros bec', - 'Rousserolle africaine', - 'Rousserolle des buissons', - 'Rousserolle effarvatte', - 'Rousserolle isabelle', - 'Rousserolle stentor', - 'Rousserolle turdoïde', - 'Rousserolle verderolle', - 'Sarcelle à ailes bleues', - 'Sarcelle à ailes vertes', - 'Sarcelle cannelle', - "Sarcelle d'été", - "Sarcelle d'hiver", - 'Sarcelle élégante', - 'Sarcelle marbrée', - 'Marmaronette marbrée', - 'Serin à front rouge', - "Serin à front d'or", - 'Serin cini', - 'Serin des Canaries', - 'Serin du Cap', - 'Sirli de Dupont', - 'Alouette de Dupont', - 'Sirli du désert', - 'Sittelle à poitrine rousse', - 'Sittelle corse', - 'Sittelle de Krüper', - 'Sittelle de Neumayer', - 'Sittelle torchepot', - 'Sizerin blanchâtre', - 'Sizerin cabaret', - 'Sizerin flammé', - 'Spatule blanche', - "Spatule d'Afrique", - 'Starique cristatelle', - 'Starique perroquet', - 'Sterne à dos pâle', - 'Sterne royale (Afrique)', - 'Sterne à joues blanches', - 'Sterne arctique', - 'Sterne bridée', - 'Sterne caspienne', - 'Sterne caugek', - 'Sterne de Cabot', - 'Sterne de Dougall', - 'Sterne de Forster', - 'Sterne de Saunders', - 'Sterne des Aléoutiennes', - 'Sterne élégante', - 'Sterne fuligineuse', - 'Sterne hansel', - 'Sterne naine', - 'Sterne pierregarin', - 'Sterne royale', - 'Sterne voyageuse', - 'Syrrhapte paradoxal', - 'Tadorne casarca', - 'Tadorne de Belon', - 'Talève à tête grise', - "Talève d'Afrique", - "Talève d'Allen", - 'Talève sultane', - 'Talève violacée', - 'Tangara écarlate', - 'Piranga écarlate', - 'Tangara vermillon', - 'Piranga vermillon', - 'Tantale ibis', - 'Tarier africain', - "Tarier d'Afrique", - 'Tarier de Sibérie', - 'Tarier de Stejneger', - 'Tarier des Canaries', - 'Tarier des prés', - 'Tarier pâtre', - 'Tarier pie', - 'Tarin des aulnes', - 'Tchagra à tête noire', - 'Tétras lyre', - 'Tichodrome échelette', - 'Tisserin à tête noire', - 'Tisserin gendarme', - 'Tohi à flancs roux', - 'Torcol fourmilier', - 'Torrentaire à calotte blanche', - 'Rougequeue à calotte blanche', - 'Tournepierre à collier', - 'Tourterelle à queue carrée', - 'Tourterelle des bois', - 'Tourterelle maillée', - 'Tourterelle masquée', - 'Tourtelette masquée', - 'Tourterelle orientale', - 'Tourterelle rieuse', - 'Tourterelle triste', - 'Tourterelle turque', - 'Traquet à capuchon', - 'Traquet à tête blanche', - 'Traquet à tête grise', - 'Traquet de Chypre', - 'Traquet de Finsch', - 'Traquet de Seebohm', - 'Traquet deuil', - 'Traquet du désert', - 'Traquet isabelle', - 'Traquet kurde', - 'Traquet motteux', - 'Traquet noir et blanc', - 'Traquet oreillard', - 'Traquet pie', - 'Traquet rieur', - 'Traquet variable', - 'Troglodyte des marais', - 'Troglodyte mignon', - 'Turnix mugissant', - "Turnix d'Andalousie", - "Tyran de l'Ouest", - 'Tyran des savanes', - 'Tyran tritri', - 'Vacher à tête brune', - 'Vanneau à queue blanche', - 'Vanneau à tête grise', - 'Vanneau éperonné', - 'Vanneau à éperons', - 'Vanneau huppé', - 'Vanneau indien', - 'Vanneau sociable', - 'Vautour africain', - 'Vautour de Rüppell', - 'Vautour fauve', - 'Vautour moine', - 'Vautour oricou', - 'Vautour percnoptère', - "Percnoptère d'Égypte", - 'Venturon corse', - 'Venturon montagnard', - "Verdier d'Europe", - 'Viréo à gorge jaune', - 'Viréo à oeil rouge', - 'Viréo aux yeux rouges', - 'Viréo à tête bleue', - 'Viréo aux yeux blancs', - 'Viréo de Philadelphie', - 'Viréo mélodieux', -]; diff --git a/src/locales/fr_CH/animal/cat.ts b/src/locales/fr_CH/animal/cat.ts deleted file mode 100644 index acd41fb8abe..00000000000 --- a/src/locales/fr_CH/animal/cat.ts +++ /dev/null @@ -1,80 +0,0 @@ -export default [ - 'Abyssin', - 'American curl', - 'American shorthair', - 'American wirehair', - 'Anatoli', - 'Angora turc', - 'Asian', - 'Balinais', - 'Bengal', - 'Bleu russe', - 'Bobtail américain', - 'Bobtail des Kouriles', - 'Bobtail japonais', - 'Bombay', - 'Brazilian shorthair', - 'British longhair', - 'British shorthair', - 'Burmese', - 'Burmilla', - 'Californian rex', - 'Californian spangled', - 'Ceylan', - 'Chartreux', - 'Chantilly', - 'Chausie', - 'Colorpoint shorthair', - 'Cornish rex', - 'Cymric', - 'Devon rex', - 'Donskoy', - 'European shorthair', - 'Exotic shorthair', - 'German rex', - 'Havana brown', - 'Highland fold', - 'Himalayen', - 'Khao Manee', - 'Korat', - 'LaPerm', - 'Maine coon', - 'Mandarin', - 'Manx', - 'Mau arabe', - 'Mau égyptien', - 'Minskin', - 'Munchkin', - 'Nebelung', - 'Norvégien', - 'Ocicat', - 'Ojos azules', - 'Oriental shorthair', - 'Persan', - 'Peterbald', - 'Pixie-bob', - 'Ragamuffin', - 'Ragdoll', - 'Sacré de Birmanie', - 'Safari', - 'Savannah', - 'Scottish fold', - 'Selkirk rex', - 'Serengeti', - 'Seychellois', - 'Siamois', - 'Sibérien', - 'Singapura', - 'Skookum', - 'Snowshoe', - 'Sokoké', - 'Somali', - 'Sphynx', - 'Thaï', - 'Tiffany', - 'Tonkinois', - 'Toyger', - 'Turc de Van', - 'Ural rex', - 'York chocolat', -]; diff --git a/src/locales/fr_CH/animal/cetacean.ts b/src/locales/fr_CH/animal/cetacean.ts deleted file mode 100644 index 5abae633f83..00000000000 --- a/src/locales/fr_CH/animal/cetacean.ts +++ /dev/null @@ -1,124 +0,0 @@ -export default [ - 'Baiji', - 'Baleine à bec de Blainville', - 'Baleine à bec de Gervais', - 'Baleine à bec de Gray', - 'Baleine à bec de Hubbs', - 'Baleine à bec de Layard', - 'Baleine à bec de Longman', - 'Baleine à bec de Perrin', - 'Baleine à bec de Sowerby', - 'Baleine à bec de Stejneger', - 'Baleine à bec de Travers', - 'Baleine à bec de True', - 'Baleine à bec pygmée', - 'Baleine à bec', - 'Baleine à bosse', - 'Baleine australe', - 'Baleine bleue', - 'Baleine boréale', - 'Baleine de Cuvier', - 'Baleine de Minke', - 'Baleine du Groenland', - 'Baleine franche australe', - 'Baleine franche de Biscaye', - 'Baleine franche du Pacifique Nord', - 'Baleine grise', - 'Baleine noire australe', - 'Baleine pilote', - 'Baleine pygmée', - 'Béluga', - 'Bérardie de Baird', - 'Boto', - 'Cachalot nain', - 'Cachalot pygmée', - 'Cachalots', - 'Costero', - 'Dauphin à bec étroit', - 'Dauphin à bosse du Pacifique', - 'Dauphin à flancs blancs', - 'Dauphin à long bec', - 'Dauphin à nez blanc', - 'Dauphin aptère austral', - 'Dauphin blanc de Chine', - 'Dauphin bleu et blanc', - 'Dauphin Burrunan', - 'Dauphin clymène', - 'Dauphin commun à bec court', - 'Dauphin commun à long bec', - 'Dauphin de Chine', - 'Dauphin de Commerson', - 'Dauphin de Fraser', - 'Dauphin de Gill', - 'Dauphin de Guyane', - 'Dauphin de la Plata', - 'Dauphin de Peale', - 'Dauphin de Risso', - 'Dauphin du Cap', - 'Dauphin du Gange', - 'Dauphin du Nord', - 'Dauphin noir', - 'Dauphin obscur', - 'Dauphin sablier', - 'Dauphin tacheté pantropical', - 'Fausse orque', - 'Globicéphale noir', - 'Globicéphale tropical', - 'Globicéphale', - 'Grand cachalot', - 'Grand dauphin', - 'Hyperoodon austral', - 'Hyperoodon boréal', - 'Jubarte', - 'Marsouin à lunettes', - 'Marsouin aptère', - 'Marsouin blanc', - 'Marsouin commun', - 'Marsouin de Burmeister', - 'Marsouin de Cuvier', - 'Marsouin de Lahille', - 'Marsouin du Golfe de Californie', - 'Marsouin du Pacifique', - 'Marsouins', - 'Mégaptère', - 'Mésoplodon japonais', - 'Narval', - 'Orque pygmée', - 'Orque', - 'Petit rorqual de l’Antarctique', - 'Petit rorqual', - 'Rorqual à bosse', - 'Rorqual bleu', - 'Rorqual boréal', - 'Rorqual commun', - 'Rorqual de Bryde', - 'Rorqual de Rudolphi', - 'Rorqual tropical', - 'Rorquals', - 'Sotalie', - 'Sousouc', - 'Tasmacète de Shepherd', - 'Tucuxi', - 'Whalphin', - "Baleine à bec d'Andrews", - "Baleine à bec d'Hector", - "Baleine franche de l'Atlantique Nord", - "Baleine noire de l'Atlantique Nord", - "Bérardie d'Arnoux", - "Dauphin à aileron retroussé d'Australie", - "Dauphin à bosse de l'Atlantique", - "Dauphin à bosse de l'Indo-Pacifique", - "Dauphin à bosse de l'océan Indien", - "Dauphin commun d'Arabie", - "Dauphin d'Électre", - "Dauphin d'Hector", - "Dauphin de l'Amazone", - "Dauphin de l'Indus", - "Dauphin de l'Irrawaddy", - "Dauphin rose de l'Amazone", - "Dauphin tacheté de l'Atlantique", - "Dauphins d'eau douce", - "Grand dauphin de l'océan Indien", - "Marsouin de l'Inde", - "Rorqual d'Omura", -]; diff --git a/src/locales/fr_CH/animal/cow.ts b/src/locales/fr_CH/animal/cow.ts deleted file mode 100644 index 1c19831ddab..00000000000 --- a/src/locales/fr_CH/animal/cow.ts +++ /dev/null @@ -1,50 +0,0 @@ -export default [ - 'Abondance', - 'Armoricaine', - 'Aubrac', - 'Aure-et-Saint-Girons', - 'Bazadaise', - 'Béarnaise', - 'Bétizu', - 'Bleue du Nord', - 'Bordelaise (Nouvelle)', - 'Braunvieh', - 'Brava', - 'Bretonne pie noir', - 'Brune', - 'Camargue', - 'Charolaise', - 'Corse', - 'Coursière', - 'Créole', - 'Évolène', - 'Ferrandaise', - 'Froment du Léon', - 'Gasconne des Pyrénées', - 'Hérens', - 'INRA 95', - 'Limousine', - 'Lourdaise', - 'Maraîchine', - 'Marine landaise', - 'Mirandaise', - 'Montbéliarde', - 'Montbéliardes au pré.', - 'Nantaise', - 'Normande', - 'Parthenaise', - 'Pie rouge des plaines', - 'Rouge des prés', - 'Rouge flamande', - 'Saïnata', - 'Salers', - 'Saosnoise', - 'Sarlabot', - 'Simmental française', - 'Simmental', - 'Tarine', - 'Villard-de-Lans', - 'Vosgienne', - "Blonde d'Aquitaine", - "Prim'Holstein", -]; diff --git a/src/locales/fr_CH/animal/crocodilia.ts b/src/locales/fr_CH/animal/crocodilia.ts deleted file mode 100644 index 9a392766750..00000000000 --- a/src/locales/fr_CH/animal/crocodilia.ts +++ /dev/null @@ -1,26 +0,0 @@ -export default [ - "Alligator d'Amérique", - 'Alligator de Chine', - 'Caïman à lunettes', - 'Caïman à museau large', - 'Caïman de Schneider', - 'Caïman nain', - 'Caïman noir', - 'Crocodile américain', - "Crocodile d'Afrique de l'Ouest", - 'Crocodile de Cuba', - 'Crocodile de Johnston', - "Crocodile de l'Orénoque", - 'Crocodile de Morelet', - 'Crocodile de Nouvelle-Guinée', - 'Crocodile des marais', - 'Crocodile des Philippines', - 'Crocodile du Nil', - 'Crocodile du Siam', - 'Crocodile marin', - 'Crocodile nain', - "Faux-gavial d'Afrique", - 'Faux-gavial de Malaisie', - 'Gavial du Gange', - 'Jacara', -]; diff --git a/src/locales/fr_CH/animal/dog.ts b/src/locales/fr_CH/animal/dog.ts deleted file mode 100644 index b656204dd0e..00000000000 --- a/src/locales/fr_CH/animal/dog.ts +++ /dev/null @@ -1,339 +0,0 @@ -export default [ - 'Affenpinscher', - 'Airedale Terrier', - 'Akita Américain', - 'Akita Inu', - 'American Staffordshire Terrier', - "Ancien chien d'arrêt danois", - 'Anglo-Français de Petite Vènerie', - 'Ariégeois', - 'Barbet', - 'Barbu Tchèque', - 'Barzoï', - 'Basenji', - 'Basset Artésien-Normand', - 'Basset Bleu de Gascogne', - 'Basset de Westphalie', - 'Basset des Alpes', - 'Basset Fauve de Bretagne', - 'Basset Hound', - 'Beagle', - 'Beagle-Harrier', - 'Bearded Collie', - 'Beauceron', - 'Bedlington Terrier', - 'Berger Allemand', - 'Berger Américain Miniature', - 'Berger Australien', - 'Berger Belge Groenendael', - 'Berger Belge Laekenois', - 'Berger Belge Malinois', - 'Berger Belge Tervueren', - 'Berger Blanc Suisse', - 'Berger Catalan', - "Berger d'Anatolie", - "Berger d'Asie Centrale", - 'Berger de Bergame', - 'Berger de Bohême', - 'Berger de Brie', - "Berger de l'Atlas", - 'Berger de Maremme et des Abruzzes', - 'Berger de Picardie', - 'Berger de Russie', - 'Berger de Savoie', - 'Berger des Pyrénées', - 'Berger des Shetland', - 'Berger du Caucase', - 'Berger du massif du Karst', - 'Berger finnois de Laponie', - 'Berger Hollandais', - 'Berger Islandais', - 'Berger Polonais de Plaine', - 'Berger Polonais de Podhale', - 'Berger Portugais', - 'Berger Yougoslave', - 'Bichon à poil frisé', - 'Bichon Bolonais', - 'Bichon Havanais', - 'Bichon Maltais', - 'Biewer Yorkshire', - 'Billy', - 'Black and Tan Coonhound', - 'Bobtail', - 'Boerbull', - 'Border Collie', - 'Border Terrier', - 'Boston Terrier', - 'Bouledogue Américain', - 'Bouledogue Français', - 'Bouvier Australien', - 'Bouvier Bernois', - "Bouvier d'Appenzell", - "Bouvier de l'Entlebuch", - 'Bouvier des Ardennes', - 'Bouvier des Flandres', - 'Boxer', - 'Brachet Allemand', - 'Brachet autrichien noir et feu', - 'Brachet de Styrie à poil dur', - 'Brachet Polonais', - 'Brachet Tyrolien', - 'Braque allemand à poil court', - 'Braque allemand à poil dur', - "Braque d'Auvergne", - 'Braque de Burgos', - "Braque de l'Ariège", - 'Braque de Weimar', - 'Braque du Bourbonnais', - 'Braque Français', - 'Braque Hongrois à poil court', - 'Braque hongrois à poil dur', - 'Braque Italien', - 'Braque Saint-Germain', - 'Braque Slovaque à poil dur', - 'Briquet Griffon Vendéen', - 'Broholmer', - 'Buhund Norvégien', - 'Bull Terrier', - 'Bulldog Anglais', - 'Bulldog Continental', - 'Bullmastiff', - 'Cairn Terrier', - 'Cane Corso', - 'Caniche', - 'Cao de Castro Laboreiro', - 'Carlin', - 'Cavalier King Charles Spaniel', - 'Cavapoo', - 'Chesapeake Bay Retriever', - 'Chien chinois à crête', - "Chien courant d'Istrie à poil dur", - "Chien courant d'Istrie à poil ras", - 'Chien courant de Bosnie', - 'Chien courant de Halden', - 'Chien courant de Hamilton', - 'Chien courant de Hygen', - 'Chien courant de Posavatz', - 'Chien courant de Schiller', - 'Chien courant de Transylvanie', - 'Chien courant du Småland', - 'Chien courant espagnol', - 'Chien courant Finnois', - 'Chien courant grec', - 'Chien courant italien', - 'Chien courant norvégien', - 'Chien courant serbe', - 'Chien courant slovaque', - 'Chien courant suisse', - 'Chien courant yougoslave de montagne', - 'Chien courant yougoslave tricolore', - "Chien d'arrêt frison", - "Chien d'arrêt portugais", - "Chien d'eau américain", - "Chien d'eau espagnol", - "Chien d'eau frison", - "Chien d'eau irlandais", - "Chien d'Eau Portugais", - "Chien d'eau romagnol", - "Chien d'ours de Carélie", - "Chien d'Oysel", - 'Chien de berger de Croatie', - 'Chien de berger de Majorque', - 'Chien de Berger Roumain de Mioritza', - 'Chien de Berger Roumain des Carpathes', - 'Chien de Canaan', - 'Chien de montagne des Pyrénées', - 'Chien de montagne portugais', - 'Chien de Saint Hubert', - 'Chien du Groenland', - 'Chien du pharaon', - 'Chien d’arrêt allemand à poil long', - 'Chien d’Artois', - 'Chien d’élan norvégien gris', - 'Chien d’Élan Norvégien Noir', - 'Chien d’élan suédois', - 'Chien Finnois de Laponie', - 'Chien Jindo Coréen', - 'Chien Loup de Saarloos', - 'Chien Loup Tchécoslovaque', - 'Chien norvégien de Macareux', - 'Chien nu du Pérou', - 'Chien nu mexicain', - 'Chien rouge de Bavière', - 'Chien rouge de Hanovre', - 'Chien suédois de Laponie', - 'Chien thaïlandais', - 'Chihuahua', - 'Chow Chow', - 'Cirneco de l’Etna', - 'Clumber-Spaniel', - 'Cocker Américain', - 'Cocker Anglais', - 'Colley à poil court', - 'Colley à poil long', - 'Coton de Tuléar', - 'Curly Coated Retriever', - 'Cursinu', - 'Dalmatien', - 'Dandie-Dinmont-Terrier', - 'Dobermann', - 'Dogo Canario', - 'Dogue Allemand', - 'Dogue Argentin', - 'Dogue de Bordeaux', - 'Dogue de Majorque', - 'Dogue du Tibet', - 'Drever', - 'English Toy Terrier', - 'Epagneul à perdrix de Drente', - 'Epagneul Bleu de Picardie', - 'Epagneul Breton', - 'Epagneul de Pont-Audemer', - 'Epagneul Français', - 'Epagneul Japonais', - 'Epagneul Nain Continental', - 'Epagneul Picard', - 'Epagneul Tibétain', - 'Eurasier', - 'Field-Spaniel', - 'Fila Brasileiro', - 'Fila de Sao Miguel', - 'Flat-Coated Retriever', - 'Fox Terrier', - 'Foxhound américain', - 'Foxhound anglais', - 'Golden Retriever', - 'Goldendoodle', - 'Grand Anglo-Français blanc et noir', - 'Grand Anglo-Français blanc et orange', - 'Grand Anglo-Français tricolore', - 'Grand Basset Griffon vendéen', - 'Grand Bouvier Suisse', - 'Grand Épagneul de Münster', - 'Grand Gascon saintongeois', - 'Grand Griffon Vendéen', - 'Greyhound', - 'Griffon Belge', - 'Griffon Bleu de Gascogne', - 'Griffon Bruxellois', - 'Griffon fauve de Bretagne', - 'Griffon Korthals', - 'Griffon Nivernais', - 'Harrier', - 'Hokkaïdo Ken', - 'Hovawart', - 'Husky Sibérien', - 'Irish Glen of Imaal Terrier', - 'Irish Terrier', - 'Irish Terrier à poil doux', - 'Jack Russell Terrier', - 'Jagdterrier', - 'Kai', - 'Kelpie', - 'Kerry Blue Terrier', - 'King Charles Spaniel', - 'Kishu', - 'Komondor', - 'Kromfohrländer', - 'Kuvasz Hongrois', - 'Labradoodle', - 'Labrador Retriever', - 'Laïka de Sibérie occidentale', - 'Laïka de Sibérie orientale', - 'Laïka Russo-Européen', - 'Lakeland Terrier', - 'Landseer', - 'Leonberger', - 'Lévrier Afghan', - 'Lévrier Azawakh', - 'Lévrier Écossais', - 'Lévrier Espagnol', - 'Lévrier Hongrois', - 'Lévrier Irlandais', - 'Lévrier Polonais', - 'Lhassa Apso', - "Malamute de l'Alaska", - 'Mastiff', - "Mâtin de l'Alentejo", - 'Mâtin de Naples', - 'Mâtin des Pyrénées', - 'Mâtin Espagnol', - 'Mudi', - 'Norfolk Terrier', - 'Norwich Terrier', - 'Otterhound', - 'Parson Russell Terrier', - 'Pékinois', - 'Petit Basset Griffon vendéen', - 'Petit Brabançon', - 'Petit Chien Courant Suisse', - "Petit chien hollandais de chasse au gibier d'eau", - 'Petit Chien Lion', - 'Petit Epagneul de Münster', - 'Petit Lévrier Italien', - 'Pinscher', - 'Pinscher autrichien à poil court', - 'Pinscher Nain', - 'Pitbull', - 'Podenco Canario', - 'Podenco Ibicenco', - 'Podengo portugais', - 'Pointer Anglais', - 'Poitevin', - 'Pomsky', - 'Porcelaine', - 'Pudelpointer', - 'Puli', - 'Pumi', - 'Ratonero Bodeguero Andaluz', - 'Retriever de la Nouvelle-Écosse', - 'Rhodesian-Ridgeback', - 'Rottweiler', - 'Saint-Bernard', - 'Saluki', - 'Samoyède', - 'Schapendoes', - 'Schipperke', - 'Schnauzer', - 'Sealyham Terrier', - 'Setter Anglais', - 'Setter Gordon', - 'Setter Irlandais Rouge', - 'Shar-Pei', - 'Shiba Inu', - 'Shih Tzu', - 'Shikoku', - 'Silky Terrier', - 'Skye Terrier', - 'Sloughi', - 'Smous des Pays-Bas', - 'Spinone', - 'Spitz Allemand', - 'Spitz de Norrbotten', - 'Spitz des Wisigoths', - 'Spitz Finlandais', - 'Spitz Japonais', - 'Springer Anglais', - 'Staffordshire Bull Terrier', - 'Sussex-Spaniel', - 'Tchouvatch Slovaque', - 'Teckel', - 'Terre-Neuve', - 'Terrier australien', - 'Terrier brésilien', - 'Terrier de Manchester', - 'Terrier Ecossais', - 'Terrier japonais', - 'Terrier Noir Russe', - 'Terrier tchèque', - 'Terrier Tibétain', - 'Tosa', - 'Volpino Italien', - 'Welsh Corgi Cardigan', - 'Welsh Corgi Pembroke', - 'Welsh Springer Spaniel', - 'Welsh Terrier', - 'West Highland White Terrier', - 'Whippet', - 'Yorkshire Terrier', -]; diff --git a/src/locales/fr_CH/animal/fish.ts b/src/locales/fr_CH/animal/fish.ts deleted file mode 100644 index 60d3b96fcba..00000000000 --- a/src/locales/fr_CH/animal/fish.ts +++ /dev/null @@ -1,234 +0,0 @@ -export default [ - 'Able de Heckel', - 'Ablette', - 'Achigan de mer', - 'Aiglefin', - 'Aiguillat commun', - 'Aiguillat noir', - 'Alose', - 'Amour blanc', - 'Anchois', - 'Anguille', - 'Apogon', - 'Apron du Rhône', - 'Aspe', - 'Baliste', - 'Bar', - 'Bar blanc', - 'Barbeau', - 'Bardot', - 'Barracuda', - 'Baudroie', - 'Baudroie abyssale de Johnson', - 'Baudroie commune', - 'Baudroie d’Amérique', - 'Baudroie des abysses', - 'Beaux yeux', - 'Billard', - 'Black-Bass', - 'Blade', - 'Blageon', - 'Blanchet', - 'Blennie', - 'Bogue', - 'Bonite', - 'Bouvière', - 'Brème', - 'Brochet', - 'Brosme', - 'Cabillaud', - 'Capelan', - 'Capret', - 'Carassin', - 'Carassin doré', - 'Cardine franche', - 'Carpe', - 'Carrelet', - 'Castagnole', - 'Cernier', - 'Chabot', - 'Chapon', - 'Chat', - 'Chevesne', - 'Claresse', - 'Colin', - 'Congre', - 'Corb', - 'Corégone', - 'Coryphène', - 'Courbine', - 'Crénilabre', - 'Cyprinodonte', - 'Daubenet', - 'Denti', - 'Dorade', - 'Doré jaune', - 'Dormelle', - 'Dragonnet', - 'Églefin', - 'Elbot', - 'Éperlan', - 'Épinoche', - 'Épinochette', - 'Équille', - 'Escolier', - 'Espadon', - 'Esturgeon', - 'Fanfre', - 'Flétan', - 'Gallinette', - 'Gardon', - 'Girelle', - 'Gobie', - 'Gobio', - 'Goret', - 'Gorette', - 'Goujon', - 'Grand-gueule', - 'Grande vive', - 'Grémille', - 'Grenadier', - 'Grenadier de roche', - 'Grondin', - 'Guppy', - 'Hareng', - 'Hippocampe', - 'Hotu', - 'Huchon', - 'Ibaïa', - 'Ide mélanote', - 'Julienne', - 'Labre', - 'Lamproie', - 'Lançon', - 'Liche', - 'Lieu appelé', - 'Lieu jaune', - 'Lieu noir', - 'Limande', - 'Lingue', - 'Loche', - 'Lompe', - "Loquette d'Europe", - 'Lorette', - 'Lotte', - 'Loubine', - 'Loup de mer', - 'Mâchoiron', - 'Maigre', - 'Makaire', - 'Mako', - 'Malachigan', - 'Mandoule', - 'Maquereau', - 'Maraîche', - 'Marbré', - 'Marigane noire', - 'Marlin', - 'Maskinongé', - 'mehdia', - 'Ménomini rond', - 'Merlan', - 'Merlu', - 'Mérou', - 'Merval', - 'Meunier', - 'Mirandelle', - 'Môle', - 'Mora', - 'Morue', - 'Motelle', - 'Muge', - 'Mulet', - 'Murène', - 'Napoléon', - 'Oblade', - 'Omble chevalier', - 'Omble de fontaine1', - 'Ombre', - 'Opah', - 'Ouananiche', - 'Pageot', - 'Pagre', - 'Panga', - 'Pataclet', - 'Perche', - 'Perche du Nil', - 'Petite vive', - 'Phrynorhombe', - 'Piranha', - 'Plie', - 'Poisson clown', - 'Poisson lanterne', - 'Poisson rouge', - 'Poisson zèbre', - 'Poisson-chat', - 'Poisson-chien', - 'Poisson-coffre', - 'Poisson-lune', - 'Poisson-pilote', - 'Raie', - 'Rascasse', - 'Rason', - 'Rémora commun', - 'Requin', - 'Requin à pointes noires', - 'Requin blanc', - 'Requin gris', - 'Requin marteau', - 'Requin pèlerin', - 'Requin-baleine', - 'Requin-nourrice', - 'Requin-taureau', - 'Requin-tigre', - 'Rondin', - 'Rotengle', - 'Roucaou', - 'Rouget', - 'Roussette', - 'Rouvet', - 'Saint-pierre', - 'Sandre', - 'Sar', - 'Sardine', - 'Sarran', - 'Saumon', - 'Saupe', - 'Sébaste', - 'Sériole', - 'Séverau', - 'Sigan Corail', - 'Silure', - 'Sole', - 'Sprat', - 'Tacaud', - 'Tanche', - 'Tanche-tautogue', - 'Tanude', - 'Targeur', - 'Tassergal', - 'Tautogue noir', - 'Tétraodon', - 'Thazard', - 'Thon', - 'Thon albacore', - 'Thon blanc', - 'Thon listao', - 'Thon rouge', - 'Tilapia du Nil', - 'Truite', - 'Truite arc-en-ciel', - 'Truite de mer', - 'Truite fario', - 'Turbot', - 'Turbot de sable', - 'Turbot de Terre-Neuve', - 'Uranoscope', - 'Vairon', - 'Vandoise', - 'Vieille', - 'Vivaneau', - 'Vive', - 'Vive araignée', - 'Vive rayée', -]; diff --git a/src/locales/fr_CH/animal/horse.ts b/src/locales/fr_CH/animal/horse.ts deleted file mode 100644 index 0f340db8f38..00000000000 --- a/src/locales/fr_CH/animal/horse.ts +++ /dev/null @@ -1,751 +0,0 @@ -export default [ - 'Abaga', - 'Abyssinien', - 'Achetta', - 'Adaev', - 'Aegidienberger', - 'Aénos', - 'Akhal-Teke', - 'Alaca', - 'Albanais', - 'Alt-Württemberger', - 'Altaï', - 'American Walking Pony', - 'American warmblood', - 'Anatolien', - 'Andalou', - 'Andin', - 'Andravida', - 'Anglo-arabe', - 'Anglo-Argentino', - 'Anglo-kabarde', - 'Appaloosa', - 'Appaloosa britannique', - 'Appaloosa néerlandais', - 'Appenninico', - 'AraAppaloosa', - 'Arabe', - 'Arabe Shagya', - 'Arabe syrien', - 'Arabe-Barbe', - 'Arabe-lusitanien', - 'Arabo-boulonnais', - 'Arabo-frison', - 'Arabo-Haflinger', - 'Aralusian', - 'Aravani', - 'Ardahan', - 'Ardennais', - 'Ardennais palatin', - 'Ardennais russe', - 'Ardennais suédois', - 'Arenberg-Nordkirchener', - 'Aréwa', - 'Astrakhan', - 'Asturcón', - 'Autre que Pur-sang', - 'Auxois', - 'Axios', - 'Aztèque', - 'Bachkir', - 'Bagual', - 'Baguio', - 'Bagzan', - 'Bahiano', - 'Bahr el-Ghazal', - 'Baicha', - 'Baïkal', - 'Baise', - 'Baixadeiro', - 'Baixo-Amazona ', - 'Bajau', - 'Baladi', - 'Bale', - 'Bali', - 'Balikun', - 'Baloutche', - 'Bandiagara', - 'Bangladais', - 'Barbe', - 'Bardigiano', - 'Barock Pinto', - 'Barraquand', - 'Batak', - 'Bauernpferd', - 'Bélédougou', - 'Berba', - 'Bergmann', - 'Bhirum', - 'Bhotia', - 'Biłgoraj', - 'Bima', - 'Blazer', - 'Bobo', - 'Boer du Cap', - 'Boer sud-africain', - 'Borana', - 'Bornu', - 'Bosnien', - 'Boudienny', - 'Boulonnais', - 'Bouriate', - 'Breton', - 'Britannique sang-chaud', - 'Brumby', - 'Bucovine', - 'Bulgare oriental', - 'Buohai', - 'Burguete', - 'Cabadin', - 'Calabrais', - 'Camargue', - 'Camarillo white', - 'Cambodgien', - 'Campeiro', - 'Campolina', - 'Canadien', - 'Canik', - 'Capitanata', - 'Carneddau', - 'Carolina Marsh Tacky', - 'Caspien', - 'Castillan', - 'Castillonnais', - 'Chaidamu', - 'Chakouyi', - 'Chara', - 'Cheju', - 'Cherokee', - 'Cheval corse', - 'Cheval crème', - "Cheval d'Auvergne", - "Cheval d'Azerbaïdjan", - "Cheval de ban'ei", - 'Cheval de Catria', - 'Cheval de Heck', - 'Cheval de Koro', - "Cheval de l'île de Cumberland", - "Cheval de l'île de sable", - 'Cheval de la mer noire', - 'Cheval de la Sierra Tarahumara', - 'Cheval de Megève', - 'Cheval de Miquelon', - 'Cheval de Nangchen', - 'Cheval de Pentro', - 'Cheval de Posavina', - 'Cheval de Riwoché', - 'Cheval de selle luxembourgeois', - 'Cheval de Senne', - 'Cheval de sport belge', - 'Cheval de sport brésilien', - 'Cheval de sport bulgare', - 'Cheval de sport canadien', - 'Cheval de sport croate', - 'Cheval de sport espagnol', - 'Cheval de sport estonien', - 'Cheval de sport frison', - 'Cheval de sport hongrois', - 'Cheval de sport polonais', - 'Cheval de sport roumain', - 'Cheval de sport suisse', - 'Cheval des Marquises', - 'Cheval des montagnes du Pays basque', - 'Cheval des Nez-Percés', - 'Cheval des Outer Banks', - 'Cheval doré de la Bohême', - 'Cheval du Delta', - 'Cheval du delta du Danube', - 'Cheval du Don', - 'Cheval du Haut-Ienisseï', - 'Cheval du Namib', - 'Cheval du plateau persan', - 'Cheval du Ventasso', - 'Cheval du Vercors de Barraquand', - 'cheval en Afghanistan', - 'Cheval marocain de sport', - 'Cheval miniature américain', - 'Cheval miniature français', - 'Cheval mongol', - 'Cheval portugais de sport', - 'Chilien', - 'Chilote', - 'Chincoteague', - 'Choctaw', - 'Chumbivilcas', - 'Chumysh', - 'Cleveland Bay', - 'Clydesdale', - 'Cob Gypsy', - 'Cob normand', - 'Coffin Bay Brumby', - 'Colorado ranger', - 'Comtois', - 'Connemara', - 'Corajoso', - 'Costeño', - 'Crétois', - 'Criollo', - 'Criollo militar', - 'Criollo paraguayen', - 'Criollo uruguayen', - 'Criollo vénézuélien', - 'Crioulo', - 'Çukurova', - 'Curly', - 'Daghestan', - 'Dales', - 'Danois sang-chaud', - 'Danubien', - 'Darashouri', - 'Darkhad', - 'Dartmoor', - 'Datong', - 'Deccani', - 'Deliboz', - "Demi-sang d'Inde", - 'Djavakhéti', - 'Døle', - 'Dongola', - 'Dosanko', - 'Dülmen', - 'Dun hongrois', - 'Edelbluthaflinger', - 'Emben', - 'Eriskay', - 'Erlunchun', - 'Estonien', - 'Exmoor', - 'Falabella', - 'Feliński', - 'Fell', - 'Féroé', - 'Finlandais', - 'Finlandais sang-chaud', - 'Fiorello', - 'Fjord', - 'Flamand', - 'Fleuve', - 'Flores', - 'Florida Cracker Horse', - 'Foutanké', - 'Franches-Montagnes', - 'Frederiksborg', - 'Frison', - 'Frison oriental', - 'Furioso-North Star', - 'Galiceno', - 'Galicien', - 'Galshar', - 'Ganja', - 'Ganzi', - 'Garrano', - 'Garron', - 'Garwolin', - 'Gashghai', - 'Gayo', - 'Gelderland', - 'Gemlik', - 'Georgian Grande', - 'Gharkawi', - 'Giara', - 'Giarab', - 'Giawf', - 'Gidran', - 'Glasinacki', - 'Gobir', - 'Gocan', - 'Goklan', - 'Golden American Saddlebred', - 'Gondo', - 'Gotland', - 'Graditz', - 'Grand Žemaitukas', - 'Groningen', - 'Guangxi', - 'Guanzhong', - 'Guba', - 'Guizhou', - 'Guoxia', - 'Habash', - 'Hackney', - 'Haflinger', - 'Haflo-arabe', - 'Halla', - 'Hanovrien', - 'Haomeng', - 'Heihe', - 'Heilongjiang', - 'Henan', - 'Henson', - 'Hequ', - 'Herati', - 'Hessois', - 'Highland', - 'Hirzai', - 'Hispano', - 'Hispano-arabe', - 'Hispano-Bretón', - 'Hınıs', - 'Hmong', - 'Hodh', - 'Hoho', - 'Hokkaïdo washu', - 'Holsteiner', - 'Horro', - 'Huçul', - 'Hunter irlandais', - 'Iakoute', - 'Iomud', - 'Irish Cob', - 'Irish Sport Horse', - 'Islandais', - 'israélien', - 'Jabe', - 'Jaca Navarra', - 'Jaf', - 'Jata', - 'Java', - 'Jianchang', - 'Jilin', - 'Jinhong', - 'Jinjiang', - 'Jofi', - 'Jomud', - 'Jumli', - 'Jutland', - 'Kabardin', - 'Kabia', - 'Kabouli', - 'Kafa', - 'Kaimanawa', - 'Kajlan', - 'Kalmouk', - 'Kandachime', - 'Karabaïr', - 'Karabakh', - 'Karachai', - 'Karakatchan', - 'Kathiawari', - 'Kazakh', - 'Kazakh chinois', - 'Kentucky Mountain Saddle Horse', - 'Kerqin', - 'Kerry bog', - 'Kiger Mustang', - 'Kinsky', - 'Kirdi', - 'Kirdimi', - 'Kirghiz', - 'Kisber Felver', - 'Kiso', - 'Kladruber', - 'Knabstrup', - 'Kohband', - 'Konik', - 'Kordofani', - 'Koto-koli', - 'Kouznetsk', - 'Kuda Padi', - 'Kuda-Pacu', - 'Kumyk', - 'Kundudo', - 'Kuningan', - 'Kurde', - 'Kushum', - 'Kustanair', - 'Kwangok', - 'KWPN', - 'La Silla', - 'Lakka', - 'Lämminverinen Ravuri', - 'Landais', - 'Lao', - 'Lavradeiro', - 'Lebaniega', - 'Lehmkuhlener', - 'Lesbos', - 'Letea', - 'Letton', - 'Leutstettener', - 'Lewitzer', - 'Lezgian', - 'Lichuan', - 'Lidzbark', - 'Liebenthaler', - 'Lijiang', - 'Lipizzan', - 'Lippitt Morgan', - 'Livno', - 'Llanero', - 'Logone', - 'Lokaï', - 'Lombok', - 'Losino', - 'Lovets', - 'Lowicz', - 'Lundy', - 'Lusitanien', - 'Lynghest', - "M'Bayar", - "M'Par", - 'Macassar', - 'Makra', - 'Malakan', - 'Mallorquín', - 'Malopolski', - 'Manga', - 'Mangalarga marchador', - 'Mangalarga paulista', - 'Mangolina', - 'Marajoara', - 'Marazi', - 'Maremmano', - 'Marismeña', - 'Marwari', - 'Mayray', - 'Mbai', - 'Mecklembourg', - 'Međimurje', - 'Megezh', - 'Megruli', - 'Merak-Saktenpata', - 'Mérens', - 'Messara', - 'Messeri', - 'Mezen', - 'Midilli', - 'Minahasa', - 'Mini Shetland', - 'Minianka', - 'Miniature néerlandais', - 'Miniature sud-africain', - 'Miniature Toy Horse', - 'Minorquin', - 'Minoussinsk', - 'Misaki', - 'Missouri Fox Trotter', - 'Miyako', - 'Moldave', - 'Monchina', - 'Mongol chinois', - 'Montana Traveler', - 'Morab', - 'Morave', - 'Morgan', - 'Morna', - 'Morocco spotted horse', - 'Morochuco', - 'Mossi', - 'Mountain Pleasure', - 'Moyle', - 'Muniqi', - 'Murakosi - Murakoz', - 'Murgese', - 'Murinsulaner', - 'Mustang', - 'Mustang de Cerbat', - 'Mustang des monts Pryor', - 'Mustang espagnol', - 'Myangad', - 'Napolitain', - 'Narym', - 'National Show Horse', - 'New Forest', - 'Ngua Noi', - 'Nigérian', - 'Ningqiang', - 'Nokota', - 'Nonius', - 'Nooitgedacht', - 'Nordestin', - 'Nordlandshest', - 'Noriker', - 'Noriker silésien', - 'Nouvel Altaï', - 'Novoalexandrovsk', - 'Novokirghize', - 'Ob', - 'Oldenbourg', - 'Oldenbourg danois', - 'Ondorshil', - 'Orlov-Rostopchin', - 'Østland', - 'Padang', - 'Pagan', - 'Paint Horse', - 'Pampa', - 'Pampa marchador', - 'Panje', - 'Pantaneiro', - 'Paso cubain', - 'Paso du Costa Rica', - 'Paso Fino', - 'Paso fino colombien', - 'Paso péruvien', - 'Patibarcino', - 'Pechora', - 'Percheron', - 'Persano', - 'Petiso argentino', - 'Petit cheval de selle allemand', - 'Pfalz-ardenner', - 'Pindos', - 'Pinkafeld', - 'Pintabian', - 'Pinto cubain', - 'Pinzgauer', - 'Piquira', - 'Pleven', - 'Poitevin mulassier', - 'Polesskaya', - 'Polo argentin', - 'Poney Appaloosa européen', - 'Poney australien', - 'Poney basque', - 'Poney classique allemand', - 'Poney de Birmanie', - 'Poney de Bornéo', - 'Poney de Kagoshima', - "Poney de l'Esperia", - 'Poney de Manipur', - 'Poney de Monterufoli', - 'Poney de Pénée', - 'Poney de polo', - 'Poney de Râjshâhî', - 'Poney de selle allemand', - 'Poney de selle belge', - 'Poney de selle britannique', - 'Poney de selle finlandais', - 'Poney de selle polonais', - 'Poney de selle suédois', - 'Poney de Somalie', - 'Poney de sport danois', - 'Poney de sport nord-américain', - 'Poney de sport slovaque', - 'Poney de sport tchèque', - 'Poney de Terre-Neuve', - 'Poney des Açores', - 'Poney des Amériques', - 'Poney des Carpates', - 'Poney des Mogods', - 'Poney du Darfour', - 'Poney du Sri Lanka', - 'Poney français de selle', - 'Poney Hackney', - 'Poney indien du lac La Croix', - 'Poney Noma', - 'Poney roumain', - 'Poney rustique canadien', - 'Poney sardinien', - 'Poney tacheté britannique', - 'Poney thaïlandais', - 'Poney tibétain', - 'Poney westphalien', - 'Pottok', - 'Priangan', - 'Priob', - 'Pur-sang', - 'Pur-sang arabe', - 'Pure race espagnole', - 'Puruca', - 'Pyongwon', - 'Pyrénées catalanes', - 'Qashqai', - 'Qatgani', - 'Qazal', - 'Quarab', - 'Quarter Horse', - 'Quarter pony', - 'Racking horse', - 'Rahvan', - 'Retuerta', - 'Reziegi Taaishi', - 'Rhénan sang-chaud', - 'Rhodos', - 'Rocky Mountain Horse', - 'Rodope', - 'Romano della Maremma Laziale', - 'Rottaler', - 'Sabyol', - 'Saddlebred', - 'Saklawi', - 'Salernitano', - 'Samand', - 'Samolaco', - 'Sandalwood', - 'Sanfratellano', - 'Sang-chaud lourd de Saxe-Thuringe', - 'Sanhe', - 'Sara', - 'Sarcidano', - 'sBs', - 'Selale', - 'Selle argentin', - 'Selle australien', - 'Selle autrichien', - 'Selle de Thuringe', - 'Selle français', - 'Selle italien', - 'Selle russe', - 'Selle slovaque', - 'Selle slovène', - 'Selle sud-africain', - 'Selle suédois', - 'Selle tchèque', - 'Selle ukrainien', - 'Selle uruguayen', - 'Serrano', - 'Shagya', - 'Shan', - 'Shandan', - 'Shetland', - 'Shetland américain', - 'Shirazi', - 'Shire', - 'Shirvan', - 'Siaen', - 'Siciliano', - 'Siglavy', - 'Sikang', - 'Silésien', - 'Sindh Desi', - 'Sini', - 'Sistani', - 'Skogsruss', - 'Skyros', - 'Sokólski', - 'Sorraïa', - 'Soudanais', - 'Spanish Jennet', - 'Spanish Norman', - 'Spiti', - 'Sportaloosa', - 'Spotted saddle horse', - 'Standardbred', - 'Stock Horse australien', - 'Sud-africain sang-chaud', - 'Suédois du nord', - 'Suffolk Punch', - 'Sulphur', - 'Sumba', - 'Sumbar-Sandel-Arabe', - 'Sumbawa', - 'Sunicho', - 'Sztumski', - 'Tadjik', - 'Tagaytay', - 'Taishuh', - 'Tarāi', - 'Tavda', - 'Tawleed', - 'Tchéco-morave belge', - 'Tchenaran', - 'Tchèque sang-froid', - 'Tchernomor', - 'Tennessee Walker', - 'Tersk', - 'Tes', - 'Thessalien', - 'Tieling', - 'Tiger horse', - 'Timor', - 'Tokara', - 'Tolfetano', - 'Tonga', - 'Tooraq', - 'Topuğu Kıllı', - 'Tori', - 'Touchine', - 'Touva', - 'Trait allemand du Sud', - 'Trait argentin', - 'Trait australien', - 'Trait belge', - 'Trait biélorusse', - 'Trait bulgare', - 'Trait crème américain', - 'Trait de Croatie', - "Trait de l'Altmark", - 'Trait de la Forêt-Noire', - 'Trait de Rhénanie', - 'Trait de Saxe-Thuringe', - 'Trait du Nord', - 'Trait du Schleswig', - 'Trait estonien', - "Trait hanovrien d'origine Schleswig", - 'Trait hongrois', - 'Trait irlandais', - 'Trait italien', - 'Trait lituanien', - 'Trait néerlandais', - 'Trait pie américain', - 'Trait polonais', - 'Trait roumain', - 'Trait russe', - 'Trait soviétique', - 'Trait westphalien', - 'Trakehner', - 'Trakya', - 'Transbaïkal', - 'Trocha Pura Colombiana', - 'Trote y galope', - 'Trotteur allemand', - 'Trotteur croate', - 'Trotteur cubain', - 'Trotteur danois', - 'Trotteur de Ljutomer', - 'Trotteur Døle', - 'Trotteur espagnol', - 'Trotteur finlandais sang-chaud', - 'Trotteur français', - 'Trotteur italien', - 'Trotteur Latgale', - 'Trotteur métis', - 'Trotteur Orlov', - 'Trotteur roumain', - 'Trotteur russe', - 'Trotteur scandinave', - 'Trotteur yougoslave', - 'Tuigpaard', - 'Turkestani', - 'Ujumqin', - 'Unmol', - 'Uzunyayla', - 'Viatka', - 'Virginia highlander', - 'Vlaamperd', - 'Vladimir', - 'Voronej', - 'Warlander', - 'Waziri', - 'Welara', - 'Welsh', - 'Welsh cob', - 'Welsh de type cob', - 'Welsh mountain', - 'Wenshan', - 'Westphalien', - 'Wielkopolski', - 'Wilwal', - 'Württemberger', - 'Wushen', - 'Xiangfen', - 'Xilinguole', - 'Xinihe', - 'Yabu', - 'Yanqi', - 'Yargha', - 'Yili', - 'Yiwu', - 'Yonaguni', - 'Yongning', - 'Yunnan', - 'Yushu', - 'Yuta', - 'Zabaikal', - 'Zakynthos', - 'Zanskari', - 'Žemaitukas', - 'Zhongdian', - 'Zweibrücker', -]; diff --git a/src/locales/fr_CH/animal/index.ts b/src/locales/fr_CH/animal/index.ts deleted file mode 100644 index 04ba8030431..00000000000 --- a/src/locales/fr_CH/animal/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is automatically generated. - * Run 'pnpm run generate:locales' to update. - */ -import type { AnimalDefinition } from '../../..'; -import bear from './bear'; -import bird from './bird'; -import cat from './cat'; -import cetacean from './cetacean'; -import cow from './cow'; -import crocodilia from './crocodilia'; -import dog from './dog'; -import fish from './fish'; -import horse from './horse'; -import insect from './insect'; -import lion from './lion'; -import rabbit from './rabbit'; -import snake from './snake'; -import type_ from './type'; - -const animal: AnimalDefinition = { - bear, - bird, - cat, - cetacean, - cow, - crocodilia, - dog, - fish, - horse, - insect, - lion, - rabbit, - snake, - type: type_, -}; - -export default animal; diff --git a/src/locales/fr_CH/animal/insect.ts b/src/locales/fr_CH/animal/insect.ts deleted file mode 100644 index 6c478aae078..00000000000 --- a/src/locales/fr_CH/animal/insect.ts +++ /dev/null @@ -1,199 +0,0 @@ -export default [ - 'Abeille tueuse', - 'Abeille découpeuse de la luzerne', - 'Abeille européenne', - 'Abeille à miel', - 'Æschne', - 'Æschne bleue', - 'Æschne des joncs', - 'Agrion jouvencelle', - 'Agrion élégant', - 'Ammophile des sables', - 'Anax empereur', - 'Anophèle', - 'Apollon', - 'Argus bleu', - 'Ascalaphe soufré', - 'Atlas', - 'Aurore', - 'Azuré du serpolet', - 'Balanin des noisettes', - 'Blastophage', - 'Blatte', - 'Blatte américaine', - 'Blatte de Madagascar', - 'Blatte germanique', - 'Blatte orientale', - 'Bombyle', - 'Bombyx du mûrier', - 'Bombyx du ricin', - 'Bombyx éri', - 'Bostryche typographe', - 'Bourdon', - 'Bourdon des champs', - 'Bourdon des pierres', - 'Bourdon des prés', - 'Bourdon terrestre', - 'Bousier', - 'Calliphoridé', - 'Caloptéryx vierge', - "Capricorne de l'épine de Jérusalem", - 'Capricorne des cactus', - 'Capricorne des maisons', - 'Capricorne du chêne', - 'Capricorne musqué', - 'Carabe doré', - 'Carabe violet', - 'Cercope', - 'Cétoine', - 'Cétoine dorée', - 'Cétoine grise', - 'Cétoine marginée', - 'Cétoine verte', - 'Charançon du blé', - 'Charançon rouge des palmiers', - 'Chironome', - 'Chouette', - 'Chrysope', - 'Chrysope nacrée', - 'Chrysope verte', - 'Cicadelle blanche', - 'Cicindèle', - 'Cigale', - 'Cigale bossue', - 'Cigale bossue du chêne', - 'Cigale grise', - 'Cigale plébéienne', - 'Citron', - 'Citron de Provence', - 'Clairon des abeilles', - 'Clairon des ruches', - 'Coccinelle', - 'Coccinelle asiatique', - 'Coccinelle à deux points', - 'Coccinelle à quatorze points', - 'Coccinelle à sept points', - 'Coccinelle à vingt-deux points', - 'Courtilière', - 'Criquet', - 'Criquet migrateur', - 'Déesse précieuse', - 'Demi-deuil', - 'Demi diable', - 'Grand diable', - 'Petit diable', - 'Doryphore de la pomme de terre', - 'Drosophile', - 'Dynaste Hercule', - 'Éphémère', - 'Euglossine', - 'Fausse teigne de la cire', - 'Flambé', - 'Fourmi', - 'Fourmi balle de fusil', - 'Fourmi de feu', - 'Fourmi ensanglantée', - 'Fourmilion', - 'Frelon asiatique', - 'Frelon européen', - 'Frelon géant japonais', - 'Gazé', - 'Gendarme', - 'Gerris', - 'Grand paon de nuit', - 'Grand Planeur', - 'Grande aeschne', - 'Grande saperde du peuplier', - 'Grande sauterelle verte', - "Graphosome d'Italie", - 'Greta oto', - 'Grillon', - 'Grillon champêtre', - 'Grillon domestique', - 'Guêpe commune', - 'Guêpe germanique', - 'Guêpe-papillon', - 'Hanneton', - 'Hercule', - 'Hulotte', - 'Insecte', - 'Lepture cordigère', - 'Leste fiancé', - "Léthocère d'Amérique", - 'Libellule déprimée', - 'Lucane cerf-volant', - 'Lucilie bouchère', - 'Lucilie bufonivore', - 'Luciole', - 'Lyctus', - 'Machaon', - 'Magicienne dentelée', - 'Mante religieuse', - 'Mante-orchidée', - 'Mélipone', - 'Monarque', - 'Morpho cypris', - 'Mouche domestique', - 'Mouche du vinaigre', - 'Mouche tsé-tsé', - 'Mouche verte commune', - 'Moustique tigre', - 'Nèpe', - 'Neuroptère', - 'Osmie cornue', - 'Papillon', - 'Papillon du palmier', - 'Perle', - 'Petit apollon', - 'Petit capricorne', - 'Phasme', - 'Phasme bâton', - 'Phrygane', - 'Phyllie', - "Poisson d'argent", - 'Poliste', - 'Poliste géant', - 'Polyphème', - 'Pou', - 'Pou du pubis', - 'Prométhée', - 'Puce', - 'Puceron', - 'Punaise', - "Punaise d'eau géante", - 'Punaise de la Morelle', - 'Punaise de lit', - 'Punaise ornée', - 'Punaise-épine', - 'Rosalie alpine', - 'Saturnie Cécropia', - 'Saturnie du cerisier', - 'Saturnie du poirier', - 'Sauterelle', - 'Scarabée du désert', - 'Scarabée rhinocéros européen', - 'Scarabée rhinocéros japonais', - 'Scolie des jardins', - 'Sorcière blanche', - 'Sphinx de Morgan', - 'Sphinx de Wallace', - 'Sphinx du tilleul', - 'Taon', - 'Ténébrion meunier', - 'Termite', - 'Tipule', - 'Titan', - 'Titiwai', - 'Turquoise', - 'Ver de bancoule', - 'Ver luisant', - 'Vrillette', - 'Vrillette du pain', - 'Weta', - 'Weta des arbres', - 'Weta des cavernes', - 'Weta géant', - 'Xylocope violet', - 'Zabre des céréales', - 'Zygène', -]; diff --git a/src/locales/fr_CH/animal/lion.ts b/src/locales/fr_CH/animal/lion.ts deleted file mode 100644 index 816c016b813..00000000000 --- a/src/locales/fr_CH/animal/lion.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default [ - "Lion de l'Atlas", - 'Lion du Cap', - "Lion d'Afrique", - "Lion d'Asie", -]; diff --git a/src/locales/fr_CH/animal/rabbit.ts b/src/locales/fr_CH/animal/rabbit.ts deleted file mode 100644 index c1809a10f98..00000000000 --- a/src/locales/fr_CH/animal/rabbit.ts +++ /dev/null @@ -1,62 +0,0 @@ -export default [ - 'Alaska', - 'Angora français', - 'Argenté de Champagne', - 'Argenté de Saint Hubert', - 'Bélier anglais', - 'Bélier français', - 'Blanc de Hotot', - 'Blanc de Vendée', - 'Bleu de Beveren', - 'Bleu de Vienne', - 'Brun marron de Lorraine', - 'Californien', - 'Castorrex', - 'Chamois de Thuringe', - 'Fauve de Bourgogne', - 'Feh de Marbourg', - 'Feu Feh', - 'Feu havane', - 'Feu noir', - 'Géant blanc du Bouscat', - 'Géant des Flandres', - 'Géant papillon français', - 'Grand Chinchilla', - 'Grand Russe', - 'Gris bleu de Vienne', - 'Gris de Vienne', - 'Gris du Bourbonnais', - 'Havane français', - 'Hermine de Lutterbach', - 'Hollandais', - 'Japonais', - 'lapin bélier', - 'Lapin blanc danois', - 'Lapin chèvre', - 'Lapin chinchilla', - 'Lièvre belge', - 'Lynx', - 'Nain angora', - 'Nain bélier Rex', - 'Nain de couleur', - 'Nain renard', - 'Nain Rex', - 'Nain satin', - 'Néo-Zélandais', - 'Noir de Vienne', - 'Normand', - 'Papillon anglais', - 'Papillon rhénan', - 'Perlfeh', - 'Petit bélier', - 'Petit papillon', - 'Polonais', - 'Renard', - 'Rex', - 'Rhoen', - 'Russe', - 'Sablé des Vosges', - 'Satin', - 'Separator', - 'Zibeline', -]; diff --git a/src/locales/fr_CH/animal/snake.ts b/src/locales/fr_CH/animal/snake.ts deleted file mode 100644 index 84b64fdb0f9..00000000000 --- a/src/locales/fr_CH/animal/snake.ts +++ /dev/null @@ -1,202 +0,0 @@ -export default [ - 'Alsophis ater', - 'Anaconda à taches sombres', - 'Anaconda bolivien', - 'Anaconda curiyú', - 'Anaconda de Barbour', - 'Anaconda de Bolivie', - 'Anaconda de Deschauense', - 'Anaconda du Paraguay', - 'Anaconda géant', - 'Anaconda jaune', - 'Anaconda vert', - 'Barba amarilla', - 'Boa', - 'Boa arboricole de Madagascar', - 'Boa arc-en-ciel', - 'Boa arc-en-ciel cubain', - 'Boa canin', - 'Boa caoutchouc', - 'Boa cubain', - "Boa d'Amazonie", - 'Boa de Cuba', - 'Boa de Duméril', - "Boa de l'île Ronde", - "Boa de l'île Ronde de Dussumier", - "Boa de l'île Ronde de Schlegel", - 'Boa de la Jamaïque', - 'Boa de Madagascar', - 'Boa de Maurice', - 'Boa de Porto Rico', - 'Boa des forêts', - 'Boa des forêts de Madagascar', - 'Boa des perroquets', - 'Boa des sables', - "Boa des sables d'Afrique", - 'Boa des savanes de Duméril', - 'Boa devin', - 'Boa émeraude', - "Boa fouisseur de l'île Maurice", - "Boa fouisseur de l'île Ronde", - 'Boa nain', - 'Boa sobre', - 'Boa terrestre de Madagascar', - 'Bongare', - 'Bongare annelé', - 'Bongare candide', - 'Bongare fascié', - 'Bongare indien', - 'Bongare rayé', - 'Boomslang', - 'Bungare', - 'Cinglard', - 'Cobra', - 'Cobra à lunettes', - 'Cobra à monocle', - 'Cobra chinois', - 'Cobra cracheur', - 'Cobra cracheur à cou noir', - 'Cobra cracheur du Mozambique', - 'Cobra cracheur équatorial', - 'Cobra cracheur indonésien', - 'Cobra cracheur rouge', - "Cobra d'eau", - "Cobra d'eau rayé", - 'Cobra de mer', - 'Cobra des Philipines du Nord', - 'Cobra du Cap', - 'Cobra du Mozambique', - 'Cobra égyptien', - 'Cobra indien', - 'Cobra royal', - 'Coronelle', - 'Coronelle girondine', - 'Coronelle lisse', - 'Couleuvre', - 'Couleuvre à capuchon', - 'Couleuvre à collier', - 'Couleuvre à collier américaine', - 'Couleuvre à dos rouge', - 'Couleuvre à échelons', - 'Couleuvre à jarretière de Santa Cruz', - 'Couleuvre à nez plat', - 'Couleuvre à nez retroussé', - 'Couleuvre à quatre raies', - 'Couleuvre à ventre rouge', - 'Couleuvre brune', - "Couleuvre d'eau", - "Couleuvre d'Esculape", - 'Couleuvre de Forsskal', - "Couleuvre de l'Amour", - "Couleuvre de l'Ouest", - 'Couleuvre de Montpellier', - 'Couleuvre des Plaines', - 'Couleuvre diadème', - 'Couleuvre du Nord-Ouest', - "Couleuvre fauve de l'Est", - 'Couleuvre faux-corail', - 'Couleuvre léopard', - 'Couleuvre mauresque', - 'Couleuvre mince', - 'Couleuvre obscure', - 'Couleuvre rayée', - 'Couleuvre royale', - 'Couleuvre tachetée', - 'Couleuvre tessellée', - 'Couleuvre verte', - 'Couleuvre verte et jaune', - 'Couleuvre vipérine', - 'Couleuvre-jarretière', - 'Couresse à ventre rouge', - "Couresse du Banc d'Anguilla", - 'Crotale', - 'Crotale à losange', - 'Crotale cascabelle', - 'Crotale cent pas', - "Crotale de l'ouest", - 'Crotale de Malaisie', - 'Crotale de Mojave', - 'Crotale des bambous', - 'Crotale des bois', - 'Crotale des prairies', - 'Crotale des tropiques', - 'Crotale diamantin', - "Crotale diamantin de l'Ouest", - 'Crotale du temple', - 'Crotale du Texas', - 'Crotale du Venezuela', - 'Crotale muet', - 'Crotale tigré', - 'Cuatronarices', - 'Curiyú', - 'Échide', - 'Échide à ventre blanc', - 'Échide carénée', - 'Échide des pyramides', - 'Faux-corail de Sinaloa', - 'Fer de lance', - 'Fer de lance centro-américain', - 'Fer de lance commun', - 'Fer de lance de la Martinique', - 'Grage grands carreaux', - 'Grand anaconda', - 'Grands carreaux', - 'Habu', - "Habu d'Arisa", - "Habu d'Okinawa", - 'Habu de Kikuchi', - 'Habu de Kume-jima', - 'Habu de Sakishima', - 'Habu de Taïwan', - 'Habu de Tokara', - 'Habu Hime', - 'Jaracacá amarilla', - 'Jaracacá jaune', - 'Jararaca', - 'Jararaca Pintada', - 'Jararaca-cruzeira', - 'Jararaca-ilhoa', - 'Jararacuçu', - 'Katuali', - 'Macagua', - 'Maître de la brousse', - 'Mamba de Jameson', - 'Mamba noir', - 'Mamba vert', - 'Mamba vert de Guinée', - 'Mamba vert de Jameson', - "Mamba vert de l'Est", - "Mamba vert de l'Ouest", - 'Mapanare', - "Mocassin d'eau", - 'Ñacaniná', - 'Pélamide', - 'Plature', - 'Python', - 'Python à lèvres blanches', - 'Python à tête noire', - "Python à tête noire d'Australie", - 'Python améthyste', - 'Python arboricole vert', - 'Python arboricole vert australien', - 'Python birman', - 'Python boule', - "Python d'Amérique centrale", - "Python d'Angola", - 'Python de Boelen', - 'Python de Children', - 'Python de Macklot', - 'Python de Papouasie', - 'Python de Ramsay', - 'Python de Seba', - 'Python de Stimson', - 'Python de Timor', - 'Python fouisseur du Mexique', - 'Python indien', - 'Python malais', - 'Python molure', - 'Python olive', - 'Python pygmé', - 'Python réticulé', - 'Python royal', -]; diff --git a/src/locales/fr_CH/animal/type.ts b/src/locales/fr_CH/animal/type.ts deleted file mode 100644 index 53f9f00e53e..00000000000 --- a/src/locales/fr_CH/animal/type.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default [ - 'chien', - 'chat', - 'serpent', - 'ours', - 'lion', - 'cétacé', - 'insecte', - 'crocodilien', - 'vache', - 'oiseau', - 'poisson', - 'lapin', - 'cheval', -]; diff --git a/src/locales/fr_CH/color/human.ts b/src/locales/fr_CH/color/human.ts deleted file mode 100644 index f85ffdd9118..00000000000 --- a/src/locales/fr_CH/color/human.ts +++ /dev/null @@ -1,188 +0,0 @@ -export default [ - 'abricot', - 'acajou', - 'aigue-marine', - 'amande', - 'amarante', - 'ambre', - 'améthyste', - 'anthracite', - 'argent', - 'aubergine', - 'aurore', - 'avocat', - 'azur', - 'basané', - 'beurre', - 'bis', - 'bisque', - 'bistre', - 'bitume', - 'blanc cassé', - 'blanc lunaire', - 'blé', - 'bleu acier', - 'bleu bleuet', - 'bleu canard', - 'bleu charrette', - 'bleu ciel', - 'bleu de cobalt', - 'bleu de Prusse', - 'bleu électrique', - 'bleu givré', - 'bleu marine', - 'bleu nuit', - 'bleu outremer', - 'bleu paon', - 'bleu persan', - 'bleu pétrole', - 'bleu roi', - 'bleu saphir', - 'bleu turquin', - "bouton d'or", - 'brique', - 'bronze', - 'brou de noix', - "caca d'oie", - 'cacao', - 'cachou', - 'café', - 'cannelle', - 'capucine', - 'caramel', - 'carmin', - 'carotte', - 'chamois', - 'chartreuse', - 'cuivre', - 'chocolat', - 'cinabre', - 'citrouille', - 'cœruleum', - "coquille d'œuf", - 'corail', - 'cramoisi', - 'cuisse de nymphe', - 'cyan', - 'écarlate', - 'écru', - 'émeraude', - 'fauve', - 'flave', - 'fraise', - 'framboise', - 'fumée', - 'garance', - 'glauque', - 'glycine', - 'grège', - 'grenadine', - 'grenat', - 'gris acier', - 'gris de Payne', - 'gris fer', - 'gris perle', - 'gris souris', - 'groseille', - 'gueules', - 'héliotrope', - 'incarnat', - 'indigo', - 'isabelle', - 'jaune canari', - 'jaune citron', - 'jaune de cobalt', - 'couleurs de Mars', - 'jaune de Naples', - 'jaune impérial', - 'jaune mimosa', - 'outremer véritable', - 'lavallière', - 'lavande', - 'lie de vin', - 'lilas', - 'lime', - 'lin', - 'magenta', - 'maïs', - 'malachite', - 'mandarine', - 'marron', - 'mastic', - 'mauve', - 'menthe', - 'moutarde', - 'nacarat', - 'nankin', - 'noisette', - 'ocre', - 'ocre rouge', - 'olive', - 'or', - 'orange brûlé', - 'orchidée', - 'orpiment', - 'paille', - 'parme', - "pelure d'oignon", - 'pervenche', - 'pistache', - 'poil de chameau', - 'ponceau', - 'pourpre', - 'prasin', - 'prune', - 'puce', - 'rose Mountbatten', - 'oxyde de fer', - 'rouge cardinal', - 'rouge cerise', - "rouge d'Andrinople", - 'rouge de Falun', - 'rouge feu', - 'rouge tomate', - 'tomette', - 'rouille', - 'rubis', - 'sable', - 'safre', - 'sang de bœuf', - 'sanguine', - 'sarcelle', - 'saumon', - 'sépia', - 'sinople', - 'smalt', - 'soufre', - 'tabac', - "terre d'ombre", - 'topaze', - 'tourterelle', - 'turquoise', - 'vanille', - 'vermeil', - 'vermillon', - 'vert bouteille', - 'vert céladon', - "vert d'eau", - 'vert-de-gris', - 'vert de Hooker', - 'vert de vessie', - 'vert épinard', - 'vert impérial', - 'vert lichen', - 'vert oxyde de chrome', - 'vert perroquet', - 'vert poireau', - 'vert pomme', - 'vert prairie', - 'vert printemps', - 'vert sapin', - 'vert sauge', - 'vert tilleul', - 'vert Véronèse', - 'violet', - "violet d'évêque", - 'viride', - 'zinzolin', -]; diff --git a/src/locales/fr_CH/color/index.ts b/src/locales/fr_CH/color/index.ts deleted file mode 100644 index e7cf1e89436..00000000000 --- a/src/locales/fr_CH/color/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * 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/fr_CH/commerce/department.ts b/src/locales/fr_CH/commerce/department.ts deleted file mode 100644 index 4e1e2a4a539..00000000000 --- a/src/locales/fr_CH/commerce/department.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default [ - 'Livres', - 'Films', - 'Musique', - 'Jeux', - 'Electronique', - 'Ordinateurs', - 'Maison', - 'Jardin', - 'Outils', - 'Épicerie', - 'Santé', - 'Beauté', - 'Jouets', - 'Enfants', - 'Bébé', - 'Vêtements', - 'Chaussures', - 'Bijoux', - 'Sports', - 'Plein air', - 'Automobile', - 'Industrie', -]; diff --git a/src/locales/fr_CH/commerce/index.ts b/src/locales/fr_CH/commerce/index.ts deleted file mode 100644 index 29c9eeb2006..00000000000 --- a/src/locales/fr_CH/commerce/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This file is automatically generated. - * Run 'pnpm run generate:locales' to update. - */ -import type { CommerceDefinition } from '../../..'; -import department from './department'; -import product_description from './product_description'; -import product_name from './product_name'; - -const commerce: CommerceDefinition = { - department, - product_description, - product_name, -}; - -export default commerce; diff --git a/src/locales/fr_CH/commerce/product_description.ts b/src/locales/fr_CH/commerce/product_description.ts deleted file mode 100644 index aeb2a71b249..00000000000 --- a/src/locales/fr_CH/commerce/product_description.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default [ - "Ces médailles et épingles sont en argent avec patine artistique. Elles ont été composées et frappées spécialement dans les ateliers de l'État pour la Société l'Hirondelle.", - 'Cadre raccord brasé de 53 ou 58 %. Jantes en acier émaillées. Pneus “Hiron” 700 x 35, garantis 12 mois. Pignon roue libre à emboitement hexagonal. Frein “Hirondelle” sur jante arrière. Garde-boue métal.', - "Montre-bracelet, dite “d'Aviateur”, métal inaltérable, diam. 435ym. Mouvement de précision chronographe, cadran avec grande aiguille trotteuse, permettant la lecture 1/25de seconde.", - "Lanterne cuivre fort, finement nickelé, chute d'eau réglable, suspension antivibratrice, projecteur diamètre cm2, avec verre bombé. Durée d'éclairage 3 heures. Poids 395 grammes.", - 'Lunettes étanches, monture caoutchouc moulé de 1re qual. glaces rondes de 55 mm de diam. en verre clair. Les lunettes protègent les yeux contre les poussières, fumées et gaz industriels et se portent av. nos masques 5862-5864. Pds 60 gr.', - "Carrosserie en tôle d'acier laqué blanc montée sur roues pour faciliter le déplacement, couvercle laqué blanc, dessus et cuve en métal émaille marron, inaltérable a l'eau de lessive et a la chaleur,", - 'Bicyclette à 1 vitesse, pneus 1/2 ballon. Cadre de 52cm. Jantes chromées. Roue Hore. Moyeux indéréglables. 2 freins sur jantes. Guidon trials. Garde-boue et couvre chaine en acier émaillé. Porte-bagages. Gardejupes. Pédales à blocs caoutchouc. Émail couleur. Selle route cuir. Sacoche avec outillage. Pompe de cadre. Timbre avertisseur.', - 'Petite griffe à sarcler. 5 dents en acier, largeur 8 cm. poignée estampée, longueur 26 cm. poids 150 gr. Pour ameublir le sol, arracher les herbes entre les plantes ou fleurs cultivées en lignes rapprochées.', - 'Moteur Villiers. Puissance au frein : 7 HP, 3 vitesses, lancement au pied, éclairage électrique, carrosserie 2 places, coffre à outils, outillage complet, capote et pare-brise.', - 'Maillot en coton fin à rayures se boutonnant devant pour enfants.', - "Rasoir de sûreté “Prima” tout en laiton massif nickelé chromé, manche moleté bien en main. Peigne et contre-peigne galbés tenant tout d'une pièce, fermeture à charnière, blocage instantané de la lame.", - "Ce magnifique radio-phono comprend un excellent récepteur radioL'ensemble, dans une belle ébénisterie teintée palissandre, forme un très phonique 6 lampes et un tourne-disque de vitesses placé sous le couvercle. Beau meuble. Ce modèle, dont le montage particulièrement soigne assure un très bon rendement aussi bien en radio qu'en phono, est garanti mn an.", - "Récepteurs de télévision à haute définition 819 lignes, donnant une image très nette et d'un contraste agréable ne fatiguant pas la vue, le montage de la partie radio donne un son absolument remarquable.", - 'Tous nos appareils sont blindés pour que leur rayonnement ne trouble pas les récepteurs radiophoniques, et ils fonctionnent sur courant alternatif 50 riodes 110 et 220 volts. Ils sont garantis pendant 1 an; toutefois, suivant la règle, le tube cathodique est garanti pour 6 mois seulement.', -]; diff --git a/src/locales/fr_CH/commerce/product_name.ts b/src/locales/fr_CH/commerce/product_name.ts deleted file mode 100644 index c8af2bb4696..00000000000 --- a/src/locales/fr_CH/commerce/product_name.ts +++ /dev/null @@ -1,67 +0,0 @@ -export default { - adjective: [ - 'Petit', - 'Ergonomique', - 'Électronique', - 'Rustique', - 'Intelligent', - 'Magnifique', - 'Incroyable', - 'Élégant', - 'Fantastique', - 'Pratique', - 'Moderne', - 'Recyclé', - 'Sur mesure', - 'Génial', - 'Générique', - 'Artisanal', - 'Fait main', - 'Oriental', - 'Licencié', - 'Luxueux', - 'Raffiné', - 'Sans marque', - 'Savoureux', - ], - material: [ - 'Acier', - 'Bronze', - 'Bois', - 'Béton', - 'Plastique', - 'Coton', - 'Granit', - 'Caoutchouc', - 'Métal', - 'Doux', - 'Frais', - 'Congelé', - ], - product: [ - 'Chaise', - 'Voiture', - 'Ordinateur', - 'Clavier', - 'Souris', - 'Vélo', - 'Boule', - 'Gants', - 'Pantalon', - 'Chemise', - 'Table', - 'Chaussures', - 'Chapeau', - 'Serviettes', - 'Savon', - 'Thon', - 'Poulet', - 'Poisson', - 'Fromage', - 'Lard', - 'Pizza', - 'Salade', - 'Saucisses', - 'Frites', - ], -}; diff --git a/src/locales/fr_CH/date/index.ts b/src/locales/fr_CH/date/index.ts deleted file mode 100644 index a28ce823bb8..00000000000 --- a/src/locales/fr_CH/date/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * This file is automatically generated. - * Run 'pnpm run generate:locales' to update. - */ -import type { DateDefinition } from '../../..'; -import month from './month'; -import weekday from './weekday'; - -const date: DateDefinition = { - month, - weekday, -}; - -export default date; diff --git a/src/locales/fr_CH/date/month.ts b/src/locales/fr_CH/date/month.ts deleted file mode 100644 index a3d77d291a5..00000000000 --- a/src/locales/fr_CH/date/month.ts +++ /dev/null @@ -1,46 +0,0 @@ -export default { - wide: [ - 'Janvier', - 'Février', - 'Mars', - 'Avril', - 'Mai', - 'Juin', - 'Juillet', - 'Août', - 'Septembre', - 'Octobre', - 'Novembre', - 'Décembre', - ], - // Property "wide_context" is optional, if not set then "wide" will be used instead - // It is used to specify a word in context, which may differ from a stand-alone word - wide_context: [ - 'janvier', - 'février', - 'mars', - 'avril', - 'mai', - 'juin', - 'juillet', - 'août', - 'septembre', - 'octobre', - 'novembre', - 'décembre', - ], - abbr: [ - 'janv.', - 'févr.', - 'mars', - 'avril', - 'mai', - 'juin', - 'juil.', - 'août', - 'sept.', - 'oct.', - 'nov.', - 'déc.', - ], -}; diff --git a/src/locales/fr_CH/date/weekday.ts b/src/locales/fr_CH/date/weekday.ts deleted file mode 100644 index ceb0fbfec6c..00000000000 --- a/src/locales/fr_CH/date/weekday.ts +++ /dev/null @@ -1,26 +0,0 @@ -export default { - wide: [ - 'Dimanche', - 'Lundi', - 'Mardi', - 'Mercredi', - 'Jeudi', - 'Vendredi', - 'Samedi', - ], - // Property "wide_context" is optional, if not set then "wide" will be used instead - // It is used to specify a word in context, which may differ from a stand-alone word - wide_context: [ - 'dimanche', - 'lundi', - 'mardi', - 'mercredi', - 'jeudi', - 'vendredi', - 'samedi', - ], - abbr: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'], - // Property "abbr_context" is optional, if not set then "abbr" will be used instead - // It is used to specify a word in context, which may differ from a stand-alone word - abbr_context: ['dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam'], -}; diff --git a/src/locales/fr_CH/finance/account_type.ts b/src/locales/fr_CH/finance/account_type.ts deleted file mode 100644 index 28b2a89e02c..00000000000 --- a/src/locales/fr_CH/finance/account_type.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default [ - 'Chèque', - 'Epargne', - 'Marché monétaire', - 'Investissement', - 'Prêt immobilier', - 'Carte de crédit', - 'Prêt personnel', -]; diff --git a/src/locales/fr_CH/finance/currency.ts b/src/locales/fr_CH/finance/currency.ts deleted file mode 100644 index dea5757cf72..00000000000 --- a/src/locales/fr_CH/finance/currency.ts +++ /dev/null @@ -1,432 +0,0 @@ -export default [ - { - name: 'Dollar', - code: 'USD', - symbol: '$', - }, - { - name: 'Dollar canadien', - code: 'CAD', - symbol: '$', - }, - { - name: 'Peso mexicain', - code: 'MXN', - symbol: '$', - }, - { - name: 'Florin', - code: 'AWG', - symbol: 'ƒ', - }, - { - name: 'Baisse du dollar', - code: 'BBD', - symbol: '$', - }, - { - name: 'Dollar bermudien', - code: 'BMD', - symbol: '$', - }, - { - name: 'Dollar des Bahamas', - code: 'BSD', - symbol: '$', - }, - { - name: 'Peso dominicain', - code: 'DOP', - symbol: '$', - }, - { - name: 'Dollar jamaïcain', - code: 'JMD', - symbol: '$', - }, - { - name: 'Quetzal guatémaltèque', - code: 'GTQ', - symbol: 'Q', - }, - { - name: 'Balboa panaméen', - code: 'PAB', - symbol: 'B/.', - }, - { - name: 'Dollar des Caraïbes', - code: 'XCD', - symbol: '$', - }, - { - name: 'euro', - code: 'EUR', - symbol: '€', - }, - { - name: 'Livre sterling', - code: 'GBP', - symbol: '£', - }, - { - name: 'Course géorgienne', - code: 'GEL', - symbol: '₾', - }, - { - name: 'Lev bulgare', - code: 'BGN', - symbol: 'лв', - }, - { - name: 'Franc suisse', - code: 'CHF', - symbol: 'CHF', - }, - { - name: 'Couronne danoise', - code: 'DKK', - symbol: 'kr', - }, - { - name: 'République tchèque Couronne', - code: 'CZK', - symbol: 'Kč', - }, - { - name: 'Kuna croate', - code: 'HRK', - symbol: 'kn', - }, - { - name: 'Forint hongrois', - code: 'HUF', - symbol: 'ft', - }, - { - name: 'couronne norvégienne', - code: 'NOK', - symbol: 'kr', - }, - { - name: 'Rouble russe', - code: 'RUB', - symbol: '₽', - }, - { - name: 'Zloty polonais', - code: 'PLN', - symbol: 'zł', - }, - { - name: 'Leu roumain', - code: 'RON', - symbol: 'lei', - }, - { - name: 'couronne suédoise', - code: 'SEK', - symbol: 'kr', - }, - { - name: 'Hryvnia ukrainienne', - code: 'UAH', - symbol: '₴', - }, - { - name: 'lire turque', - code: 'TRY', - symbol: '₺', - }, - { - name: 'Argentine Peso', - code: 'ARS', - symbol: '$', - }, - { - name: 'Bolivien bolivien', - code: 'BOB', - symbol: 'Bs.', - }, - { - name: 'Real brésilien', - code: 'BRL', - symbol: 'R$', - }, - { - name: 'Peso chilien', - code: 'CLP', - symbol: '$', - }, - { - name: 'Peso colombien', - code: 'COP', - symbol: '$', - }, - { - name: 'Nouveau Sol Péruvien', - code: 'PEN', - symbol: 'S/.', - }, - { - name: 'Guarani paraguayen', - code: 'PYG', - symbol: '₲', - }, - { - name: 'Peso uruguayen', - code: 'UYU', - symbol: '$', - }, - { - name: 'Bolivar vénézuélien', - code: 'VES', - symbol: 'Bs.', - }, - { - name: 'Yen japonais', - code: 'JPY', - symbol: '¥', - }, - { - name: 'Bangladesh Taka', - code: 'BDT', - symbol: '৳', - }, - { - name: 'Le yuan chinois', - code: 'CNY', - symbol: '¥', - }, - { - name: 'Dollar de Hong Kong', - code: 'HKD', - symbol: '$', - }, - { - name: 'Roupie indienne', - code: 'INR', - symbol: '₹', - }, - { - name: 'Riel cambodgien', - code: 'KHR', - symbol: '៛', - }, - { - name: 'Poulet', - code: 'LAK', - symbol: '₭', - }, - { - name: 'Roupie sri lankaise', - code: 'LKR', - symbol: 'රු', - }, - { - name: 'Rufiyaa', - code: 'MVR', - symbol: '.ރ', - }, - { - name: 'cloche malaisienne', - code: 'MYR', - symbol: 'RM', - }, - { - name: 'Roupie népalaise', - code: 'NPR', - symbol: 'रू', - }, - { - name: 'Peso philippin', - code: 'PHP', - symbol: '₱', - }, - { - name: 'Roupie pakistanaise', - code: 'PKR', - symbol: '₨', - }, - { - name: 'Dollar de Singapour', - code: 'SGD', - symbol: '$', - }, - { - name: 'Baht thaïlandais', - code: 'THB', - symbol: '฿', - }, - { - name: 'Nouveau dollar de Taïwan', - code: 'TWD', - symbol: '$', - }, - { - name: 'Dong vietnamien', - code: 'VND', - symbol: '₫', - }, - { - name: 'Dollar australien', - code: 'AUD', - symbol: '$', - }, - { - name: 'Dollar fidjien', - code: 'FJD', - symbol: '$', - }, - { - name: 'Dollar néo-zélandais', - code: 'NZD', - symbol: '$', - }, - { - name: 'Franc CFP', - code: 'XPF', - symbol: '₣', - }, - { - name: 'Livre égyptienne', - code: 'EGP', - symbol: '£', - }, - { - name: 'Cédi ghanéen', - code: 'GHS', - symbol: '₵', - }, - { - name: 'Dalasi', - code: 'GMD', - symbol: 'D', - }, - { - name: 'Shilling kenyan', - code: 'KES', - symbol: 'Sh', - }, - { - name: 'Dirham marocain', - code: 'MAD', - symbol: 'DH', - }, - { - name: 'Ariary malgache', - code: 'MGA', - symbol: 'Ar', - }, - { - name: 'Roupie mauricienne', - code: 'MUR', - symbol: '₨', - }, - { - name: 'Dollar namibien', - code: 'NAD', - symbol: '$', - }, - { - name: 'Naira nigérian', - code: 'NGN', - symbol: '₦', - }, - { - name: 'Roupie', - code: 'SCR', - symbol: '₨', - }, - { - name: 'Dinar tunisien', - code: 'TND', - symbol: 'DT', - }, - { - name: 'Shilling ougandais', - code: 'UGX', - symbol: 'Sh', - }, - { - name: 'CFA Franc BEAC', - code: 'XAF', - symbol: 'Fr', - }, - { - name: 'CFA Franc BCEAO', - code: 'XOF', - symbol: 'Fr', - }, - { - name: 'Rand sud-africain', - code: 'ZAR', - symbol: 'Br', - }, - { - name: 'Dirham des Émirats arabes unis', - code: 'AED', - symbol: 'د.إ', - }, - { - name: 'Nouveau Shekel israélien', - code: 'ILS', - symbol: '₪', - }, - { - name: 'Livre syrienne', - code: 'SYP', - symbol: '£', - }, - { - name: 'Dinar jordanien', - code: 'JOD', - symbol: 'د.ا', - }, - { - name: 'Dinar koweïtien', - code: 'KWD', - symbol: 'د.ك', - }, - { - name: 'Livre libanaise', - code: 'LBP', - symbol: 'ل.ل', - }, - { - name: 'Rial omanais', - code: 'OMR', - symbol: 'ر.ع.', - }, - { - name: 'Rial qatari', - code: 'QAR', - symbol: 'ر.ق', - }, - { - name: 'Riyal saoudien', - code: 'SAR', - symbol: '', - }, - { - name: 'Bitcoin', - code: 'BTC', - symbol: '₿', - }, - { - name: 'Ethereum', - code: 'ETH', - symbol: 'Ξ', - }, - { - name: 'Litecoin', - code: 'LTC', - symbol: 'Ł', - }, - { - name: 'Ripples', - code: 'XRP', - symbol: 'XRP', - }, -]; diff --git a/src/locales/fr_CH/finance/index.ts b/src/locales/fr_CH/finance/index.ts deleted file mode 100644 index 55979604aa6..00000000000 --- a/src/locales/fr_CH/finance/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This file is automatically generated. - * Run 'pnpm run generate:locales' to update. - */ -import type { FinanceDefinition } from '../../..'; -import account_type from './account_type'; -import currency from './currency'; -import transaction_type from './transaction_type'; - -const finance: FinanceDefinition = { - account_type, - currency, - transaction_type, -}; - -export default finance; diff --git a/src/locales/fr_CH/finance/transaction_type.ts b/src/locales/fr_CH/finance/transaction_type.ts deleted file mode 100644 index bdbb578a0da..00000000000 --- a/src/locales/fr_CH/finance/transaction_type.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['dépôt', 'retrait', 'paiement', 'facture']; diff --git a/src/locales/fr_CH/index.ts b/src/locales/fr_CH/index.ts index 4bd3598cf9b..36c67c18e2f 100644 --- a/src/locales/fr_CH/index.ts +++ b/src/locales/fr_CH/index.ts @@ -3,38 +3,22 @@ * Run 'pnpm run generate:locales' to update. */ import type { LocaleDefinition } from '../..'; -import animal from './animal'; import cell_phone from './cell_phone'; -import color from './color'; -import commerce from './commerce'; -import date from './date'; -import finance from './finance'; 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 fr_CH: LocaleDefinition = { - animal, cell_phone, - color, - commerce, - date, - finance, internet, location, lorem, metadata, - music, person, phone_number, - vehicle, - word, }; export default fr_CH; diff --git a/src/locales/fr_CH/music/genre.ts b/src/locales/fr_CH/music/genre.ts deleted file mode 100644 index 21fac42b065..00000000000 --- a/src/locales/fr_CH/music/genre.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default [ - 'Rock', - 'Metal', - 'Pop', - 'Électronique', - 'Folk', - 'World', - 'Country', - 'Jazz', - 'Funk', - 'Soul', - 'Hip Hop', - 'Classique', - 'Latine', - 'Reggae', - 'Blues', - 'Rap', - 'Variété', - 'Lofi', -]; diff --git a/src/locales/fr_CH/music/index.ts b/src/locales/fr_CH/music/index.ts deleted file mode 100644 index a2e4a3b6c54..00000000000 --- a/src/locales/fr_CH/music/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * 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/fr_CH/person/index.ts b/src/locales/fr_CH/person/index.ts index fd7e10d16df..e1e0ae596ae 100644 --- a/src/locales/fr_CH/person/index.ts +++ b/src/locales/fr_CH/person/index.ts @@ -13,7 +13,6 @@ import male_prefix from './male_prefix'; import name_ from './name'; import prefix from './prefix'; import sex from './sex'; -import title from './title'; const person: PersonDefinition = { female_first_name, @@ -26,7 +25,6 @@ const person: PersonDefinition = { name: name_, prefix, sex, - title, }; export default person; diff --git a/src/locales/fr_CH/person/title.ts b/src/locales/fr_CH/person/title.ts deleted file mode 100644 index 85f235ff3c2..00000000000 --- a/src/locales/fr_CH/person/title.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default { - job: [ - 'Superviseur', - 'Executif', - 'Manager', - 'Ingenieur', - 'Specialiste', - 'Directeur', - 'Coordinateur', - 'Administrateur', - 'Architecte', - 'Analyste', - 'Designer', - 'Technicien', - 'Developpeur', - 'Producteur', - 'Consultant', - 'Assistant', - 'Agent', - 'Stagiaire', - ], -}; diff --git a/src/locales/fr_CH/vehicle/bicycle_type.ts b/src/locales/fr_CH/vehicle/bicycle_type.ts deleted file mode 100644 index b4f2b9adc94..00000000000 --- a/src/locales/fr_CH/vehicle/bicycle_type.ts +++ /dev/null @@ -1,42 +0,0 @@ -export default [ - 'Biporteur', - 'Cruiser', - 'Cyclo-draisine', - 'Draisienne', - 'Fatbike', - 'Gocycle', - 'Grand bi', - 'Gravel', - 'Longtail', - 'Lowrider bikes', - 'Michaudine', - 'Rickshaw', - 'Rosalie', - 'Singlespeed', - 'Tall bike', - 'Tandem', - 'Tricycle', - 'Tricycle couché', - 'Triplette', - 'Triporteur', - 'Vélo à assistance électrique', - 'Vélo à voile', - 'Vélo cargo', - 'Vélo couché', - 'Vélo de piste', - 'Vélo de route', - 'Vélo électrique', - 'Vélo en bambou', - 'Vélo fantôme', - 'Vélo festif', - 'Vélo hollandais', - 'Vélo pliant', - 'Vélo tout chemin', - 'Vélo tout-terrain', - 'Vélocar', - 'Vélocipède', - 'Vélocipèdraisiavaporianna', - 'Vélomobile', - 'Vélo-taxi', - 'Whike', -]; diff --git a/src/locales/fr_CH/vehicle/fuel.ts b/src/locales/fr_CH/vehicle/fuel.ts deleted file mode 100644 index 5950a4eee74..00000000000 --- a/src/locales/fr_CH/vehicle/fuel.ts +++ /dev/null @@ -1 +0,0 @@ -export default ['Diesel', 'Électrique', 'Essence', 'Hybride']; diff --git a/src/locales/fr_CH/vehicle/index.ts b/src/locales/fr_CH/vehicle/index.ts deleted file mode 100644 index d6c83dcf393..00000000000 --- a/src/locales/fr_CH/vehicle/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This file is automatically generated. - * Run 'pnpm run generate:locales' to update. - */ -import type { VehicleDefinition } from '../../..'; -import bicycle_type from './bicycle_type'; -import fuel from './fuel'; -import type_ from './type'; - -const vehicle: VehicleDefinition = { - bicycle_type, - fuel, - type: type_, -}; - -export default vehicle; diff --git a/src/locales/fr_CH/vehicle/type.ts b/src/locales/fr_CH/vehicle/type.ts deleted file mode 100644 index 1930bb42529..00000000000 --- a/src/locales/fr_CH/vehicle/type.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default [ - 'Micro-urbaines', - 'Mini-citadines', - 'Citadines polyvalentes', - 'Berlines compactes', - 'Berlines', - 'SUV', - 'Tout-terrains', - 'Pick-up', - 'Minispaces', - 'Monospaces compacts', - 'Grands monospaces', -]; diff --git a/src/locales/fr_CH/word/adjective.ts b/src/locales/fr_CH/word/adjective.ts deleted file mode 100644 index 29b7771d67c..00000000000 --- a/src/locales/fr_CH/word/adjective.ts +++ /dev/null @@ -1,115 +0,0 @@ -export default [ - 'âcre', - 'adorable', - 'affable', - 'agréable', - 'aigre', - 'aimable', - 'altruiste', - 'amorphe', - 'antique', - 'apte', - 'avare', - 'blême', - 'brave', - 'brusque', - 'calme', - 'candide', - 'charitable', - 'circulaire', - 'considérable', - 'coupable', - 'cyan', - 'débile', - 'délectable', - 'dense', - 'désagréable', - 'dynamique', - 'efficace', - 'égoïste', - 'émérite', - 'énergique', - 'énorme', - 'espiègle', - 'extatique', - 'extra', - 'fade', - 'ferme', - 'fidèle', - 'fourbe', - 'gai', - 'géométrique', - 'gigantesque', - 'habile', - 'hebdomadaire', - 'hirsute', - 'horrible', - 'hypocrite', - 'hystérique', - 'immense', - 'incalculable', - 'infime', - 'innombrable', - 'insipide', - 'insolite', - 'intrépide', - 'jeune', - 'lâche', - 'large', - 'loufoque', - 'lunatique', - 'magenta', - 'magnifique', - 'maigre', - 'malade', - 'marron', - 'mature', - 'mélancolique', - 'mince', - 'minuscule', - 'moderne', - 'multiple', - 'neutre', - 'novice', - 'orange', - 'pacifique', - 'pauvre', - 'perplexe', - 'placide', - 'pourpre', - 'propre', - 'raide', - 'rapide', - 'rectangulaire', - 'rose', - 'sage', - 'sale', - 'sauvage', - 'séculaire', - 'sédentaire', - 'serviable', - 'simple', - 'sincère', - 'snob', - 'solitaire', - 'sombre', - 'souple', - 'spécialiste', - 'splendide', - 'super', - 'svelte', - 'sympathique', - 'téméraire', - 'tendre', - 'terne', - 'timide', - 'tranquille', - 'triangulaire', - 'triste', - 'turquoise', - 'vaste', - 'vétuste', - 'vide', - 'vivace', - 'vorace', -]; diff --git a/src/locales/fr_CH/word/adverb.ts b/src/locales/fr_CH/word/adverb.ts deleted file mode 100644 index 4cef1053285..00000000000 --- a/src/locales/fr_CH/word/adverb.ts +++ /dev/null @@ -1,161 +0,0 @@ -export default [ - 'admirablement', - 'ainsi', - 'aussi', - 'bien', - 'comme', - 'comment', - 'debout', - 'doucement', - 'également', - 'ensemble', - 'exprès', - 'franco', - 'gratis', - 'impromptu', - 'incognito', - 'lentement', - 'mal', - 'mieux', - 'pis', - 'plutôt', - 'presque', - 'recta', - 'vite', - 'volontiers', - 'à peine', - 'à peu près', - 'absolument', - 'à demi', - 'assez', - 'autant', - 'autrement', - 'approximativement', - 'beaucoup', - 'carrément', - 'combien', - 'complètement', - 'davantage', - 'diablement', - 'divinement', - 'drôlement', - 'encore', - 'entièrement', - 'environ', - 'extrêmement', - 'fort', - 'grandement', - 'guère', - 'infiniment', - 'insuffisamment', - 'joliment', - 'même', - 'moins', - 'pas mal', - 'passablement', - 'peu', - 'plus', - 'prou', - 'quasi', - 'quasiment', - 'quelque', - 'rudement', - 'si', - 'suffisamment', - 'tant', - 'tellement', - 'terriblement', - 'totalement', - 'tout', - 'tout à fait', - 'très', - 'trop', - 'trop peu', - 'un peu', - 'alors', - 'après', - 'après-demain', - "aujourd'hui", - 'auparavant', - 'aussitôt', - 'autrefois', - 'avant', - 'avant-hier', - 'bientôt', - 'cependant', - "d'abord", - 'déjà', - 'demain', - 'depuis', - 'derechef', - 'désormais', - 'dorénavant', - 'enfin', - 'ensuite', - 'entre-temps', - 'hier', - 'jadis', - 'jamais', - 'longtemps', - 'lors', - 'maintenant', - 'naguère', - 'parfois', - 'premièrement', - 'puis', - 'quand ?', - 'quelquefois', - 'sitôt', - 'soudain', - 'souvent', - 'subito', - 'tantôt', - 'tard', - 'tôt', - 'toujours', - 'ailleurs', - 'alentour', - 'arrière', - 'au-delà', - 'au-dessous', - 'au-dessus', - 'au-devant', - 'autour', - 'ça', - 'céans', - 'ci', - 'contre', - 'deçà', - 'dedans', - 'dehors', - 'derrière', - 'dessous', - 'dessus', - 'devant', - 'ici', - 'là', - 'là-haut', - 'loin', - 'où', - 'outre', - 'partout', - 'près', - 'proche', - 'sus', - 'y', - 'apparemment', - 'assurément', - 'bon', - 'certainement', - 'certes', - 'en vérité', - 'oui', - 'peut-être', - 'précisément', - 'probablement', - 'sans doute', - 'soit', - 'toutefois', - 'vraiment', - 'vraisemblablement', -]; diff --git a/src/locales/fr_CH/word/conjunction.ts b/src/locales/fr_CH/word/conjunction.ts deleted file mode 100644 index bd85dcddd48..00000000000 --- a/src/locales/fr_CH/word/conjunction.ts +++ /dev/null @@ -1,46 +0,0 @@ -export default [ - 'que', - 'afin que', - 'pour que', - 'de sorte que', - 'de façon à ce que', - 'de manière à ce que', - 'de peur que', - 'de crainte que', - 'puisque', - 'parce que', - 'comme', - 'vu que', - 'étant donné que', - 'du fait que', - 'du moment que', - 'd’autant que', - 'même si', - 'quoique', - 'bien que', - 'si', - 'dans la mesure où', - 'à condition que', - 'pourvu que', - 'au cas où', - 'si bien que', - 'de façon que', - 'au point que', - 'tant', - 'tellement', - 'assez', - 'trop', - 'avant que', - 'jusqu’à ce que', - 'lorsque', - 'quand', - 'aussitôt que', - 'sitôt que', - 'dès que', - 'après que', - 'pendant que', - 'tant que', - 'alors que', - 'tandis que', - 'sans que', -]; diff --git a/src/locales/fr_CH/word/index.ts b/src/locales/fr_CH/word/index.ts deleted file mode 100644 index 3aa438b70ce..00000000000 --- a/src/locales/fr_CH/word/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This file is automatically generated. - * Run 'pnpm run generate:locales' to update. - */ -import type { WordDefinition } from '../../..'; -import adjective from './adjective'; -import adverb from './adverb'; -import conjunction from './conjunction'; -import interjection from './interjection'; -import noun from './noun'; -import preposition from './preposition'; -import verb from './verb'; - -const word: WordDefinition = { - adjective, - adverb, - conjunction, - interjection, - noun, - preposition, - verb, -}; - -export default word; diff --git a/src/locales/fr_CH/word/interjection.ts b/src/locales/fr_CH/word/interjection.ts deleted file mode 100644 index c7f30cb6ee9..00000000000 --- a/src/locales/fr_CH/word/interjection.ts +++ /dev/null @@ -1,64 +0,0 @@ -export default [ - 'ah', - 'aïe', - 'areu areu', - 'atchoum', - 'badaboum', - 'bang', - 'bè', - 'blablabla', - 'bof', - 'boum', - 'broum', - 'bzzz', - 'chut', - 'clac', - 'coac coac', - 'cocorico', - 'coin-coin', - 'cot cot', - 'crac', - 'croâ', - 'cuicui', - 'ding', - 'drelin', - 'dring', - 'euh', - 'glouglou', - 'groin groin', - 'grrr', - 'ha', - 'ha ha', - 'hé', - 'hi', - 'meuh', - 'miam', - 'miaou', - 'oh', - 'ouah', - 'ouch', - 'ouf', - 'ouille', - 'ouin', - 'oups', - 'paf', - 'pff', - 'pin-pon', - 'plic', - 'plouf', - 'prout', - 'pschitt', - 'psitt', - 'ronron', - 'smack', - 'snif', - 'tchou tchouu', - 'tic-tac', - 'toc', - 'toc-toc', - 'tsoin-tsoin', - 'vlan', - 'vouh', - 'vroum', - 'zzzz', -]; diff --git a/src/locales/fr_CH/word/noun.ts b/src/locales/fr_CH/word/noun.ts deleted file mode 100644 index c1cdf69773a..00000000000 --- a/src/locales/fr_CH/word/noun.ts +++ /dev/null @@ -1,63 +0,0 @@ -export default [ - 'cadre', - 'fonctionnaire', - 'commis de cuisine', - 'adepte', - 'diplomate', - 'camarade', - 'actionnaire', - 'jeune enfant', - 'biathlète', - 'responsable', - 'chef de cuisine', - 'partenaire', - 'collègue', - 'adversaire', - 'guide', - 'commissionnaire', - 'parlementaire', - 'diététiste', - 'gestionnaire', - 'chef', - 'membre du personnel', - 'antagoniste', - 'membre de l’équipe', - 'spécialiste', - 'prestataire de services', - 'juriste', - 'hôte', - 'membre titulaire', - 'membre à vie', - 'commis', - 'porte-parole', - 'secouriste', - 'athlète', - 'triathlète', - 'touriste', - 'administration', - 'conseil d’administration', - 'équipe de recherche', - 'clientèle', - 'concurrence', - 'conseil municipal', - 'délégation', - 'direction', - 'électorat', - 'personnel', - 'corps enseignant', - 'équipe', - 'communauté étudiante', - 'gens', - 'lectorat', - 'mairie', - 'patientèle', - 'police', - 'présidence', - 'personnel professionnel', - 'population du Québec', - 'rectorat', - 'rédaction', - 'secours', - 'foule', - 'main-d’œuvre', -]; diff --git a/src/locales/fr_CH/word/preposition.ts b/src/locales/fr_CH/word/preposition.ts deleted file mode 100644 index 0006b6df65c..00000000000 --- a/src/locales/fr_CH/word/preposition.ts +++ /dev/null @@ -1,106 +0,0 @@ -export default [ - 'a', - 'après', - 'avant', - 'avex', - 'chez', - 'concernant', - 'contre', - 'dans', - 'de', - 'depuis', - 'derrière', - 'dès', - 'devant', - 'durant', - 'en', - 'entre', - 'envers', - 'hormis', - 'hors', - 'jusque', - 'malgré', - 'moyennant', - 'nonobstant', - 'outre', - 'par', - 'parmi', - 'pendant', - 'pour', - 'près', - 'sans', - 'sauf', - 'selon', - 'sous', - 'suivant', - 'sur', - 'touchant', - 'vers', - 'via', - 'à bas de', - 'à cause de', - 'à côté de', - 'à défaut de ', - 'afin de', - 'à force de', - 'à la merci', - 'à la faveur de', - "à l'égard de", - "à l'encontre de", - "à l'entour de", - "à l'exception de", - "à l'instar de", - "à l'insu de", - 'à même', - 'à moins de', - 'à partir de', - 'à raison de', - 'à seule fin de', - 'à travers', - 'au-dedans de', - 'au défaut de', - 'au-dehors', - 'au-dessous de', - 'au-dessus de', - 'au lieu de', - 'au moyen de', - 'auprès de', - 'aux environs de', - 'au prix de', - 'autour de', - 'aux alentours de', - 'au dépens de', - 'avant de', - "d'après", - "d'avec", - 'de façon à', - 'de la part de', - 'de manière à', - "d'entre", - 'de par', - 'de peur de', - 'du côté de', - 'en bas de', - 'en decà de', - 'en dedans de', - 'en dehors de', - 'en dépit de', - 'en face de', - 'en faveur de', - 'en guise de', - 'en outre de', - 'en plus de', - 'grâce à', - 'hors de', - 'loin de', - 'lors de', - 'par rapport à', - 'par suite de', - 'près de', - 'proche de', - 'quant à', - 'quitte à', - 'sauf à', - 'sous couleur de', - 'vis-à-vie de', -]; diff --git a/src/locales/fr_CH/word/verb.ts b/src/locales/fr_CH/word/verb.ts deleted file mode 100644 index e1ee70a1200..00000000000 --- a/src/locales/fr_CH/word/verb.ts +++ /dev/null @@ -1,1003 +0,0 @@ -export default [ - 'être', - 'avoir', - 'faire', - 'dire', - 'voir', - 'prendre', - 'pouvoir', - 'parler', - 'aller', - 'savoir', - 'donner', - 'passer', - 'mettre', - 'partir', - 'trouver', - 'rire', - 'vivre', - 'laisser', - 'rendre', - 'sourire', - 'venir', - 'comprendre', - 'penser', - 'chercher', - 'croire', - 'entendre', - 'tenir', - 'demander', - 'souvenir', - 'attendre', - 'sortir', - 'regarder', - 'jouer', - 'écrire', - 'connaître', - 'devenir', - 'mourir', - 'rester', - 'retrouver', - 'entrer', - 'manger', - 'tomber', - 'tirer', - 'lire', - 'suivre', - 'répondre', - 'obtenir', - 'perdre', - 'expliquer', - 'assurer', - 'servir', - 'porter', - 'montrer', - 'étranger', - 'éviter', - 'arriver', - 'vouloir', - 'reconnaître', - 'monter', - 'boire', - 'oublier', - 'poser', - 'aimer', - 'arrêter', - 'sentir', - 'atteindre', - 'revenir', - 'devoir', - 'changer', - 'dormir', - 'permettre', - 'quitter', - 'reprendre', - 'appeler', - 'dîner', - 'apprendre', - 'empêcher', - 'établir', - 'travailler', - 'garder', - 'marcher', - 'imaginer', - 'considérer', - 'tendre', - 'lever', - 'tourner', - 'gagner', - 'recevoir', - 'revoir', - 'aider', - 'créer', - 'découvrir', - 'compter', - 'tuer', - 'courir', - 'rentrer', - 'réaliser', - 'toucher', - 'finir', - 'descendre', - 'ajouter', - 'essayer', - 'présenter', - 'coucher', - 'occuper', - 'asseoir', - 'payer', - 'jeter', - 'définir', - 'déjeuner', - 'agir', - 'choisir', - 'distinguer', - 'préparer', - 'apparaître', - 'remettre', - 'raconter', - 'échapper', - 'acheter', - 'rejoindre', - 'battre', - 'écouter', - 'offrir', - 'glisser', - 'conduire', - 'paraître', - 'exprimer', - 'pleurer', - 'étudier', - 'retourner', - 'accepter', - 'défendre', - 'maintenir', - 'rappeler', - 'continuer', - 'commencer', - 'disparaître', - 'produire', - 'officier', - 'observer', - 'apporter', - 'former', - 'admettre', - 'retenir', - 'fournir', - 'déterminer', - 'pousser', - 'rencontrer', - 'fixer', - 'construire', - 'constater', - 'remarquer', - 'cacher', - 'développer', - 'prévoir', - 'préciser', - 'réduire', - 'constituer', - 'résoudre', - 'crier', - 'sauver', - 'remonter', - 'imposer', - 'naître', - 'envoyer', - 'souffrir', - 'tenter', - 'juger', - 'bouger', - 'exercer', - 'intervenir', - 'supporter', - 'mesurer', - 'sauter', - 'apercevoir', - 'conserver', - 'représenter', - 'placer', - 'traiter', - 'appliquer', - 'remplacer', - 'baiser', - 'étendre', - 'affirmer', - 'mener', - 'satisfaire', - 'réfléchir', - 'chanter', - 'vendre', - 'traverser', - 'fier', - 'décider', - 'entraîner', - 'avancer', - 'refuser', - 'abandonner', - 'protéger', - 'noter', - 'remplir', - 'fermer', - 'dégager', - 'ramener', - 'poursuivre', - 'couper', - 'embrasser', - 'décrire', - 'répéter', - 'organiser', - 'vérifier', - 'danser', - 'espérer', - 'frapper', - 'avouer', - 'exister', - 'accomplir', - 'couler', - 'élever', - 'parvenir', - 'arracher', - 'citer', - 'provoquer', - 'renoncer', - 'approcher', - 'lancer', - 'séparer', - 'transformer', - 'examiner', - 'justifier', - 'installer', - 'respirer', - 'rêver', - 'prévenir', - 'taire', - 'plancher', - 'relever', - 'livrer', - 'pénétrer', - 'détruire', - 'rouler', - 'discuter', - 'modifier', - 'participer', - 'régler', - 'engager', - 'employer', - 'profiter', - 'envisager', - 'concevoir', - 'soutenir', - 'promener', - 'conclure', - 'nourrir', - 'prouver', - 'douter', - 'laver', - 'disposer', - 'aboutir', - 'dépasser', - 'intéresser', - 'prononcer', - 'apprécier', - 'assister', - 'rechercher', - 'lutter', - 'marquer', - 'effectuer', - 'rompre', - 'partager', - 'supposer', - 'accorder', - 'casser', - 'procéder', - 'convaincre', - 'éloigner', - 'emporter', - 'augmenter', - 'introduire', - 'évoquer', - 'amener', - 'enlever', - 'désigner', - 'franchir', - 'écarter', - 'réveiller', - 'proposer', - 'calculer', - 'diriger', - 'posséder', - 'retirer', - 'voler', - 'durer', - 'crever', - 'résister', - 'deviner', - 'tromper', - 'dresser', - 'céder', - 'prêter', - 'craindre', - 'couvrir', - 'ménager', - 'traîner', - 'cesser', - 'traduire', - 'confondre', - 'aborder', - 'peindre', - 'entreprendre', - 'débarrasser', - 'comparer', - 'entretenir', - 'plaindre', - 'amuser', - 'attaquer', - 'fabriquer', - 'combattre', - 'accroître', - 'ignorer', - 'reposer', - 'attirer', - 'songer', - 'opposer', - 'emmener', - 'visiter', - 'améliorer', - 'annoncer', - 'éprouver', - 'accompagner', - 'recommencer', - 'conseiller', - 'brûler', - 'adresser', - 'adapter', - 'prétendre', - 'rapprocher', - 'confier', - 'indiquer', - 'nier', - 'signaler', - 'serrer', - 'démontrer', - 'réussir', - 'soumettre', - 'appuyer', - 'surveiller', - 'prier', - 'éclater', - 'super', - 'chasser', - 'acquérir', - 'endormir', - 'attribuer', - 'souligner', - 'épouser', - 'adopter', - 'interroger', - 'éclairer', - 'révéler', - 'limiter', - 'demeurer', - 'consacrer', - 'faciliter', - 'inventer', - 'libérer', - 'ranger', - 'plaire', - 'goûter', - 'boucher', - 'communiquer', - 'effacer', - 'exécuter', - 'rocher', - 'réunir', - 'repartir', - 'respecter', - 'refaire', - 'forcer', - 'interpréter', - 'contrôler', - 'vaincre', - 'ficher', - 'lâcher', - 'trembler', - 'supprimer', - 'identifier', - 'opérer', - 'diminuer', - 'imiter', - 'insister', - 'manifester', - 'admirer', - 'rétablir', - 'filer', - 'contenter', - 'mêler', - 'nommer', - 'exposer', - 'écraser', - 'achever', - 'marier', - 'jouir', - 'surprendre', - 'fondre', - 'soulever', - 'allumer', - 'dissimuler', - 'briser', - 'consulter', - 'obéir', - 'reconstituer', - 'enfoncer', - 'analyser', - 'éliminer', - 'étonner', - 'terminer', - 'procurer', - 'peser', - 'contempler', - 'transporter', - 'ressembler', - 'classer', - 'éteindre', - 'inscrire', - 'déplacer', - 'habiter', - 'attacher', - 'ramasser', - 'sonner', - 'accueillir', - 'substituer', - 'soigner', - 'déceler', - 'fumer', - 'arranger', - 'parcourir', - 'veiller', - 'claquer', - 'reculer', - 'publier', - 'compléter', - 'hésiter', - 'téléphoner', - 'contenir', - 'transmettre', - 'dominer', - 'causer', - 'situer', - 'détacher', - 'fonctionner', - 'rassurer', - 'avaler', - 'associer', - 'rassembler', - 'saluer', - 'briller', - 'commander', - 'valoir', - 'recueillir', - 'reproduire', - 'taper', - 'mentir', - 'isoler', - 'multiplier', - 'rattraper', - 'orienter', - 'affronter', - 'enseigner', - 'user', - 'falloir', - 'enfermer', - 'dessiner', - 'favoriser', - 'retomber', - 'pratiquer', - 'recourir', - 'abattre', - 'baisser', - 'bénéficier', - 'exiger', - 'fonder', - 'réparer', - 'risquer', - 'vider', - 'percevoir', - 'comporter', - 'accéder', - 'composer', - 'caresser', - 'formuler', - 'prolonger', - 'signer', - 'varier', - 'détourner', - 'consoler', - 'rapporter', - 'éveiller', - 'calmer', - 'regagner', - 'survivre', - 'renforcer', - 'plonger', - 'réclamer', - 'ressortir', - 'attraper', - 'négliger', - 'figurer', - 'chier', - 'corriger', - 'hurler', - 'craquer', - 'préserver', - 'récupérer', - 'accrocher', - 'grandir', - 'reprocher', - 'habiller', - 'tarder', - 'déposer', - 'assumer', - 'évaluer', - 'susciter', - 'noyer', - 'regretter', - 'remuer', - 'exploiter', - 'remercier', - 'rejeter', - 'déduire', - 'charger', - 'inviter', - 'échanger', - 'appartenir', - 'persuader', - 'planter', - 'percer', - 'tracer', - 'distraire', - 'bâtir', - 'combler', - 'guider', - 'déranger', - 'déclarer', - 'inquiéter', - 'plier', - 'interrompre', - 'bouffer', - 'secouer', - 'entrevoir', - 'souffler', - 'souhaiter', - 'allonger', - 'confirmer', - 'discerner', - 'réagir', - 'grimper', - 'pardonner', - 'repérer', - 'presser', - 'estimer', - 'creuser', - 'clocher', - 'lier', - 'boulanger', - 'verser', - 'refermer', - 'piquer', - 'repousser', - 'obliger', - 'pencher', - 'informer', - 'étouffer', - 'conquérir', - 'correspondre', - 'déchiffrer', - 'ressentir', - 'sacrifier', - 'subsister', - 'mordre', - 'désirer', - 'encourager', - 'excuser', - 'explorer', - 'nettoyer', - 'coller', - 'délivrer', - 'gêner', - 'avertir', - 'ôter', - 'élargir', - 'intégrer', - 'renouveler', - 'garantir', - 'répandre', - 'fouiller', - 'oser', - 'résumer', - 'pisser', - 'interdire', - 'venger', - 'convenir', - 'surmonter', - 'rédiger', - 'jaillir', - 'contribuer', - 'emprunter', - 'défiler', - 'agiter', - 'séduire', - 'revivre', - 'défaire', - 'signifier', - 'flotter', - 'concilier', - 'croître', - 'émettre', - 'suffire', - 'concentrer', - 'renverser', - 'renvoyer', - 'commettre', - 'inspirer', - 'chauffer', - 'troubler', - 'balancer', - 'enregistrer', - 'mentionner', - 'réserver', - 'soucier', - 'réchauffer', - 'élaborer', - 'assimiler', - 'dénoncer', - 'voyager', - 'précipiter', - 'témoigner', - 'suggérer', - 'embarquer', - 'loger', - 'régner', - 'sécher', - 'enrichir', - 'distribuer', - 'essuyer', - 'soupçonner', - 'compenser', - 'dissoudre', - 'cueillir', - 'progresser', - 'caractériser', - 'grouper', - 'manier', - 'absorber', - 'maîtriser', - 'répartir', - 'compromettre', - 'basculer', - 'circuler', - 'déclencher', - 'pêcher', - 'alimenter', - 'épargner', - 'instruire', - 'apaiser', - 'remédier', - 'accuser', - 'cracher', - 'enfiler', - 'heurter', - 'souper', - 'redresser', - 'nager', - 'ennuyer', - 'envahir', - 'coudre', - 'verger', - 'évoluer', - 'louer', - 'préférer', - 'repasser', - 'soustraire', - 'habituer', - 'baigner', - 'consentir', - 'condamner', - 'négocier', - 'guetter', - 'protester', - 'reporter', - 'sembler', - 'vibrer', - 'bondir', - 'pendre', - 'dissiper', - 'moquer', - 'rattacher', - 'trancher', - 'voter', - 'priver', - 'atténuer', - 'déchirer', - 'murmurer', - 'triompher', - 'pourvoir', - 'repentir', - 'exclure', - 'édifier', - 'enterrer', - 'renseigner', - 'parer', - 'ordonner', - 'déployer', - 'diviser', - 'frotter', - 'gratter', - 'raisonner', - 'rigoler', - 'tailler', - 'relire', - 'bavarder', - 'capter', - 'illustrer', - 'mériter', - 'dérouler', - 'émouvoir', - 'revêtir', - 'dérober', - 'étaler', - 'abriter', - 'fréquenter', - 'promettre', - 'passager', - 'animer', - 'approuver', - 'blesser', - 'célébrer', - 'cultiver', - 'relier', - 'dévorer', - 'contester', - 'hâter', - 'résigner', - 'vanter', - 'recouvrir', - 'critiquer', - 'conférer', - 'croiser', - 'doubler', - 'qualifier', - 'réciter', - 'restaurer', - 'résulter', - 'promouvoir', - 'approfondir', - 'gémir', - 'attarder', - 'bûcher', - 'combiner', - 'succéder', - 'abaisser', - 'cogner', - 'coordonner', - 'imprimer', - 'accélérer', - 'déshabiller', - 'invoquer', - 'jurer', - 'mouiller', - 'ralentir', - 'contraindre', - 'préoccuper', - 'dépenser', - 'accumuler', - 'déboucher', - 'siffler', - 'restituer', - 'retarder', - 'décrocher', - 'influencer', - 'redouter', - 'entamer', - 'généraliser', - 'balayer', - 'perfectionner', - 'simplifier', - 'épuiser', - 'épanouir', - 'éclaircir', - 'fendre', - 'redevenir', - 'soulager', - 'consommer', - 'débarquer', - 'décourager', - 'engendrer', - 'fêter', - 'renaître', - 'affranchir', - 'freiner', - 'initier', - 'racheter', - 'raser', - 'solliciter', - 'dater', - 'errer', - 'dépouiller', - 'entourer', - 'féliciter', - 'honorer', - 'accommoder', - 'énumérer', - 'exciter', - 'incliner', - 'insérer', - 'pleuvoir', - 'tâcher', - 'exploser', - 'convertir', - 'viser', - 'méconnaître', - 'redire', - 'nouer', - 'rallier', - 'aménager', - 'débrouiller', - 'sombrer', - 'proclamer', - 'ressusciter', - 'buter', - 'découper', - 'masquer', - 'menacer', - 'mépriser', - 'cerner', - 'contrarier', - 'mater', - 'réjouir', - 'virer', - 'affecter', - 'dispenser', - 'gouverner', - 'renier', - 'plaider', - 'périr', - 'gonfler', - 'étrangler', - 'expédier', - 'fourrer', - 'hisser', - 'inciter', - 'photographier', - 'puiser', - 'redonner', - 'saigner', - 'projeter', - 'accentuer', - 'exagérer', - 'lasser', - 'méditer', - 'sauvegarder', - 'insulter', - 'choir', - 'emplir', - 'pourrir', - 'rembourser', - 'abuser', - 'décoller', - 'lécher', - 'autoriser', - 'frémir', - 'gravir', - 'tisser', - 'débattre', - 'dépendre', - 'cocher', - 'compliquer', - 'équilibrer', - 'emmerder', - 'détendre', - 'rater', - 'plaisanter', - 'copier', - 'déborder', - 'gâcher', - 'contredire', - 'reconstruire', - 'redescendre', - 'abîmer', - 'évacuer', - 'aggraver', - 'conformer', - 'résonner', - 'grossir', - 'hausser', - 'administrer', - 'dissocier', - 'effondrer', - 'pressentir', - 'prévaloir', - 'chialer', - 'coïncider', - 'coûter', - 'disputer', - 'fusiller', - 'gueuler', - 'différencier', - 'équiper', - 'foncer', - 'modeler', - 'recommander', - 'décharger', - 'inspecter', - 'aligner', - 'énoncer', - 'instituer', - 'tousser', - 'violer', - 'assigner', - 'ébranler', - 'émerger', - 'gérer', - 'planquer', - 'référer', - 'réprimer', - 'retracer', - 'tâter', - 'contourner', - 'démarrer', - 'effrayer', - 'frayer', - 'liquider', - 'camper', - 'commenter', - 'différer', - 'semer', - 'pater', - 'ranimer', - 'sursauter', - 'anéantir', - 'retentir', - 'barrer', - 'confesser', - 'confronter', - 'flatter', - 'incarner', - 'détester', - 'regrouper', - 'tremper', - 'feindre', - 'refroidir', - 'articuler', - 'brouiller', - 'doter', - 'économiser', - 'égarer', - 'adhérer', - 'trier', - 'attendrir', - 'tordre', - 'ramper', - 'recruter', - 'pointer', - 'apprivoiser', - 'assassiner', - 'aventurer', - 'défier', - 'détailler', - 'envelopper', - 'impressionner', - 'engloutir', - 'restreindre', - 'abolir', - 'réconcilier', - 'ruiner', - 'amorcer', - 'corner', - 'dériver', - 'esquisser', - 'incorporer', - 'manipuler', - 'disperser', - 'échouer', - 'mélanger', - 'replacer', - 'rôder', - 'ronfler', - 'raccrocher', - 'applaudir', - 'reparaître', - 'aspirer', - 'bousculer', - 'détecter', - 'dévoiler', - 'excéder', - 'financer', - 'afficher', - 'collaborer', - 'meubler', - 'pallier', - 'tolérer', - 'rafraîchir', - 'fleurir', -]; diff --git a/src/locales/fr_SN/index.ts b/src/locales/fr_SN/index.ts new file mode 100644 index 00000000000..7b766e772ef --- /dev/null +++ b/src/locales/fr_SN/index.ts @@ -0,0 +1,18 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ +import type { LocaleDefinition } from '../..'; +import internet from './internet'; +import location from './location'; +import metadata from './metadata'; +import person from './person'; + +const fr_SN: LocaleDefinition = { + internet, + location, + metadata, + person, +}; + +export default fr_SN; diff --git a/src/locales/fr_SN/internet/domain_suffix.ts b/src/locales/fr_SN/internet/domain_suffix.ts new file mode 100644 index 00000000000..4c9e2ae0793 --- /dev/null +++ b/src/locales/fr_SN/internet/domain_suffix.ts @@ -0,0 +1 @@ +export default ['sn', 'com', 'net', 'org']; diff --git a/src/locales/fr_SN/internet/free_email.ts b/src/locales/fr_SN/internet/free_email.ts new file mode 100644 index 00000000000..8ef7d24397b --- /dev/null +++ b/src/locales/fr_SN/internet/free_email.ts @@ -0,0 +1 @@ +export default ['gmail.com', 'yahoo.com', 'hotmail.com']; diff --git a/src/locales/fr_SN/internet/index.ts b/src/locales/fr_SN/internet/index.ts new file mode 100644 index 00000000000..0b63b5f2fb5 --- /dev/null +++ b/src/locales/fr_SN/internet/index.ts @@ -0,0 +1,14 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ +import type { InternetDefinition } from '../../..'; +import domain_suffix from './domain_suffix'; +import free_email from './free_email'; + +const internet: InternetDefinition = { + domain_suffix, + free_email, +}; + +export default internet; diff --git a/src/locales/fr_SN/location/building_number.ts b/src/locales/fr_SN/location/building_number.ts new file mode 100644 index 00000000000..b875f685863 --- /dev/null +++ b/src/locales/fr_SN/location/building_number.ts @@ -0,0 +1 @@ +export default ['####', '###', '##', '#']; diff --git a/src/locales/fr_SN/location/city_name.ts b/src/locales/fr_SN/location/city_name.ts new file mode 100644 index 00000000000..8e7b51ca8ee --- /dev/null +++ b/src/locales/fr_SN/location/city_name.ts @@ -0,0 +1,53 @@ +export default [ + 'Bakel', + 'Bambey', + 'Bargny', + 'Bignona', + 'Dagana', + 'Dahra', + 'Dakar', + 'Diourbel', + 'Fatick', + 'Gandiaye', + 'Gossas', + 'Goudomp', + 'Guinguinéo', + 'Guédiawaye', + 'Joal-Fadiouth', + 'Kaffrine', + 'Kanel', + 'Kaolack', + 'Kayar', + 'Khombole', + 'Kolda', + 'Koungheul', + 'Kébémer', + 'Kédougou', + 'Linguère', + 'Louga', + 'Matam', + 'Mbacké', + 'Mboro', + 'Mbour', + 'NDofan', + 'Ndioum', + 'Ngaaÿ Meckhe', + 'Nguékhokh', + 'Nioro du Rip', + 'Ourossogui', + 'Pikine', + 'Pout', + 'Richard-Toll', + 'Rufisque', + 'Saint-Louis', + 'Sokone', + 'Sébikhotane', + 'Sédhiou', + 'Tambacounda', + 'Thiadiaye', + 'Thiès', + 'Tivaouane', + 'Touba', + 'Vélingara', + 'Ziguinchor', +]; diff --git a/src/locales/fr_SN/location/city_pattern.ts b/src/locales/fr_SN/location/city_pattern.ts new file mode 100644 index 00000000000..ad43b68fc5c --- /dev/null +++ b/src/locales/fr_SN/location/city_pattern.ts @@ -0,0 +1 @@ +export default ['{{location.city_name}}']; diff --git a/src/locales/fr_SN/location/default_country.ts b/src/locales/fr_SN/location/default_country.ts new file mode 100644 index 00000000000..dd6221e0c48 --- /dev/null +++ b/src/locales/fr_SN/location/default_country.ts @@ -0,0 +1 @@ +export default ['Sénégal']; diff --git a/src/locales/fr_SN/location/index.ts b/src/locales/fr_SN/location/index.ts new file mode 100644 index 00000000000..c13e4805f72 --- /dev/null +++ b/src/locales/fr_SN/location/index.ts @@ -0,0 +1,32 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ +import type { LocationDefinition } from '../../..'; +import building_number from './building_number'; +import city_name from './city_name'; +import city_pattern from './city_pattern'; +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_pattern from './street_pattern'; +import street_prefix from './street_prefix'; +import street_suffix from './street_suffix'; + +const location: LocationDefinition = { + building_number, + city_name, + city_pattern, + default_country, + postcode, + secondary_address, + state, + street_address, + street_pattern, + street_prefix, + street_suffix, +}; + +export default location; diff --git a/src/locales/fr_SN/location/postcode.ts b/src/locales/fr_SN/location/postcode.ts new file mode 100644 index 00000000000..db2bcfedae5 --- /dev/null +++ b/src/locales/fr_SN/location/postcode.ts @@ -0,0 +1 @@ +export default ['#####']; diff --git a/src/locales/fr_SN/location/secondary_address.ts b/src/locales/fr_SN/location/secondary_address.ts new file mode 100644 index 00000000000..776ec15169b --- /dev/null +++ b/src/locales/fr_SN/location/secondary_address.ts @@ -0,0 +1 @@ +export default ['Apt. ###', '# étage']; diff --git a/src/locales/fr_SN/location/state.ts b/src/locales/fr_SN/location/state.ts new file mode 100644 index 00000000000..da6aa87a848 --- /dev/null +++ b/src/locales/fr_SN/location/state.ts @@ -0,0 +1,16 @@ +export default [ + 'Dakar', + 'Diourbel', + 'Fatick', + 'Kaffrine', + 'Kaolack', + 'Kolda', + 'Kédougou', + 'Louga', + 'Matam', + 'Saint-Louis', + 'Sédhiou', + 'Tambacounda', + 'Thiès', + 'Ziguinchor', +]; diff --git a/src/locales/fr_SN/location/street_address.ts b/src/locales/fr_SN/location/street_address.ts new file mode 100644 index 00000000000..2e1a661d418 --- /dev/null +++ b/src/locales/fr_SN/location/street_address.ts @@ -0,0 +1,4 @@ +export default { + normal: '{{location.buildingNumber}} {{location.street}}', + full: '{{location.buildingNumber}} {{location.street}} {{location.secondaryAddress}}', +}; diff --git a/src/locales/fr_SN/location/street_pattern.ts b/src/locales/fr_SN/location/street_pattern.ts new file mode 100644 index 00000000000..f62f53f0931 --- /dev/null +++ b/src/locales/fr_SN/location/street_pattern.ts @@ -0,0 +1 @@ +export default ['{{location.street_prefix}} {{location.street_suffix}}']; diff --git a/src/locales/fr_SN/location/street_prefix.ts b/src/locales/fr_SN/location/street_prefix.ts new file mode 100644 index 00000000000..d03abd97564 --- /dev/null +++ b/src/locales/fr_SN/location/street_prefix.ts @@ -0,0 +1,12 @@ +export default [ + 'Allée', + 'Voie', + 'Rue', + 'Avenue', + 'Boulevard', + 'Quai', + 'Place', + 'Échangeur', + 'Résidence', + 'Immeuble', +]; diff --git a/src/locales/fr_SN/location/street_suffix.ts b/src/locales/fr_SN/location/street_suffix.ts new file mode 100644 index 00000000000..5dff1b5a62b --- /dev/null +++ b/src/locales/fr_SN/location/street_suffix.ts @@ -0,0 +1,33 @@ +export default [ + "de l'alternance", + "de l'émergence", + 'Abdou Aziz Sy Dabakh', + 'Amadou Assane Ndoye', + 'Birago Diop', + 'Blaise Diagne', + 'Cheikh Amadou Bamba', + 'Cheikh Anta Diop', + 'Cheikh Seydi El Hadji Malick Sy', + 'Dial Diop', + 'Faidherbe', + 'Galandou Diouf', + 'Houphouët Boigny', + 'Lamine Gueye', + 'Lat Dior', + 'Léopold Sedar Senghor', + 'Neslon Mandela', + 'Saint Michel', + 'St Joseph', + 'Sérigne Fallou Mbacké', + 'Victor Hugo', + 'Wagane Diouf', + 'William Ponty', + 'Yacine Boubou', + 'de Bordeaux', + 'de Contournement Nord', + 'de Nguinth', + 'des Diambars', + 'des Jasmins', + 'du Baol', + 'du Tirailleur', +]; diff --git a/src/locales/fr_SN/metadata.ts b/src/locales/fr_SN/metadata.ts new file mode 100644 index 00000000000..94cf70d498f --- /dev/null +++ b/src/locales/fr_SN/metadata.ts @@ -0,0 +1,13 @@ +import type { PreBuiltMetadataDefinitionForCountry } from '../../definitions/metadata'; + +const metadata: PreBuiltMetadataDefinitionForCountry = { + title: 'French (Senegal)', + code: 'fr_SN', + country: 'SN', + language: 'fr', + endonym: 'Français (Sénégal)', + dir: 'ltr', + script: 'Latn', +}; + +export default metadata; diff --git a/src/locales/fr_SN/person/female_first_name.ts b/src/locales/fr_SN/person/female_first_name.ts new file mode 100644 index 00000000000..fc2a743237a --- /dev/null +++ b/src/locales/fr_SN/person/female_first_name.ts @@ -0,0 +1,81 @@ +export default [ + 'Abibatou', + 'Aby', + 'Adama', + 'Alima', + 'Ami', + 'Amie', + 'Amina', + 'Aminata', + 'Amy', + 'Anna', + 'Arame', + 'Asta', + 'Astou', + 'Atta', + 'Awa', + 'Aïcha', + 'Aïda', + 'Aïssa', + 'Aïssata', + 'Aïssatou', + 'Banna', + 'Bineta', + 'Binta', + 'Bintou', + 'Coumba', + 'Dado', + 'Diarra', + 'Dieynaba', + 'Dior', + 'Elisabeth', + 'Elène', + 'Fanta', + 'Fatim', + 'Fatima', + 'Fatimata', + 'Fatma', + 'Fatou', + 'Fatoumata', + 'Fily', + 'Haby', + 'Hawa', + 'Jeanne', + 'Josephine', + 'Kadiatou', + 'Khadidiatou', + 'Khady', + 'Khoudia', + 'Kiné', + 'Lala', + 'Madeleine', + 'Maguette', + 'Mariama', + 'Marie', + 'Marième', + 'Mary', + 'Marème', + 'Maï', + 'Maïmouna', + 'Néné', + 'Oumou', + 'Paulette', + 'Penda', + 'Rama', + 'Ramata', + 'Ramatoulaye', + 'Rokhaya', + 'Rose', + 'Safiatou', + 'Safiétou', + 'Salimata', + 'Salimatou', + 'Saly', + 'Seynabou', + 'Soda', + 'Sokhna', + 'Sophie', + 'Thérèse', + 'Yacine', + 'Yaya', +]; diff --git a/src/locales/fr_SN/person/first_name.ts b/src/locales/fr_SN/person/first_name.ts new file mode 100644 index 00000000000..3c787970a71 --- /dev/null +++ b/src/locales/fr_SN/person/first_name.ts @@ -0,0 +1,5 @@ +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/fr_SN/person/index.ts b/src/locales/fr_SN/person/index.ts new file mode 100644 index 00000000000..148d05fa360 --- /dev/null +++ b/src/locales/fr_SN/person/index.ts @@ -0,0 +1,22 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ +import type { PersonDefinition } from '../../..'; +import female_first_name from './female_first_name'; +import first_name from './first_name'; +import last_name from './last_name'; +import last_name_pattern from './last_name_pattern'; +import male_first_name from './male_first_name'; +import name_ from './name'; + +const person: PersonDefinition = { + female_first_name, + first_name, + last_name, + last_name_pattern, + male_first_name, + name: name_, +}; + +export default person; diff --git a/src/locales/fr_SN/person/last_name.ts b/src/locales/fr_SN/person/last_name.ts new file mode 100644 index 00000000000..ea5f5ef3b5d --- /dev/null +++ b/src/locales/fr_SN/person/last_name.ts @@ -0,0 +1,150 @@ +export default [ + 'Aïdara', + 'Amar', + 'Anne', + 'Aw', + 'Ba', + 'Babou', + 'Badiane', + 'Badji', + 'Bakhoum', + 'Baldé', + 'Barry', + 'Beye', + 'Biteye', + 'Bodian', + 'Boye', + 'Camara', + 'Ciss', + 'Cisse', + 'Cissokho', + 'Coly', + 'Coulibaly', + 'Dabo', + 'Dembelé', + 'Dème', + 'Dia', + 'Diaby', + 'Diack', + 'Diagne', + 'Diakhaté', + 'Diallo', + 'Diamanka', + 'Diao', + 'Diarra', + 'Diatta', + 'Diattara', + 'Diaw', + 'Diawara', + 'Diédhiou', + 'Diémé', + 'Diène', + 'Dieng', + 'Dieye', + 'Diome', + 'Dione', + 'Diongue', + 'Diop', + 'Diouf', + 'Dioum', + 'Djitté', + 'Dramé', + 'Fall', + 'Faty', + 'Faye', + 'Fofana', + 'Gadiaga', + 'Gassama', + 'Gaye', + 'Gning', + 'Gningue', + 'Gomis', + 'Goudiaby', + 'Gueye', + 'Guissé', + 'Hane', + 'Ka', + 'Kamara', + 'Kandé', + 'Kandji', + 'Kane', + 'Kanté', + 'Kassé', + 'Kébé', + 'Keïta', + 'Khouma', + 'Konaté', + 'Konté', + 'Lam', + 'Leye', + 'Lo', + 'Loum', + 'Ly', + 'Mané', + 'Manga', + 'Mangane', + 'Mar', + 'Mbacké', + 'Mballo', + 'Mbaye', + 'Mbèngue', + 'Mbodj', + 'Mboup', + 'Mbow', + 'Mendy', + 'Ndao', + 'Ndaw', + 'Ndiaye', + 'Ndione', + 'Ndir', + 'Ndong', + 'Ndour', + 'Ndoye', + 'Ngom', + 'Nguèr', + 'Niane', + 'Niang', + 'Niass', + 'Niasse', + 'Pouye', + 'Sabaly', + 'Sadio', + 'Sagna', + 'Sakho', + 'Sall', + 'Samb', + 'Samba', + 'Sambe', + 'Sambou', + 'Sané', + 'Sarr', + 'Seck', + 'Ségnane', + 'Sène', + 'Senghor', + 'Seydi', + 'Seye', + 'Sidibé', + 'Sonko', + 'Souare', + 'Soumaré', + 'Sow', + 'Sy', + 'Sylla', + 'Tall', + 'Tamba', + 'Thiam', + 'Thiao', + 'Thiaw', + 'Thiongane', + 'Thioub', + 'Thioune', + 'Tine', + 'Top', + 'Touré', + 'Traoré', + 'Wade', + 'Wane', + 'Willane', + 'Yade', +]; diff --git a/src/locales/fr_SN/person/last_name_pattern.ts b/src/locales/fr_SN/person/last_name_pattern.ts new file mode 100644 index 00000000000..c66a770f4e3 --- /dev/null +++ b/src/locales/fr_SN/person/last_name_pattern.ts @@ -0,0 +1 @@ +export default [{ value: '{{person.last_name}}', weight: 1 }]; diff --git a/src/locales/fr_SN/person/male_first_name.ts b/src/locales/fr_SN/person/male_first_name.ts new file mode 100644 index 00000000000..295f4a0b495 --- /dev/null +++ b/src/locales/fr_SN/person/male_first_name.ts @@ -0,0 +1,105 @@ +export default [ + 'Abdou', + 'Abdoul', + 'Abdoulaye', + 'Abou', + 'Aboubacar', + 'Adama', + 'Ahmed', + 'Alassane', + 'Aliou', + 'Alioune', + 'Alpha', + 'Aly', + 'Amadou', + 'Amady', + 'Amath', + 'Amdy', + 'Ameth', + 'Antoine', + 'Arona', + 'Baba', + 'Babacar', + 'Bakary', + 'Birane', + 'Bouba', + 'Boubacar', + 'Boubou', + 'Cheikh', + 'Cheikhou', + 'Chekhouna', + 'Cherif', + 'Dame', + 'Daouda', + 'Demba', + 'Djibril', + 'Hamidou', + 'Ibou', + 'Ibra', + 'Ibrahima', + 'Idrissa', + 'Idy', + 'Insa', + 'Ismaïla', + 'Issa', + 'Jean', + 'Joseph', + 'Kalidou', + 'Kéba', + 'Khadim', + 'Khalifa', + 'Lamine', + 'Lassana', + 'Mactar', + 'Mady', + 'Makhtar', + 'Malick', + 'Mama', + 'Mamadou', + 'Mamady', + 'Mamour', + 'Mansour', + 'Massamba', + 'Matar', + 'Mbaye', + 'Médoune', + 'Meïssa', + 'Michel', + 'Moctar', + 'Modou', + 'Mohamadou', + 'Mohamed', + 'Mohammed', + 'Mouhamadou', + 'Mouhamed', + 'Mouhameth', + 'Mouhammadou', + 'Moussa', + 'Moustapha', + 'Omar', + 'Oumar', + 'Ousmane', + 'Pathé', + 'Paul', + 'Pierre', + 'Sada', + 'Sadio', + 'Saèr', + 'Sagar', + 'Salif', + 'Saliou', + 'Samba', + 'Seckou', + 'Sékou', + 'Seydou', + 'Sidy', + 'Siré', + 'Souleymane', + 'Thierno', + 'Tidiane', + 'Waly', + 'Yoro', + 'Youssou', + 'Youssouph', + 'Youssoupha', +]; diff --git a/src/locales/fr_SN/person/name.ts b/src/locales/fr_SN/person/name.ts new file mode 100644 index 00000000000..3ed8a80c86e --- /dev/null +++ b/src/locales/fr_SN/person/name.ts @@ -0,0 +1,3 @@ +export default [ + { value: '{{person.firstName}} {{person.lastName}}', weight: 1 }, +]; diff --git a/src/locales/he/person/index.ts b/src/locales/he/person/index.ts index 05882d87243..9c2d4241aa5 100644 --- a/src/locales/he/person/index.ts +++ b/src/locales/he/person/index.ts @@ -12,7 +12,6 @@ import male_first_name from './male_first_name'; import male_prefix from './male_prefix'; import name_ from './name'; import prefix from './prefix'; -import title from './title'; const person: PersonDefinition = { female_first_name, @@ -24,7 +23,6 @@ const person: PersonDefinition = { male_prefix, name: name_, prefix, - title, }; export default person; diff --git a/src/locales/he/person/title.ts b/src/locales/he/person/title.ts deleted file mode 100644 index 98af89275ef..00000000000 --- a/src/locales/he/person/title.ts +++ /dev/null @@ -1,91 +0,0 @@ -export default { - descriptor: [ - 'Lead', - 'Senior', - 'Direct', - 'Corporate', - 'Dynamic', - 'Future', - 'Product', - 'National', - 'Regional', - 'District', - 'Central', - 'Global', - 'Customer', - 'Investor', - 'International', - 'Legacy', - 'Forward', - 'Internal', - 'Human', - 'Chief', - 'Principal', - ], - level: [ - 'Solutions', - 'Program', - 'Brand', - 'Security', - 'Research', - 'Marketing', - 'Directives', - 'Implementation', - 'Integration', - 'Functionality', - 'Response', - 'Paradigm', - 'Tactics', - 'Identity', - 'Markets', - 'Group', - 'Division', - 'Applications', - 'Optimization', - 'Operations', - 'Infrastructure', - 'Intranet', - 'Communications', - 'Web', - 'Branding', - 'Quality', - 'Assurance', - 'Mobility', - 'Accounts', - 'Data', - 'Creative', - 'Configuration', - 'Accountability', - 'Interactions', - 'Factors', - 'Usability', - 'Metrics', - ], - job: [ - 'Supervisor', - 'Associate', - 'Executive', - 'Liaison', - 'Officer', - 'Manager', - 'Engineer', - 'Specialist', - 'Director', - 'Coordinator', - 'Administrator', - 'Architect', - 'Analyst', - 'Designer', - 'Planner', - 'Orchestrator', - 'Technician', - 'Developer', - 'Producer', - 'Consultant', - 'Assistant', - 'Facilitator', - 'Agent', - 'Representative', - 'Strategist', - ], -}; diff --git a/src/locales/index.ts b/src/locales/index.ts index 04109822e84..3ca1c0e2e93 100644 --- a/src/locales/index.ts +++ b/src/locales/index.ts @@ -37,6 +37,7 @@ export { default as fr_BE } from './fr_BE'; export { default as fr_CA } from './fr_CA'; export { default as fr_CH } from './fr_CH'; export { default as fr_LU } from './fr_LU'; +export { default as fr_SN } from './fr_SN'; export { default as he } from './he'; export { default as hr } from './hr'; export { default as hu } from './hu'; diff --git a/src/locales/pl/person/index.ts b/src/locales/pl/person/index.ts index 788b53ff3f8..3ce4c67ddc8 100644 --- a/src/locales/pl/person/index.ts +++ b/src/locales/pl/person/index.ts @@ -14,7 +14,6 @@ import male_prefix from './male_prefix'; import name_ from './name'; import prefix from './prefix'; import sex from './sex'; -import title from './title'; const person: PersonDefinition = { female_first_name, @@ -28,7 +27,6 @@ const person: PersonDefinition = { name: name_, prefix, sex, - title, }; export default person; diff --git a/src/locales/pl/person/title.ts b/src/locales/pl/person/title.ts deleted file mode 100644 index 98af89275ef..00000000000 --- a/src/locales/pl/person/title.ts +++ /dev/null @@ -1,91 +0,0 @@ -export default { - descriptor: [ - 'Lead', - 'Senior', - 'Direct', - 'Corporate', - 'Dynamic', - 'Future', - 'Product', - 'National', - 'Regional', - 'District', - 'Central', - 'Global', - 'Customer', - 'Investor', - 'International', - 'Legacy', - 'Forward', - 'Internal', - 'Human', - 'Chief', - 'Principal', - ], - level: [ - 'Solutions', - 'Program', - 'Brand', - 'Security', - 'Research', - 'Marketing', - 'Directives', - 'Implementation', - 'Integration', - 'Functionality', - 'Response', - 'Paradigm', - 'Tactics', - 'Identity', - 'Markets', - 'Group', - 'Division', - 'Applications', - 'Optimization', - 'Operations', - 'Infrastructure', - 'Intranet', - 'Communications', - 'Web', - 'Branding', - 'Quality', - 'Assurance', - 'Mobility', - 'Accounts', - 'Data', - 'Creative', - 'Configuration', - 'Accountability', - 'Interactions', - 'Factors', - 'Usability', - 'Metrics', - ], - job: [ - 'Supervisor', - 'Associate', - 'Executive', - 'Liaison', - 'Officer', - 'Manager', - 'Engineer', - 'Specialist', - 'Director', - 'Coordinator', - 'Administrator', - 'Architect', - 'Analyst', - 'Designer', - 'Planner', - 'Orchestrator', - 'Technician', - 'Developer', - 'Producer', - 'Consultant', - 'Assistant', - 'Facilitator', - 'Agent', - 'Representative', - 'Strategist', - ], -}; diff --git a/src/locales/sk/person/index.ts b/src/locales/sk/person/index.ts index d839b4e1be1..64c89b1124f 100644 --- a/src/locales/sk/person/index.ts +++ b/src/locales/sk/person/index.ts @@ -15,7 +15,6 @@ import male_prefix from './male_prefix'; import name_ from './name'; import prefix from './prefix'; import suffix from './suffix'; -import title from './title'; const person: PersonDefinition = { female_first_name, @@ -30,7 +29,6 @@ const person: PersonDefinition = { name: name_, prefix, suffix, - title, }; export default person; diff --git a/src/locales/sk/person/title.ts b/src/locales/sk/person/title.ts deleted file mode 100644 index 98af89275ef..00000000000 --- a/src/locales/sk/person/title.ts +++ /dev/null @@ -1,91 +0,0 @@ -export default { - descriptor: [ - 'Lead', - 'Senior', - 'Direct', - 'Corporate', - 'Dynamic', - 'Future', - 'Product', - 'National', - 'Regional', - 'District', - 'Central', - 'Global', - 'Customer', - 'Investor', - 'International', - 'Legacy', - 'Forward', - 'Internal', - 'Human', - 'Chief', - 'Principal', - ], - level: [ - 'Solutions', - 'Program', - 'Brand', - 'Security', - 'Research', - 'Marketing', - 'Directives', - 'Implementation', - 'Integration', - 'Functionality', - 'Response', - 'Paradigm', - 'Tactics', - 'Identity', - 'Markets', - 'Group', - 'Division', - 'Applications', - 'Optimization', - 'Operations', - 'Infrastructure', - 'Intranet', - 'Communications', - 'Web', - 'Branding', - 'Quality', - 'Assurance', - 'Mobility', - 'Accounts', - 'Data', - 'Creative', - 'Configuration', - 'Accountability', - 'Interactions', - 'Factors', - 'Usability', - 'Metrics', - ], - job: [ - 'Supervisor', - 'Associate', - 'Executive', - 'Liaison', - 'Officer', - 'Manager', - 'Engineer', - 'Specialist', - 'Director', - 'Coordinator', - 'Administrator', - 'Architect', - 'Analyst', - 'Designer', - 'Planner', - 'Orchestrator', - 'Technician', - 'Developer', - 'Producer', - 'Consultant', - 'Assistant', - 'Facilitator', - 'Agent', - 'Representative', - 'Strategist', - ], -}; diff --git a/src/locales/sv/phone_number/formats.ts b/src/locales/sv/phone_number/formats.ts index 8b3dd93366f..b8d99e4677c 100644 --- a/src/locales/sv/phone_number/formats.ts +++ b/src/locales/sv/phone_number/formats.ts @@ -1 +1,31 @@ -export default ['####-#####', '####-######']; +export default [ + // mobile + '070#######', + '+4670#######', + '072#######', + '+4672#######', + '073#######', + '+4673#######', + '076#######', + '+4676#######', + '079#######', + '+4679#######', + + // landline + '01#####', + '+461#####', + '02######', + '+462######', + '03#######', + '+463#######', + '04########', + '+464########', + '05#####', + '+465#####', + '06######', + '+466######', + '08#######', + '+468#######', + '09########', + '+469########', +]; diff --git a/src/locales/zh_CN/airline/airline.ts b/src/locales/zh_CN/airline/airline.ts index 9ffcc7ea32b..0105f88a000 100644 --- a/src/locales/zh_CN/airline/airline.ts +++ b/src/locales/zh_CN/airline/airline.ts @@ -1,8 +1,8 @@ export default [ { name: '爱琴海航空公司', iataCode: 'A3' }, { name: '俄罗斯航空公司', iataCode: 'SU' }, - { name: '阿根廷航空', iataCode: 'AR' }, - { name: '墨西哥国际航空', iataCode: 'AM' }, + { name: '阿根廷航空公司', iataCode: 'AR' }, + { name: '墨西哥国际航空公司', iataCode: 'AM' }, { name: '阿尔及利亚航空公司', iataCode: 'AH' }, { name: '阿拉伯航空公司', iataCode: 'G9' }, { name: '加拿大航空公司', iataCode: 'AC' }, @@ -27,7 +27,7 @@ export default [ { name: '韩亚航空公司', iataCode: 'OZ' }, { name: '哥伦比亚航空公司', iataCode: 'AV' }, { name: '巴西蔚蓝航空公司', iataCode: 'AD' }, - { name: '蓝色航空', iataCode: 'ZF' }, + { name: '蓝色航空公司', iataCode: 'ZF' }, { name: '北京首都航空公司', iataCode: 'JD' }, { name: '玻利维亚航空公司', iataCode: 'OB' }, { name: '英国航空公司', iataCode: 'BA' }, diff --git a/src/modules/airline/index.ts b/src/modules/airline/index.ts index f6d2fdc7cea..e8ac47c58c2 100644 --- a/src/modules/airline/index.ts +++ b/src/modules/airline/index.ts @@ -4,8 +4,7 @@ * responsible for setting standards relating to many aspects of airline * operations. */ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; export enum Aircraft { Narrowbody = 'narrowbody', @@ -78,11 +77,7 @@ const aircraftTypeSeats: Record = { * * - To generate sample passenger data, you can use the methods of the [`faker.person`](https://fakerjs.dev/api/person.html) module. */ -export class AirlineModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class AirlineModule extends ModuleBase { /** * Generates a random airport. * @@ -130,7 +125,7 @@ export class AirlineModule { * are used by airlines to identify reservations. They're also known as booking reference numbers, * locator codes, confirmation codes, or reservation codes. * - * @param options The options to use. Defaults to `{}`. + * @param options The options to use. * @param options.allowNumerics Whether to allow numeric characters. Defaults to `false`. * @param options.allowVisuallySimilarCharacters Whether to allow visually similar characters such as '1' and 'I'. Defaults to `false`. * @@ -160,7 +155,7 @@ export class AirlineModule { ): string { const { allowNumerics = false, allowVisuallySimilarCharacters = false } = options; - const excludedChars = []; + const excludedChars: string[] = []; if (!allowNumerics) { excludedChars.push(...numerics); } @@ -179,7 +174,7 @@ export class AirlineModule { /** * Generates a random seat. * - * @param options The options to use. Defaults to `{}`. + * @param options The options to use. * @param options.aircraftType The aircraft type. Can be one of `narrowbody`, `regional`, `widebody`. Defaults to `narrowbody`. * * @example @@ -230,7 +225,7 @@ export class AirlineModule { * `${faker.airline.airline().iataCode}${faker.airline.flightNumber({ addLeadingZeros: true })}` // 'AA0798' * ``` * - * @param options The options to use. Defaults to `{}`. + * @param options The options to use. * @param options.length The number or range of digits to generate. Defaults to `{ min: 1, max: 4 }`. * @param options.addLeadingZeros Whether to pad the flight number up to 4 digits with leading zeros. Defaults to `false`. * diff --git a/src/modules/animal/index.ts b/src/modules/animal/index.ts index 09d7f9e167a..7e5a51da4ad 100644 --- a/src/modules/animal/index.ts +++ b/src/modules/animal/index.ts @@ -1,5 +1,4 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; /** * Module to generate animal related entries. @@ -12,11 +11,7 @@ import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-fu * * All values may be localized. */ -export class AnimalModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class AnimalModule extends ModuleBase { /** * Returns a random dog breed. * diff --git a/src/modules/color/index.ts b/src/modules/color/index.ts index 5855cd862e3..a9b39377668 100644 --- a/src/modules/color/index.ts +++ b/src/modules/color/index.ts @@ -1,5 +1,4 @@ -import type { Faker } from '../../faker'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; /** * Color space names supported by CSS. @@ -48,27 +47,31 @@ export type Casing = 'lower' | 'upper' | 'mixed'; * * @param hexColor Hex color string to be formatted. * @param options Options object. - * @param options.prefix Prefix of the generated hex color. Defaults to `'0x'`. - * @param options.casing Letter type case of the generated hex color. Defaults to `'mixed'`. + * @param options.prefix Prefix of the generated hex color. + * @param options.casing Letter type case of the generated hex color. */ function formatHexColor( hexColor: string, - options?: { - prefix?: string; - casing?: Casing; + options: { + prefix: string; + casing: Casing; } ): string { - switch (options?.casing) { + const { prefix, casing } = options; + + switch (casing) { case 'upper': hexColor = hexColor.toUpperCase(); break; case 'lower': hexColor = hexColor.toLowerCase(); break; + case 'mixed': + // Do nothing } - if (options?.prefix) { - hexColor = options.prefix + hexColor; + if (prefix) { + hexColor = prefix + hexColor; } return hexColor; @@ -157,6 +160,7 @@ function toColorFormat( return toCSS(values, cssFunction, space); case 'binary': return toBinary(values); + case 'decimal': default: return values; } @@ -171,11 +175,7 @@ function toColorFormat( * * For a hex color like `#ff0000` used in HTML/CSS, use [`rgb()`](https://fakerjs.dev/api/color.html#rgb). There are also methods for other color formats such as [`hsl()`](https://fakerjs.dev/api/color.html#hsl), [`cmyk()`](https://fakerjs.dev/api/color.html#cmyk), [`hwb()`](https://fakerjs.dev/api/color.html#hwb), [`lab()`](https://fakerjs.dev/api/color.html#lab), and [`lch()`](https://fakerjs.dev/api/color.html#lch). */ -export class ColorModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class ColorModule extends ModuleBase { /** * Returns a random human-readable color name. * @@ -362,19 +362,20 @@ export class ColorModule { */ includeAlpha?: boolean; }): string | number[]; - rgb(options?: { - prefix?: string; - casing?: Casing; - format?: 'hex' | ColorFormat; - includeAlpha?: boolean; - }): string | number[] { + rgb( + options: { + prefix?: string; + casing?: Casing; + format?: 'hex' | ColorFormat; + includeAlpha?: boolean; + } = {} + ): string | number[] { const { format = 'hex', includeAlpha = false, prefix = '#', casing = 'lower', - } = options || {}; - options = { format, includeAlpha, prefix, casing }; + } = options; let color: string | number[]; let cssFunction: CssFunctionType = 'rgb'; if (format === 'hex') { @@ -382,13 +383,13 @@ export class ColorModule { length: includeAlpha ? 8 : 6, prefix: '', }); - color = formatHexColor(color, options); + color = formatHexColor(color, { prefix, casing }); return color; } color = Array.from({ length: 3 }, () => this.faker.number.int(255)); if (includeAlpha) { - color.push(this.faker.number.float({ precision: 0.01 })); + color.push(this.faker.number.float({ multipleOf: 0.01 })); cssFunction = 'rgba'; } @@ -469,7 +470,7 @@ export class ColorModule { }): string | number[]; cmyk(options?: { format?: ColorFormat }): string | number[] { const color: string | number[] = Array.from({ length: 4 }, () => - this.faker.number.float({ precision: 0.01 }) + this.faker.number.float({ multipleOf: 0.01 }) ); return toColorFormat(color, options?.format || 'decimal', 'cmyk'); } @@ -579,7 +580,7 @@ export class ColorModule { }): string | number[] { const hsl: number[] = [this.faker.number.int(360)]; for (let i = 0; i < (options?.includeAlpha ? 3 : 2); i++) { - hsl.push(this.faker.number.float({ precision: 0.01 })); + hsl.push(this.faker.number.float({ multipleOf: 0.01 })); } return toColorFormat( @@ -685,7 +686,7 @@ export class ColorModule { }): string | number[] { const hsl: number[] = [this.faker.number.int(360)]; for (let i = 0; i < 2; i++) { - hsl.push(this.faker.number.float({ precision: 0.01 })); + hsl.push(this.faker.number.float({ multipleOf: 0.01 })); } return toColorFormat(hsl, options?.format || 'decimal', 'hwb'); @@ -764,10 +765,10 @@ export class ColorModule { format?: ColorFormat; }): string | number[]; lab(options?: { format?: ColorFormat }): string | number[] { - const lab = [this.faker.number.float({ precision: 0.000001 })]; + const lab = [this.faker.number.float({ multipleOf: 0.000001 })]; for (let i = 0; i < 2; i++) { lab.push( - this.faker.number.float({ min: -100, max: 100, precision: 0.0001 }) + this.faker.number.float({ min: -100, max: 100, multipleOf: 0.0001 }) ); } @@ -859,9 +860,9 @@ export class ColorModule { format?: ColorFormat; }): string | number[]; lch(options?: { format?: ColorFormat }): string | number[] { - const lch = [this.faker.number.float({ precision: 0.000001 })]; + const lch = [this.faker.number.float({ multipleOf: 0.000001 })]; for (let i = 0; i < 2; i++) { - lch.push(this.faker.number.float({ max: 230, precision: 0.1 })); + lch.push(this.faker.number.float({ max: 230, multipleOf: 0.1 })); } return toColorFormat(lch, options?.format || 'decimal', 'lch'); @@ -969,7 +970,7 @@ export class ColorModule { } const color = Array.from({ length: 3 }, () => - this.faker.number.float({ precision: 0.0001 }) + this.faker.number.float({ multipleOf: 0.0001 }) ); return toColorFormat( color, diff --git a/src/modules/commerce/index.ts b/src/modules/commerce/index.ts index 18147dcb2e8..6750299bafc 100644 --- a/src/modules/commerce/index.ts +++ b/src/modules/commerce/index.ts @@ -1,6 +1,6 @@ -import type { Faker } from '../../faker'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { FakerError } from '../../errors/faker-error'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; // Source for official prefixes: https://www.isbn-international.org/range_file_generation const ISBN_LENGTH_RULES: Record< @@ -86,11 +86,7 @@ const ISBN_LENGTH_RULES: Record< * * You can also create a price using [`price()`](https://fakerjs.dev/api/commerce.html#price). */ -export class CommerceModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class CommerceModule extends ModuleBase { /** * Returns a department inside a shop. * @@ -120,7 +116,7 @@ export class CommerceModule { /** * Generates a price between min and max (inclusive). * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.min The minimum price. Defaults to `1`. * @param options.max The maximum price. Defaults to `1000`. * @param options.dec The number of decimal places. Defaults to `2`. @@ -184,7 +180,7 @@ export class CommerceModule { /** * Generates a price between min and max (inclusive). * - * @param options The minimum price or on options object. Defaults to `{}`. + * @param options The minimum price or on options object. * @param options.min The minimum price. Defaults to `1`. * @param options.max The maximum price. Defaults to `1000`. * @param options.dec The number of decimal places. Defaults to `2`. @@ -206,9 +202,29 @@ export class CommerceModule { options?: | number | { + /** + * The minimum price. + * + * @default 1 + */ min?: number; + /** + * The maximum price. + * + * @default 1000 + */ max?: number; + /** + * The number of decimal places. + * + * @default 2 + */ dec?: number; + /** + * The currency value to use. + * + * @default '' + */ symbol?: string; }, legacyMax?: number, @@ -218,7 +234,7 @@ export class CommerceModule { /** * Generates a price between min and max (inclusive). * - * @param options The minimum price or on options object. Defaults to `{}`. + * @param options The minimum price or on options object. * @param options.min The minimum price. Defaults to `1`. * @param options.max The maximum price. Defaults to `1000`. * @param options.dec The number of decimal places. Defaults to `2`. @@ -267,7 +283,7 @@ export class CommerceModule { const { dec = 2, max = 1000, min = 1, symbol = '' } = options; if (min < 0 || max < 0) { - return `${symbol}${0.0}`; + return `${symbol}0`; } // TODO @Shinigami92 2022-11-24: https://github.com/faker-js/faker/issues/350 @@ -335,7 +351,7 @@ export class CommerceModule { /** * Returns a random [ISBN](https://en.wikipedia.org/wiki/ISBN) identifier. * - * @param options The variant to return or an options object. Defaults to `{}`. + * @param options The variant to return or an options object. * @param options.variant The variant to return. Can be either `10` (10-digit format) * or `13` (13-digit format). Defaults to `13`. * @param options.separator The separator to use in the format. Defaults to `'-'`. @@ -386,7 +402,14 @@ export class CommerceModule { const registrantLength = groupRules.find( ([rangeMaximum]) => elementValue <= rangeMaximum - )[1]; + )?.[1]; + + if (!registrantLength) { + // This can only happen if the ISBN_LENGTH_RULES are corrupted + throw new FakerError( + `Unable to find a registrant length for the group ${group}` + ); + } const registrant = element.slice(0, registrantLength); const publication = element.slice(registrantLength); diff --git a/src/modules/company/index.ts b/src/modules/company/index.ts index 361449618c0..e0f79e622f8 100644 --- a/src/modules/company/index.ts +++ b/src/modules/company/index.ts @@ -1,6 +1,5 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; /** * Module to generate company related entries. @@ -16,15 +15,11 @@ import { deprecated } from '../../internal/deprecated'; * - For products and commerce, use [`faker.commerce`](https://fakerjs.dev/api/commerce.html). * - For finance-related entries, use [`faker.finance`](https://fakerjs.dev/api/finance.html). */ -export class CompanyModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class CompanyModule extends ModuleBase { /** * Returns an array with possible company name suffixes. * - * @see faker.company.name() + * @see faker.company.name(): For generating a complete company name. * * @example * faker.company.suffixes() // [ 'Inc', 'and Sons', 'LLC', 'Group' ] @@ -60,7 +55,7 @@ export class CompanyModule { /** * Returns a random company suffix. * - * @see faker.company.name() + * @see faker.company.name(): For generating a complete company name. * * @example * faker.company.companySuffix() // 'and Sons' diff --git a/src/modules/database/index.ts b/src/modules/database/index.ts index 6015cfa2160..6c3595cc4fc 100644 --- a/src/modules/database/index.ts +++ b/src/modules/database/index.ts @@ -1,5 +1,4 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; /** * Module to generate database related entries. @@ -10,11 +9,7 @@ import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-fu * * For the NoSQL database MongoDB, [`mongodbObjectId()`](https://fakerjs.dev/api/database.html#mongodbobjectid) provides a random ID. */ -export class DatabaseModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class DatabaseModule extends ModuleBase { /** * Returns a random database column name. * diff --git a/src/modules/datatype/index.ts b/src/modules/datatype/index.ts index 4043d6c5433..daec9640dca 100644 --- a/src/modules/datatype/index.ts +++ b/src/modules/datatype/index.ts @@ -1,6 +1,5 @@ -import type { SimpleFaker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { SimpleModuleBase } from '../../internal/module-base'; /** * Module to generate various primitive values and data types. @@ -11,24 +10,21 @@ import { deprecated } from '../../internal/deprecated'; * * For a simple random true or false value, use [`boolean()`](https://fakerjs.dev/api/datatype.html#boolean). */ -export class DatatypeModule { - constructor(private readonly faker: SimpleFaker) { - bindThisToMemberFunctions(this); - } - +export class DatatypeModule extends SimpleModuleBase { /** * Returns a single random number between zero and the given max value or the given range with the specified precision. * The bounds are inclusive. * - * @param options Maximum value or options object. + * @param options Maximum value or options object. Defaults to `99999`. * @param options.min Lower bound for generated number. Defaults to `0`. * @param options.max Upper bound for generated number. Defaults to `min + 99999`. * @param options.precision Precision of the generated number. Defaults to `1`. * - * @throws When options define `max < min`. + * @throws When `min` is greater than `max`. + * @throws When `precision` is negative. * - * @see faker.number.int() for the default precision of `1` - * @see faker.number.float() for a custom precision + * @see faker.number.int(): For generating a random integer. + * @see faker.number.float(): For generating a random floating-point number. * * @example * faker.datatype.number() // 55422 @@ -79,7 +75,7 @@ export class DatatypeModule { const { min = 0, max = min + 99999, precision = 1 } = options; - return this.faker.number.float({ min, max, precision }); + return this.faker.number.float({ min, max, multipleOf: precision }); } /** @@ -90,7 +86,10 @@ export class DatatypeModule { * @param options.max Upper bound for generated number. Defaults to `min + 99999`. * @param options.precision Precision of the generated number. Defaults to `0.01`. * - * @see faker.number.float() + * @throws When `min` is greater than `max`. + * @throws When `precision` is negative. + * + * @see faker.number.float(): For the replacement method. * * @example * faker.datatype.float() // 51696.36 @@ -143,7 +142,7 @@ export class DatatypeModule { const { min = 0, max = min + 99999, precision = 0.01 } = options; - return this.faker.number.float({ min, max, precision }); + return this.faker.number.float({ min, max, multipleOf: precision }); } /** @@ -158,8 +157,8 @@ export class DatatypeModule { * When not provided or larger than `8640000000000000`, `2100-01-01` is considered * as maximum generated date. Defaults to `4102444800000`. * - * @see faker.date.anytime() - * @see faker.date.between() + * @see faker.date.anytime(): For generating a random date in either the past or future. + * @see faker.date.between(): For generating a random date in between two dates. * * @example * faker.datatype.datetime() // '2089-04-17T18:03:24.956Z' @@ -218,10 +217,10 @@ export class DatatypeModule { /** * Returns a string containing UTF-16 chars between 33 and 125 (`!` to `}`). * - * @param options Length of the generated string or an options object. Defaults to `{}`. + * @param options Length of the generated string or an options object. * @param options.length Length of the generated string. Max length is `2^20`. Defaults to `10`. * - * @see faker.string.sample() + * @see faker.string.sample(): For the replacement method. * * @example * faker.datatype.string() // 'Zo!.:*e>wR' @@ -262,7 +261,7 @@ export class DatatypeModule { /** * Returns a UUID v4 ([Universally Unique Identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier)). * - * @see faker.string.uuid() + * @see faker.string.uuid(): For the replacement method. * * @example * faker.datatype.uuid() // '4136cd0b-d90b-4af7-b485-5d1ded8db252' @@ -290,7 +289,7 @@ export class DatatypeModule { * If the probability is `>= 1.0`, it will always return `true`. * The probability is limited to two decimal places. * - * @param options The optional options object or the probability (`[0.00, 1.00]`) of returning `true`. Defaults to `0.5`. + * @param options The optional options object or the probability (`[0.00, 1.00]`) of returning `true`. * @param options.probability The probability (`[0.00, 1.00]`) of returning `true`. Defaults to `0.5`. * * @example @@ -339,7 +338,8 @@ export class DatatypeModule { * @param options.prefix Prefix for the generated number. Defaults to `'0x'`. * @param options.case Case of the generated number. Defaults to `'mixed'`. * - * @see faker.string.hexadecimal() + * @see faker.string.hexadecimal(): For generating a random hexadecimal string. + * @see faker.number.hex(): For generating a random hexadecimal number. * * @example * faker.datatype.hexadecimal() // '0xB' @@ -469,7 +469,7 @@ export class DatatypeModule { * * @throws When options define `max < min`. * - * @see faker.number.bigInt() + * @see faker.number.bigInt(): For the replacement method. * * @example * faker.datatype.bigInt() // 55422n diff --git a/src/modules/date/index.ts b/src/modules/date/index.ts index 3ad5f438383..9b96e704079 100644 --- a/src/modules/date/index.ts +++ b/src/modules/date/index.ts @@ -1,8 +1,9 @@ -import type { Faker, SimpleFaker } from '../..'; +import type { Faker } from '../..'; import type { DateEntryDefinition } from '../../definitions'; import { FakerError } from '../../errors/faker-error'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { SimpleModuleBase } from '../../internal/module-base'; +import { assertLocaleData } from '../../locale-proxy'; /** * Converts date passed as a string, number or Date to a Date object. @@ -15,6 +16,10 @@ function toDate( date: string | Date | number | undefined, fallback: () => Date ): Date { + if (date == null) { + return fallback(); + } + date = new Date(date); if (Number.isNaN(date.valueOf())) { date = fallback(); @@ -26,20 +31,16 @@ function toDate( /** * Module to generate dates (without methods requiring localized data). */ -export class SimpleDateModule { - constructor(protected readonly faker: SimpleFaker) { - bindThisToMemberFunctions(this); - } - +export class SimpleDateModule extends SimpleModuleBase { /** * Generates a random date that can be either in the past or in the future. * * @param options The optional options object. * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * - * @see faker.date.between() For dates in a specific range. - * @see faker.date.past() For dates explicitly in the past. - * @see faker.date.future() For dates explicitly in the future. + * @see faker.date.between(): For generating dates in a specific range. + * @see faker.date.past(): For generating dates explicitly in the past. + * @see faker.date.future(): For generating dates explicitly in the future. * * @example * faker.date.anytime() // '2022-07-31T01:33:29.567Z' @@ -73,7 +74,7 @@ export class SimpleDateModule { * @param options.years The range of years the date may be in the past. Defaults to `1`. * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * - * @see faker.date.recent() + * @see faker.date.recent(): For generating dates in the recent past (days instead of years). * * @example * faker.date.past() // '2021-12-03T05:40:44.408Z' @@ -102,7 +103,7 @@ export class SimpleDateModule { * @param years The range of years the date may be in the past. Defaults to `1`. * @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * - * @see faker.date.recent() + * @see faker.date.recent(): For generating dates in the recent past (days instead of years). * * @example * faker.date.past() // '2021-12-03T05:40:44.408Z' @@ -122,7 +123,7 @@ export class SimpleDateModule { * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * @param legacyRefDate Deprecated, use `options.refDate` instead. * - * @see faker.date.recent() + * @see faker.date.recent(): For generating dates in the recent past (days instead of years). * * @example * faker.date.past() // '2021-12-03T05:40:44.408Z' @@ -195,7 +196,7 @@ export class SimpleDateModule { * @param options.years The range of years the date may be in the future. Defaults to `1`. * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * - * @see faker.date.soon() + * @see faker.date.soon(): For generating dates in the near future (days instead of years). * * @example * faker.date.future() // '2022-11-19T05:52:49.100Z' @@ -224,7 +225,7 @@ export class SimpleDateModule { * @param years The range of years the date may be in the future. Defaults to `1`. * @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * - * @see faker.date.soon() + * @see faker.date.soon(): For generating dates in the near future (days instead of years). * * @example * faker.date.future() // '2022-11-19T05:52:49.100Z' @@ -244,7 +245,7 @@ export class SimpleDateModule { * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * @param legacyRefDate Deprecated, use `options.refDate` instead. * - * @see faker.date.soon() + * @see faker.date.soon(): For generating dates in the near future (days instead of years). * * @example * faker.date.future() // '2022-11-19T05:52:49.100Z' @@ -387,14 +388,15 @@ export class SimpleDateModule { }, legacyTo?: string | Date | number ): Date { - if (typeof options !== 'object' || options instanceof Date) { + if (options instanceof Date || typeof options !== 'object') { deprecated({ deprecated: 'faker.date.between(from, to)', proposed: 'faker.date.between({ from, to })', since: '8.0', until: '9.0', }); - options = { from: options, to: legacyTo }; + // We use options as fallback for legacyTo avoid TS errors for unintended usage. + options = { from: options, to: legacyTo ?? options }; } const { from, to } = options; @@ -495,7 +497,7 @@ export class SimpleDateModule { * @param options.to The late date boundary. * @param options.count The number of dates to generate. Defaults to `3`. * @param legacyTo Deprecated, use `options.to` instead. - * @param legacyCount Deprecated, use `options.count` instead. + * @param legacyCount Deprecated, use `options.count` instead. Defaults to `3`. * * @example * faker.date.betweens({ from: '2020-01-01T00:00:00.000Z', to: '2030-01-01T00:00:00.000Z' }) @@ -563,14 +565,15 @@ export class SimpleDateModule { legacyTo?: string | Date | number, legacyCount: number = 3 ): Date[] { - if (typeof options !== 'object' || options instanceof Date) { + if (options instanceof Date || typeof options !== 'object') { deprecated({ deprecated: 'faker.date.betweens(from, to, count)', proposed: 'faker.date.betweens({ from, to, count })', since: '8.0', until: '9.0', }); - options = { from: options, to: legacyTo, count: legacyCount }; + // We use options as fallback for legacyTo avoid TS errors for unintended usage. + options = { from: options, to: legacyTo ?? options, count: legacyCount }; } const { from, to, count = 3 } = options; @@ -587,7 +590,7 @@ export class SimpleDateModule { * @param options.days The range of days the date may be in the past. Defaults to `1`. * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * - * @see faker.date.past() + * @see faker.date.past(): For generating dates further back in time (years instead of days). * * @example * faker.date.recent() // '2022-02-04T02:09:35.077Z' @@ -616,7 +619,7 @@ export class SimpleDateModule { * @param days The range of days the date may be in the past. Defaults to `1`. * @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * - * @see faker.date.past() + * @see faker.date.past(): For generating dates further back in time (years instead of days). * * @example * faker.date.recent() // '2022-02-04T02:09:35.077Z' @@ -636,7 +639,7 @@ export class SimpleDateModule { * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * @param legacyRefDate Deprecated, use `options.refDate` instead. * - * @see faker.date.past() + * @see faker.date.past(): For generating dates further back in time (years instead of days). * * @example * faker.date.recent() // '2022-02-04T02:09:35.077Z' @@ -704,7 +707,7 @@ export class SimpleDateModule { * @param options.days The range of days the date may be in the future. Defaults to `1`. * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * - * @see faker.date.future() + * @see faker.date.future(): For generating dates further in the future (years instead of days). * * @example * faker.date.soon() // '2022-02-05T09:55:39.216Z' @@ -733,7 +736,7 @@ export class SimpleDateModule { * @param days The range of days the date may be in the future. Defaults to `1`. * @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * - * @see faker.date.future() + * @see faker.date.future(): For generating dates further in the future (years instead of days). * * @example * faker.date.soon() // '2022-02-05T09:55:39.216Z' @@ -753,7 +756,7 @@ export class SimpleDateModule { * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * @param legacyRefDate Deprecated, use `options.refDate` instead. * - * @see faker.date.future() + * @see faker.date.future(): For generating dates further in the future (years instead of days). * * @example * faker.date.soon() // '2022-02-05T09:55:39.216Z' @@ -868,12 +871,6 @@ export class SimpleDateModule { refDate?: string | Date | number; } = {} ): Date { - if (options.max < options.min) { - throw new FakerError( - `Max ${options.max} should be larger than or equal to min ${options.min}.` - ); - } - const mode = options.mode === 'age' ? 'age' : 'year'; const refDate = toDate(options.refDate, this.faker.defaultRefDate); const refYear = refDate.getUTCFullYear(); @@ -894,7 +891,13 @@ export class SimpleDateModule { options.min ?? refYear - 80 ); max = new Date(Date.UTC(0, 11, 30)).setUTCFullYear( - options.max ?? refYear - 18 + options.max ?? refYear - 19 + ); + } + + if (max < min) { + throw new FakerError( + `Max ${options.max} should be larger than or equal to min ${options.min}.` ); } @@ -1078,12 +1081,8 @@ export class DateModule extends SimpleDateModule { context?: boolean; } = {} ): string { - const { - // eslint-disable-next-line deprecation/deprecation - abbr, - abbreviated = abbr ?? false, - context = false, - } = options; + // eslint-disable-next-line deprecation/deprecation + const { abbr, abbreviated = abbr ?? false, context = false } = options; if (abbr != null) { deprecated({ @@ -1104,7 +1103,9 @@ export class DateModule extends SimpleDateModule { type = useContext ? 'wide_context' : 'wide'; } - return this.faker.helpers.arrayElement(source[type]); + const values = source[type]; + assertLocaleData(values, 'date.month', type); + return this.faker.helpers.arrayElement(values); } /** @@ -1264,12 +1265,8 @@ export class DateModule extends SimpleDateModule { context?: boolean; } = {} ): string { - const { - // eslint-disable-next-line deprecation/deprecation - abbr, - abbreviated = abbr ?? false, - context = false, - } = options; + // eslint-disable-next-line deprecation/deprecation + const { abbr, abbreviated = abbr ?? false, context = false } = options; if (abbr != null) { deprecated({ @@ -1290,6 +1287,8 @@ export class DateModule extends SimpleDateModule { type = useContext ? 'wide_context' : 'wide'; } - return this.faker.helpers.arrayElement(source[type]); + const values = source[type]; + assertLocaleData(values, 'date.weekday', type); + return this.faker.helpers.arrayElement(values); } } diff --git a/src/modules/finance/iban.ts b/src/modules/finance/iban.ts index f37bc7f4cab..d639404cf9d 100644 --- a/src/modules/finance/iban.ts +++ b/src/modules/finance/iban.ts @@ -1133,7 +1133,7 @@ const iban: Iban = { total: 24, bban: [ { - type: 'c', + type: 'a', count: 4, }, { @@ -1408,7 +1408,7 @@ const iban: Iban = { pattern100: ['001', '002', '003', '004', '005', '006', '007', '008', '009'], toDigitString: (str) => str.replace(/[A-Z]/gi, (match) => - String(match.toUpperCase().charCodeAt(0) - 55) + String((match.toUpperCase().codePointAt(0) ?? Number.NaN) - 55) ), }; diff --git a/src/modules/finance/index.ts b/src/modules/finance/index.ts index 2664cdfca11..4caa77b028c 100644 --- a/src/modules/finance/index.ts +++ b/src/modules/finance/index.ts @@ -1,7 +1,6 @@ -import type { Faker } from '../..'; import { FakerError } from '../../errors/faker-error'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; import iban from './iban'; /** @@ -24,6 +23,22 @@ export interface Currency { symbol: string; } +/** + * Puts a space after every 4 characters. + * + * @internal + * + * @param iban The iban to pretty print. + */ +export function prettyPrintIban(iban: string): string { + let pretty = ''; + for (let i = 0; i < iban.length; i += 4) { + pretty += `${iban.substring(i, i + 4)} `; + } + + return pretty.trimEnd(); +} + /** * Module to generate finance and money related entries. * @@ -37,17 +52,13 @@ export interface Currency { * * For blockchain related methods, use: [`bitcoinAddress()`](https://fakerjs.dev/api/finance.html#bitcoinaddress), [`ethereumAddress()`](https://fakerjs.dev/api/finance.html#ethereumaddress) and [`litecoinAddress()`](https://fakerjs.dev/api/finance.html#litecoinaddress). */ -export class FinanceModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class FinanceModule extends ModuleBase { /** * Generates a random account number. * * @param length The length of the account number. Defaults to `8`. * - * @see faker.finance.accountNumber() + * @see faker.finance.accountNumber(): For the replacement method. * * @example * faker.finance.account() // 92842238 @@ -83,7 +94,7 @@ export class FinanceModule { /** * Generates a random account number. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.length The length of the account number. Defaults to `8`. * * @example @@ -103,7 +114,7 @@ export class FinanceModule { /** * Generates a random account number. * - * @param optionsOrLength An options object or the length of the account number. Defaults to `{}`. + * @param optionsOrLength An options object or the length of the account number. * @param optionsOrLength.length The length of the account number. Defaults to `8`. * * @example @@ -128,7 +139,7 @@ export class FinanceModule { /** * Generates a random account number. * - * @param options An options object or the length of the account number. Defaults to `{}`. + * @param options An options object or the length of the account number. * @param options.length The length of the account number. Defaults to `8`. * * @example @@ -209,7 +220,7 @@ export class FinanceModule { * @param parens Whether to use surrounding parenthesis. Defaults to `true`. * @param ellipsis Whether to prefix the numbers with an ellipsis. Defaults to `true`. * - * @see faker.finance.maskedNumber() + * @see faker.finance.maskedNumber(): For the replacement method. * * @example * faker.finance.mask() // '(...9711)' @@ -246,7 +257,7 @@ export class FinanceModule { /** * Generates a random masked number. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.length The length of the unmasked number. Defaults to `4`. * @param options.parens Whether to use surrounding parenthesis. Defaults to `true`. * @param options.ellipsis Whether to prefix the numbers with an ellipsis. Defaults to `true`. @@ -267,7 +278,7 @@ export class FinanceModule { /** * Generates a random masked number. * - * @param optionsOrLength An options object or the length of the unmask number. Defaults to `{}`. + * @param optionsOrLength An options object or the length of the unmask number. * @param optionsOrLength.length The length of the unmasked number. Defaults to `4`. * @param optionsOrLength.parens Whether to use surrounding parenthesis. Defaults to `true`. * @param optionsOrLength.ellipsis Whether to prefix the numbers with an ellipsis. Defaults to `true`. @@ -308,7 +319,7 @@ export class FinanceModule { /** * Generates a random masked number. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.length The length of the unmasked number. Defaults to `4`. * @param options.parens Whether to use surrounding parenthesis. Defaults to `true`. * @param options.ellipsis Whether to prefix the numbers with an ellipsis. Defaults to `true`. @@ -350,7 +361,7 @@ export class FinanceModule { options = { length: options }; } - const { ellipsis, length = 4, parens } = options; + const { ellipsis = true, length = 4, parens = true } = options; let template = this.faker.string.numeric({ length }); @@ -393,7 +404,7 @@ export class FinanceModule { /** * Generates a random amount between the given bounds (inclusive). * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.min The lower bound for the amount. Defaults to `0`. * @param options.max The upper bound for the amount. Defaults to `1000`. * @param options.dec The number of decimal places for the amount. Defaults to `2`. @@ -444,7 +455,7 @@ export class FinanceModule { /** * Generates a random amount between the given bounds (inclusive). * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.min The lower bound for the amount. Defaults to `0`. * @param options.max The upper bound for the amount. Defaults to `1000`. * @param options.dec The number of decimal places for the amount. Defaults to `2`. @@ -453,7 +464,7 @@ export class FinanceModule { * @param legacyMax The upper bound for the amount. Defaults to `1000`. * @param legacyDec The number of decimal places for the amount. Defaults to `2`. * @param legacySymbol The symbol used to prefix the amount. Defaults to `''`. - * @param legacyAutoFormat If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. + * @param legacyAutoFormat If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. Defaults to `false`. * * @example * faker.finance.amount() // '617.87' @@ -511,7 +522,7 @@ export class FinanceModule { /** * Generates a random amount between the given bounds (inclusive). * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.min The lower bound for the amount. Defaults to `0`. * @param options.max The upper bound for the amount. Defaults to `1000`. * @param options.dec The number of decimal places for the amount. Defaults to `2`. @@ -520,7 +531,7 @@ export class FinanceModule { * @param legacyMax The upper bound for the amount. Defaults to `1000`. * @param legacyDec The number of decimal places for the amount. Defaults to `2`. * @param legacySymbol The symbol used to prefix the amount. Defaults to `''`. - * @param legacyAutoFormat If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. + * @param legacyAutoFormat If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. Defaults to `false`. * * @example * faker.finance.amount() // '617.87' @@ -590,7 +601,7 @@ export class FinanceModule { const randValue = this.faker.number.float({ max, min, - precision: 10 ** -dec, + multipleOf: 10 ** -dec, }); const formattedString = autoFormat @@ -618,9 +629,9 @@ export class FinanceModule { * Returns a random currency object, containing `code`, `name `and `symbol` properties. * * @see - * faker.finance.currencyCode() - * faker.finance.currencyName() - * faker.finance.currencySymbol() + * faker.finance.currencyCode(): For generating specifically the currency code. + * faker.finance.currencyName(): For generating specifically the currency name. + * faker.finance.currencySymbol(): For generating specifically the currency symbol. * * @example * faker.finance.currency() // { code: 'USD', name: 'US Dollar', symbol: '$' } @@ -668,9 +679,9 @@ export class FinanceModule { */ currencySymbol(): string { let symbol: string; - while (!symbol) { + do { symbol = this.currency().symbol; - } + } while (symbol.length === 0); return symbol; } @@ -755,7 +766,7 @@ export class FinanceModule { /** * Generates a random credit card number. * - * @param options An options object, the issuer or a custom format. Defaults to `{}`. + * @param options An options object, the issuer or a custom format. * @param options.issuer The name of the issuer (case-insensitive) or the format used to generate one. * * @example @@ -781,7 +792,7 @@ export class FinanceModule { /** * Generates a random credit card number. * - * @param options An options object, the issuer or a custom format. Defaults to `{}`. + * @param options An options object, the issuer or a custom format. * @param options.issuer The name of the issuer (case-insensitive) or the format used to generate one. * * @example @@ -815,7 +826,7 @@ export class FinanceModule { const normalizedIssuer = issuer.toLowerCase(); if (normalizedIssuer in localeFormat) { format = this.faker.helpers.arrayElement(localeFormat[normalizedIssuer]); - } else if (/#/.test(issuer)) { + } else if (issuer.includes('#')) { // The user chose an optional scheme format = issuer; } else { @@ -872,7 +883,7 @@ export class FinanceModule { /** * Generates a random PIN number. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.length The length of the PIN to generate. Defaults to `4`. * * @throws Will throw an error if length is less than 1. @@ -894,7 +905,7 @@ export class FinanceModule { /** * Generates a random PIN number. * - * @param options An options object or the length of the PIN. Defaults to `{}`. + * @param options An options object or the length of the PIN. * @param options.length The length of the PIN to generate. Defaults to `4`. * * @throws Will throw an error if length is less than 1. @@ -921,7 +932,7 @@ export class FinanceModule { /** * Generates a random PIN number. * - * @param options An options object or the length of the PIN. Defaults to `{}`. + * @param options An options object or the length of the PIN. * @param options.length The length of the PIN to generate. Defaults to `4`. * * @throws Will throw an error if length is less than 1. @@ -995,7 +1006,7 @@ export class FinanceModule { /** * Generates a random iban. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.formatted Return a formatted version of the generated IBAN. Defaults to `false`. * @param options.countryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used. * @@ -1024,7 +1035,7 @@ export class FinanceModule { /** * Generates a random iban. * - * @param options An options object or whether the return value should be formatted. Defaults to `{}`. + * @param options An options object or whether the return value should be formatted. * @param options.formatted Return a formatted version of the generated IBAN. Defaults to `false`. * @param options.countryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used. * @param legacyCountryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used. @@ -1061,7 +1072,7 @@ export class FinanceModule { /** * Generates a random iban. * - * @param options An options object or whether the return value should be formatted. Defaults to `{}`. + * @param options An options object or whether the return value should be formatted. * @param options.formatted Return a formatted version of the generated IBAN. Defaults to `false`. * @param options.countryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used. * @param legacyCountryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used. @@ -1152,7 +1163,7 @@ export class FinanceModule { const result = `${ibanFormat.country}${checksum}${s}`; - return formatted ? result.match(/.{1,4}/g).join(' ') : result; + return formatted ? prettyPrintIban(result) : result; } /** diff --git a/src/modules/git/index.ts b/src/modules/git/index.ts index cbbeb3518e7..89ab4799fef 100644 --- a/src/modules/git/index.ts +++ b/src/modules/git/index.ts @@ -1,6 +1,5 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; const nbsp = '\u00A0'; @@ -11,11 +10,7 @@ const nbsp = '\u00A0'; * * [`commitEntry()`](https://fakerjs.dev/api/git.html#commitentry) generates a random commit entry as printed by `git log`. This includes a commit hash [`commitSha()`](https://fakerjs.dev/api/git.html#commitsha), author, date [`commitDate()`](https://fakerjs.dev/api/git.html#commitdate), and commit message [`commitMessage()`](https://fakerjs.dev/api/git.html#commitmessage). You can also generate a random branch name with [`branch()`](https://fakerjs.dev/api/git.html#branch). */ -export class GitModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class GitModule extends ModuleBase { /** * Generates a random branch name. * diff --git a/src/modules/hacker/index.ts b/src/modules/hacker/index.ts index 7513095ac49..3a0f9dab1cd 100644 --- a/src/modules/hacker/index.ts +++ b/src/modules/hacker/index.ts @@ -1,5 +1,4 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; /** * Module to generate hacker/IT words and phrases. @@ -16,11 +15,7 @@ import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-fu * - [faker.lorem](https://fakerjs.dev/api/lorem.html) uses faux-Latin "lorem ipsum" text. * - [faker.company](https://fakerjs.dev/api/company.html) includes corporate catchphrases and buzzwords. */ -export class HackerModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class HackerModule extends ModuleBase { /** * Returns a random hacker/IT abbreviation. * diff --git a/src/modules/helpers/eval.ts b/src/modules/helpers/eval.ts new file mode 100644 index 00000000000..033c5d35d80 --- /dev/null +++ b/src/modules/helpers/eval.ts @@ -0,0 +1,229 @@ +import { FakerError } from '../../errors/faker-error'; +import type { Faker } from '../../faker'; + +const REGEX_DOT_OR_BRACKET = /\.|\(/; + +/** + * Resolves the given expression and returns its result. This method should only be used when using serialized expressions. + * + * This method is useful if you have to build a random string from a static, non-executable source + * (e.g. string coming from a developer, stored in a database or a file). + * + * It tries to resolve the expression on the given/default entrypoints: + * + * ```js + * const firstName = fakeEval('person.firstName', faker); + * const firstName2 = fakeEval('person.first_name', faker); + * ``` + * + * Is equivalent to: + * + * ```js + * const firstName = faker.person.firstName(); + * const firstName2 = faker.helpers.arrayElement(faker.rawDefinitions.person.first_name); + * ``` + * + * You can provide parameters as well. At first, they will be parsed as json, + * and if that isn't possible, it will fall back to string: + * + * ```js + * const message = fakeEval('phone.number(+!# !## #### #####!)', faker); + * ``` + * + * It is also possible to use multiple parameters (comma separated). + * + * ```js + * const pin = fakeEval('string.numeric(4, {"allowLeadingZeros": true})', faker); + * ``` + * + * This method can resolve expressions with varying depths (dot separated parts). + * + * ```ts + * const airlineModule = fakeEval('airline', faker); // AirlineModule + * const airlineObject = fakeEval('airline.airline', faker); // { name: 'Etihad Airways', iataCode: 'EY' } + * const airlineCode = fakeEval('airline.airline.iataCode', faker); // 'EY' + * const airlineName = fakeEval('airline.airline().name', faker); // 'Etihad Airways' + * const airlineMethodName = fakeEval('airline.airline.name', faker); // 'bound airline' + * ``` + * + * It is NOT possible to access any values not passed as entrypoints. + * + * This method will never return arrays, as it will pick a random element from them instead. + * + * @param expression The expression to evaluate on the entrypoints. + * @param faker The faker instance to resolve array elements. + * @param entrypoints The entrypoints to use when evaluating the expression. + * + * @see faker.helpers.fake() If you wish to have a string with multiple expressions. + * + * @example + * fakeEval('person.lastName', faker) // 'Barrows' + * fakeEval('helpers.arrayElement(["heads", "tails"])', faker) // 'tails' + * fakeEval('number.int(9999)', faker) // 4834 + * + * @since 8.4.0 + */ +export function fakeEval( + expression: string, + faker: Faker, + entrypoints: ReadonlyArray = [faker, faker.rawDefinitions] +): unknown { + if (expression.length === 0) { + throw new FakerError('Eval expression cannot be empty.'); + } + + if (entrypoints.length === 0) { + throw new FakerError('Eval entrypoints cannot be empty.'); + } + + let current = entrypoints; + let remaining = expression; + do { + let index: number; + if (remaining.startsWith('(')) { + [index, current] = evalProcessFunction(remaining, current); + } else { + [index, current] = evalProcessExpression(remaining, current); + } + + remaining = remaining.substring(index); + + // Remove garbage and resolve array values + current = current + .filter((value) => value != null) + .map((value): unknown => + Array.isArray(value) ? faker.helpers.arrayElement(value) : value + ); + } while (remaining.length > 0 && current.length > 0); + + if (current.length === 0) { + throw new FakerError(`Cannot resolve expression '${expression}'`); + } + + const value = current[0]; + return typeof value === 'function' ? value() : value; +} + +/** + * Evaluates a function call and returns the new read index and the mapped results. + * + * @param input The input string to parse. + * @param entrypoints The entrypoints to attempt the call on. + */ +function evalProcessFunction( + input: string, + entrypoints: ReadonlyArray +): [continueIndex: number, mapped: unknown[]] { + const [index, params] = findParams(input); + const nextChar = input[index + 1]; + switch (nextChar) { + case '.': + case '(': + case undefined: + break; // valid + default: + throw new FakerError( + `Expected dot ('.'), open parenthesis ('('), or nothing after function call but got '${nextChar}'` + ); + } + + return [ + index + (nextChar === '.' ? 2 : 1), // one for the closing bracket, one for the dot + entrypoints.map((entrypoint): unknown => + // TODO @ST-DDT 2023-12-11: Replace in v9 + // typeof entrypoint === 'function' ? entrypoint(...params) : undefined + typeof entrypoint === 'function' ? entrypoint(...params) : entrypoint + ), + ]; +} + +/** + * Tries to find the parameters of a function call. + * + * @param input The input string to parse. + */ +function findParams(input: string): [continueIndex: number, params: unknown[]] { + let index = input.indexOf(')', 1); + if (index === -1) { + throw new FakerError(`Missing closing parenthesis in '${input}'`); + } + + while (index !== -1) { + const params = input.substring(1, index); + try { + // assuming that the params are valid JSON + return [index, JSON.parse(`[${params}]`) as unknown[]]; + } catch { + if (!params.includes("'") && !params.includes('"')) { + try { + // assuming that the params are a single unquoted string + return [index, JSON.parse(`["${params}"]`) as unknown[]]; + } catch { + // try again with the next index + } + } + } + + index = input.indexOf(')', index + 1); + } + + index = input.lastIndexOf(')'); + const params = input.substring(1, index); + return [index, [params]]; +} + +/** + * Processes one expression part and returns the new read index and the mapped results. + * + * @param input The input string to parse. + * @param entrypoints The entrypoints to resolve on. + */ +function evalProcessExpression( + input: string, + entrypoints: ReadonlyArray +): [continueIndex: number, mapped: unknown[]] { + const result = REGEX_DOT_OR_BRACKET.exec(input); + const dotMatch = (result?.[0] ?? '') === '.'; + const index = result?.index ?? input.length; + const key = input.substring(0, index); + if (key.length === 0) { + throw new FakerError(`Expression parts cannot be empty in '${input}'`); + } + + const next = input[index + 1]; + if (dotMatch && (next == null || next === '.' || next === '(')) { + throw new FakerError(`Found dot without property name in '${input}'`); + } + + return [ + index + (dotMatch ? 1 : 0), + entrypoints.map((entrypoint) => resolveProperty(entrypoint, key)), + ]; +} + +/** + * Resolves the given property on the given entrypoint. + * + * @param entrypoint The entrypoint to resolve the property on. + * @param key The property name to resolve. + */ +function resolveProperty(entrypoint: unknown, key: string): unknown { + switch (typeof entrypoint) { + case 'function': { + try { + entrypoint = entrypoint(); + } catch { + return undefined; + } + + return entrypoint?.[key as keyof typeof entrypoint]; + } + + case 'object': { + return entrypoint?.[key as keyof typeof entrypoint]; + } + + default: + return undefined; + } +} diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index 4c64be4e98c..635b3e09d4f 100644 --- a/src/modules/helpers/index.ts +++ b/src/modules/helpers/index.ts @@ -1,7 +1,8 @@ import type { Faker, SimpleFaker } from '../..'; import { FakerError } from '../../errors/faker-error'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { SimpleModuleBase } from '../../internal/module-base'; +import { fakeEval } from './eval'; import { luhnCheckValue } from './luhn-check'; import type { RecordKey } from './unique'; import * as uniqueExec from './unique'; @@ -9,7 +10,7 @@ import * as uniqueExec from './unique'; /** * Returns a number based on given RegEx-based quantifier symbol or quantifier values. * - * @param faker Faker instance + * @param faker The Faker instance to use. * @param quantifierSymbol Quantifier symbols can be either of these: `?`, `*`, `+`. * @param quantifierMin Quantifier minimum value. If given without a maximum, this will be used as the quantifier value. * @param quantifierMax Quantifier maximum value. Will randomly get a value between the minimum and maximum if both are provided. @@ -17,9 +18,9 @@ import * as uniqueExec from './unique'; * @returns a random number based on the given quantifier parameters. * * @example - * getRepetitionsBasedOnQuantifierParameters(this.faker, '*', null, null) // 3 - * getRepetitionsBasedOnQuantifierParameters(this.faker, null, 10, null) // 10 - * getRepetitionsBasedOnQuantifierParameters(this.faker, null, 5, 8) // 6 + * getRepetitionsBasedOnQuantifierParameters(faker, '*', null, null) // 3 + * getRepetitionsBasedOnQuantifierParameters(faker, null, 10, null) // 10 + * getRepetitionsBasedOnQuantifierParameters(faker, null, 5, 8) // 6 * * @since 8.0.0 */ @@ -73,7 +74,9 @@ function getRepetitionsBasedOnQuantifierParameters( } /** - * Replaces the regex like expressions in the given string with matching values. Note: This method will be removed in v9. + * Replaces the regex like expressions in the given string with matching values. + * + * Note: This method will be removed in v9. * * Supported patterns: * - `.{times}` => Repeat the character exactly `times` times. @@ -82,15 +85,15 @@ function getRepetitionsBasedOnQuantifierParameters( * * @internal * - * @param faker A Faker instance. + * @param faker The Faker instance to use. * @param string The template string to parse. * * @example - * faker.helpers.legacyRegexpStringParse() // '' - * faker.helpers.legacyRegexpStringParse('#{5}') // '#####' - * faker.helpers.legacyRegexpStringParse('#{2,9}') // '#######' - * faker.helpers.legacyRegexpStringParse('[500-15000]') // '8375' - * faker.helpers.legacyRegexpStringParse('#{3}test[1-5]') // '###test3' + * legacyRegexpStringParse(faker) // '' + * legacyRegexpStringParse(faker, '#{5}') // '#####' + * legacyRegexpStringParse(faker, '#{2,9}') // '#######' + * legacyRegexpStringParse(faker, '[500-15000]') // '8375' + * legacyRegexpStringParse(faker, '#{3}test[1-5]') // '###test3' * * @since 5.0.0 */ @@ -158,10 +161,49 @@ function legacyRegexpStringParse( return string; } +/** + * Parses the given string symbol by symbol and replaces the placeholders with digits (`0` - `9`). + * `!` will be replaced by digits >=2 (`2` - `9`). + * + * Note: This method will be removed in v9. + * + * @internal + * + * @param faker The Faker instance to use. + * @param string The template string to parse. Defaults to `''`. + * @param symbol The symbol to replace with digits. Defaults to `'#'`. + * + * @example + * legacyReplaceSymbolWithNumber(faker) // '' + * legacyReplaceSymbolWithNumber(faker, '#####') // '04812' + * legacyReplaceSymbolWithNumber(faker, '!####') // '27378' + * legacyReplaceSymbolWithNumber(faker, 'Your pin is: !####') // '29841' + * + * @since 8.4.0 + */ +export function legacyReplaceSymbolWithNumber( + faker: SimpleFaker, + string: string = '', + symbol: string = '#' +): string { + let str = ''; + for (let i = 0; i < string.length; i++) { + if (string.charAt(i) === symbol) { + str += faker.number.int(9); + } else if (string.charAt(i) === '!') { + str += faker.number.int({ min: 2, max: 9 }); + } else { + str += string.charAt(i); + } + } + + return str; +} + /** * Module with various helper methods providing basic (seed-dependent) operations useful for implementing faker methods (without methods requiring localized data). */ -export class SimpleHelpersModule { +export class SimpleHelpersModule extends SimpleModuleBase { /** * Global store of unique values. * This means that faker should *never* return duplicate values across all API methods when using `faker.helpers.unique` without passing `options.store`. @@ -170,16 +212,12 @@ export class SimpleHelpersModule { */ private readonly uniqueStore: Record = {}; - constructor(protected readonly faker: SimpleFaker) { - bindThisToMemberFunctions(this); - } - /** * Slugifies the given string. * For that all spaces (` `) are replaced by hyphens (`-`) * and most non word characters except for dots and hyphens will be removed. * - * @param string The input to slugify. + * @param string The input to slugify. Defaults to `''`. * * @example * faker.helpers.slugify() // '' @@ -199,9 +237,11 @@ export class SimpleHelpersModule { * Parses the given string symbol by symbol and replaces the placeholders with digits (`0` - `9`). * `!` will be replaced by digits >=2 (`2` - `9`). * - * @param string The template string to parse. + * @param string The template string to parse. Defaults to `''`. * @param symbol The symbol to replace with digits. Defaults to `'#'`. * + * @see faker.string.numeric(): For the replacement method. + * * @example * faker.helpers.replaceSymbolWithNumber() // '' * faker.helpers.replaceSymbolWithNumber('#####') // '04812' @@ -209,20 +249,18 @@ export class SimpleHelpersModule { * faker.helpers.replaceSymbolWithNumber('Your pin is: !####') // '29841' * * @since 2.0.1 + * + * @deprecated Use `faker.string.numeric()` instead. Example: `value.replace(/#+/g, (m) => faker.string.numeric(m.length));` */ replaceSymbolWithNumber(string: string = '', symbol: string = '#'): string { - let str = ''; - for (let i = 0; i < string.length; i++) { - if (string.charAt(i) === symbol) { - str += this.faker.number.int(9); - } else if (string.charAt(i) === '!') { - str += this.faker.number.int({ min: 2, max: 9 }); - } else { - str += string.charAt(i); - } - } + deprecated({ + deprecated: 'faker.helpers.replaceSymbolWithNumber', + proposed: 'string.replace(/#+/g, (m) => faker.string.numeric(m.length))', + since: '8.4', + until: '9.0', + }); - return str; + return legacyReplaceSymbolWithNumber(this.faker, string, symbol); } /** @@ -232,7 +270,7 @@ export class SimpleHelpersModule { * - `?` will be replaced with an upper letter ('A' - 'Z') * - and `*` will be replaced with either a digit or letter. * - * @param string The template string to parse. + * @param string The template string to parse. Defaults to `''`. * * @example * faker.helpers.replaceSymbols() // '' @@ -297,8 +335,8 @@ export class SimpleHelpersModule { * This method supports both range patterns `[4-9]` as well as the patterns used by `replaceSymbolWithNumber()`. * `L` will be replaced with the appropriate Luhn checksum. * - * @param string The credit card format pattern. Defaults to `6453-####-####-####-###L`. - * @param symbol The symbol to replace with a digit. + * @param string The credit card format pattern. Defaults to `'6453-####-####-####-###L'`. + * @param symbol The symbol to replace with a digit. Defaults to `'#'`. * * @example * faker.helpers.replaceCreditCardSymbols() // '6453-4876-8626-8995-3771' @@ -313,7 +351,7 @@ export class SimpleHelpersModule { // default values required for calling method without arguments string = legacyRegexpStringParse(this.faker, string); // replace [4-9] with a random number in range etc... - string = this.replaceSymbolWithNumber(string, symbol); // replace ### with random numbers + string = legacyReplaceSymbolWithNumber(this.faker, string, symbol); // replace ### with random numbers const checkNum = luhnCheckValue(string); return string.replace('L', String(checkNum)); @@ -327,9 +365,9 @@ export class SimpleHelpersModule { * - `.{min,max}` => Repeat the character `min` to `max` times. * - `[min-max]` => Generate a number between min and max (inclusive). * - * @param string The template string to parse. + * @param string The template string to parse. Defaults to `''`. * - * @see faker.helpers.fromRegExp() + * @see faker.helpers.fromRegExp(): For generating a string matching the given regex-like expressions. * * @example * faker.helpers.regexpStyleStringParse() // '' @@ -380,8 +418,8 @@ export class SimpleHelpersModule { * * @param pattern The template string/RegExp to generate a matching string for. * - * @throws If min value is more than max value in quantifier. e.g. `#{10,5}` - * @throws If invalid quantifier symbol is passed in. + * @throws If min value is more than max value in quantifier, e.g. `#{10,5}`. + * @throws If an invalid quantifier symbol is passed in. * * @example * faker.helpers.fromRegExp('#{5}') // '#####' @@ -460,19 +498,11 @@ export class SimpleHelpersModule { } while (range != null) { - if (!range[0].includes('-')) { - // handle non-ranges - if (isCaseInsensitive && Number.isNaN(Number(range[0]))) { - rangeCodes.push( - range[0].toUpperCase().charCodeAt(0), - range[0].toLowerCase().charCodeAt(0) - ); - } else { - rangeCodes.push(range[0].charCodeAt(0)); - } - } else { + if (range[0].includes('-')) { // handle ranges - const rangeMinMax = range[0].split('-').map((x) => x.charCodeAt(0)); + const rangeMinMax = range[0] + .split('-') + .map((x) => x.codePointAt(0) ?? Number.NaN); min = rangeMinMax[0]; max = rangeMinMax[1]; // throw error if min larger than max @@ -483,17 +513,27 @@ export class SimpleHelpersModule { for (let i = min; i <= max; i++) { if ( isCaseInsensitive && - Number.isNaN(Number(String.fromCharCode(i))) + Number.isNaN(Number(String.fromCodePoint(i))) ) { - const ch = String.fromCharCode(i); + const ch = String.fromCodePoint(i); rangeCodes.push( - ch.toUpperCase().charCodeAt(0), - ch.toLowerCase().charCodeAt(0) + ch.toUpperCase().codePointAt(0) ?? Number.NaN, + ch.toLowerCase().codePointAt(0) ?? Number.NaN ); } else { rangeCodes.push(i); } } + } else { + // handle non-ranges + if (isCaseInsensitive && Number.isNaN(Number(range[0]))) { + rangeCodes.push( + range[0].toUpperCase().codePointAt(0) ?? Number.NaN, + range[0].toLowerCase().codePointAt(0) ?? Number.NaN + ); + } else { + rangeCodes.push(range[0].codePointAt(0) ?? Number.NaN); + } } ranges = ranges.substring(range[0].length); @@ -544,7 +584,7 @@ export class SimpleHelpersModule { } const generatedString = this.multiple( - () => String.fromCharCode(this.arrayElement(rangeCodes)), + () => String.fromCodePoint(this.arrayElement(rangeCodes)), { count: repetitions } ).join(''); @@ -773,7 +813,7 @@ export class SimpleHelpersModule { * @template TResult The type of result of the given callback. * * @param callback The callback to that will be invoked if the probability check was successful. - * @param options The options to use. Defaults to `{}`. + * @param options The options to use. * @param options.probability The probability (`[0.00, 1.00]`) of the callback being invoked. Defaults to `0.5`. * * @example @@ -939,7 +979,6 @@ export class SimpleHelpersModule { const random = this.faker.number.float({ min: 0, max: total, - precision: 1e-9, }); let current = 0; for (const { weight, value } of array) { @@ -1096,7 +1135,7 @@ export class SimpleHelpersModule { * @template TMethod The type of the method to execute. * * @param method The method used to generate the values. - * @param args The arguments used to call the method. + * @param args The arguments used to call the method. Defaults to `[]`. * @param options The optional options used to configure this method. * @param options.startTime This parameter does nothing. * @param options.maxTime The time in milliseconds this method may take before throwing an error. Defaults to `50`. @@ -1124,7 +1163,7 @@ export class SimpleHelpersModule { ) => RecordKey, >( method: TMethod, - args: Parameters = [] as Parameters, + args: Parameters = [] as unknown as Parameters, options: { /** * This parameter does nothing. @@ -1296,7 +1335,7 @@ export class HelpersModule extends SimpleHelpersModule { * * @param pattern The pattern string that will get interpolated. * - * @see faker.helpers.mustache() to use custom functions for resolution. + * @see faker.helpers.mustache(): For using custom functions to resolve templates. * * @example * faker.helpers.fake('{{person.lastName}}') // 'Barrows' @@ -1348,7 +1387,7 @@ export class HelpersModule extends SimpleHelpersModule { * * @param patterns The array to select a pattern from, that will then get interpolated. Must not be empty. * - * @see faker.helpers.mustache() to use custom functions for resolution. + * @see faker.helpers.mustache(): For using custom functions to resolve templates. * * @example * faker.helpers.fake(['A: {{person.firstName}}', 'B: {{person.lastName}}']) // 'A: Barry' @@ -1391,7 +1430,7 @@ export class HelpersModule extends SimpleHelpersModule { * * @param pattern The pattern string that will get interpolated. If an array is passed, a random element will be picked and interpolated. * - * @see faker.helpers.mustache() to use custom functions for resolution. + * @see faker.helpers.mustache(): For using custom functions to resolve templates. * * @example * faker.helpers.fake('{{person.lastName}}') // 'Barrows' @@ -1421,66 +1460,15 @@ export class HelpersModule extends SimpleHelpersModule { // extract method name from between the {{ }} that we found // for example: {{person.firstName}} const token = pattern.substring(start + 2, end + 2); - let method = token.replace('}}', '').replace('{{', ''); - - // extract method parameters - const regExp = /\(([^)]*)\)/; - const matches = regExp.exec(method); - let parameters = ''; - if (matches) { - method = method.replace(regExp, ''); - parameters = matches[1]; - } - - // split the method into module and function - const parts = method.split('.'); - - let currentModuleOrMethod: unknown = this.faker; - let currentDefinitions: unknown = this.faker.rawDefinitions; - - // Search for the requested method or definition - for (const part of parts) { - currentModuleOrMethod = - currentModuleOrMethod?.[part as keyof typeof currentModuleOrMethod]; - currentDefinitions = - currentDefinitions?.[part as keyof typeof currentDefinitions]; - } - - // Make method executable - let fn: (...args: unknown[]) => unknown; - if (typeof currentModuleOrMethod === 'function') { - fn = currentModuleOrMethod as (args?: unknown) => unknown; - } else if (Array.isArray(currentDefinitions)) { - fn = () => - this.faker.helpers.arrayElement(currentDefinitions as unknown[]); - } else { - throw new FakerError(`Invalid module method or definition: ${method} -- faker.${method} is not a function -- faker.definitions.${method} is not an array`); - } - - // assign the function from the module.function namespace - fn = fn.bind(this); - - // If parameters are populated here, they are always going to be of string type - // since we might actually be dealing with an object or array, - // we always attempt to the parse the incoming parameters into JSON - let params: unknown[]; - // Note: we experience a small performance hit here due to JSON.parse try / catch - // If anyone actually needs to optimize this specific code path, please open a support issue on github - try { - params = JSON.parse(`[${parameters}]`); - } catch { - // since JSON.parse threw an error, assume parameters was actually a string - params = [parameters]; - } + const method = token.replace('}}', '').replace('{{', ''); - const result = String(fn(...params)); + const result = fakeEval(method, this.faker); + const stringified = String(result); // Replace the found tag with the returned fake value // We cannot use string.replace here because the result might contain evaluated characters const res = - pattern.substring(0, start) + result + pattern.substring(end + 2); + pattern.substring(0, start) + stringified + pattern.substring(end + 2); // return the response recursively until we are done finding all tags return this.fake(res); diff --git a/src/modules/helpers/unique.ts b/src/modules/helpers/unique.ts index 44b3a71d339..20805530478 100644 --- a/src/modules/helpers/unique.ts +++ b/src/modules/helpers/unique.ts @@ -97,9 +97,9 @@ export function exec< maxRetries = 50, currentIterations = 0, compare = defaultCompare, - store, + store = {}, } = options; - let { exclude } = options; + let { exclude = [] } = options; options.currentIterations = currentIterations; // Support single exclude argument as string diff --git a/src/modules/image/index.ts b/src/modules/image/index.ts index 4e153a2d727..d3b532cd8b0 100644 --- a/src/modules/image/index.ts +++ b/src/modules/image/index.ts @@ -1,6 +1,6 @@ import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; import type { MethodsOf } from '../../utils/types'; import { LoremPicsum } from './providers/lorempicsum'; import { Placeholder } from './providers/placeholder'; @@ -19,7 +19,7 @@ import { Unsplash } from './providers/unsplash'; * * This module previously also contained methods for specifically themed images like "fashion" or "food", but these are now deprecated. If you need more control over image type, you can request categorized images using [`urlLoremFlickr()`](https://fakerjs.dev/api/image.html#urlloremflickr), use an image provider directly or provide your own set of placeholder images. */ -export class ImageModule { +export class ImageModule extends ModuleBase { /** * @deprecated Use `faker.image` instead. */ @@ -38,8 +38,8 @@ export class ImageModule { // eslint-disable-next-line deprecation/deprecation readonly placeholder: Placeholder; - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); + constructor(faker: Faker) { + super(faker); // eslint-disable-next-line deprecation/deprecation this.unsplash = new Unsplash(this.faker); @@ -182,7 +182,7 @@ export class ImageModule { } = options; return `https://loremflickr.com/${width}/${height}${ - category != null ? `/${category}` : '' + category == null ? '' : `/${category}` }?lock=${this.faker.number.int()}`; } @@ -244,17 +244,16 @@ export class ImageModule { length: { min: 5, max: 10 }, })}/${width}/${height}`; - const hasValidGrayscale = grayscale === true; const hasValidBlur = typeof blur === 'number' && blur >= 1 && blur <= 10; - if (hasValidGrayscale || hasValidBlur) { + if (grayscale || hasValidBlur) { url += '?'; - if (hasValidGrayscale) { + if (grayscale) { url += `grayscale`; } - if (hasValidGrayscale && hasValidBlur) { + if (grayscale && hasValidBlur) { url += '&'; } @@ -520,8 +519,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.abstract() // 'https://loremflickr.com/640/480/abstract' @@ -552,8 +551,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.animals() // 'https://loremflickr.com/640/480/animals' @@ -584,8 +583,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.business() // 'https://loremflickr.com/640/480/business' @@ -617,8 +616,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.cats() // 'https://loremflickr.com/640/480/cats' @@ -648,8 +647,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.city() // 'https://loremflickr.com/640/480/city' @@ -679,8 +678,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.food() // 'https://loremflickr.com/640/480/food' @@ -710,8 +709,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.nightlife() // 'https://loremflickr.com/640/480/nightlife' @@ -741,8 +740,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.fashion() // 'https://loremflickr.com/640/480/fashion' @@ -772,8 +771,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.people() // 'https://loremflickr.com/640/480/people' @@ -803,8 +802,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.nature() // 'https://loremflickr.com/640/480/nature' @@ -834,8 +833,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.sports() // 'https://loremflickr.com/640/480/sports' @@ -865,8 +864,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.technics() // 'https://loremflickr.com/640/480/technics' @@ -896,8 +895,8 @@ export class ImageModule { * @param height The height of the image. Defaults to `480`. * @param randomize Whether to randomize the image or not. Defaults to `false`. * - * @see faker.image.url() - * @see faker.image.urlLoremFlickr() + * @see faker.image.url(): For generating a random image url (has fewer options, uses multiple image providers). + * @see faker.image.urlLoremFlickr(): For generating a random image url from LoremFlickr. * * @example * faker.image.transport() // 'https://loremflickr.com/640/480/transport' diff --git a/src/modules/internet/index.ts b/src/modules/internet/index.ts index aecdb302a48..395266fb588 100644 --- a/src/modules/internet/index.ts +++ b/src/modules/internet/index.ts @@ -1,6 +1,5 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; import { charMapping } from './char-mappings'; import * as random_ua from './user-agent'; @@ -38,11 +37,7 @@ export type HTTPProtocolType = 'http' | 'https'; * * You also have access to a number of the more technical elements of web requests, such as [`httpMethod`](https://fakerjs.dev/api/internet.html#httpmethod), [`httpStatusCode`](https://fakerjs.dev/api/internet.html#httpstatuscode), [`ip`](https://fakerjs.dev/api/internet.html#ip), [`mac`](https://fakerjs.dev/api/internet.html#mac), [`userAgent`](https://fakerjs.dev/api/internet.html#useragent), and [`port`](https://fakerjs.dev/api/internet.html#port). */ -export class InternetModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class InternetModule extends ModuleBase { /** * Returns a random avatar url. * @@ -61,7 +56,7 @@ export class InternetModule { /** * Generates an email address using the given person's name as base. * - * @param options The options to use. Defaults to `{}`. + * @param options The options to use. * @param options.firstName The optional first name to use. If not specified, a random one will be chosen. * @param options.lastName The optional last name to use. If not specified, a random one will be chosen. * @param options.provider The mail provider domain to use. If not specified, a random free mail provider will be chosen. @@ -70,7 +65,9 @@ export class InternetModule { * * @example * faker.internet.email() // 'Kassandra4@hotmail.com' - * faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe' }) // 'Jeanne63@yahoo.com' + * faker.internet.email({ firstName: 'Jeanne'}) // 'Jeanne63@yahoo.com' + * faker.internet.email({ firstName: 'Jeanne'}) // 'Jeanne_Smith63@yahoo.com' + * faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe' }) // 'Jeanne.Doe63@yahoo.com' * faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe', provider: 'example.fakerjs.dev' }) // 'Jeanne_Doe88@example.fakerjs.dev' * faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe', provider: 'example.fakerjs.dev', allowSpecialCharacters: true }) // 'Jeanne%Doe88@example.fakerjs.dev' * @@ -106,13 +103,15 @@ export class InternetModule { * @param firstName The optional first name to use. If not specified, a random one will be chosen. * @param lastName The optional last name to use. If not specified, a random one will be chosen. * @param provider The mail provider domain to use. If not specified, a random free mail provider will be chosen. - * @param options The options to use. Defaults to `{ allowSpecialCharacters: false }`. + * @param options The options to use. * @param options.allowSpecialCharacters Whether special characters such as ``.!#$%&'*+-/=?^_`{|}~`` should be included * in the email address. Defaults to `false`. * * @example * faker.internet.email() // 'Kassandra4@hotmail.com' - * faker.internet.email('Jeanne', 'Doe') // 'Jeanne63@yahoo.com' + * faker.internet.email('Jeanne') // 'Jeanne63@yahoo.com' + * faker.internet.email('Jeanne') // 'Jeanne.Smith63@yahoo.com' + * faker.internet.email('Jeanne', 'Doe') // 'Jeanne_Doe63@yahoo.com' * faker.internet.email('Jeanne', 'Doe', 'example.fakerjs.dev') // 'Jeanne_Doe88@example.fakerjs.dev' * faker.internet.email('Jeanne', 'Doe', 'example.fakerjs.dev', { allowSpecialCharacters: true }) // 'Jeanne%Doe88@example.fakerjs.dev' * @@ -136,7 +135,7 @@ export class InternetModule { /** * Generates an email address using the given person's name as base. * - * @param options The options to use. Defaults to `{}`. + * @param options The options to use. * @param options.firstName The optional first name to use. If not specified, a random one will be chosen. * @param options.lastName The optional last name to use. If not specified, a random one will be chosen. * @param options.provider The mail provider domain to use. If not specified, a random free mail provider will be chosen. @@ -144,13 +143,15 @@ export class InternetModule { * in the email address. Defaults to `false`. * @param legacyLastName The optional last name to use. If not specified, a random one will be chosen. * @param legacyProvider The mail provider domain to use. If not specified, a random free mail provider will be chosen. - * @param legacyOptions The options to use. Defaults to `{ allowSpecialCharacters: false }`. + * @param legacyOptions The options to use. * @param legacyOptions.allowSpecialCharacters Whether special characters such as ``.!#$%&'*+-/=?^_`{|}~`` should be included * in the email address. Defaults to `false`. * * @example * faker.internet.email() // 'Kassandra4@hotmail.com' - * faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe' }) // 'Jeanne63@yahoo.com' + * faker.internet.email({ firstName: 'Jeanne' }) // 'Jeanne63@yahoo.com' + * faker.internet.email({ firstName: 'Jeanne' }) // 'Jeanne.Smith63@yahoo.com' + * faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe' }) // 'Jeanne_Doe63@yahoo.com' * faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe', provider: 'example.fakerjs.dev' }) // 'Jeanne_Doe88@example.fakerjs.dev' * faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe', provider: 'example.fakerjs.dev', allowSpecialCharacters: true }) // 'Jeanne%Doe88@example.fakerjs.dev' * @@ -253,8 +254,8 @@ export class InternetModule { } const { - firstName = this.faker.person.firstName(), - lastName = legacyLastName ?? this.faker.person.lastName(), + firstName, + lastName = legacyLastName, provider = legacyProvider ?? this.faker.helpers.arrayElement( this.faker.definitions.internet.free_email @@ -292,7 +293,7 @@ export class InternetModule { /** * Generates an email address using an example mail provider using the given person's name as base. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.firstName The optional first name to use. If not specified, a random one will be chosen. * @param options.lastName The optional last name to use. If not specified, a random one will be chosen. * @param options.allowSpecialCharacters Whether special characters such as ``.!#$%&'*+-/=?^_`{|}~`` should be included @@ -300,7 +301,9 @@ export class InternetModule { * * @example * faker.internet.exampleEmail() // 'Helmer.Graham23@example.com' - * faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe' }) // 'Jeanne96@example.net' + * faker.internet.exampleEmail({ firstName: 'Jeanne' }) // 'Jeanne96@example.net' + * faker.internet.exampleEmail({ firstName: 'Jeanne' }) // 'Jeanne.Smith96@example.net' + * faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe' }) // 'Jeanne_Doe96@example.net' * faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe', allowSpecialCharacters: true }) // 'Jeanne%Doe88@example.com' * * @since 3.1.0 @@ -330,13 +333,15 @@ export class InternetModule { * * @param firstName The optional first name to use. If not specified, a random one will be chosen. * @param lastName The optional last name to use. If not specified, a random one will be chosen. - * @param options The options to use. Defaults to `{ allowSpecialCharacters: false }`. + * @param options The options to use. * @param options.allowSpecialCharacters Whether special characters such as ``.!#$%&'*+-/=?^_`{|}~`` should be included * in the email address. Defaults to `false`. * * @example * faker.internet.exampleEmail() // 'Helmer.Graham23@example.com' - * faker.internet.exampleEmail('Jeanne', 'Doe') // 'Jeanne96@example.net' + * faker.internet.exampleEmail('Jeanne') // 'Jeanne96@example.net' + * faker.internet.exampleEmail('Jeanne') // 'Jeanne.Smith96@example.net' + * faker.internet.exampleEmail('Jeanne', 'Doe') // 'Jeanne_Doe96@example.net' * faker.internet.exampleEmail('Jeanne', 'Doe', { allowSpecialCharacters: true }) // 'Jeanne%Doe88@example.com' * * @since 3.1.0 @@ -358,19 +363,21 @@ export class InternetModule { /** * Generates an email address using an example mail provider using the given person's name as base. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.firstName The optional first name to use. If not specified, a random one will be chosen. * @param options.lastName The optional last name to use. If not specified, a random one will be chosen. * @param options.allowSpecialCharacters Whether special characters such as ``.!#$%&'*+-/=?^_`{|}~`` should be included * in the email address. Defaults to `false`. * @param legacyLastName The optional last name to use. If not specified, a random one will be chosen. - * @param legacyOptions The options to use. Defaults to `{}`. + * @param legacyOptions The options to use. * @param legacyOptions.allowSpecialCharacters Whether special characters such as ``.!#$%&'*+-/=?^_`{|}~`` should be included * in the email address. Defaults to `false`. * * @example * faker.internet.exampleEmail() // 'Helmer.Graham23@example.com' - * faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe' }) // 'Jeanne96@example.net' + * faker.internet.exampleEmail({ firstName: 'Jeanne' }) // 'Jeanne96@example.net' + * faker.internet.exampleEmail({ firstName: 'Jeanne' }) // 'Jeanne.Smith96@example.net' + * faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe' }) // 'Jeanne_Doe96@example.net' * faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe', allowSpecialCharacters: true }) // 'Jeanne%Doe88@example.com' * * @since 3.1.0 @@ -459,8 +466,8 @@ export class InternetModule { } const { - firstName = this.faker.person.firstName(), - lastName = legacyLastName ?? this.faker.person.lastName(), + firstName, + lastName = legacyLastName, allowSpecialCharacters = legacyOptions?.allowSpecialCharacters ?? false, } = options; @@ -482,15 +489,17 @@ export class InternetModule { * This will always return a plain ASCII string. * Some basic stripping of accents and transliteration of characters will be done. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.firstName The optional first name to use. If not specified, a random one will be chosen. * @param options.lastName The optional last name to use. If not specified, a random one will be chosen. * - * @see faker.internet.displayName() + * @see faker.internet.displayName(): For generating an Unicode display name. * * @example * faker.internet.userName() // 'Nettie_Zboncak40' - * faker.internet.userName({ firstName: 'Jeanne', lastName: 'Doe'}) // 'Jeanne98' - note surname is not used + * faker.internet.userName({ firstName: 'Jeanne' }) // 'Jeanne98' + * faker.internet.userName({ firstName: 'Jeanne' }) // 'Jeanne.Smith98' + * faker.internet.userName({ firstName: 'Jeanne', lastName: 'Doe'}) // 'Jeanne_Doe98' * faker.internet.userName({ firstName: 'John', lastName: 'Doe' }) // 'John.Doe' * faker.internet.userName({ firstName: 'Hélene', lastName: 'Müller' }) // 'Helene_Muller11' * faker.internet.userName({ firstName: 'Фёдор', lastName: 'Достоевский' }) // 'Fedor.Dostoevskii50' @@ -521,11 +530,13 @@ export class InternetModule { * @param firstName The optional first name to use. If not specified, a random one will be chosen. * @param lastName The optional last name to use. If not specified, a random one will be chosen. * - * @see faker.internet.displayName() + * @see faker.internet.displayName(): For generating an Unicode display name. * * @example * faker.internet.userName() // 'Nettie_Zboncak40' - * faker.internet.userName('Jeanne', 'Doe') // 'Jeanne98' - note surname is not used + * faker.internet.userName('Jeanne') // 'Jeanne98' + * faker.internet.userName('Jeanne') // 'Jeanne.Smith98' + * faker.internet.userName('Jeanne', 'Doe') // 'Jeanne_Doe98' * faker.internet.userName('John', 'Doe') // 'John.Doe' * faker.internet.userName('Hélene', 'Müller') // 'Helene_Muller11' * faker.internet.userName('Фёдор', 'Достоевский') // 'Fedor.Dostoevskii50' @@ -542,16 +553,18 @@ export class InternetModule { * This will always return a plain ASCII string. * Some basic stripping of accents and transliteration of characters will be done. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.firstName The optional first name to use. If not specified, a random one will be chosen. * @param options.lastName The optional last name to use. If not specified, a random one will be chosen. * @param legacyLastName The optional last name to use. If not specified, a random one will be chosen. * - * @see faker.internet.displayName() + * @see faker.internet.displayName(): For generating an Unicode display name. * * @example * faker.internet.userName() // 'Nettie_Zboncak40' - * faker.internet.userName({ firstName: 'Jeanne', lastName: 'Doe'}) // 'Jeanne98' - note surname is not used + * faker.internet.userName({ firstName: 'Jeanne'}) // 'Jeanne98' + * faker.internet.userName({ firstName: 'Jeanne'}) // 'Jeanne.Smith98' + * faker.internet.userName({ firstName: 'Jeanne', lastName: 'Doe'}) // 'Jeanne_Doe98' * faker.internet.userName({ firstName: 'John', lastName: 'Doe' }) // 'John.Doe' * faker.internet.userName({ firstName: 'Hélene', lastName: 'Müller' }) // 'Helene_Muller11' * faker.internet.userName({ firstName: 'Фёдор', lastName: 'Достоевский' }) // 'Fedor.Dostoevskii50' @@ -613,22 +626,24 @@ export class InternetModule { const { firstName = this.faker.person.firstName(), lastName = legacyLastName ?? this.faker.person.lastName(), + lastName: hasLastName = legacyLastName, } = options; let result: string; - switch (this.faker.number.int(2)) { + const strategy = this.faker.number.int(hasLastName ? 1 : 2); + const separator = this.faker.helpers.arrayElement(['.', '_']); + switch (strategy) { case 0: - result = `${firstName}${this.faker.number.int(99)}`; + result = `${firstName}${separator}${lastName}${this.faker.number.int( + 99 + )}`; break; case 1: - result = - firstName + this.faker.helpers.arrayElement(['.', '_']) + lastName; + result = `${firstName}${separator}${lastName}`; break; case 2: - result = `${firstName}${this.faker.helpers.arrayElement([ - '.', - '_', - ])}${lastName}${this.faker.number.int(99)}`; + default: + result = `${firstName}${this.faker.number.int(99)}`; break; } @@ -645,13 +660,15 @@ export class InternetModule { return charMapping[char]; } - if (char.charCodeAt(0) < 0x80) { + const charCode = char.codePointAt(0) ?? Number.NaN; + + if (charCode < 0x80) { // Keep ASCII characters return char; } // Final fallback return the Unicode char code value for Chinese, Japanese, Korean etc, base-36 encoded - return char.charCodeAt(0).toString(36); + return charCode.toString(36); }) .join(''); result = result.toString().replace(/'/g, ''); @@ -666,11 +683,11 @@ export class InternetModule { * If the input names include Unicode characters, the resulting display name will contain Unicode characters. * It will not contain spaces. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.firstName The optional first name to use. If not specified, a random one will be chosen. * @param options.lastName The optional last name to use. If not specified, a random one will be chosen. * - * @see faker.internet.userName() + * @see faker.internet.userName(): For generating a plain ASCII username. * * @example * faker.internet.displayName() // 'Nettie_Zboncak40' @@ -705,7 +722,7 @@ export class InternetModule { * @param firstName The optional first name to use. If not specified, a random one will be chosen. * @param lastName The optional last name to use. If not specified, a random one will be chosen. * - * @see faker.internet.userName() + * @see faker.internet.userName(): For generating a plain ASCII username. * * @example * faker.internet.displayName() // 'Nettie_Zboncak40' @@ -726,12 +743,12 @@ export class InternetModule { * If the input names include Unicode characters, the resulting display name will contain Unicode characters. * It will not contain spaces. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.firstName The optional first name to use. If not specified, a random one will be chosen. * @param options.lastName The optional last name to use. If not specified, a random one will be chosen. * @param legacyLastName The optional last name to use. If not specified, a random one will be chosen. * - * @see faker.internet.userName() + * @see faker.internet.userName(): For generating a plain ASCII username. * * @example * faker.internet.displayName() // 'Nettie_Zboncak40' @@ -809,6 +826,7 @@ export class InternetModule { firstName + this.faker.helpers.arrayElement(['.', '_']) + lastName; break; case 2: + default: result = `${firstName}${this.faker.helpers.arrayElement([ '.', '_', @@ -1048,7 +1066,7 @@ export class InternetModule { * Based on * http://stackoverflow.com/questions/43044/algorithm-to-randomly-generate-an-aesthetically-pleasing-color-palette * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.redBase The optional base red in range between `0` and `255`. Defaults to `0`. * @param options.greenBase The optional base green in range between `0` and `255`. Defaults to `0`. * @param options.blueBase The optional base blue in range between `0` and `255`. Defaults to `0`. @@ -1104,7 +1122,7 @@ export class InternetModule { * Based on * http://stackoverflow.com/questions/43044/algorithm-to-randomly-generate-an-aesthetically-pleasing-color-palette * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.redBase The optional base red in range between `0` and `255`. Defaults to `0`. * @param options.greenBase The optional base green in range between `0` and `255`. Defaults to `0`. * @param options.blueBase The optional base blue in range between `0` and `255`. Defaults to `0`. @@ -1207,7 +1225,7 @@ export class InternetModule { /** * Generates a random mac address. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param separator The optional separator to use. Can be either `':'`, `'-'` or `''`. Defaults to `':'`. * * @example @@ -1237,7 +1255,7 @@ export class InternetModule { /** * Generates a random mac address. * - * @param options The optional separator or an options object. Defaults to `{}`. + * @param options The optional separator or an options object. * @param separator The optional separator to use. Can be either `':'`, `'-'` or `''`. Defaults to `':'`. * * @example @@ -1297,7 +1315,7 @@ export class InternetModule { * Generates a random password-like string. Do not use this method for generating actual passwords for users. * Since the source of the randomness is not cryptographically secure, neither is this generator. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.length The length of the password to generate. Defaults to `15`. * @param options.memorable Whether the generated password should be memorable. Defaults to `false`. * @param options.pattern The pattern that all chars should match. @@ -1369,7 +1387,7 @@ export class InternetModule { /** * Generates a random password. * - * @param options The length of the password or an options object. Defaults to `{}`. + * @param options The length of the password or an options object. * @param options.length The length of the password to generate. Defaults to `15`. * @param options.memorable Whether the generated password should be memorable. Defaults to `false`. * @param options.pattern The pattern that all chars should match. @@ -1479,7 +1497,7 @@ export class InternetModule { } const n = this.faker.number.int(94) + 33; - let char = String.fromCharCode(n); + let char = String.fromCodePoint(n); if (memorable) { char = char.toLowerCase(); } diff --git a/src/modules/internet/user-agent.ts b/src/modules/internet/user-agent.ts index 43a1b3cebe6..fba5ed05ea5 100644 --- a/src/modules/internet/user-agent.ts +++ b/src/modules/internet/user-agent.ts @@ -255,8 +255,8 @@ export function generate(faker: Faker): string { arch === 'win' ? `(Windows NT ${version_string.nt()}${proc ? `; ${proc}` : ''}` : arch === 'mac' - ? `(Macintosh; ${proc} Mac OS X ${version_string.osx()}` - : `(X11; Linux ${proc}`; + ? `(Macintosh; ${proc} Mac OS X ${version_string.osx()}` + : `(X11; Linux ${proc}`; return `Mozilla/5.0 ${os_ver}; rv:${firefox_ver.slice( 0, @@ -290,8 +290,10 @@ export function generate(faker: Faker): string { arch === 'win' ? `(Windows NT ${version_string.nt()}; U; ${randomLang()}${presto_ver}` : arch === 'lin' - ? `(X11; Linux ${randomProc(arch)}; U; ${randomLang()}${presto_ver}` - : `(Macintosh; Intel Mac OS X ${version_string.osx()} U; ${randomLang()} Presto/${version_string.presto()} Version/${version_string.presto2()})`; + ? `(X11; Linux ${randomProc( + arch + )}; U; ${randomLang()}${presto_ver}` + : `(Macintosh; Intel Mac OS X ${version_string.osx()} U; ${randomLang()} Presto/${version_string.presto()} Version/${version_string.presto2()})`; return `Opera/${faker.number.int({ min: 9, @@ -326,8 +328,8 @@ export function generate(faker: Faker): string { '_' )}) ` : arch === 'win' - ? `(Windows; U; Windows NT ${version_string.nt()})` - : `(X11; Linux ${randomProc(arch)}`; + ? `(Windows; U; Windows NT ${version_string.nt()})` + : `(X11; Linux ${randomProc(arch)}`; return `Mozilla/5.0 ${os_ver} AppleWebKit/${safari} (KHTML, like Gecko) Chrome/${version_string.chrome()} Safari/${safari}`; }, diff --git a/src/modules/location/index.ts b/src/modules/location/index.ts index 19816c8fd67..b06af49e656 100644 --- a/src/modules/location/index.ts +++ b/src/modules/location/index.ts @@ -1,7 +1,6 @@ -import type { Faker } from '../..'; import { FakerError } from '../../errors/faker-error'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; /** * Module to generate addresses and locations. Prior to Faker 8.0.0, this module was known as `faker.address`. @@ -14,23 +13,19 @@ import { deprecated } from '../../internal/deprecated'; * * For a random country, you can use [`country()`](https://fakerjs.dev/api/location.html#country) or [`countryCode()`](https://fakerjs.dev/api/location.html#countrycode). */ -export class LocationModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class LocationModule extends ModuleBase { /** * Generates random zip code from specified format. If format is not specified, * the locale's zip format is used. * - * @param options The format used to generate the zip code or an options object. Defaults to `{}`. + * @param options The format used to generate the zip code or an options object. * @param options.state The state to generate the zip code for. * If the current locale does not have a corresponding `postcode_by_state` definition, an error is thrown. * @param options.format The optional format used to generate the zip code. * By default, a random format is used from the locale zip formats. * This won't be used if the state option is specified. * - * @see faker.helpers.replaceSymbols() + * @see faker.helpers.replaceSymbols(): For more information about how the pattern is used. * * @example * faker.location.zipCode() // '17839' @@ -90,11 +85,11 @@ export class LocationModule { * * If the current locale does not have a corresponding `postcode_by_state` definition, an error is thrown. * - * @param options A state abbreviation or an options object. Defaults to `{}`. + * @param options A state abbreviation or an options object. * @param options.state The abbreviation of the state to generate the zip code for. * If not specified, a random zip code is generated according to the locale's zip format. * - * @see faker.location.zipCode() + * @see faker.location.zipCode(): For the replacement method. * * @example * fakerEN_US.location.zipCodeByState("AK") // '99595' @@ -150,7 +145,7 @@ export class LocationModule { /** * Returns a random city name from a list of real cities for the locale. * - * @see faker.location.city() + * @see faker.location.city(): For the replacement method. * * @example * faker.location.cityName() // 'San Rafael' @@ -208,7 +203,7 @@ export class LocationModule { /** * Returns a random localized street name. * - * @see faker.location.street() + * @see faker.location.street(): For the replacement method. * * @example * fakerDE.location.streetName() // 'Cavill Avenue' @@ -232,7 +227,7 @@ export class LocationModule { /** * Generates a random localized street address. * - * @param options Whether to use a full address or an options object. Defaults to `{}`. + * @param options Whether to use a full address or an options object. * @param options.useFullAddress When true this will generate a full address. * Otherwise it will just generate a street address. * @@ -319,7 +314,7 @@ export class LocationModule { /** * Returns a random [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code. * - * @param options The code to return or an options object. Defaults to `{}`. + * @param options The code to return or an options object. * @param options.variant The variant to return. Can be one of: * * - `'alpha-2'` (two-letter code) @@ -377,8 +372,11 @@ export class LocationModule { /** * Returns a random localized state, or other equivalent first-level administrative entity for the locale's country such as a province or region. + * Generally, these are the ISO 3166-2 subdivisions for a country. + * If a locale doesn't correspond to one specific country, the method may return ISO 3166-2 subdivisions from one or more countries that uses that language. For example, the `ar` locale includes subdivisions from Arabic-speaking countries, such as Tunisia, Algeria, Syria, Lebanon, etc. + * For historical compatibility reasons, the default `en` locale only includes states in the United States (identical to `en_US`). However, you can use other English locales, such as `en_IN`, `en_GB`, and `en_AU`, if needed. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.abbreviated If true this will return abbreviated first-level administrative entity names. * Otherwise this will return the long name. Defaults to `false`. * @@ -432,7 +430,7 @@ export class LocationModule { /** * Generates a random latitude. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.max The upper bound for the latitude to generate. Defaults to `90`. * @param options.min The lower bound for the latitude to generate. Defaults to `-90`. * @param options.precision The number of decimal points of precision for the latitude. Defaults to `4`. @@ -484,7 +482,7 @@ export class LocationModule { /** * Generates a random latitude. * - * @param options The upper bound for the latitude or an options object. Defaults to `{}`. + * @param options The upper bound for the latitude or an options object. * @param options.max The upper bound for the latitude to generate. Defaults to `90`. * @param options.min The lower bound for the latitude to generate. Defaults to `-90`. * @param options.precision The number of decimal points of precision for the latitude. Defaults to `4`. @@ -531,7 +529,7 @@ export class LocationModule { /** * Generates a random latitude. * - * @param options The upper bound for the latitude or an options object. Defaults to `{}`. + * @param options The upper bound for the latitude or an options object. * @param options.max The upper bound for the latitude to generate. Defaults to `90`. * @param options.min The lower bound for the latitude to generate. Defaults to `-90`. * @param options.precision The number of decimal points of precision for the latitude. Defaults to `4`. @@ -581,13 +579,13 @@ export class LocationModule { const { max = 90, min = legacyMin, precision = legacyPrecision } = options; - return this.faker.number.float({ min, max, precision: 10 ** -precision }); + return this.faker.number.float({ min, max, multipleOf: 10 ** -precision }); } /** * Generates a random longitude. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.max The upper bound for the longitude to generate. Defaults to `180`. * @param options.min The lower bound for the longitude to generate. Defaults to `-180`. * @param options.precision The number of decimal points of precision for the longitude. Defaults to `4`. @@ -623,7 +621,7 @@ export class LocationModule { /** * Generates a random longitude. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.max The upper bound for the longitude to generate. Defaults to `180`. * @param options.min The lower bound for the longitude to generate. Defaults to `-180`. * @param options.precision The number of decimal points of precision for the longitude. Defaults to `4`. @@ -640,7 +638,7 @@ export class LocationModule { /** * Generates a random longitude. * - * @param options The upper bound for the longitude or an options object. Defaults to `{}`. + * @param options The upper bound for the longitude or an options object. * @param options.max The upper bound for the longitude to generate. Defaults to `180`. * @param options.min The lower bound for the longitude to generate. Defaults to `-180`. * @param options.precision The number of decimal points of precision for the longitude. Defaults to `4`. @@ -684,7 +682,7 @@ export class LocationModule { /** * Generates a random longitude. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.max The upper bound for the longitude to generate. Defaults to `180`. * @param options.min The lower bound for the longitude to generate. Defaults to `-180`. * @param options.precision The number of decimal points of precision for the longitude. Defaults to `4`. @@ -734,13 +732,13 @@ export class LocationModule { const { max = 180, min = legacyMin, precision = legacyPrecision } = options; - return this.faker.number.float({ max, min, precision: 10 ** -precision }); + return this.faker.number.float({ max, min, multipleOf: 10 ** -precision }); } /** * Returns a random direction (cardinal and ordinal; northwest, east, etc). * - * @param options The options to use. Defaults to `{}`. + * @param options The options to use. * @param options.abbreviated If true this will return abbreviated directions (NW, E, etc). * Otherwise this will return the long name. Defaults to `false`. * @@ -778,7 +776,7 @@ export class LocationModule { /** * Returns a random direction (cardinal and ordinal; northwest, east, etc). * - * @param options Whether to use abbreviated or an options object. Defaults to `{}`. + * @param options Whether to use abbreviated or an options object. * @param options.abbreviated If true this will return abbreviated directions (NW, E, etc). * Otherwise this will return the long name. Defaults to `false`. * @@ -804,7 +802,7 @@ export class LocationModule { /** * Returns a random direction (cardinal and ordinal; northwest, east, etc). * - * @param options Whether to use abbreviated or an options object. Defaults to `{}`. + * @param options Whether to use abbreviated or an options object. * @param options.abbreviated If true this will return abbreviated directions (NW, E, etc). * Otherwise this will return the long name. Defaults to `false`. * @@ -853,7 +851,7 @@ export class LocationModule { /** * Returns a random cardinal direction (north, east, south, west). * - * @param options The options to use. Defaults to `{}`. + * @param options The options to use. * @param options.abbreviated If true this will return abbreviated directions (N, E, etc). * Otherwise this will return the long name. Defaults to `false`. * @@ -917,7 +915,7 @@ export class LocationModule { /** * Returns a random cardinal direction (north, east, south, west). * - * @param options Whether to use abbreviated or an options object. Defaults to `{}`. + * @param options Whether to use abbreviated or an options object. * @param options.abbreviated If true this will return abbreviated directions (N, E, etc). * Otherwise this will return the long name. Defaults to `false`. * @@ -965,7 +963,7 @@ export class LocationModule { /** * Returns a random ordinal direction (northwest, southeast, etc). * - * @param options Whether to use abbreviated or an options object. Defaults to `{}`. + * @param options Whether to use abbreviated or an options object. * @param options.abbreviated If true this will return abbreviated directions (NW, SE, etc). * Otherwise this will return the long name. Defaults to `false`. * @@ -987,7 +985,7 @@ export class LocationModule { /** * Returns a random ordinal direction (northwest, southeast, etc). * - * @param options Whether to use abbreviated or an options object. Defaults to `{}`. + * @param options Whether to use abbreviated or an options object. * @param options.abbreviated If true this will return abbreviated directions (NW, SE, etc). * Otherwise this will return the long name. Defaults to `false`. * @@ -1004,7 +1002,7 @@ export class LocationModule { /** * Returns a random ordinal direction (northwest, southeast, etc). * - * @param options Whether to use abbreviated or an options object. Defaults to `{}`. + * @param options Whether to use abbreviated or an options object. * @param options.abbreviated If true this will return abbreviated directions (NW, SE, etc). * Otherwise this will return the long name. Defaults to `false`. * @@ -1030,7 +1028,7 @@ export class LocationModule { /** * Returns a random ordinal direction (northwest, southeast, etc). * - * @param options Whether to use abbreviated or an options object. Defaults to `{}`. + * @param options Whether to use abbreviated or an options object. * @param options.abbreviated If true this will return abbreviated directions (NW, SE, etc). * Otherwise this will return the long name. Defaults to `false`. * @@ -1092,8 +1090,21 @@ export class LocationModule { * @since 8.0.0 */ nearbyGPSCoordinate(options?: { + /** + * The original coordinate to get a new coordinate close to. + */ origin?: [latitude: number, longitude: number]; + /** + * The maximum distance from the given coordinate to the new coordinate. + * + * @default 10 + */ radius?: number; + /** + * If `true` assume the radius to be in kilometers. If `false` for miles. + * + * @default false + */ isMetric?: boolean; }): [latitude: number, longitude: number]; /** @@ -1126,8 +1137,8 @@ export class LocationModule { * If no coordinate is given, a random one will be chosen. * @param options.radius The maximum distance from the given coordinate to the new coordinate. Defaults to `10`. * @param options.isMetric If `true` assume the radius to be in kilometers. If `false` for miles. Defaults to `false`. - * @param legacyRadius Deprecated, use `options.radius` instead. - * @param legacyIsMetric Deprecated, use `options.isMetric` instead. + * @param legacyRadius Deprecated, use `options.radius` instead. Defaults to `10`. + * @param legacyIsMetric Deprecated, use `options.isMetric` instead. Defaults to `false`. * * @example * faker.location.nearbyGPSCoordinate() // [ 33.8475, -170.5953 ] @@ -1140,8 +1151,21 @@ export class LocationModule { options?: | [latitude: number, longitude: number] | { + /** + * The original coordinate to get a new coordinate close to. + */ origin?: [latitude: number, longitude: number]; + /** + * The maximum distance from the given coordinate to the new coordinate. + * + * @default 10 + */ radius?: number; + /** + * If `true` assume the radius to be in kilometers. If `false` for miles. + * + * @default false + */ isMetric?: boolean; }, legacyRadius?: number, @@ -1183,7 +1207,7 @@ export class LocationModule { const angleRadians = this.faker.number.float({ max: 2 * Math.PI, - precision: 0.00001, + multipleOf: 0.00001, }); // in ° radians const radiusMetric = isMetric ? radius : radius * 1.60934; // in km @@ -1191,7 +1215,7 @@ export class LocationModule { const distanceInKm = this.faker.number.float({ max: radiusMetric, - precision: 0.001, + multipleOf: 0.001, }) * errorCorrection; // in km /** diff --git a/src/modules/lorem/index.ts b/src/modules/lorem/index.ts index 82e557e607c..1f9ba026327 100644 --- a/src/modules/lorem/index.ts +++ b/src/modules/lorem/index.ts @@ -1,5 +1,4 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; import { filterWordListByLength } from '../word/filter-word-list-by-length'; /** @@ -13,11 +12,7 @@ import { filterWordListByLength } from '../word/filter-word-list-by-length'; * * The generic [`text()`](https://fakerjs.dev/api/lorem.html#text) method can be used to generate some text between one sentence and multiple paragraphs, while [`slug()`](https://fakerjs.dev/api/lorem.html#slug) generates an URL-friendly hyphenated string. */ -export class LoremModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class LoremModule extends ModuleBase { /** * Generates a word of a specified length. * @@ -332,7 +327,7 @@ export class LoremModule { const method = this.faker.helpers.arrayElement(methods); - return `${this[method]()}`; + return this[method](); } /** diff --git a/src/modules/music/index.ts b/src/modules/music/index.ts index 86e865aee52..332b45306ad 100644 --- a/src/modules/music/index.ts +++ b/src/modules/music/index.ts @@ -1,5 +1,4 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; /** * Module to generate music related entries. @@ -8,11 +7,7 @@ import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-fu * * Generate a random music genre with [`genre()`](https://fakerjs.dev/api/music.html#genre) or song name with [`songName()`](https://fakerjs.dev/api/music.html#songname). Both may be localized. */ -export class MusicModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class MusicModule extends ModuleBase { /** * Returns a random music genre. * diff --git a/src/modules/number/index.ts b/src/modules/number/index.ts index 87464212a0a..2d1af9ccbd9 100644 --- a/src/modules/number/index.ts +++ b/src/modules/number/index.ts @@ -1,6 +1,6 @@ -import type { SimpleFaker } from '../..'; import { FakerError } from '../../errors/faker-error'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { deprecated } from '../../internal/deprecated'; +import { SimpleModuleBase } from '../../internal/module-base'; /** * Module to generate numbers of any kind. @@ -16,22 +16,19 @@ import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-fu * - For numeric strings of a given length, use [`faker.string.numeric()`](https://fakerjs.dev/api/string.html#numeric). * - For credit card numbers, use [`faker.finance.creditCardNumber()`](https://fakerjs.dev/api/finance.html#creditcardnumber). */ -export class NumberModule { - constructor(private readonly faker: SimpleFaker) { - bindThisToMemberFunctions(this); - } - +export class NumberModule extends SimpleModuleBase { /** * Returns a single random integer between zero and the given max value or the given range. * The bounds are inclusive. * - * @param options Maximum value or options object. Defaults to `{}`. + * @param options Maximum value or options object. * @param options.min Lower bound for generated number. Defaults to `0`. * @param options.max Upper bound for generated number. Defaults to `Number.MAX_SAFE_INTEGER`. * - * @throws When options define `max < min`. + * @throws When `min` is greater than `max`. + * @throws When there are no integers between `min` and `max`. * - * @see faker.string.numeric() If you would like to generate a `string` of digits with a given length (range). + * @see faker.string.numeric(): For generating a `string` of digits with a given length (range). * * @example * faker.number.int() // 2900970162509863 @@ -89,22 +86,29 @@ export class NumberModule { } /** - * Returns a single random floating-point number for a given precision or range and precision. - * The lower bound is inclusive, the upper bound is exclusive, unless precision is passed. + * Returns a single random floating-point number. + * The lower bound is inclusive, the upper bound is exclusive, unless `multipleOf` is passed. * - * @param options Upper bound or options object. Defaults to `{}`. + * @param options Upper bound or options object. * @param options.min Lower bound for generated number. Defaults to `0.0`. * @param options.max Upper bound for generated number. Defaults to `1.0`. * @param options.precision Precision of the generated number, for example `0.01` will round to 2 decimal points. * If precision is passed, the upper bound is inclusive. + * @param options.multipleOf The generated number will be a multiple of this property. + * This property can be used to limit the result to a specific number of decimal digits. + * For example `0.01` will round to 2 decimal points. + * If multipleOf is passed, the upper bound is inclusive. + * + * @throws When `min` is greater than `max`. + * @throws When `precision` is negative. * * @example * faker.number.float() // 0.5688541042618454 * faker.number.float(3) // 2.367973240558058 * faker.number.float({ min: -1000000 }) //-780678.849672846 * faker.number.float({ max: 100 }) // 17.3687307164073 - * faker.number.float({ precision: 0.1 }) // 0.9 - * faker.number.float({ min: 10, max: 100, precision: 0.001 }) // 35.415 + * faker.number.float({ multipleOf: 0.25 }) // 3.75 + * faker.number.float({ min: 10, max: 100, multipleOf: 0.001 }) // 35.415 * * @since 8.0.0 */ @@ -126,8 +130,15 @@ export class NumberModule { max?: number; /** * Precision of the generated number. + * + * @deprecated Use `multipleOf` instead. */ precision?: number; + /** + * The generated number will be a multiple of this property. + * If multipleOf is passed, the upper bound is inclusive. + */ + multipleOf?: number; } = {} ): number { if (typeof options === 'number') { @@ -136,7 +147,17 @@ export class NumberModule { }; } - const { min = 0, max = 1, precision } = options; + // eslint-disable-next-line deprecation/deprecation + const { min = 0, max = 1, precision, multipleOf = precision } = options; + + if (precision !== undefined) { + deprecated({ + deprecated: 'faker.number.float({ precision })', + proposed: 'faker.number.float({ multipleOf })', + since: '8.4', + until: '9.0', + }); + } if (max === min) { return min; @@ -146,12 +167,18 @@ export class NumberModule { throw new FakerError(`Max ${max} should be greater than min ${min}.`); } - if (precision !== undefined) { - if (precision <= 0) { - throw new FakerError(`Precision should be greater than 0.`); + if (multipleOf !== undefined) { + if (multipleOf <= 0) { + // TODO @xDivisionByZerox: Clean up in v9.0 + throw new FakerError(`multipleOf/precision should be greater than 0.`); } - const factor = 1 / precision; + const logPrecision = Math.log10(multipleOf); + // Workaround to get integer values for the inverse of all multiples of the form 10^-n + const factor = + multipleOf < 1 && Number.isInteger(logPrecision) + ? 10 ** -logPrecision + : 1 / multipleOf; const int = this.int({ min: min * factor, max: max * factor, @@ -169,13 +196,14 @@ export class NumberModule { * Returns a [binary](https://en.wikipedia.org/wiki/Binary_number) number. * The bounds are inclusive. * - * @param options Maximum value or options object. Defaults to `{}`. + * @param options Maximum value or options object. * @param options.min Lower bound for generated number. Defaults to `0`. * @param options.max Upper bound for generated number. Defaults to `1`. * - * @throws When options define `max < min`. + * @throws When `min` is greater than `max`. + * @throws When there are no integers between `min` and `max`. * - * @see faker.string.binary() If you would like to generate a `binary string` with a given length (range). + * @see faker.string.binary(): For generating a `binary string` with a given length (range). * * @example * faker.number.binary() // '1' @@ -218,13 +246,14 @@ export class NumberModule { * Returns an [octal](https://en.wikipedia.org/wiki/Octal) number. * The bounds are inclusive. * - * @param options Maximum value or options object. Defaults to `{}`. + * @param options Maximum value or options object. * @param options.min Lower bound for generated number. Defaults to `0`. * @param options.max Upper bound for generated number. Defaults to `7`. * - * @throws When options define `max < min`. + * @throws When `min` is greater than `max`. + * @throws When there are no integers between `min` and `max`. * - * @see faker.string.octal() If you would like to generate an `octal string` with a given length (range). + * @see faker.string.octal(): For generating an `octal string` with a given length (range). * * @example * faker.number.octal() // '5' @@ -267,11 +296,12 @@ export class NumberModule { * Returns a lowercase [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) number. * The bounds are inclusive. * - * @param options Maximum value or options object. Defaults to `{}`. + * @param options Maximum value or options object. * @param options.min Lower bound for generated number. Defaults to `0`. * @param options.max Upper bound for generated number. Defaults to `15`. * - * @throws When options define `max < min`. + * @throws When `min` is greater than `max`. + * @throws When there are no integers between `min` and `max`. * * @example * faker.number.hex() // 'b' @@ -314,11 +344,11 @@ export class NumberModule { * Returns a [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#bigint_type) number. * The bounds are inclusive. * - * @param options Maximum value or options object. Defaults to `{}`. + * @param options Maximum value or options object. * @param options.min Lower bound for generated bigint. Defaults to `0n`. * @param options.max Upper bound for generated bigint. Defaults to `min + 999999999999999n`. * - * @throws When options define `max < min`. + * @throws When `min` is greater than `max`. * * @example * faker.number.bigInt() // 55422n diff --git a/src/modules/person/index.ts b/src/modules/person/index.ts index f07727a2c96..6c5a42dfe02 100644 --- a/src/modules/person/index.ts +++ b/src/modules/person/index.ts @@ -1,5 +1,7 @@ import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { FakerError } from '../../errors/faker-error'; +import { ModuleBase } from '../../internal/module-base'; +import { assertLocaleData } from '../../locale-proxy'; export enum Sex { Female = 'female', @@ -18,6 +20,7 @@ export type SexType = `${Sex}`; * @param param2.generic Non-sex definitions. * @param param2.female Female definitions. * @param param2.male Male definitions. + * @param type Type of the definition. * * @returns Definition based on given sex. */ @@ -25,10 +28,14 @@ function selectDefinition( faker: Faker, elementSelectorFn: (values: T[]) => string, sex: SexType | undefined, - // TODO @Shinigami92 2022-03-21: Remove fallback empty object when `strict: true` - { generic, female, male }: { generic?: T[]; female?: T[]; male?: T[] } = {} + { + generic, + female, + male, + }: { generic?: T[] | null; female?: T[] | null; male?: T[] | null }, + type: string ): string { - let values: T[] | undefined; + let values: T[] | undefined | null; switch (sex) { case Sex.Female: @@ -50,6 +57,8 @@ function selectDefinition( } else { values = generic; } + + assertLocaleData(values, `person.{${type}, female_${type}, male_${type}}`); } return elementSelectorFn(values); @@ -74,11 +83,7 @@ function selectDefinition( * * For personal contact information like phone numbers and email addresses, see the [`faker.phone`](https://fakerjs.dev/api/phone.html) and [`faker.internet`](https://fakerjs.dev/api/internet.html) modules. */ -export class PersonModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class PersonModule extends ModuleBase { /** * Returns a random first name. * @@ -96,11 +101,17 @@ export class PersonModule { const { first_name, female_first_name, male_first_name } = this.faker.rawDefinitions.person ?? {}; - return selectDefinition(this.faker, this.faker.helpers.arrayElement, sex, { - generic: first_name, - female: female_first_name, - male: male_first_name, - }); + return selectDefinition( + this.faker, + this.faker.helpers.arrayElement, + sex, + { + generic: first_name, + female: female_first_name, + male: male_first_name, + }, + 'first_name' + ); } /** @@ -139,16 +150,23 @@ export class PersonModule { generic: last_name_pattern, female: female_last_name_pattern, male: male_last_name_pattern, - } + }, + 'last_name_pattern' ); return this.faker.helpers.fake(pattern); } - return selectDefinition(this.faker, this.faker.helpers.arrayElement, sex, { - generic: last_name, - female: female_last_name, - male: male_last_name, - }); + return selectDefinition( + this.faker, + this.faker.helpers.arrayElement, + sex, + { + generic: last_name, + female: female_last_name, + male: male_last_name, + }, + 'last_name' + ); } /** @@ -168,17 +186,23 @@ export class PersonModule { const { middle_name, female_middle_name, male_middle_name } = this.faker.rawDefinitions.person ?? {}; - return selectDefinition(this.faker, this.faker.helpers.arrayElement, sex, { - generic: middle_name, - female: female_middle_name, - male: male_middle_name, - }); + return selectDefinition( + this.faker, + this.faker.helpers.arrayElement, + sex, + { + generic: middle_name, + female: female_middle_name, + male: male_middle_name, + }, + 'middle_name' + ); } /** * Generates a random full name. * - * @param options An options object. Defaults to `{}`. + * @param options An options object. * @param options.firstName The optional first name to use. If not specified a random one will be chosen. * @param options.lastName The optional last name to use. If not specified a random one will be chosen. * @param options.sex The optional sex to use. Can be either `'female'` or `'male'`. @@ -237,7 +261,7 @@ export class PersonModule { /** * Returns a random gender. * - * @see faker.person.sex() if you would like to generate binary-gender value + * @see faker.person.sex(): For generating a binary-gender value. * * @example * faker.person.gender() // 'Trans*Man' @@ -256,7 +280,8 @@ export class PersonModule { * Output of this method is localised, so it should not be used to fill the parameter `sex` * available in some other modules for example `faker.person.firstName()`. * - * @see faker.person.gender() if you would like to generate gender related values. + * @see faker.person.gender(): For generating a gender related value. + * @see faker.person.sexType(): For generating a sex value to be used as a parameter. * * @example * faker.person.sex() // 'female' @@ -268,7 +293,10 @@ export class PersonModule { } /** - * Returns a random sex type. + * Returns a random sex type. The `SexType` is intended to be used in parameters and conditions. + * + * @see faker.person.gender(): For generating a gender related value in forms. + * @see faker.person.sex(): For generating a binary-gender value in forms. * * @example * faker.person.sexType() // Sex.Female @@ -309,11 +337,17 @@ export class PersonModule { const { prefix, female_prefix, male_prefix } = this.faker.rawDefinitions.person ?? {}; - return selectDefinition(this.faker, this.faker.helpers.arrayElement, sex, { - generic: prefix, - female: female_prefix, - male: male_prefix, - }); + return selectDefinition( + this.faker, + this.faker.helpers.arrayElement, + sex, + { + generic: prefix, + female: female_prefix, + male: male_prefix, + }, + 'prefix' + ); } /** @@ -340,7 +374,9 @@ export class PersonModule { * @since 8.0.0 */ jobTitle(): string { - return `${this.jobDescriptor()} ${this.jobArea()} ${this.jobType()}`; + return this.faker.helpers.fake( + this.faker.definitions.person.job_title_pattern + ); } /** @@ -352,9 +388,13 @@ export class PersonModule { * @since 8.0.0 */ jobDescriptor(): string { - return this.faker.helpers.arrayElement( - this.faker.definitions.person.title.descriptor - ); + const values = this.faker.definitions.person.title.descriptor; + + if (values == null) { + throw new FakerError('No person.title.descriptor definitions available.'); + } + + return this.faker.helpers.arrayElement(values); } /** @@ -366,9 +406,13 @@ export class PersonModule { * @since 8.0.0 */ jobArea(): string { - return this.faker.helpers.arrayElement( - this.faker.definitions.person.title.level - ); + const values = this.faker.definitions.person.title.level; + + if (values == null) { + throw new FakerError('No person.title.area definitions available.'); + } + + return this.faker.helpers.arrayElement(values); } /** @@ -380,9 +424,13 @@ export class PersonModule { * @since 8.0.0 */ jobType(): string { - return this.faker.helpers.arrayElement( - this.faker.definitions.person.title.job - ); + const values = this.faker.definitions.person.title.job; + + if (values == null) { + throw new FakerError('No person.title.job definitions available.'); + } + + return this.faker.helpers.arrayElement(values); } /** diff --git a/src/modules/phone/index.ts b/src/modules/phone/index.ts index b677ec4a6b8..833938d71fc 100644 --- a/src/modules/phone/index.ts +++ b/src/modules/phone/index.ts @@ -1,6 +1,6 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; +import { legacyReplaceSymbolWithNumber } from '../helpers'; /** * Module to generate phone-related data. @@ -9,14 +9,13 @@ import { deprecated } from '../../internal/deprecated'; * * For a phone number, use [`number()`](https://fakerjs.dev/api/phone.html#number). Many locales provide country-specific formats. */ -export class PhoneModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class PhoneModule extends ModuleBase { /** * Generates a random phone number. * + * @see faker.string.numeric(): For generating a random string of numbers. + * @see faker.helpers.fromRegExp(): For generating a phone number matching a regular expression. + * * @example * faker.phone.number() // '961-770-7727' * @@ -28,13 +27,16 @@ export class PhoneModule { * * @param format Format of the phone number. * + * @see faker.string.numeric(): For generating a random string of numbers. + * @see faker.helpers.fromRegExp(): For generating a phone number matching a regular expression. + * * @example * faker.phone.number('501-###-###') // '501-039-841' * faker.phone.number('+48 91 ### ## ##') // '+48 91 463 61 70' * * @since 7.3.0 * - * @deprecated Use `faker.phone.number()` without an argument instead. + * @deprecated Use `faker.phone.number()` without an argument, `faker.string.numeric()` or `faker.helpers.fromRegExp()` instead. */ number(format: string): string; /** @@ -42,6 +44,9 @@ export class PhoneModule { * * @param format Format of the phone number. Defaults to a random phone number format. * + * @see faker.string.numeric(): For generating a random string of numbers. + * @see faker.helpers.fromRegExp(): For generating a phone number matching a regular expression. + * * @example * faker.phone.number() // '961-770-7727' * @@ -52,7 +57,8 @@ export class PhoneModule { if (format != null) { deprecated({ deprecated: 'faker.phone.number(format)', - proposed: 'faker.phone.number()', + proposed: + 'faker.phone.number(), faker.string.numeric() or faker.helpers.fromRegExp()', since: '8.1', until: '9.0', }); @@ -63,7 +69,7 @@ export class PhoneModule { this.faker.helpers.arrayElement( this.faker.definitions.phone_number.formats ); - return this.faker.helpers.replaceSymbolWithNumber(format); + return legacyReplaceSymbolWithNumber(this.faker, format); } /** diff --git a/src/modules/random/index.ts b/src/modules/random/index.ts index 7fa16f40bfe..371c810ec52 100644 --- a/src/modules/random/index.ts +++ b/src/modules/random/index.ts @@ -1,7 +1,6 @@ -import type { Faker } from '../..'; import { FakerError } from '../../errors/faker-error'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; import { deprecated } from '../../internal/deprecated'; +import { ModuleBase } from '../../internal/module-base'; import type { LiteralUnion } from '../../utils/types'; import type { AlphaChar, @@ -15,16 +14,12 @@ import type { * * @deprecated Use the modules specific to the type of data you want to generate instead. */ -export class RandomModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class RandomModule extends ModuleBase { /** * Returns a random word. * - * @see faker.lorem.word() - * @see faker.word.sample() + * @see faker.lorem.word(): For generating a random placeholder word. + * @see faker.word.sample(): For generating a random real word. * * @example * faker.random.word() // 'Seamless' @@ -128,7 +123,7 @@ export class RandomModule { '_', '-', ]; - let result: string; + let result = ''; let iteration = 0; @@ -162,8 +157,8 @@ export class RandomModule { * @param count.min The minimum number of words. Defaults to `1`. * @param count.max The maximum number of words. Defaults to `3`. * - * @see faker.lorem.words() - * @see faker.word.words() + * @see faker.lorem.words(): For generating a sequence of random placeholder words. + * @see faker.word.words(): For generating a sequence of random real words. * * @example * faker.random.words() // 'neural' @@ -220,12 +215,12 @@ export class RandomModule { /** * Generating a string consisting of letters in the English alphabet. * - * @param options Either the number of characters or an options instance. Defaults to `{ count: 1, casing: 'mixed', bannedChars: [] }`. + * @param options Either the number of characters or an options instance. * @param options.count The number of characters to generate. Defaults to `1`. * @param options.casing The casing of the characters. Defaults to `'mixed'`. * @param options.bannedChars An array with characters to exclude. Defaults to `[]`. * - * @see faker.string.alpha() + * @see faker.string.alpha(): For the replacement method. * * @example * faker.random.alpha() // 'b' @@ -281,11 +276,11 @@ export class RandomModule { * Generating a string consisting of alpha characters and digits. * * @param count The number of characters and digits to generate. Defaults to `1`. - * @param options The options to use. Defaults to `{ bannedChars: [] }`. + * @param options The options to use. * @param options.casing The casing of the characters. Defaults to `'lower'`. * @param options.bannedChars An array of characters and digits which should be banned in the generated string. Defaults to `[]`. * - * @see faker.string.alphanumeric() + * @see faker.string.alphanumeric(): For the replacement method. * * @example * faker.random.alphaNumeric() // '2' @@ -330,11 +325,11 @@ export class RandomModule { * Generates a given length string of digits. * * @param length The number of digits to generate. Defaults to `1`. - * @param options The options to use. Defaults to `{}`. + * @param options The options to use. * @param options.allowLeadingZeros Whether leading zeros are allowed or not. Defaults to `true`. * @param options.bannedDigits An array of digits which should be banned in the generated string. Defaults to `[]`. * - * @see faker.string.numeric() + * @see faker.string.numeric(): For the replacement method. * * @example * faker.random.numeric() // '2' diff --git a/src/modules/science/index.ts b/src/modules/science/index.ts index 95fc1290519..26c78014786 100644 --- a/src/modules/science/index.ts +++ b/src/modules/science/index.ts @@ -1,5 +1,4 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; /** * The possible definitions related to elements. @@ -37,11 +36,7 @@ export interface Unit { * * Both methods in this module return objects rather than strings. For example, you can use `faker.science.chemicalElement().name` to pick out the specific property you need. */ -export class ScienceModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class ScienceModule extends ModuleBase { /** * Returns a random periodic table element. * diff --git a/src/modules/string/index.ts b/src/modules/string/index.ts index a370c386c11..6428153d5aa 100644 --- a/src/modules/string/index.ts +++ b/src/modules/string/index.ts @@ -1,6 +1,5 @@ -import type { SimpleFaker } from '../..'; import { FakerError } from '../../errors/faker-error'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { SimpleModuleBase } from '../../internal/module-base'; import type { LiteralUnion } from '../../utils/types'; export type Casing = 'upper' | 'lower' | 'mixed'; @@ -80,8 +79,6 @@ export type NumericChar = export type AlphaChar = LowerAlphaChar | UpperAlphaChar; export type AlphaNumericChar = AlphaChar | NumericChar; -const SAMPLE_MAX_LENGTH = 2 ** 20; - /** * Module to generate string related entries. * @@ -98,11 +95,7 @@ const SAMPLE_MAX_LENGTH = 2 ** 20; * - Emoji can be found at [`faker.internet.emoji()`](https://fakerjs.dev/api/internet.html#emoji). * - The [`faker.helpers`](https://fakerjs.dev/api/helpers.html) module includes a number of string related methods. */ -export class StringModule { - constructor(private readonly faker: SimpleFaker) { - bindThisToMemberFunctions(this); - } - +export class StringModule extends SimpleModuleBase { /** * Generates a string from the given characters. * @@ -345,7 +338,7 @@ export class StringModule { * @param options.length The number or range of characters to generate after the prefix. Defaults to `1`. * @param options.prefix Prefix for the generated number. Defaults to `'0b'`. * - * @see faker.number.binary() If you would like to generate a `binary number` (within a range). + * @see faker.number.binary(): For generating a binary number (within a range). * * @example * faker.string.binary() // '0b1' @@ -358,6 +351,11 @@ export class StringModule { */ binary( options: { + /** + * The number or range of characters to generate after the prefix. + * + * @default 1 + */ length?: | number | { @@ -370,6 +368,11 @@ export class StringModule { */ max: number; }; + /** + * Prefix for the generated number. + * + * @default '0b' + */ prefix?: string; } = {} ): string { @@ -387,7 +390,7 @@ export class StringModule { * @param options.length The number or range of characters to generate after the prefix. Defaults to `1`. * @param options.prefix Prefix for the generated number. Defaults to `'0o'`. * - * @see faker.number.octal() If you would like to generate an `octal number` (within a range). + * @see faker.number.octal(): For generating an octal number (within a range). * * @example * faker.string.octal() // '0o3' @@ -400,6 +403,11 @@ export class StringModule { */ octal( options: { + /** + * The number or range of characters to generate after the prefix. + * + * @default 1 + */ length?: | number | { @@ -412,6 +420,11 @@ export class StringModule { */ max: number; }; + /** + * Prefix for the generated number. + * + * @default '0o' + */ prefix?: string; } = {} ): string { @@ -530,7 +543,7 @@ export class StringModule { * @param options.allowLeadingZeros Whether leading zeros are allowed or not. Defaults to `true`. * @param options.exclude An array of digits which should be excluded in the generated string. Defaults to `[]`. * - * @see faker.number.int() If you would like to generate a `number` (within a range). + * @see faker.number.int(): For generating a number (within a range). * * @example * faker.string.numeric() // '2' @@ -626,7 +639,7 @@ export class StringModule { /** * Returns a string containing UTF-16 chars between 33 and 125 (`!` to `}`). * - * @param length Length of the generated string. Max length is `2^20`. Defaults to `10`. + * @param length Length of the generated string. Defaults to `10`. * @param length.min The minimum number of characters to generate. * @param length.max The maximum number of characters to generate. * @@ -652,9 +665,6 @@ export class StringModule { } = 10 ): string { length = this.faker.helpers.rangeToNumber(length); - if (length >= SAMPLE_MAX_LENGTH) { - length = SAMPLE_MAX_LENGTH; - } const charCodeOption = { min: 33, @@ -664,7 +674,7 @@ export class StringModule { let returnString = ''; while (returnString.length < length) { - returnString += String.fromCharCode( + returnString += String.fromCodePoint( this.faker.number.int(charCodeOption) ); } diff --git a/src/modules/system/index.ts b/src/modules/system/index.ts index 8a21a39b567..4c6e010ffca 100644 --- a/src/modules/system/index.ts +++ b/src/modules/system/index.ts @@ -1,5 +1,4 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; const commonFileTypes = ['video', 'audio', 'image', 'text', 'application']; @@ -36,11 +35,7 @@ const CRON_DAY_OF_WEEK = [ /** * Generates fake data for many computer systems properties. */ -export class SystemModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class SystemModule extends ModuleBase { /** * Returns a random file name with extension. * @@ -231,7 +226,7 @@ export class SystemModule { /** * Returns a random [network interface](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-understanding_the_predictable_network_interface_device_names). * - * @param options The options to use. Defaults to `{}`. + * @param options The options to use. * @param options.interfaceType The interface type. Can be one of `en`, `wl`, `ww`. * @param options.interfaceSchema The interface schema. Can be one of `index`, `slot`, `mac`, `pci`. * diff --git a/src/modules/vehicle/index.ts b/src/modules/vehicle/index.ts index f5f4f1afd1a..e47b7b05765 100644 --- a/src/modules/vehicle/index.ts +++ b/src/modules/vehicle/index.ts @@ -1,5 +1,4 @@ -import type { Faker } from '../..'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; /** * Module to generate vehicle related entries. @@ -10,11 +9,7 @@ import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-fu * * If you prefer two wheels, you can generate a [`bicycle()`](https://fakerjs.dev/api/vehicle.html#bicycle) type instead. */ -export class VehicleModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class VehicleModule extends ModuleBase { /** * Returns a random vehicle. * diff --git a/src/modules/word/filter-word-list-by-length.ts b/src/modules/word/filter-word-list-by-length.ts index 106e98589bc..f3fcd5abfee 100644 --- a/src/modules/word/filter-word-list-by-length.ts +++ b/src/modules/word/filter-word-list-by-length.ts @@ -1,4 +1,5 @@ import { FakerError } from '../../errors/faker-error'; +import { groupBy } from '../../internal/group-by'; /** * The error handling strategies for the `filterWordListByLength` function. @@ -13,14 +14,7 @@ const STRATEGIES = { wordList: ReadonlyArray, length: { min: number; max: number } ): string[] => { - const wordsByLength = wordList.reduce( - (data, word) => { - (data[word.length] = data[word.length] ?? []).push(word); - return data; - }, - {} as Record - ); - + const wordsByLength = groupBy(wordList, (word) => word.length); const lengths = Object.keys(wordsByLength).map(Number); const min = Math.min(...lengths); const max = Math.max(...lengths); diff --git a/src/modules/word/index.ts b/src/modules/word/index.ts index 93c56829f7d..0408f3cf1bf 100644 --- a/src/modules/word/index.ts +++ b/src/modules/word/index.ts @@ -1,16 +1,11 @@ -import type { Faker } from '../..'; import { FakerError } from '../../errors/faker-error'; -import { bindThisToMemberFunctions } from '../../internal/bind-this-to-member-functions'; +import { ModuleBase } from '../../internal/module-base'; import { filterWordListByLength } from './filter-word-list-by-length'; /** * Module to return various types of words. */ -export class WordModule { - constructor(private readonly faker: Faker) { - bindThisToMemberFunctions(this); - } - +export class WordModule extends ModuleBase { /** * Returns an adjective of random or optionally specified length. * diff --git a/src/simple-faker.ts b/src/simple-faker.ts index 9dae635813b..b6fb3475bde 100644 --- a/src/simple-faker.ts +++ b/src/simple-faker.ts @@ -43,7 +43,7 @@ export class SimpleFaker { * Defaults to `() => new Date()`. * * @see [Reproducible Results](https://fakerjs.dev/guide/usage.html#reproducible-results) - * @see faker.seed() for reproducible results. + * @see faker.seed(): For generating reproducible values. * * @example * faker.seed(1234); @@ -131,7 +131,7 @@ export class SimpleFaker { * @returns The seed that was set. * * @see [Reproducible Results](https://fakerjs.dev/guide/usage.html#reproducible-results) - * @see faker.setDefaultRefDate() when generating relative dates. + * @see faker.setDefaultRefDate(): For generating reproducible relative dates. * * @example * // Consistent values for tests: @@ -166,7 +166,7 @@ export class SimpleFaker { * @returns The seed array that was set. * * @see [Reproducible Results](https://fakerjs.dev/guide/usage.html#reproducible-results) - * @see faker.setDefaultRefDate() when generating relative dates. + * @see faker.setDefaultRefDate(): For generating reproducible relative dates. * * @example * // Consistent values for tests: @@ -201,7 +201,7 @@ export class SimpleFaker { * @returns The seed that was set. * * @see [Reproducible Results](https://fakerjs.dev/guide/usage.html#reproducible-results) - * @see faker.setDefaultRefDate() when generating relative dates. + * @see faker.setDefaultRefDate(): For generating reproducible dates. * * @example * // Consistent values for tests (using a number): diff --git a/test/all-functional.spec.ts b/test/all-functional.spec.ts index 91c310b2b3d..a883da7d2a4 100644 --- a/test/all-functional.spec.ts +++ b/test/all-functional.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest'; import type { allLocales, Faker, RandomModule } from '../src'; import { allFakers, fakerEN } from '../src'; +import { keys } from '../src/internal/keys'; const IGNORED_MODULES = new Set([ 'rawDefinitions', @@ -10,12 +11,32 @@ const IGNORED_MODULES = new Set([ '_defaultRefDate', ]); -function isTestableModule(mod: string) { - return !IGNORED_MODULES.has(mod); +function getMethodNamesByModules(faker: Faker): { [module: string]: string[] } { + return Object.fromEntries( + Object.keys(faker) + .filter(isTestableModule) + .sort() + .map<[string, string[]]>((moduleName) => [ + moduleName, + getMethodNamesOf(faker[moduleName]), + ]) + .filter(([module, methods]) => { + if (methods.length === 0) { + console.log(`Skipping ${module} - No testable methods`); + return false; + } + + return true; + }) + ); } -function isMethodOf(mod: string) { - return (meth: string) => typeof fakerEN[mod][meth] === 'function'; +function isTestableModule(moduleName: string): moduleName is keyof Faker { + return !IGNORED_MODULES.has(moduleName); +} + +function getMethodNamesOf(module: object): string[] { + return keys(module).filter((method) => typeof module[method] === 'function'); } type SkipConfig = Partial< @@ -43,46 +64,28 @@ const BROKEN_LOCALE_METHODS = { person: { prefix: ['az', 'id_ID', 'ru', 'zh_CN', 'zh_TW'], suffix: ['az', 'it', 'mk', 'pt_PT', 'ro_MD', 'ru'], - jobArea: ['ar', 'fr', 'fr_BE', 'fr_CA', 'fr_CH', 'fr_LU'], - jobDescriptor: ['ar', 'fr', 'fr_BE', 'fr_CA', 'fr_CH', 'fr_LU'], - jobTitle: ['ar', 'fr', 'fr_BE', 'fr_CA', 'fr_CH', 'fr_LU', 'ur'], + jobArea: ['ar'], + jobDescriptor: ['ar'], + jobTitle: ['ar', 'ur'], jobType: ['ur'], }, } satisfies { - [module in keyof Faker]?: SkipConfig; + [module_ in keyof Faker]?: SkipConfig; }; function isWorkingLocaleForMethod( - mod: string, - meth: string, + module: string, + method: string, locale: string ): boolean { - const broken = BROKEN_LOCALE_METHODS[mod]?.[meth] ?? []; + // @ts-expect-error: We don't have types for the dynamic access + const broken = BROKEN_LOCALE_METHODS[module]?.[method] ?? []; return broken !== '*' && !broken.includes(locale); } // Basic smoke tests to make sure each method is at least implemented and returns a value. -function modulesList(): { [module: string]: string[] } { - const modules = Object.keys(fakerEN) - .sort() - .filter(isTestableModule) - .reduce((result, mod) => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - const methods = Object.keys(fakerEN[mod]).filter(isMethodOf(mod)); - if (methods.length > 0) { - result[mod] = methods; - } else { - console.log(`Skipping ${mod} - No testable methods`); - } - - return result; - }, {}); - - return modules; -} - -const modules = modulesList(); +const modules = getMethodNamesByModules(fakerEN); describe('BROKEN_LOCALE_METHODS test', () => { it('should not contain obsolete configuration (modules)', () => { @@ -99,6 +102,7 @@ describe('BROKEN_LOCALE_METHODS test', () => { it('should not contain obsolete configuration (methods)', () => { const existingMethods = modules[module]; const configuredMethods = Object.keys( + // @ts-expect-error: We don't have types for the dynamic access // eslint-disable-next-line @typescript-eslint/no-unsafe-argument BROKEN_LOCALE_METHODS[module] ?? {} ); @@ -124,6 +128,7 @@ describe('functional tests', () => { const testAssertion = () => { // TODO @ST-DDT 2022-03-28: Use random seed once there are no more failures faker.seed(1); + // @ts-expect-error: We don't have types for the dynamic access const result = faker[module][meth](); if (meth === 'boolean') { diff --git a/test/faker.spec.ts b/test/faker.spec.ts index 2ff5aab9468..bf1bfafc4dc 100644 --- a/test/faker.spec.ts +++ b/test/faker.spec.ts @@ -2,6 +2,7 @@ import type { SpyInstance } from 'vitest'; import { describe, expect, it, vi } from 'vitest'; import { faker, Faker } from '../src'; import { FakerError } from '../src/errors/faker-error'; +import { keys } from '../src/internal/keys'; describe('faker', () => { it('should throw error if no locales passed', () => { @@ -13,13 +14,13 @@ describe('faker', () => { }); it('should not log anything on startup', () => { - const spies: SpyInstance[] = Object.keys(console) + const spies: SpyInstance[] = keys(console) .filter((key) => typeof console[key] === 'function') .map((methodName) => vi.spyOn(console, methodName as keyof typeof console) ); - // eslint-disable-next-line @typescript-eslint/no-var-requires + // eslint-disable-next-line @typescript-eslint/no-var-requires, unicorn/prefer-module -- Using import() requires types being build but the CI / TS-Check runs without them. require('..').faker; new Faker({ locale: { metadata: { title: '' } } }); @@ -41,7 +42,7 @@ describe('faker', () => { describe('rawDefinitions', () => { it('locale rawDefinition accessibility', () => { // Metadata - expect(faker.rawDefinitions.metadata.title).toBeDefined(); + expect(faker.rawDefinitions.metadata?.title).toBeDefined(); // Standard modules expect(faker.rawDefinitions.location?.city_name).toBeDefined(); // Non-existing module @@ -62,7 +63,7 @@ describe('faker', () => { // Non-existing module expect(faker.definitions.missing).toBeDefined(); // Non-existing definition in a non-existing module - expect(() => faker.definitions.missing.missing).toThrow(); + expect(() => faker.definitions.missing?.missing).toThrow(); // Non-existing definition in an existing module expect(() => faker.definitions.location.missing).toThrow(); }); diff --git a/test/__snapshots__/mersenne.spec.ts.snap b/test/internal/__snapshots__/mersenne.spec.ts.snap similarity index 100% rename from test/__snapshots__/mersenne.spec.ts.snap rename to test/internal/__snapshots__/mersenne.spec.ts.snap diff --git a/test/internal/group-by.spec.ts b/test/internal/group-by.spec.ts new file mode 100644 index 00000000000..4f186e3dd2c --- /dev/null +++ b/test/internal/group-by.spec.ts @@ -0,0 +1,41 @@ +import { describe, expect, it } from 'vitest'; +import { groupBy } from '../../src/internal/group-by'; + +describe('groupBy()', () => { + it('should group values by key', () => { + const values = [ + { id: 1, name: 'John' }, + { id: 2, name: 'Jane' }, + { id: 3, name: 'John' }, + ]; + + const result = groupBy(values, ({ name }) => name); + + expect(result).toEqual({ + John: [ + { id: 1, name: 'John' }, + { id: 3, name: 'John' }, + ], + Jane: [{ id: 2, name: 'Jane' }], + }); + }); + + it('should group by key and map values', () => { + const values = [ + { id: 1, name: 'John' }, + { id: 2, name: 'Jane' }, + { id: 3, name: 'John' }, + ]; + + const result = groupBy( + values, + ({ name }) => name, + ({ id }) => id + ); + + expect(result).toEqual({ + John: [1, 3], + Jane: [2], + }); + }); +}); diff --git a/test/internal/mersenne-test-utils.ts b/test/internal/mersenne-test-utils.ts new file mode 100644 index 00000000000..ee7a43da455 --- /dev/null +++ b/test/internal/mersenne-test-utils.ts @@ -0,0 +1,17 @@ +// Moved to a separate file to avoid importing the tests + +/** + * The maximum value that can be returned by `MersenneTwister19937.genrandReal2()`. + * This is the max possible value with 32 bits of precision that is less than 1. + */ +export const TWISTER_32CO_MAX_VALUE = 0.9999999997671694; +/** + * The maximum value that can be returned by `MersenneTwister19937.genrandRes53()`. + * This is the max possible value with 53 bits of precision that is less than 1. + */ +export const TWISTER_53CO_MAX_VALUE = 0.9999999999999999; +// Re-exported because the value might change in the future +/** + * The maximum value that can be returned by `next()`. + */ +export const MERSENNE_MAX_VALUE = TWISTER_32CO_MAX_VALUE; diff --git a/test/internal/mersenne.spec.ts b/test/internal/mersenne.spec.ts new file mode 100644 index 00000000000..bbee050258f --- /dev/null +++ b/test/internal/mersenne.spec.ts @@ -0,0 +1,136 @@ +import { beforeAll, beforeEach, describe, expect, it } from 'vitest'; +import { + generateMersenne32Randomizer, + MersenneTwister19937, +} from '../../src/internal/mersenne'; +import type { Randomizer } from '../../src/randomizer'; +import { seededRuns } from '../support/seeded-runs'; +import { times } from '../support/times'; +import { + MERSENNE_MAX_VALUE, + TWISTER_32CO_MAX_VALUE, + TWISTER_53CO_MAX_VALUE, +} from './mersenne-test-utils'; + +const NON_SEEDED_BASED_RUN = 25; + +function newTwister( + seed: number = Math.random() * Number.MAX_SAFE_INTEGER +): MersenneTwister19937 { + const twister = new MersenneTwister19937(); + twister.initGenrand(seed); + return twister; +} + +describe('MersenneTwister19937', () => { + describe('genrandInt32()', () => { + it('should be able to return 0', () => { + const twister = newTwister(257678572); + + // There is no single value seed that can produce 0 in the first call + for (let i = 0; i < 5; i++) { + twister.genrandInt32(); + } + + const actual = twister.genrandInt32(); + expect(actual).toBe(0); + }); + + it('should be able to return 2^32-1', () => { + const twister = newTwister(2855577693); + const actual = twister.genrandInt32(); + expect(actual).toBe(2 ** 32 - 1); + }); + }); + + describe('genrandReal2()', () => { + it('should be able to return 0', () => { + const twister = newTwister(); + // shortcut to return minimal value + // the test above shows that it is possible to return 0 + twister.genrandInt32 = () => 0; + const actual = twister.genrandReal2(); + expect(actual).toBe(0); + }); + + it('should be able to return almost 1', () => { + const twister = newTwister(); + // shortcut to return maximal value + // the test above shows that it is possible to return 2^32-1 + twister.genrandInt32 = () => 2 ** 32 - 1; + const actual = twister.genrandReal2(); + expect(actual).toBe(TWISTER_32CO_MAX_VALUE); + }); + }); + + describe('genrandRes53()', () => { + it('should be able to return 0', () => { + const twister = newTwister(); + // shortcut to return minimal value + // the test above shows that it is possible to return 0 + twister.genrandInt32 = () => 0; + const actual = twister.genrandRes53(); + expect(actual).toBe(0); + }); + + it('should be able to return almost 1', () => { + const twister = newTwister(); + // shortcut to return maximal value + // the test above shows that it is possible to return 2^32-1 + twister.genrandInt32 = () => 2 ** 32 - 1; + const actual = twister.genrandRes53(); + expect(actual).toBe(TWISTER_53CO_MAX_VALUE); + }); + }); +}); + +describe('generateMersenne32Randomizer()', () => { + const randomizer: Randomizer = generateMersenne32Randomizer(); + + it('should return a result matching the interface', () => { + expect(randomizer).toBeDefined(); + expect(randomizer).toBeTypeOf('object'); + expect(randomizer.next).toBeTypeOf('function'); + expect(randomizer.seed).toBeTypeOf('function'); + }); + + describe.each( + [...seededRuns, ...seededRuns.map((v) => [v, 1, 2])].map((v) => [v]) + )('seed: %j', (seed) => { + beforeEach(() => { + randomizer.seed(seed); + }); + + it('should return deterministic value for next()', () => { + const actual = randomizer.next(); + + expect(actual).toMatchSnapshot(); + }); + }); + + function randomSeed(): number { + return Math.ceil(Math.random() * 1_000_000_000); + } + + // Create and log-back the seed for debug purposes + describe.each( + times(NON_SEEDED_BASED_RUN).flatMap(() => [ + [randomSeed()], + [[randomSeed(), randomSeed()]], + ]) + )('random seeded tests %j', (seed) => { + beforeAll(() => { + randomizer.seed(seed); + }); + + describe('next', () => { + it('should return random number from interval [0, 1)', () => { + const actual = randomizer.next(); + + expect(actual).toBeGreaterThanOrEqual(0); + expect(actual).toBeLessThanOrEqual(MERSENNE_MAX_VALUE); + expect(actual).toBeLessThan(1); + }); + }); + }); +}); diff --git a/test/locale-imports.spec.ts b/test/locale-imports.spec.ts index 6882d5379c8..1d7dc4751f1 100644 --- a/test/locale-imports.spec.ts +++ b/test/locale-imports.spec.ts @@ -1,10 +1,11 @@ import { describe, expect, it } from 'vitest'; import type { Faker } from '../src'; import { allLocales } from '../src'; +import { keys } from '../src/internal/keys'; -describe.each(Object.keys(allLocales))('locale imports', (locale) => { +describe.each(keys(allLocales))('locale imports', (locale) => { it(`should be possible to directly require('@faker-js/faker/locale/${locale}')`, () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires + // eslint-disable-next-line @typescript-eslint/no-var-requires, unicorn/prefer-module const { faker } = require(`../dist/cjs/locale/${locale}`) as { faker: Faker; }; @@ -12,7 +13,7 @@ describe.each(Object.keys(allLocales))('locale imports', (locale) => { expect(faker).toBeDefined(); expect(faker.string.alpha()).toBeTypeOf('string'); expect(faker.definitions.metadata.title).toBe( - allLocales[locale].metadata.title + allLocales[locale].metadata?.title ); }); @@ -24,12 +25,12 @@ describe.each(Object.keys(allLocales))('locale imports', (locale) => { expect(faker).toBeDefined(); expect(faker.string.alpha()).toBeTypeOf('string'); expect(faker.definitions.metadata.title).toBe( - allLocales[locale].metadata.title + allLocales[locale].metadata?.title ); }); it('should have complete metadata values', () => { - const metadata = allLocales[locale].metadata; + const metadata = allLocales[locale].metadata ?? {}; expect(metadata.title).toBeTypeOf('string'); expect(metadata.code).toBeTypeOf('string'); expect(metadata.code).toEqual(locale); diff --git a/test/mersenne.spec.ts b/test/mersenne.spec.ts deleted file mode 100644 index 6c7d5a18579..00000000000 --- a/test/mersenne.spec.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { beforeAll, beforeEach, describe, expect, it } from 'vitest'; -import { generateMersenne32Randomizer } from '../src/internal/mersenne'; -import type { Randomizer } from '../src/randomizer'; -import { seededRuns } from './support/seeded-runs'; -import { times } from './support/times'; - -const NON_SEEDED_BASED_RUN = 25; - -describe('generateMersenne32Randomizer()', () => { - const randomizer: Randomizer = generateMersenne32Randomizer(); - - it('should return a result matching the interface', () => { - expect(randomizer).toBeDefined(); - expect(randomizer).toBeTypeOf('object'); - expect(randomizer.next).toBeTypeOf('function'); - expect(randomizer.seed).toBeTypeOf('function'); - }); - - describe.each( - [...seededRuns, ...seededRuns.map((v) => [v, 1, 2])].map((v) => [v]) - )('seed: %j', (seed) => { - beforeEach(() => { - randomizer.seed(seed); - }); - - it('should return deterministic value for next()', () => { - const actual = randomizer.next(); - - expect(actual).toMatchSnapshot(); - }); - }); - - function randomSeed(): number { - return Math.ceil(Math.random() * 1_000_000_000); - } - - // Create and log-back the seed for debug purposes - describe.each( - times(NON_SEEDED_BASED_RUN).flatMap(() => [ - [randomSeed()], - [[randomSeed(), randomSeed()]], - ]) - )('random seeded tests %j', (seed) => { - beforeAll(() => { - randomizer.seed(seed); - }); - - describe('next', () => { - it('should return random number from interval [0, 1)', () => { - const actual = randomizer.next(); - - expect(actual).toBeGreaterThanOrEqual(0); - expect(actual).toBeLessThan(1); - }); - }); - }); -}); diff --git a/test/modules/__snapshots__/date.spec.ts.snap b/test/modules/__snapshots__/date.spec.ts.snap index 701c8cc7430..4ade2cc7301 100644 --- a/test/modules/__snapshots__/date.spec.ts.snap +++ b/test/modules/__snapshots__/date.spec.ts.snap @@ -71,11 +71,11 @@ exports[`date > 42 > birthdate > with age mode and refDate 1`] = `1963-09-27T06: exports[`date > 42 > birthdate > with age range and refDate 1`] = `1962-12-27T20:13:59.702Z`; -exports[`date > 42 > birthdate > with only refDate 1`] = `1964-08-06T01:03:57.017Z`; +exports[`date > 42 > birthdate > with only refDate 1`] = `1964-03-22T08:05:39.972Z`; exports[`date > 42 > birthdate > with year and refDate 1`] = `0020-07-07T19:06:53.022Z`; -exports[`date > 42 > birthdate > with year mode and refDate 1`] = `1964-08-06T01:03:57.017Z`; +exports[`date > 42 > birthdate > with year mode and refDate 1`] = `1964-03-22T08:05:39.972Z`; exports[`date > 42 > birthdate > with year range and refDate 1`] = `0057-12-20T11:59:23.890Z`; @@ -199,11 +199,11 @@ exports[`date > 1211 > birthdate > with age mode and refDate 1`] = `1998-08-21T2 exports[`date > 1211 > birthdate > with age range and refDate 1`] = `1996-10-13T01:44:07.645Z`; -exports[`date > 1211 > birthdate > with only refDate 1`] = `1999-06-29T11:06:58.506Z`; +exports[`date > 1211 > birthdate > with only refDate 1`] = `1998-07-25T13:16:46.938Z`; exports[`date > 1211 > birthdate > with year and refDate 1`] = `0021-01-26T13:16:31.421Z`; -exports[`date > 1211 > birthdate > with year mode and refDate 1`] = `1999-06-29T11:06:58.506Z`; +exports[`date > 1211 > birthdate > with year mode and refDate 1`] = `1998-07-25T13:16:46.938Z`; exports[`date > 1211 > birthdate > with year range and refDate 1`] = `0113-12-03T19:45:27.654Z`; @@ -325,11 +325,11 @@ exports[`date > 1337 > birthdate > with age mode and refDate 1`] = `1956-08-25T0 exports[`date > 1337 > birthdate > with age range and refDate 1`] = `1956-02-15T21:16:40.120Z`; -exports[`date > 1337 > birthdate > with only refDate 1`] = `1957-07-05T09:38:29.057Z`; +exports[`date > 1337 > birthdate > with only refDate 1`] = `1957-03-31T18:18:18.869Z`; exports[`date > 1337 > birthdate > with year and refDate 1`] = `0020-05-27T14:46:44.831Z`; -exports[`date > 1337 > birthdate > with year mode and refDate 1`] = `1957-07-05T09:38:29.057Z`; +exports[`date > 1337 > birthdate > with year mode and refDate 1`] = `1957-03-31T18:18:18.869Z`; exports[`date > 1337 > birthdate > with year range and refDate 1`] = `0046-08-09T19:19:18.047Z`; diff --git a/test/modules/__snapshots__/finance.spec.ts.snap b/test/modules/__snapshots__/finance.spec.ts.snap index b80380b96e0..b2478f58ea4 100644 --- a/test/modules/__snapshots__/finance.spec.ts.snap +++ b/test/modules/__snapshots__/finance.spec.ts.snap @@ -24,13 +24,13 @@ exports[`finance > 42 > amount > with min and max option 1`] = `"24.98"`; exports[`finance > 42 > amount > with min option 1`] = `"380.79"`; -exports[`finance > 42 > amount > with min, leagcy max, leagcy dec and leagcy symbol 1`] = `"$24.98161"`; +exports[`finance > 42 > amount > with min, leagcy max, leagcy dec and leagcy symbol 1`] = `"$24.98160"`; -exports[`finance > 42 > amount > with min, max and dec option 1`] = `"24.98161"`; +exports[`finance > 42 > amount > with min, max and dec option 1`] = `"24.98160"`; -exports[`finance > 42 > amount > with min, max, dec and symbol option 1`] = `"#24.98161"`; +exports[`finance > 42 > amount > with min, max, dec and symbol option 1`] = `"#24.98160"`; -exports[`finance > 42 > amount > with min, max, dec, symbol and autoFormat option 1`] = `"#24.98161"`; +exports[`finance > 42 > amount > with min, max, dec, symbol and autoFormat option 1`] = `"#24.98160"`; exports[`finance > 42 > bic > noArgs 1`] = `"UYETSCLLG53"`; @@ -78,23 +78,23 @@ exports[`finance > 42 > iban > with formatted option 1`] = `"GT03 9751 1086 7098 exports[`finance > 42 > litecoinAddress 1`] = `"3XbJMAAara64sSkA9HD24YHQWd1b"`; -exports[`finance > 42 > mask > noArgs 1`] = `"3791"`; +exports[`finance > 42 > mask > noArgs 1`] = `"(...3791)"`; -exports[`finance > 42 > mask > with ellipsis 1`] = `"...3791"`; +exports[`finance > 42 > mask > with ellipsis 1`] = `"(...3791)"`; -exports[`finance > 42 > mask > with length 1`] = `"37917"`; +exports[`finance > 42 > mask > with length 1`] = `"(...37917)"`; exports[`finance > 42 > mask > with length, parenthesis and ellipsis 1`] = `"(...37917)"`; -exports[`finance > 42 > mask > with parenthesis 1`] = `"(3791)"`; +exports[`finance > 42 > mask > with parenthesis 1`] = `"(...3791)"`; -exports[`finance > 42 > maskedNumber > noArgs 1`] = `"3791"`; +exports[`finance > 42 > maskedNumber > noArgs 1`] = `"(...3791)"`; -exports[`finance > 42 > maskedNumber > with length 1`] = `"37917"`; +exports[`finance > 42 > maskedNumber > with length 1`] = `"(...37917)"`; -exports[`finance > 42 > maskedNumber > with length and parenthesis option 1`] = `"37917"`; +exports[`finance > 42 > maskedNumber > with length and parenthesis option 1`] = `"...37917"`; -exports[`finance > 42 > maskedNumber > with length option 1`] = `"37917"`; +exports[`finance > 42 > maskedNumber > with length option 1`] = `"(...37917)"`; exports[`finance > 42 > maskedNumber > with length, parenthesis and ellipsis option 1`] = `"...37917"`; @@ -106,7 +106,7 @@ exports[`finance > 42 > pin > with length option 1`] = `"3791775514"`; exports[`finance > 42 > routingNumber 1`] = `"379177554"`; -exports[`finance > 42 > transactionDescription 1`] = `"invoice transaction at Wiegand, Deckow and Reynolds using card ending with ***8361 for RSD 374.54 in account ***55141004"`; +exports[`finance > 42 > transactionDescription 1`] = `"invoice transaction at Wiegand, Deckow and Reynolds using card ending with ***(...8361) for RSD 374.54 in account ***55141004"`; exports[`finance > 42 > transactionType 1`] = `"withdrawal"`; @@ -188,23 +188,23 @@ exports[`finance > 1211 > iban > with formatted option 1`] = `"TN42 8201 6024 17 exports[`finance > 1211 > litecoinAddress 1`] = `"MTMe8Z3EaFdLqmaGKP1LEEJQVriSZRZds"`; -exports[`finance > 1211 > mask > noArgs 1`] = `"9487"`; +exports[`finance > 1211 > mask > noArgs 1`] = `"(...9487)"`; -exports[`finance > 1211 > mask > with ellipsis 1`] = `"...9487"`; +exports[`finance > 1211 > mask > with ellipsis 1`] = `"(...9487)"`; -exports[`finance > 1211 > mask > with length 1`] = `"94872"`; +exports[`finance > 1211 > mask > with length 1`] = `"(...94872)"`; exports[`finance > 1211 > mask > with length, parenthesis and ellipsis 1`] = `"(...94872)"`; -exports[`finance > 1211 > mask > with parenthesis 1`] = `"(9487)"`; +exports[`finance > 1211 > mask > with parenthesis 1`] = `"(...9487)"`; -exports[`finance > 1211 > maskedNumber > noArgs 1`] = `"9487"`; +exports[`finance > 1211 > maskedNumber > noArgs 1`] = `"(...9487)"`; -exports[`finance > 1211 > maskedNumber > with length 1`] = `"94872"`; +exports[`finance > 1211 > maskedNumber > with length 1`] = `"(...94872)"`; -exports[`finance > 1211 > maskedNumber > with length and parenthesis option 1`] = `"94872"`; +exports[`finance > 1211 > maskedNumber > with length and parenthesis option 1`] = `"...94872"`; -exports[`finance > 1211 > maskedNumber > with length option 1`] = `"94872"`; +exports[`finance > 1211 > maskedNumber > with length option 1`] = `"(...94872)"`; exports[`finance > 1211 > maskedNumber > with length, parenthesis and ellipsis option 1`] = `"...94872"`; @@ -216,7 +216,7 @@ exports[`finance > 1211 > pin > with length option 1`] = `"9487219061"`; exports[`finance > 1211 > routingNumber 1`] = `"948721904"`; -exports[`finance > 1211 > transactionDescription 1`] = `"deposit transaction at Trantow - Satterfield using card ending with ***4316 for SDG 928.52 in account ***19061627"`; +exports[`finance > 1211 > transactionDescription 1`] = `"deposit transaction at Trantow - Satterfield using card ending with ***(...4316) for SDG 928.52 in account ***19061627"`; exports[`finance > 1211 > transactionType 1`] = `"invoice"`; @@ -244,13 +244,13 @@ exports[`finance > 1337 > amount > with min and max option 1`] = `"20.48"`; exports[`finance > 1337 > amount > with min option 1`] = `"269.40"`; -exports[`finance > 1337 > amount > with min, leagcy max, leagcy dec and leagcy symbol 1`] = `"$20.48099"`; +exports[`finance > 1337 > amount > with min, leagcy max, leagcy dec and leagcy symbol 1`] = `"$20.48098"`; -exports[`finance > 1337 > amount > with min, max and dec option 1`] = `"20.48099"`; +exports[`finance > 1337 > amount > with min, max and dec option 1`] = `"20.48098"`; -exports[`finance > 1337 > amount > with min, max, dec and symbol option 1`] = `"#20.48099"`; +exports[`finance > 1337 > amount > with min, max, dec and symbol option 1`] = `"#20.48098"`; -exports[`finance > 1337 > amount > with min, max, dec, symbol and autoFormat option 1`] = `"#20.48099"`; +exports[`finance > 1337 > amount > with min, max, dec, symbol and autoFormat option 1`] = `"#20.48098"`; exports[`finance > 1337 > bic > noArgs 1`] = `"OEFHLYG18IL"`; @@ -298,23 +298,23 @@ exports[`finance > 1337 > iban > with formatted option 1`] = `"FO56 1005 0250 09 exports[`finance > 1337 > litecoinAddress 1`] = `"Madhxs2jewAgkYgJi7No6Cn8JZar"`; -exports[`finance > 1337 > mask > noArgs 1`] = `"2512"`; +exports[`finance > 1337 > mask > noArgs 1`] = `"(...2512)"`; -exports[`finance > 1337 > mask > with ellipsis 1`] = `"...2512"`; +exports[`finance > 1337 > mask > with ellipsis 1`] = `"(...2512)"`; -exports[`finance > 1337 > mask > with length 1`] = `"25122"`; +exports[`finance > 1337 > mask > with length 1`] = `"(...25122)"`; exports[`finance > 1337 > mask > with length, parenthesis and ellipsis 1`] = `"(...25122)"`; -exports[`finance > 1337 > mask > with parenthesis 1`] = `"(2512)"`; +exports[`finance > 1337 > mask > with parenthesis 1`] = `"(...2512)"`; -exports[`finance > 1337 > maskedNumber > noArgs 1`] = `"2512"`; +exports[`finance > 1337 > maskedNumber > noArgs 1`] = `"(...2512)"`; -exports[`finance > 1337 > maskedNumber > with length 1`] = `"25122"`; +exports[`finance > 1337 > maskedNumber > with length 1`] = `"(...25122)"`; -exports[`finance > 1337 > maskedNumber > with length and parenthesis option 1`] = `"25122"`; +exports[`finance > 1337 > maskedNumber > with length and parenthesis option 1`] = `"...25122"`; -exports[`finance > 1337 > maskedNumber > with length option 1`] = `"25122"`; +exports[`finance > 1337 > maskedNumber > with length option 1`] = `"(...25122)"`; exports[`finance > 1337 > maskedNumber > with length, parenthesis and ellipsis option 1`] = `"...25122"`; @@ -326,6 +326,6 @@ exports[`finance > 1337 > pin > with length option 1`] = `"2512254032"`; exports[`finance > 1337 > routingNumber 1`] = `"251225401"`; -exports[`finance > 1337 > transactionDescription 1`] = `"withdrawal transaction at Cronin - Effertz using card ending with ***3927 for GIP 262.02 in account ***54032552"`; +exports[`finance > 1337 > transactionDescription 1`] = `"withdrawal transaction at Cronin - Effertz using card ending with ***(...3927) for GIP 262.02 in account ***54032552"`; exports[`finance > 1337 > transactionType 1`] = `"withdrawal"`; diff --git a/test/modules/__snapshots__/git.spec.ts.snap b/test/modules/__snapshots__/git.spec.ts.snap index 9e52bd15e82..2294d6fcc5f 100644 --- a/test/modules/__snapshots__/git.spec.ts.snap +++ b/test/modules/__snapshots__/git.spec.ts.snap @@ -10,28 +10,28 @@ exports[`git > 42 > commitDate > with only string refDate 1`] = `"Tue Dec 31 15: exports[`git > 42 > commitEntry > with only Date refDate 1`] = ` "commit be4abdd39321ad7d3fe01ffce404f4d6db0906bd -Author: Gregg Beahan III -Date: Tue Dec 31 14:49:14 2019 +0100 +Author: Gregg.Beahan9 +Date: Tue Dec 31 00:24:08 2019 +0300 -    parse multi-byte sensor +    connect auxiliary bus " `; exports[`git > 42 > commitEntry > with only number refDate 1`] = ` "commit be4abdd39321ad7d3fe01ffce404f4d6db0906bd -Author: Gregg Beahan III -Date: Tue Dec 31 14:49:14 2019 +0100 +Author: Gregg.Beahan9 +Date: Tue Dec 31 00:24:08 2019 +0300 -    parse multi-byte sensor +    connect auxiliary bus " `; exports[`git > 42 > commitEntry > with only string refDate 1`] = ` "commit be4abdd39321ad7d3fe01ffce404f4d6db0906bd -Author: Gregg Beahan III -Date: Tue Dec 31 14:49:14 2019 +0100 +Author: Gregg.Beahan9 +Date: Tue Dec 31 00:24:08 2019 +0300 -    parse multi-byte sensor +    connect auxiliary bus " `; @@ -53,28 +53,28 @@ exports[`git > 1211 > commitDate > with only string refDate 1`] = `"Tue Dec 31 0 exports[`git > 1211 > commitEntry > with only Date refDate 1`] = ` "commit adb42f0e3f4a973fab0aeefce96dfcf49cd438df -Author: Imani Anderson -Date: Tue Dec 31 10:07:32 2019 -0400 +Author: Imani.Anderson +Date: Tue Dec 31 18:36:59 2019 +0200 -    override wireless interface +    copy digital feed " `; exports[`git > 1211 > commitEntry > with only number refDate 1`] = ` "commit adb42f0e3f4a973fab0aeefce96dfcf49cd438df -Author: Imani Anderson -Date: Tue Dec 31 10:07:32 2019 -0400 +Author: Imani.Anderson +Date: Tue Dec 31 18:36:59 2019 +0200 -    override wireless interface +    copy digital feed " `; exports[`git > 1211 > commitEntry > with only string refDate 1`] = ` "commit adb42f0e3f4a973fab0aeefce96dfcf49cd438df -Author: Imani Anderson -Date: Tue Dec 31 10:07:32 2019 -0400 +Author: Imani.Anderson +Date: Tue Dec 31 18:36:59 2019 +0200 -    override wireless interface +    copy digital feed " `; @@ -96,28 +96,28 @@ exports[`git > 1337 > commitDate > with only string refDate 1`] = `"Tue Dec 31 1 exports[`git > 1337 > commitEntry > with only Date refDate 1`] = ` "commit c346ba075bd57f5a62b82d72af39cbbb07a98cba -Author: Miss Friedrich Krajcik -Date: Tue Dec 31 04:18:56 2019 -0700 +Author: Miss Friedrich Krajcik +Date: Tue Dec 31 02:27:22 2019 +0100 -    reboot haptic capacitor +    reboot neural pixel " `; exports[`git > 1337 > commitEntry > with only number refDate 1`] = ` "commit c346ba075bd57f5a62b82d72af39cbbb07a98cba -Author: Miss Friedrich Krajcik -Date: Tue Dec 31 04:18:56 2019 -0700 +Author: Miss Friedrich Krajcik +Date: Tue Dec 31 02:27:22 2019 +0100 -    reboot haptic capacitor +    reboot neural pixel " `; exports[`git > 1337 > commitEntry > with only string refDate 1`] = ` "commit c346ba075bd57f5a62b82d72af39cbbb07a98cba -Author: Miss Friedrich Krajcik -Date: Tue Dec 31 04:18:56 2019 -0700 +Author: Miss Friedrich Krajcik +Date: Tue Dec 31 02:27:22 2019 +0100 -    reboot haptic capacitor +    reboot neural pixel " `; diff --git a/test/modules/__snapshots__/internet.spec.ts.snap b/test/modules/__snapshots__/internet.spec.ts.snap index c8c6d8bbc36..488dd6a873b 100644 --- a/test/modules/__snapshots__/internet.spec.ts.snap +++ b/test/modules/__snapshots__/internet.spec.ts.snap @@ -38,41 +38,41 @@ exports[`internet > 42 > domainSuffix 1`] = `"info"`; exports[`internet > 42 > domainWord 1`] = `"hasty-sherbet"`; -exports[`internet > 42 > email > noArgs 1`] = `"Garnet_Wiegand59@gmail.com"`; +exports[`internet > 42 > email > noArgs 1`] = `"Peyton59@yahoo.com"`; -exports[`internet > 42 > email > with all options 1`] = `"Jane_Doe@fakerjs.dev"`; +exports[`internet > 42 > email > with all options 1`] = `"Jane_Doe95@fakerjs.dev"`; -exports[`internet > 42 > email > with allowSpecialCharacters option 1`] = `"Garnet$Wiegand59@gmail.com"`; +exports[`internet > 42 > email > with allowSpecialCharacters option 1`] = `"Peyton59@yahoo.com"`; -exports[`internet > 42 > email > with firstName option 1`] = `"Jane73@hotmail.com"`; +exports[`internet > 42 > email > with firstName option 1`] = `"Jane_Wiegand77@yahoo.com"`; -exports[`internet > 42 > email > with lastName option 1`] = `"Garnet.Doe73@hotmail.com"`; +exports[`internet > 42 > email > with lastName option 1`] = `"Peyton.Doe@yahoo.com"`; -exports[`internet > 42 > email > with legacy names 1`] = `"Jane_Doe18@yahoo.com"`; +exports[`internet > 42 > email > with legacy names 1`] = `"Jane_Doe@yahoo.com"`; -exports[`internet > 42 > email > with legacy names and provider 1`] = `"Jane_Doe@fakerjs.dev"`; +exports[`internet > 42 > email > with legacy names and provider 1`] = `"Jane_Doe95@fakerjs.dev"`; -exports[`internet > 42 > email > with legacy provider 1`] = `"Garnet73@fakerjs.dev"`; +exports[`internet > 42 > email > with legacy provider 1`] = `"Garnet_Wiegand77@fakerjs.dev"`; -exports[`internet > 42 > email > with provider option 1`] = `"Garnet73@fakerjs.dev"`; +exports[`internet > 42 > email > with provider option 1`] = `"Garnet_Wiegand77@fakerjs.dev"`; exports[`internet > 42 > emoji > noArgs 1`] = `"🕸️"`; exports[`internet > 42 > emoji > with options 1`] = `"🦔"`; -exports[`internet > 42 > exampleEmail > noArgs 1`] = `"Garnet_Wiegand59@example.org"`; +exports[`internet > 42 > exampleEmail > noArgs 1`] = `"Peyton59@example.com"`; -exports[`internet > 42 > exampleEmail > with all options 1`] = `"Jane_Doe18@example.com"`; +exports[`internet > 42 > exampleEmail > with all options 1`] = `"Jane_Doe@example.com"`; -exports[`internet > 42 > exampleEmail > with allowSpecialCharacters option 1`] = `"Garnet$Wiegand59@example.org"`; +exports[`internet > 42 > exampleEmail > with allowSpecialCharacters option 1`] = `"Peyton59@example.com"`; -exports[`internet > 42 > exampleEmail > with firstName option 1`] = `"Jane73@example.net"`; +exports[`internet > 42 > exampleEmail > with firstName option 1`] = `"Jane_Wiegand77@example.com"`; -exports[`internet > 42 > exampleEmail > with lastName option 1`] = `"Garnet.Doe73@example.net"`; +exports[`internet > 42 > exampleEmail > with lastName option 1`] = `"Peyton.Doe@example.com"`; -exports[`internet > 42 > exampleEmail > with legacy names 1`] = `"Jane_Doe18@example.com"`; +exports[`internet > 42 > exampleEmail > with legacy names 1`] = `"Jane_Doe@example.com"`; -exports[`internet > 42 > exampleEmail > with legacy names and options 1`] = `"Jane_Doe18@example.com"`; +exports[`internet > 42 > exampleEmail > with legacy names and options 1`] = `"Jane_Doe@example.com"`; exports[`internet > 42 > httpMethod 1`] = `"POST"`; @@ -124,23 +124,23 @@ exports[`internet > 42 > url > without slash appended and with http protocol 1`] exports[`internet > 42 > userAgent 1`] = `"Mozilla/5.0 (X11; Linux x86_64; rv:15.1) Gecko/20100101 Firefox/15.1.7"`; -exports[`internet > 42 > userName > noArgs 1`] = `"Garnet73"`; +exports[`internet > 42 > userName > noArgs 1`] = `"Garnet_Wiegand77"`; -exports[`internet > 42 > userName > with Chinese names 1`] = `"hlzp8d_tpv"`; +exports[`internet > 42 > userName > with Chinese names 1`] = `"hlzp8d_tpv95"`; -exports[`internet > 42 > userName > with Cyrillic names 1`] = `"Fedor_Dostoevskii"`; +exports[`internet > 42 > userName > with Cyrillic names 1`] = `"Fedor_Dostoevskii95"`; -exports[`internet > 42 > userName > with Latin names 1`] = `"Jane_Doe"`; +exports[`internet > 42 > userName > with Latin names 1`] = `"Jane_Doe95"`; -exports[`internet > 42 > userName > with accented names 1`] = `"Helene_Muller"`; +exports[`internet > 42 > userName > with accented names 1`] = `"Helene_Muller95"`; -exports[`internet > 42 > userName > with all option 1`] = `"Jane_Doe"`; +exports[`internet > 42 > userName > with all option 1`] = `"Jane_Doe95"`; -exports[`internet > 42 > userName > with firstName option 1`] = `"Jane.Schinner73"`; +exports[`internet > 42 > userName > with firstName option 1`] = `"Jane73"`; -exports[`internet > 42 > userName > with lastName option 1`] = `"Garnet_Doe18"`; +exports[`internet > 42 > userName > with lastName option 1`] = `"Garnet_Doe"`; -exports[`internet > 42 > userName > with legacy names 1`] = `"Jane_Doe"`; +exports[`internet > 42 > userName > with legacy names 1`] = `"Jane_Doe95"`; exports[`internet > 1211 > avatar 1`] = `"https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/1160.jpg"`; @@ -180,41 +180,41 @@ exports[`internet > 1211 > domainSuffix 1`] = `"org"`; exports[`internet > 1211 > domainWord 1`] = `"vicious-infrastructure"`; -exports[`internet > 1211 > email > noArgs 1`] = `"Tito12@hotmail.com"`; +exports[`internet > 1211 > email > noArgs 1`] = `"Jadyn.Satterfield99@hotmail.com"`; -exports[`internet > 1211 > email > with all options 1`] = `"Jane.Doe89@fakerjs.dev"`; +exports[`internet > 1211 > email > with all options 1`] = `"Jane.Doe@fakerjs.dev"`; -exports[`internet > 1211 > email > with allowSpecialCharacters option 1`] = `"Tito12@hotmail.com"`; +exports[`internet > 1211 > email > with allowSpecialCharacters option 1`] = `"Jadyn^Satterfield99@hotmail.com"`; -exports[`internet > 1211 > email > with firstName option 1`] = `"Jane.Koelpin12@hotmail.com"`; +exports[`internet > 1211 > email > with firstName option 1`] = `"Jane12@hotmail.com"`; -exports[`internet > 1211 > email > with lastName option 1`] = `"Tito_Doe22@yahoo.com"`; +exports[`internet > 1211 > email > with lastName option 1`] = `"Jadyn_Doe@hotmail.com"`; -exports[`internet > 1211 > email > with legacy names 1`] = `"Jane_Doe@hotmail.com"`; +exports[`internet > 1211 > email > with legacy names 1`] = `"Jane_Doe77@hotmail.com"`; -exports[`internet > 1211 > email > with legacy names and provider 1`] = `"Jane.Doe89@fakerjs.dev"`; +exports[`internet > 1211 > email > with legacy names and provider 1`] = `"Jane.Doe@fakerjs.dev"`; -exports[`internet > 1211 > email > with legacy provider 1`] = `"Tito.Trantow12@fakerjs.dev"`; +exports[`internet > 1211 > email > with legacy provider 1`] = `"Tito12@fakerjs.dev"`; -exports[`internet > 1211 > email > with provider option 1`] = `"Tito.Trantow12@fakerjs.dev"`; +exports[`internet > 1211 > email > with provider option 1`] = `"Tito12@fakerjs.dev"`; exports[`internet > 1211 > emoji > noArgs 1`] = `"🇮🇸"`; exports[`internet > 1211 > emoji > with options 1`] = `"🌲"`; -exports[`internet > 1211 > exampleEmail > noArgs 1`] = `"Tito12@example.net"`; +exports[`internet > 1211 > exampleEmail > noArgs 1`] = `"Jadyn.Satterfield99@example.net"`; -exports[`internet > 1211 > exampleEmail > with all options 1`] = `"Jane_Doe@example.net"`; +exports[`internet > 1211 > exampleEmail > with all options 1`] = `"Jane_Doe77@example.net"`; -exports[`internet > 1211 > exampleEmail > with allowSpecialCharacters option 1`] = `"Tito12@example.net"`; +exports[`internet > 1211 > exampleEmail > with allowSpecialCharacters option 1`] = `"Jadyn^Satterfield99@example.net"`; -exports[`internet > 1211 > exampleEmail > with firstName option 1`] = `"Jane.Koelpin12@example.net"`; +exports[`internet > 1211 > exampleEmail > with firstName option 1`] = `"Jane12@example.net"`; -exports[`internet > 1211 > exampleEmail > with lastName option 1`] = `"Tito_Doe22@example.com"`; +exports[`internet > 1211 > exampleEmail > with lastName option 1`] = `"Jadyn_Doe@example.net"`; -exports[`internet > 1211 > exampleEmail > with legacy names 1`] = `"Jane_Doe@example.net"`; +exports[`internet > 1211 > exampleEmail > with legacy names 1`] = `"Jane_Doe77@example.net"`; -exports[`internet > 1211 > exampleEmail > with legacy names and options 1`] = `"Jane_Doe@example.net"`; +exports[`internet > 1211 > exampleEmail > with legacy names and options 1`] = `"Jane_Doe77@example.net"`; exports[`internet > 1211 > httpMethod 1`] = `"PATCH"`; @@ -266,23 +266,23 @@ exports[`internet > 1211 > url > without slash appended and with http protocol 1 exports[`internet > 1211 > userAgent 1`] = `"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.3; Trident/4.0)"`; -exports[`internet > 1211 > userName > noArgs 1`] = `"Tito.Trantow12"`; +exports[`internet > 1211 > userName > noArgs 1`] = `"Tito12"`; -exports[`internet > 1211 > userName > with Chinese names 1`] = `"hlzp8d.tpv89"`; +exports[`internet > 1211 > userName > with Chinese names 1`] = `"hlzp8d.tpv"`; -exports[`internet > 1211 > userName > with Cyrillic names 1`] = `"Fedor.Dostoevskii89"`; +exports[`internet > 1211 > userName > with Cyrillic names 1`] = `"Fedor.Dostoevskii"`; -exports[`internet > 1211 > userName > with Latin names 1`] = `"Jane.Doe89"`; +exports[`internet > 1211 > userName > with Latin names 1`] = `"Jane.Doe"`; -exports[`internet > 1211 > userName > with accented names 1`] = `"Helene.Muller89"`; +exports[`internet > 1211 > userName > with accented names 1`] = `"Helene.Muller"`; -exports[`internet > 1211 > userName > with all option 1`] = `"Jane.Doe89"`; +exports[`internet > 1211 > userName > with all option 1`] = `"Jane.Doe"`; -exports[`internet > 1211 > userName > with firstName option 1`] = `"Jane_Koelpin22"`; +exports[`internet > 1211 > userName > with firstName option 1`] = `"Jane22"`; -exports[`internet > 1211 > userName > with lastName option 1`] = `"Tito_Doe"`; +exports[`internet > 1211 > userName > with lastName option 1`] = `"Tito_Doe77"`; -exports[`internet > 1211 > userName > with legacy names 1`] = `"Jane.Doe89"`; +exports[`internet > 1211 > userName > with legacy names 1`] = `"Jane.Doe"`; exports[`internet > 1337 > avatar 1`] = `"https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/327.jpg"`; @@ -322,37 +322,37 @@ exports[`internet > 1337 > domainSuffix 1`] = `"biz"`; exports[`internet > 1337 > domainWord 1`] = `"fair-mile"`; -exports[`internet > 1337 > email > noArgs 1`] = `"Devyn54@gmail.com"`; +exports[`internet > 1337 > email > noArgs 1`] = `"Kellen_Effertz45@gmail.com"`; -exports[`internet > 1337 > email > with all options 1`] = `"Jane56@fakerjs.dev"`; +exports[`internet > 1337 > email > with all options 1`] = `"Jane_Doe15@fakerjs.dev"`; -exports[`internet > 1337 > email > with allowSpecialCharacters option 1`] = `"Devyn54@gmail.com"`; +exports[`internet > 1337 > email > with allowSpecialCharacters option 1`] = `"Kellen_Effertz45@gmail.com"`; -exports[`internet > 1337 > email > with firstName option 1`] = `"Jane27@gmail.com"`; +exports[`internet > 1337 > email > with firstName option 1`] = `"Jane.Cronin54@gmail.com"`; -exports[`internet > 1337 > email > with lastName option 1`] = `"Devyn21@yahoo.com"`; +exports[`internet > 1337 > email > with lastName option 1`] = `"Kellen.Doe27@gmail.com"`; exports[`internet > 1337 > email > with legacy names 1`] = `"Jane.Doe@gmail.com"`; -exports[`internet > 1337 > email > with legacy names and provider 1`] = `"Jane56@fakerjs.dev"`; +exports[`internet > 1337 > email > with legacy names and provider 1`] = `"Jane_Doe15@fakerjs.dev"`; -exports[`internet > 1337 > email > with legacy provider 1`] = `"Devyn27@fakerjs.dev"`; +exports[`internet > 1337 > email > with legacy provider 1`] = `"Devyn.Cronin54@fakerjs.dev"`; -exports[`internet > 1337 > email > with provider option 1`] = `"Devyn27@fakerjs.dev"`; +exports[`internet > 1337 > email > with provider option 1`] = `"Devyn.Cronin54@fakerjs.dev"`; exports[`internet > 1337 > emoji > noArgs 1`] = `"💇🏼‍♀️"`; exports[`internet > 1337 > emoji > with options 1`] = `"🐪"`; -exports[`internet > 1337 > exampleEmail > noArgs 1`] = `"Devyn54@example.org"`; +exports[`internet > 1337 > exampleEmail > noArgs 1`] = `"Kellen_Effertz45@example.org"`; exports[`internet > 1337 > exampleEmail > with all options 1`] = `"Jane&Doe@example.org"`; -exports[`internet > 1337 > exampleEmail > with allowSpecialCharacters option 1`] = `"Devyn54@example.org"`; +exports[`internet > 1337 > exampleEmail > with allowSpecialCharacters option 1`] = `"Kellen_Effertz45@example.org"`; -exports[`internet > 1337 > exampleEmail > with firstName option 1`] = `"Jane27@example.org"`; +exports[`internet > 1337 > exampleEmail > with firstName option 1`] = `"Jane.Cronin54@example.org"`; -exports[`internet > 1337 > exampleEmail > with lastName option 1`] = `"Devyn21@example.com"`; +exports[`internet > 1337 > exampleEmail > with lastName option 1`] = `"Kellen.Doe27@example.org"`; exports[`internet > 1337 > exampleEmail > with legacy names 1`] = `"Jane.Doe@example.org"`; @@ -408,20 +408,20 @@ exports[`internet > 1337 > url > without slash appended and with http protocol 1 exports[`internet > 1337 > userAgent 1`] = `"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7.0; rv:6.2) Gecko/20100101 Firefox/6.2.2"`; -exports[`internet > 1337 > userName > noArgs 1`] = `"Devyn27"`; +exports[`internet > 1337 > userName > noArgs 1`] = `"Devyn.Cronin54"`; -exports[`internet > 1337 > userName > with Chinese names 1`] = `"hlzp8d56"`; +exports[`internet > 1337 > userName > with Chinese names 1`] = `"hlzp8d_tpv15"`; -exports[`internet > 1337 > userName > with Cyrillic names 1`] = `"Fedor56"`; +exports[`internet > 1337 > userName > with Cyrillic names 1`] = `"Fedor_Dostoevskii15"`; -exports[`internet > 1337 > userName > with Latin names 1`] = `"Jane56"`; +exports[`internet > 1337 > userName > with Latin names 1`] = `"Jane_Doe15"`; -exports[`internet > 1337 > userName > with accented names 1`] = `"Helene56"`; +exports[`internet > 1337 > userName > with accented names 1`] = `"Helene_Muller15"`; -exports[`internet > 1337 > userName > with all option 1`] = `"Jane56"`; +exports[`internet > 1337 > userName > with all option 1`] = `"Jane_Doe15"`; -exports[`internet > 1337 > userName > with firstName option 1`] = `"Jane21"`; +exports[`internet > 1337 > userName > with firstName option 1`] = `"Jane.MacGyver27"`; exports[`internet > 1337 > userName > with lastName option 1`] = `"Devyn.Doe"`; -exports[`internet > 1337 > userName > with legacy names 1`] = `"Jane56"`; +exports[`internet > 1337 > userName > with legacy names 1`] = `"Jane_Doe15"`; diff --git a/test/modules/__snapshots__/location.spec.ts.snap b/test/modules/__snapshots__/location.spec.ts.snap index cfdc45f4b98..b4e2586b184 100644 --- a/test/modules/__snapshots__/location.spec.ts.snap +++ b/test/modules/__snapshots__/location.spec.ts.snap @@ -74,7 +74,7 @@ exports[`location > 42 > longitude > with precision option 1`] = `-45.1655588485 exports[`location > 42 > nearbyGPSCoordinate > near origin 1`] = ` [ - 0.08140632875358443, + 0.08140632875358447, -0.08093642792425726, ] `; @@ -234,7 +234,7 @@ exports[`location > 1211 > longitude > with precision option 1`] = `154.26725534 exports[`location > 1211 > nearbyGPSCoordinate > near origin 1`] = ` [ - -0.02872111236834616, + -0.02872111236834621, 0.05959024752564801, ] `; diff --git a/test/modules/__snapshots__/number.spec.ts.snap b/test/modules/__snapshots__/number.spec.ts.snap index 3d10ddb4477..c04b4fe561e 100644 --- a/test/modules/__snapshots__/number.spec.ts.snap +++ b/test/modules/__snapshots__/number.spec.ts.snap @@ -26,6 +26,8 @@ exports[`number > 42 > float > with min 1`] = `-25.894775084685534`; exports[`number > 42 > float > with min and max 1`] = `-0.4260473116301`; +exports[`number > 42 > float > with min, max and multipleOf 1`] = `-0.4261`; + exports[`number > 42 > float > with min, max and precision 1`] = `-0.4261`; exports[`number > 42 > float > with plain number 1`] = `1.498160457238555`; @@ -74,6 +76,8 @@ exports[`number > 1211 > float > with min 1`] = `-2.073633389081806`; exports[`number > 1211 > float > with min and max 1`] = `61.06573706539348`; +exports[`number > 1211 > float > with min, max and multipleOf 1`] = `61.0658`; + exports[`number > 1211 > float > with min, max and precision 1`] = `61.0658`; exports[`number > 1211 > float > with plain number 1`] = `3.7140806149691343`; @@ -122,6 +126,8 @@ exports[`number > 1337 > float > with min 1`] = `-30.732938923640177`; exports[`number > 1337 > float > with min and max 1`] = `-12.915260942419991`; +exports[`number > 1337 > float > with min, max and multipleOf 1`] = `-12.9153`; + exports[`number > 1337 > float > with min, max and precision 1`] = `-12.9153`; exports[`number > 1337 > float > with plain number 1`] = `1.048098704777658`; diff --git a/test/modules/__snapshots__/person.spec.ts.snap b/test/modules/__snapshots__/person.spec.ts.snap index 6f3e0963034..a85f4ccb62e 100644 --- a/test/modules/__snapshots__/person.spec.ts.snap +++ b/test/modules/__snapshots__/person.spec.ts.snap @@ -50,7 +50,7 @@ exports[`person > 42 > suffix > with sex 1`] = `"III"`; exports[`person > 42 > zodiacSign 1`] = `"Gemini"`; -exports[`person > 1211 > bio 1`] = `"infrastructure supporter, photographer 🙆‍♀️"`; +exports[`person > 1211 > bio 1`] = `"teletype lover, dreamer 👄"`; exports[`person > 1211 > firstName > noArgs 1`] = `"Tito"`; diff --git a/test/modules/airline.spec.ts b/test/modules/airline.spec.ts index 5ac05a5b82f..bf674570c76 100644 --- a/test/modules/airline.spec.ts +++ b/test/modules/airline.spec.ts @@ -96,7 +96,7 @@ describe('airline', () => { it('should return a random narrowbody seat when not passing an argument', () => { const seat = faker.airline.seat(); const matchResult = seatRegex.exec(seat); - expect(matchResult).not.toBeNull(); + expectNotNull(matchResult); const row = matchResult[1]; const seatLetter = matchResult[2]; expect(row).toSatisfy((row: number) => row >= 1 && row <= 35); @@ -107,7 +107,7 @@ describe('airline', () => { aircraftType: Aircraft.Narrowbody, }); const matchResult = seatRegex.exec(seat); - expect(matchResult).not.toBeNull(); + expectNotNull(matchResult); const row = matchResult[1]; const seatLetter = matchResult[2]; expect(row).toSatisfy((row: number) => row >= 1 && row <= 35); @@ -116,7 +116,7 @@ describe('airline', () => { it('should return a random regional seat', () => { const seat = faker.airline.seat({ aircraftType: Aircraft.Regional }); const matchResult = seatRegex.exec(seat); - expect(matchResult).not.toBeNull(); + expectNotNull(matchResult); const row = matchResult[1]; const seatLetter = matchResult[2]; expect(row).toSatisfy((row: number) => row >= 1 && row <= 20); @@ -125,7 +125,7 @@ describe('airline', () => { it('should return a random widebody seat', () => { const seat = faker.airline.seat({ aircraftType: Aircraft.Widebody }); const matchResult = seatRegex.exec(seat); - expect(matchResult).not.toBeNull(); + expectNotNull(matchResult); const row = matchResult[1]; const seatLetter = matchResult[2]; expect(row).toSatisfy((row: number) => row >= 1 && row <= 60); @@ -179,3 +179,7 @@ describe('airline', () => { } ); }); + +function expectNotNull(value: T): asserts value is NonNullable { + expect(value).not.toBeNull(); +} diff --git a/test/modules/datatype.spec.ts b/test/modules/datatype.spec.ts index db676fdc333..75f2897cf28 100644 --- a/test/modules/datatype.spec.ts +++ b/test/modules/datatype.spec.ts @@ -232,6 +232,14 @@ describe('datatype', () => { new FakerError(`Max ${max} should be greater than min ${min}.`) ); }); + + it('should throw when precision is negative', () => { + expect(() => { + faker.datatype.number({ precision: -0.01 }); + }).toThrow( + new FakerError('multipleOf/precision should be greater than 0.') + ); + }); }); describe('float', () => { @@ -306,6 +314,25 @@ describe('datatype', () => { expect(opts.min).toBe(min); expect(opts.max).toBe(max); }); + + it('should throw when min > max', () => { + const min = 10; + const max = 9; + + expect(() => { + faker.datatype.number({ min, max }); + }).toThrow( + new FakerError(`Max ${max} should be greater than min ${min}.`) + ); + }); + + it('should throw when precision is negative', () => { + expect(() => { + faker.datatype.float({ precision: -0.01 }); + }).toThrow( + new FakerError('multipleOf/precision should be greater than 0.') + ); + }); }); describe('datetime', () => { @@ -330,12 +357,6 @@ describe('datatype', () => { expect(generatedString).toBe(''); expect(generatedString).toHaveLength(0); }); - - it('should return string with length of 2^20 if bigger length value is passed', () => { - const overMaxValue = Math.pow(2, 28); - const generatedString = faker.datatype.string(overMaxValue); - expect(generatedString).toHaveLength(Math.pow(2, 20)); - }); }); describe('boolean', () => { diff --git a/test/modules/date.spec.ts b/test/modules/date.spec.ts index 715d714af5d..bbd8020d2f0 100644 --- a/test/modules/date.spec.ts +++ b/test/modules/date.spec.ts @@ -587,6 +587,35 @@ describe('date', () => { expect(birthdate.getUTCFullYear()).toBeLessThanOrEqual(max); }); + it('returns a random birthdate that is 18+ by default', () => { + // Generate the latest possible value => youngest + faker.seed(2855577693); + + const refDate = new Date(); + const birthdate = faker.date.birthdate({ refDate }); + expect(birthdate).toBeInstanceOf(Date); + const value = birthdate.valueOf(); + const refDateValue = refDate.valueOf(); + expect(value).toBeLessThanOrEqual(refDateValue); + const deltaDate = new Date(refDateValue - value); + expect(deltaDate.getUTCFullYear() - 1970).toBeGreaterThanOrEqual(18); + }); + + it('returns a random birthdate in one year', () => { + const min = 1990; + const max = 1990; + + const birthdate = faker.date.birthdate({ min, max, mode: 'year' }); + + // birthdate is a date object + expect(birthdate).toBeInstanceOf(Date); + expect(birthdate.toISOString()).not.toMatch(/T00:00:00.000Z/); + + // Generated date is between min and max + expect(birthdate.getUTCFullYear()).toBeGreaterThanOrEqual(min); + expect(birthdate.getUTCFullYear()).toBeLessThanOrEqual(max); + }); + it('returns a random birthdate between two ages', () => { const min = 4; const max = 5; diff --git a/test/modules/finance-iban.spec.ts b/test/modules/finance-iban.spec.ts index 145a4751b50..4d801aa570f 100644 --- a/test/modules/finance-iban.spec.ts +++ b/test/modules/finance-iban.spec.ts @@ -1,6 +1,7 @@ import validator from 'validator'; import { describe, expect, it } from 'vitest'; import { faker } from '../../src'; +import { prettyPrintIban } from '../../src/modules/finance'; import ibanLib from '../../src/modules/finance/iban'; import { times } from '../support/times'; @@ -36,7 +37,7 @@ describe('finance_iban', () => { expect(iban).toSatisfy(validator.isIBAN); - const ibanFormatted = iban.match(/.{1,4}/g).join(' '); + const ibanFormatted = prettyPrintIban(iban); const bban = iban.substring(4) + iban.substring(0, 4); expect( @@ -96,7 +97,7 @@ describe('finance_iban', () => { expect(iban).toSatisfy(validator.isIBAN); - const ibanFormated = iban.match(/.{1,4}/g).join(' '); + const ibanFormated = prettyPrintIban(iban); const bban = iban.substring(4) + iban.substring(0, 4); expect( @@ -162,7 +163,7 @@ describe('finance_iban', () => { expect(iban).toSatisfy(validator.isIBAN); - const ibanFormated = iban.match(/.{1,4}/g).join(' '); + const ibanFormated = prettyPrintIban(iban); const bban = iban.substring(4) + iban.substring(0, 4); expect( @@ -232,7 +233,7 @@ describe('finance_iban', () => { expect(iban).toSatisfy(validator.isIBAN); - const ibanFormated = iban.match(/.{1,4}/g).join(' '); + const ibanFormated = prettyPrintIban(iban); const bban = iban.substring(4) + iban.substring(0, 4); expect( @@ -291,7 +292,7 @@ describe('finance_iban', () => { expect(iban).toSatisfy(validator.isIBAN); - const ibanFormated = iban.match(/.{1,4}/g).join(' '); + const ibanFormated = prettyPrintIban(iban); const bban = iban.substring(4) + iban.substring(0, 4); expect( @@ -336,7 +337,7 @@ describe('finance_iban', () => { // Bank account number 16 digit const iban = faker.finance.iban(false, 'AL'); - const ibanFormated = iban.match(/.{1,4}/g).join(' '); + const ibanFormated = prettyPrintIban(iban); expect(iban).toSatisfy(validator.isIBAN); diff --git a/test/modules/finance.spec.ts b/test/modules/finance.spec.ts index 93c6a0fcbd4..322e3ba91df 100644 --- a/test/modules/finance.spec.ts +++ b/test/modules/finance.spec.ts @@ -217,6 +217,12 @@ describe('finance', () => { }); describe('maskedNumber()', () => { + it('should return contain parenthesis, ellipsis and have a length of 4 by default', () => { + const actual = faker.finance.maskedNumber(); + + expect(actual).toMatch(/\(\.{3}\d{4}\)/); + }); + it('should set a default length', () => { const expected = 4; // default account mask length const mask = faker.finance.maskedNumber({ diff --git a/test/modules/helpers-eval.spec.ts b/test/modules/helpers-eval.spec.ts new file mode 100644 index 00000000000..40612c37312 --- /dev/null +++ b/test/modules/helpers-eval.spec.ts @@ -0,0 +1,162 @@ +import { describe, expect, it, vi } from 'vitest'; +import { faker, FakerError } from '../../src'; +import { fakeEval } from '../../src/modules/helpers/eval'; + +describe('fakeEval()', () => { + it('does not allow empty string input', () => { + expect(() => fakeEval('', faker)).toThrowError( + new FakerError('Eval expression cannot be empty.') + ); + }); + + it('does not allow empty entrypoints', () => { + expect(() => fakeEval('foobar', faker, [])).toThrowError( + new FakerError('Eval entrypoints cannot be empty.') + ); + }); + + it('supports single pattern part invocations', () => { + const actual = fakeEval('string', faker); + expect(actual).toBeTypeOf('object'); + expect(actual).toBe(faker.string); + }); + + it('supports simple method calls', () => { + const spy = vi.spyOn(faker.string, 'numeric'); + const actual = fakeEval('string.numeric', faker); + expect(spy).toHaveBeenCalledWith(); + expect(actual).toBeTypeOf('string'); + expect(actual).toMatch(/^\d$/); + }); + + it('supports method calls without arguments', () => { + const spy = vi.spyOn(faker.string, 'numeric'); + const actual = fakeEval('string.numeric()', faker); + expect(spy).toHaveBeenCalledWith(); + expect(actual).toBeTypeOf('string'); + expect(actual).toMatch(/^\d$/); + }); + + it('supports method calls with simple arguments', () => { + const spy = vi.spyOn(faker.string, 'numeric'); + const actual = fakeEval('string.numeric(5)', faker); + expect(spy).toHaveBeenCalledWith(5); + expect(actual).toBeTypeOf('string'); + expect(actual).toMatch(/^\d{5}$/); + }); + + it('supports method calls with complex arguments', () => { + const spy = vi.spyOn(faker.string, 'numeric'); + const actual = fakeEval( + 'string.numeric({ "length": 5, "allowLeadingZeros": true, "exclude": ["5"] })', + faker + ); + expect(spy).toHaveBeenCalledWith({ + length: 5, + allowLeadingZeros: true, + exclude: ['5'], + }); + expect(actual).toBeTypeOf('string'); + expect(actual).toMatch(/^[0-46-9]{5}$/); + }); + + it('supports method calls with multiple arguments', () => { + const spy = vi.spyOn(faker.helpers, 'mustache'); + const actual = fakeEval( + 'helpers.mustache("{{foo}}", { "foo": "bar" })', + faker + ); + expect(spy).toHaveBeenCalledWith('{{foo}}', { foo: 'bar' }); + expect(actual).toBeTypeOf('string'); + expect(actual).toBe('bar'); + }); + + it('supports method calls with unquoted string argument', () => { + const spy = vi.spyOn(faker.helpers, 'slugify'); + const actual = fakeEval('helpers.slugify(This Works)', faker); + expect(spy).toHaveBeenCalledWith('This Works'); + expect(actual).toBeTypeOf('string'); + expect(actual).toBe('This-Works'); + }); + + it('supports method calls with wrongly quoted argument', () => { + const spy = vi.spyOn(faker.helpers, 'slugify'); + const actual = fakeEval("helpers.slugify('')", faker); + expect(spy).toHaveBeenCalledWith("''"); + expect(actual).toBeTypeOf('string'); + expect(actual).toBe(''); + }); + + it('should be able to return empty strings', () => { + const actual = fakeEval('string.alphanumeric(0)', faker); + expect(actual).toBeTypeOf('string'); + expect(actual).toBe(''); + }); + + it('supports returning complex objects', () => { + const actual = fakeEval('airline.airline', faker); + expect(actual).toBeTypeOf('object'); + expect(faker.definitions.airline.airline).toContain(actual); + }); + + it('supports patterns after a function call', () => { + const actual = fakeEval('airline.airline().name', faker); + expect(actual).toBeTypeOf('string'); + expect(faker.definitions.airline.airline.map(({ name }) => name)).toContain( + actual + ); // function().name + }); + + it('supports patterns after a function reference', () => { + const actual = fakeEval('airline.airline.iataCode', faker); + expect(actual).toBeTypeOf('string'); + expect( + faker.definitions.airline.airline.map(({ iataCode }) => iataCode) + ).toContain(actual); + }); + + it('requires a dot after a function call', () => { + expect(() => fakeEval('airline.airline()iataCode', faker)).toThrowError( + new FakerError( + "Expected dot ('.'), open parenthesis ('('), or nothing after function call but got 'i'" + ) + ); + }); + + it('requires a function for parameters', () => { + // TODO @ST-DDT 2023-12-11: Replace in v9 + // expect(faker.definitions.person.first_name).toBeDefined(); + //expect(() => fakeEval('person.first_name()', faker)).toThrow( + // new FakerError(`Cannot resolve expression 'person.first_name'`) + // ); + const actual = fakeEval('person.first_name()', faker); + expect(faker.definitions.person.first_name).toContain(actual); + }); + + it('requires a valid expression (missing value)', () => { + expect(() => fakeEval('foo.bar', faker)).toThrow( + new FakerError(`Cannot resolve expression 'foo.bar'`) + ); + }); + + it('requires a valid expression (trailing dot)', () => { + expect(() => fakeEval('airline.airline.', faker)).toThrowError( + new FakerError("Found dot without property name in 'airline.'") + ); + expect(() => fakeEval('airline.airline.()', faker)).toThrowError( + new FakerError("Found dot without property name in 'airline.()'") + ); + expect(() => fakeEval('airline.airline.().iataCode', faker)).toThrowError( + new FakerError("Found dot without property name in 'airline.().iataCode'") + ); + }); + + it('requires a valid expression (unclosed parenthesis)', () => { + expect(() => fakeEval('airline.airline(', faker)).toThrowError( + new FakerError("Missing closing parenthesis in '('") + ); + expect(() => fakeEval('airline.airline(.iataCode', faker)).toThrowError( + new FakerError("Missing closing parenthesis in '(.iataCode'") + ); + }); +}); diff --git a/test/modules/helpers.spec.ts b/test/modules/helpers.spec.ts index e683d1d818c..1b9ba3aeff5 100644 --- a/test/modules/helpers.spec.ts +++ b/test/modules/helpers.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest'; import { faker, FakerError } from '../../src'; import { luhnCheck } from '../../src/modules/helpers/luhn-check'; +import type { RecordKey } from '../../src/modules/helpers/unique'; import { seededTests } from '../support/seeded-runs'; import { times } from './../support/times'; import './../vitest-extensions'; @@ -95,6 +96,7 @@ describe('helpers', () => { enum MixedFoo { Foo = 0, Bar = 1, + // eslint-disable-next-line @typescript-eslint/no-mixed-enums FooName = 'Foo', BarName = 'Bar', } @@ -222,7 +224,6 @@ describe('helpers', () => { }); it('should throw on an empty array', () => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return expect(() => faker.helpers.arrayElement([])).toThrow( new FakerError('Cannot get value from empty dataset.') ); @@ -256,6 +257,7 @@ describe('helpers', () => { enum FooMixedEnum { Foo = 0, Bar = 1, + // eslint-disable-next-line @typescript-eslint/no-mixed-enums StrFoo = 'FOO', StrBar = 'BAR', } @@ -1025,34 +1027,35 @@ describe('helpers', () => { it('does not allow invalid module name', () => { expect(() => faker.helpers.fake('{{foo.bar}}')).toThrow( - new FakerError(`Invalid module method or definition: foo.bar -- faker.foo.bar is not a function -- faker.definitions.foo.bar is not an array`) + new FakerError(`Cannot resolve expression 'foo.bar'`) ); }); - it('does not allow missing method name', () => { - expect(() => faker.helpers.fake('{{location}}')).toThrow( - new FakerError(`Invalid module method or definition: location -- faker.location is not a function -- faker.definitions.location is not an array`) - ); + it('does allow missing method name', () => { + const actual = faker.helpers.fake('{{location}}'); + expect(actual).toBe('[object Object]'); }); it('does not allow invalid method name', () => { expect(() => faker.helpers.fake('{{location.foo}}')).toThrow( - new FakerError(`Invalid module method or definition: location.foo -- faker.location.foo is not a function -- faker.definitions.location.foo is not an array`) + new FakerError(`Cannot resolve expression 'location.foo'`) ); }); - it('does not allow invalid definitions data', () => { - expect(() => faker.helpers.fake('{{finance.credit_card}}')).toThrow( - new FakerError(`Invalid module method or definition: finance.credit_card -- faker.finance.credit_card is not a function -- faker.definitions.finance.credit_card is not an array`) - ); + it('should support complex data', () => { + const actual = faker.helpers.fake('{{science.unit}}'); + expect(actual).toBe('[object Object]'); + }); + + it('should support resolving a value in a complex object', () => { + const complex = faker.helpers.fake('{{airline.airline}}'); + expect(complex).toBe('[object Object]'); + + const actual = faker.helpers.fake('{{airline.airline.iataCode}}'); + expect(actual).toBeTypeOf('string'); + expect( + faker.definitions.airline.airline.map(({ iataCode }) => iataCode) + ).toContain(actual); }); it('should be able to return empty strings', () => { @@ -1060,7 +1063,7 @@ describe('helpers', () => { }); it('should be able to return locale definition strings', () => { - expect(faker.definitions.cell_phone.formats).toContain( + expect(faker.definitions.cell_phone?.formats).toContain( faker.helpers.fake('{{cell_phone.formats}}') ); }); @@ -1294,8 +1297,9 @@ Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`) const maxTime = 49; const maxRetries = 49; const currentIterations = 0; - const exclude = []; - const compare = (obj, key) => (obj[key] === undefined ? -1 : 0); + const exclude: string[] = []; + const compare = (obj: Record, key: RecordKey) => + obj[key] === undefined ? -1 : 0; const options = { startTime, @@ -1317,7 +1321,7 @@ Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`) }); it('should be possible to pass a user-specific store', () => { - const store = {}; + const store: Record = {}; const method = () => 'with conflict: 0'; diff --git a/test/modules/image.spec.ts b/test/modules/image.spec.ts index 139ff7a1d36..7499d7802aa 100644 --- a/test/modules/image.spec.ts +++ b/test/modules/image.spec.ts @@ -257,7 +257,7 @@ describe('image', () => { 'objects', 'people', 'technology', - ]; + ] satisfies Array; describe.each(categories)(`%s()`, (category) => { it(`should return a random ${category} image url`, () => { diff --git a/test/modules/internet.spec.ts b/test/modules/internet.spec.ts index 40518833b7c..e4c08b92591 100644 --- a/test/modules/internet.spec.ts +++ b/test/modules/internet.spec.ts @@ -252,9 +252,8 @@ describe('internet', () => { const [prefix, suffix] = email.split('@'); expect(prefix).includes('Aiden'); - expect(prefix).toMatch( - /^Aiden((\d{1,2})|([._]Harann\d{1,2})|([._](Harann)))/ - ); + expect(prefix).includes('Harann'); + expect(prefix).toMatch(/^Aiden[._]Harann\d*/); expect(faker.definitions.internet.free_email).toContain(suffix); }); @@ -296,9 +295,7 @@ describe('internet', () => { const [prefix, suffix] = email.split('@'); - expect(prefix).toMatch( - /^Mike((\d{1,2})|([.!#$%&'*+-/=?^_`{|}~]Smith\d{1,2})|([.!#$%&'*+-/=?^_`{|}~]Smith))/ - ); + expect(prefix).toMatch(/^Mike[.!#$%&'*+-/=?^_`{|}~]Smith\d*/); expect(faker.definitions.internet.free_email).toContain(suffix); }); }); @@ -344,10 +341,12 @@ describe('internet', () => { expect(email).toSatisfy(validator.isEmail); const [prefix, suffix] = email.split('@'); + expect(email).includes('Aiden'); + expect(email).includes('Harann'); expect(suffix).toMatch(/^example\.(com|net|org)$/); expect(faker.definitions.internet.example_email).toContain(suffix); - expect(prefix).toMatch(/^Aiden([._]Harann)?\d*/); + expect(prefix).toMatch(/^Aiden[._]Harann\d*/); }); it('should return an email with special characters', () => { @@ -365,7 +364,9 @@ describe('internet', () => { expect(suffix).toMatch(/^example\.(com|net|org)$/); expect(faker.definitions.internet.example_email).toContain(suffix); - expect(prefix).toMatch(/^Mike([.!#$%&'*+-/=?^_`{|}~]Smith)?\d*/); + expect(prefix).includes('Mike'); + expect(prefix).includes('Smith'); + expect(prefix).toMatch(/^Mike[.!#$%&'*+-/=?^_`{|}~]Smith\d*/); }); }); @@ -396,9 +397,8 @@ describe('internet', () => { expect(username).toBeTruthy(); expect(username).toBeTypeOf('string'); expect(username).includes('Aiden'); - expect(username).toMatch( - /^Aiden((\d{1,2})|([._]Harann\d{1,2})|([._](Harann)))/ - ); + expect(username).includes('Harann'); + expect(username).toMatch(/^Aiden[._]Harann\d*/); }); it('should strip accents', () => { @@ -407,6 +407,7 @@ describe('internet', () => { lastName: 'Smith', }); expect(username).includes('Adele'); + expect(username).includes('Smith'); }); it('should transliterate Cyrillic', () => { @@ -421,6 +422,14 @@ describe('internet', () => { const username = faker.internet.userName('大羽', '陳'); expect(username).includes('hlzp8d'); }); + + it('should provide a fallback special unicode characters', () => { + const username = faker.internet.userName({ + firstName: '🐼', + lastName: '❤️', + }); + expect(username).includes('2qt8'); + }); }); describe('displayName()', () => { diff --git a/test/modules/number.spec.ts b/test/modules/number.spec.ts index 66018ee61bd..c61498fab91 100644 --- a/test/modules/number.spec.ts +++ b/test/modules/number.spec.ts @@ -1,7 +1,9 @@ import validator from 'validator'; import { describe, expect, it } from 'vitest'; -import { faker, FakerError } from '../../src'; +import { faker, FakerError, SimpleFaker } from '../../src'; +import { MERSENNE_MAX_VALUE } from '../internal/mersenne-test-utils'; import { seededTests } from '../support/seeded-runs'; +import { times } from './../support/times'; describe('number', () => { seededTests(faker, 'number', (t) => { @@ -25,6 +27,11 @@ describe('number', () => { min: -42, max: 69, precision: 0.0001, + }) + .it('with min, max and multipleOf', { + min: -42, + max: 69, + multipleOf: 0.0001, }); }); @@ -242,6 +249,22 @@ describe('number', () => { expect(results).toEqual([0, 0.5, 1, 1.5]); }); + it('provides numbers with a given multipleOf of 0.5 steps', () => { + const results = [ + ...new Set( + Array.from({ length: 50 }, () => + faker.number.float({ + min: 0, + max: 1.5, + multipleOf: 0.5, + }) + ) + ), + ].sort(); + + expect(results).toEqual([0, 0.5, 1, 1.5]); + }); + it('provides numbers with a given precision of 0.4 steps', () => { const results = [ ...new Set( @@ -258,26 +281,57 @@ describe('number', () => { expect(results).toEqual([0, 0.4, 0.8, 1.2, 1.6]); }); - it('provides numbers with an exact precision', () => { - for (let i = 0; i < 100; i++) { - const actual = faker.number.float({ - min: 0.5, - max: 0.99, - precision: 0.01, - }); - expect(actual).toBe(Number(actual.toFixed(2))); - } + it('provides numbers with a given precision of 0.2', () => { + const results = [ + ...new Set( + Array.from({ length: 50 }, () => + faker.number.float({ + min: 0, + max: 0.4, + precision: 0.2, + }) + ) + ), + ].sort(); + + expect(results).toEqual([0, 0.2, 0.4]); }); + it.each(times(18))( + `provides numbers with an exact precision of 10^-%d`, + (exponent) => { + for (let i = 0; i < 100; i++) { + const actual = faker.number.float({ + min: 0.5, + max: 0.99, + precision: 10 ** -exponent, + }); + expect(actual).toBe(Number(actual.toFixed(exponent))); + } + } + ); + it('throws an error for precision 0', () => { expect(() => faker.number.float({ precision: 0 })).toThrow( - new FakerError('Precision should be greater than 0.') + new FakerError('multipleOf/precision should be greater than 0.') + ); + }); + + it('throws an error for multipleOf 0', () => { + expect(() => faker.number.float({ multipleOf: 0 })).toThrow( + new FakerError('multipleOf/precision should be greater than 0.') ); }); it('throws an error for negative precision', () => { expect(() => faker.number.float({ precision: -0.01 })).toThrow( - new FakerError('Precision should be greater than 0.') + new FakerError('multipleOf/precision should be greater than 0.') + ); + }); + + it('throws an error for negative multipleOf', () => { + expect(() => faker.number.float({ multipleOf: -0.01 })).toThrow( + new FakerError('multipleOf/precision should be greater than 0.') ); }); @@ -304,7 +358,7 @@ describe('number', () => { return [...str].every((char) => char === '0' || char === '1'); } - it('enerates single binary character when no additional argument was provided', () => { + it('generates single binary character when no additional argument was provided', () => { const binary = faker.number.binary(); expect(binary).toBeTypeOf('string'); @@ -344,6 +398,14 @@ describe('number', () => { new FakerError(`Max ${max} should be greater than min ${min}.`) ); }); + + it('should throw when there is no integer between min and max', () => { + expect(() => { + faker.number.binary({ min: 2.1, max: 2.9 }); + }).toThrow( + new FakerError(`No integer value between 2.1 and 2.9 found.`) + ); + }); }); describe('octal', () => { @@ -387,6 +449,14 @@ describe('number', () => { new FakerError(`Max ${max} should be greater than min ${min}.`) ); }); + + it('should throw when there is no integer between min and max', () => { + expect(() => { + faker.number.octal({ min: 2.1, max: 2.9 }); + }).toThrow( + new FakerError(`No integer value between 2.1 and 2.9 found.`) + ); + }); }); describe('hex', () => { @@ -427,6 +497,14 @@ describe('number', () => { new FakerError(`Max ${max} should be greater than min ${min}.`) ); }); + + it('should throw when there is no integer between min and max', () => { + expect(() => { + faker.number.hex({ min: 2.1, max: 2.9 }); + }).toThrow( + new FakerError(`No integer value between 2.1 and 2.9 found.`) + ); + }); }); describe('bigInt', () => { @@ -507,4 +585,38 @@ describe('number', () => { }); }); }); + + describe('value range tests', () => { + const customFaker = new SimpleFaker(); + // @ts-expect-error: access private member field + const randomizer = customFaker._randomizer; + describe('int', () => { + it('should be able to return 0', () => { + randomizer.next = () => 0; + const actual = customFaker.number.int(); + expect(actual).toBe(0); + }); + + // TODO @ST-DDT 2023-10-12: This requires a randomizer with 53 bits of precision + it.todo('should be able to return MAX_SAFE_INTEGER', () => { + randomizer.next = () => MERSENNE_MAX_VALUE; + const actual = customFaker.number.int(); + expect(actual).toBe(Number.MAX_SAFE_INTEGER); + }); + }); + + describe('float', () => { + it('should be able to return 0', () => { + randomizer.next = () => 0; + const actual = customFaker.number.float(); + expect(actual).toBe(0); + }); + + it('should be able to return almost 1', () => { + randomizer.next = () => MERSENNE_MAX_VALUE; + const actual = customFaker.number.float(); + expect(actual).toBe(MERSENNE_MAX_VALUE); + }); + }); + }); }); diff --git a/test/modules/string.spec.ts b/test/modules/string.spec.ts index a4f7ecef0c5..e82fa93f653 100644 --- a/test/modules/string.spec.ts +++ b/test/modules/string.spec.ts @@ -724,12 +724,6 @@ describe('string', () => { expect(generatedString).toHaveLength(0); }); - it('should return string with length of 2^20 if bigger length value is passed', () => { - const overMaxValue = 2 ** 28; - const generatedString = faker.string.sample(overMaxValue); - expect(generatedString).toHaveLength(2 ** 20); - }); - it('should return string with a specific length', () => { const length = 1337; const generatedString = faker.string.sample(length); diff --git a/test/scripts/apidoc/__snapshots__/module.spec.ts.snap b/test/scripts/apidoc/__snapshots__/module.spec.ts.snap index 3afdab63b01..2f2d15ddbee 100644 --- a/test/scripts/apidoc/__snapshots__/module.spec.ts.snap +++ b/test/scripts/apidoc/__snapshots__/module.spec.ts.snap @@ -12,7 +12,7 @@ exports[`module > analyzeModule() > ModuleExampleTest 1`] = ` { "comment": "This is a description for a module with a code example.", "deprecated": undefined, - "examples": "
ts
new ModuleExampleTest()
+ "examples": "
ts
new ModuleExampleTest()
", } `; diff --git a/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap b/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap index 12e7df29bb5..9848720c9f6 100644 --- a/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap +++ b/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap @@ -5,10 +5,10 @@ exports[`signature > analyzeSignature() > complexArrayParameter 1`] = ` "deprecated": undefined, "description": "

Complex array parameter.

", - "examples": "
ts
complexArrayParameter<T>(array: readonly Array<{
-  value: T,
-  weight: number
-}>): T
+ "examples": "
ts
complexArrayParameter<T>(array: readonly Array<{
+  value: T,
+  weight: number
+}>): T
", "name": "complexArrayParameter", "parameters": [ @@ -42,8 +42,8 @@ exports[`signature > analyzeSignature() > complexArrayParameter 1`] = ` ], "returns": "T", "seeAlsos": [], - "since": "", - "sourcePath": "test/scripts/apidoc/signature.example.ts#L367", + "since": "Missing", + "sourcePath": "test/scripts/apidoc/signature.example.ts#L377", "throws": undefined, } `; @@ -53,7 +53,7 @@ exports[`signature > analyzeSignature() > defaultBooleanParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with a default parameter.

", - "examples": "
ts
defaultBooleanParamMethod(c: boolean = true): number
+ "examples": "
ts
defaultBooleanParamMethod(c: boolean = true): number
", "name": "defaultBooleanParamMethod", "parameters": [ @@ -67,7 +67,7 @@ exports[`signature > analyzeSignature() > defaultBooleanParamMethod 1`] = ` ], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L105", "throws": undefined, } @@ -84,6 +84,7 @@ exports[`signature > analyzeSignature() > expected and actual methods are equal "methodWithExample", "methodWithMultipleSeeMarkers", "methodWithMultipleSeeMarkersAndBackticks", + "methodWithMultipleThrows", "methodWithSinceMarker", "methodWithThrows", "multiParamMethod", @@ -104,7 +105,7 @@ exports[`signature > analyzeSignature() > functionParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with a function parameters.

", - "examples": "
ts
functionParamMethod(fn: (a: string) => number): number
+ "examples": "
ts
functionParamMethod(fn: (a: string) => number): number
", "name": "functionParamMethod", "parameters": [ @@ -118,7 +119,7 @@ exports[`signature > analyzeSignature() > functionParamMethod 1`] = ` ], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L125", "throws": undefined, } @@ -129,7 +130,7 @@ exports[`signature > analyzeSignature() > literalUnionParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with LiteralUnion.

", - "examples": "
ts
literalUnionParamMethod(value: 'a' | 'b' | string, namedValue: 'a' | 'b' | string, array: readonly Array<'a' | 'b' | string>, namedArray: readonly Array<'a' | 'b' | string>, mixed: 'a' | 'b' | string | readonly Array<'a' | 'b' | string>, namedMixed: 'a' | 'b' | string | readonly Array<'a' | 'b' | string>): string
+ "examples": "
ts
literalUnionParamMethod(value: 'a' | 'b' | string, namedValue: 'a' | 'b' | string, array: readonly Array<'a' | 'b' | string>, namedArray: readonly Array<'a' | 'b' | string>, mixed: 'a' | 'b' | string | readonly Array<'a' | 'b' | string>, namedMixed: 'a' | 'b' | string | readonly Array<'a' | 'b' | string>): string
", "name": "literalUnionParamMethod", "parameters": [ @@ -178,7 +179,7 @@ exports[`signature > analyzeSignature() > literalUnionParamMethod 1`] = ` ], "returns": "string", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L159", "throws": undefined, } @@ -190,7 +191,7 @@ exports[`signature > analyzeSignature() > methodWithDeprecated 1`] = ` ", "description": "

Test with deprecated and see marker.

", - "examples": "
ts
methodWithDeprecated(): number
+ "examples": "
ts
methodWithDeprecated(): number
", "name": "methodWithDeprecated", "parameters": [], @@ -198,7 +199,7 @@ exports[`signature > analyzeSignature() > methodWithDeprecated 1`] = ` "seeAlsos": [ "test.apidoc.methodWithExample()", ], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L287", "throws": undefined, } @@ -209,11 +210,11 @@ exports[`signature > analyzeSignature() > methodWithDeprecatedOption 1`] = ` "deprecated": undefined, "description": "

Test with deprecated option.

", - "examples": "
ts
methodWithDeprecatedOption(option: {
-  a: string,
-  b: () => number,
-  c: number
-}): number
+ "examples": "
ts
methodWithDeprecatedOption(option: {
+  a: string,
+  b: () => number,
+  c: number
+}): number
", "name": "methodWithDeprecatedOption", "parameters": [ @@ -250,8 +251,8 @@ exports[`signature > analyzeSignature() > methodWithDeprecatedOption 1`] = ` ], "returns": "number", "seeAlsos": [], - "since": "", - "sourcePath": "test/scripts/apidoc/signature.example.ts#L308", + "since": "Missing", + "sourcePath": "test/scripts/apidoc/signature.example.ts#L318", "throws": undefined, } `; @@ -261,14 +262,14 @@ exports[`signature > analyzeSignature() > methodWithExample 1`] = ` "deprecated": undefined, "description": "

Test with example marker.

", - "examples": "
ts
methodWithExample(): number
-test.apidoc.methodWithExample() // 0
+ "examples": "
ts
methodWithExample(): number
+test.apidoc.methodWithExample() // 0
", "name": "methodWithExample", "parameters": [], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L276", "throws": undefined, } @@ -279,7 +280,7 @@ exports[`signature > analyzeSignature() > methodWithMultipleSeeMarkers 1`] = ` "deprecated": undefined, "description": "

Test with multiple see markers.

", - "examples": "
ts
methodWithMultipleSeeMarkers(): number
+ "examples": "
ts
methodWithMultipleSeeMarkers(): number
", "name": "methodWithMultipleSeeMarkers", "parameters": [], @@ -288,8 +289,8 @@ exports[`signature > analyzeSignature() > methodWithMultipleSeeMarkers 1`] = ` "test.apidoc.methodWithExample()", "test.apidoc.methodWithDeprecated()", ], - "since": "", - "sourcePath": "test/scripts/apidoc/signature.example.ts#L335", + "since": "Missing", + "sourcePath": "test/scripts/apidoc/signature.example.ts#L345", "throws": undefined, } `; @@ -299,7 +300,7 @@ exports[`signature > analyzeSignature() > methodWithMultipleSeeMarkersAndBacktic "deprecated": undefined, "description": "

Test with multiple see markers and backticks.

", - "examples": "
ts
methodWithMultipleSeeMarkersAndBackticks(): number
+ "examples": "
ts
methodWithMultipleSeeMarkersAndBackticks(): number
", "name": "methodWithMultipleSeeMarkersAndBackticks", "parameters": [], @@ -308,25 +309,43 @@ exports[`signature > analyzeSignature() > methodWithMultipleSeeMarkersAndBacktic "test.apidoc.methodWithExample() with parameter foo.", "test.apidoc.methodWithDeprecated() with parameter bar and baz.", ], - "since": "", - "sourcePath": "test/scripts/apidoc/signature.example.ts#L345", + "since": "Missing", + "sourcePath": "test/scripts/apidoc/signature.example.ts#L355", "throws": undefined, } `; +exports[`signature > analyzeSignature() > methodWithMultipleThrows 1`] = ` +{ + "deprecated": undefined, + "description": "

Test with multiple throws.

+", + "examples": "
ts
methodWithMultipleThrows(): number
+
", + "name": "methodWithMultipleThrows", + "parameters": [], + "returns": "number", + "seeAlsos": [], + "since": "Missing", + "sourcePath": "test/scripts/apidoc/signature.example.ts#L306", + "throws": "First error case. +Another error case.", +} +`; + exports[`signature > analyzeSignature() > methodWithSinceMarker 1`] = ` { "deprecated": undefined, "description": "

Test with since marker.

", - "examples": "
ts
methodWithSinceMarker(): number
+ "examples": "
ts
methodWithSinceMarker(): number
", "name": "methodWithSinceMarker", "parameters": [], "returns": "number", "seeAlsos": [], "since": "1.0.0", - "sourcePath": "test/scripts/apidoc/signature.example.ts#L354", + "sourcePath": "test/scripts/apidoc/signature.example.ts#L364", "throws": undefined, } `; @@ -334,17 +353,17 @@ exports[`signature > analyzeSignature() > methodWithSinceMarker 1`] = ` exports[`signature > analyzeSignature() > methodWithThrows 1`] = ` { "deprecated": undefined, - "description": "

Test with throws

+ "description": "

Test with throws.

", - "examples": "
ts
methodWithThrows(): number
+ "examples": "
ts
methodWithThrows(): number
", "name": "methodWithThrows", "parameters": [], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L296", - "throws": "a Faker error", + "throws": "Everytime.", } `; @@ -353,7 +372,7 @@ exports[`signature > analyzeSignature() > multiParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with multiple parameters.

", - "examples": "
ts
multiParamMethod(a: number, b?: string, c: boolean = true): number
+ "examples": "
ts
multiParamMethod(a: number, b?: string, c: boolean = true): number
", "name": "multiParamMethod", "parameters": [ @@ -381,7 +400,7 @@ exports[`signature > analyzeSignature() > multiParamMethod 1`] = ` ], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L116", "throws": undefined, } @@ -392,13 +411,13 @@ exports[`signature > analyzeSignature() > noParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with no parameters.

", - "examples": "
ts
noParamMethod(): number
+ "examples": "
ts
noParamMethod(): number
", "name": "noParamMethod", "parameters": [], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L78", "throws": undefined, } @@ -409,7 +428,7 @@ exports[`signature > analyzeSignature() > optionalStringParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with an optional parameter.

", - "examples": "
ts
optionalStringParamMethod(b?: string): number
+ "examples": "
ts
optionalStringParamMethod(b?: string): number
", "name": "optionalStringParamMethod", "parameters": [ @@ -423,7 +442,7 @@ exports[`signature > analyzeSignature() > optionalStringParamMethod 1`] = ` ], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L96", "throws": undefined, } @@ -434,13 +453,13 @@ exports[`signature > analyzeSignature() > optionsInlineParamMethodWithDefaults 1 "deprecated": undefined, "description": "

Test with a function parameters (inline types) with defaults.

", - "examples": "
ts
optionsInlineParamMethodWithDefaults(a: {
-  value: number
-} = { value: 1 }, b: {
-  value: number
-} = { value: 1 }, c: {
-  value: number
-}): number
+ "examples": "
ts
optionsInlineParamMethodWithDefaults(a: {
+  value: number
+} = { value: 1 }, b: {
+  value: number
+} = { value: 1 }, c: {
+  value: number
+}): number
", "name": "optionsInlineParamMethodWithDefaults", "parameters": [ @@ -491,7 +510,7 @@ It also has a more complex description.

], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L226", "throws": undefined, } @@ -502,7 +521,7 @@ exports[`signature > analyzeSignature() > optionsInterfaceParamMethodWithDefault "deprecated": undefined, "description": "

Test with a function parameters with defaults.

", - "examples": "
ts
optionsInterfaceParamMethodWithDefaults(a: ParameterOptionsInterfaceA = { value: 1 }, b: ParameterOptionsInterfaceB = { value: 1 }, c: ParameterOptionsInterfaceC): number
+ "examples": "
ts
optionsInterfaceParamMethodWithDefaults(a: ParameterOptionsInterfaceA = { value: 1 }, b: ParameterOptionsInterfaceB = { value: 1 }, c: ParameterOptionsInterfaceC): number
", "name": "optionsInterfaceParamMethodWithDefaults", "parameters": [ @@ -530,7 +549,7 @@ exports[`signature > analyzeSignature() > optionsInterfaceParamMethodWithDefault ], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L262", "throws": undefined, } @@ -541,13 +560,13 @@ exports[`signature > analyzeSignature() > optionsParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with an options parameter.

", - "examples": "
ts
optionsParamMethod(options: {
-  a: number,
-  b: string,
-  c: boolean,
-  d: () => string,
-  e: 'a' | 'b' | string
-}): number
+ "examples": "
ts
optionsParamMethod(options: {
+  a: number,
+  b: string,
+  c: boolean,
+  d: () => string,
+  e: 'a' | 'b' | string
+}): number
", "name": "optionsParamMethod", "parameters": [ @@ -596,7 +615,7 @@ exports[`signature > analyzeSignature() > optionsParamMethod 1`] = ` ], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L196", "throws": undefined, } @@ -607,7 +626,7 @@ exports[`signature > analyzeSignature() > optionsTypeParamMethodWithDefaults 1`] "deprecated": undefined, "description": "

Test with a function parameters with defaults.

", - "examples": "
ts
optionsTypeParamMethodWithDefaults(a: ParameterOptionsTypeA = { value: 1 }, b: ParameterOptionsTypeB = { value: 1 }, c: ParameterOptionsTypeC): number
+ "examples": "
ts
optionsTypeParamMethodWithDefaults(a: ParameterOptionsTypeA = { value: 1 }, b: ParameterOptionsTypeB = { value: 1 }, c: ParameterOptionsTypeC): number
", "name": "optionsTypeParamMethodWithDefaults", "parameters": [ @@ -635,7 +654,7 @@ exports[`signature > analyzeSignature() > optionsTypeParamMethodWithDefaults 1`] ], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L244", "throws": undefined, } @@ -646,7 +665,7 @@ exports[`signature > analyzeSignature() > recordParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with a Record parameter.

", - "examples": "
ts
recordParamMethod(object: Record<string, number>): number
+ "examples": "
ts
recordParamMethod(object: Record<string, number>): number
", "name": "recordParamMethod", "parameters": [ @@ -660,7 +679,7 @@ exports[`signature > analyzeSignature() > recordParamMethod 1`] = ` ], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L182", "throws": undefined, } @@ -671,7 +690,7 @@ exports[`signature > analyzeSignature() > requiredNumberParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with a required parameter.

", - "examples": "
ts
requiredNumberParamMethod(a: number): number
+ "examples": "
ts
requiredNumberParamMethod(a: number): number
", "name": "requiredNumberParamMethod", "parameters": [ @@ -685,7 +704,7 @@ exports[`signature > analyzeSignature() > requiredNumberParamMethod 1`] = ` ], "returns": "number", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L87", "throws": undefined, } @@ -696,11 +715,11 @@ exports[`signature > analyzeSignature() > stringUnionParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with string union.

", - "examples": "
ts
stringUnionParamMethod(value: 'a' | 'b', options?: {
-  casing: 'lower' | 'mixed' | 'upper',
-  excludes: readonly AlphaNumericChar[],
-  format: 'binary' | 'css' | 'decimal' | 'hex'
-}): string
+ "examples": "
ts
stringUnionParamMethod(value: 'a' | 'b', options?: {
+  casing: 'lower' | 'mixed' | 'upper',
+  excludes: readonly AlphaNumericChar[],
+  format: 'binary' | 'css' | 'decimal' | 'hex'
+}): string
", "name": "stringUnionParamMethod", "parameters": [ @@ -742,7 +761,7 @@ exports[`signature > analyzeSignature() > stringUnionParamMethod 1`] = ` ], "returns": "string", "seeAlsos": [], - "since": "", + "since": "Missing", "sourcePath": "test/scripts/apidoc/signature.example.ts#L138", "throws": undefined, } diff --git a/test/scripts/apidoc/module.example.ts b/test/scripts/apidoc/module.example.ts index b3f43a8602b..0e5d9d89613 100644 --- a/test/scripts/apidoc/module.example.ts +++ b/test/scripts/apidoc/module.example.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-extraneous-class -- required for tests */ + /** * A simple module without anything special. */ diff --git a/test/scripts/apidoc/module.spec.ts b/test/scripts/apidoc/module.spec.ts index 508c9de36af..5e55afea850 100644 --- a/test/scripts/apidoc/module.spec.ts +++ b/test/scripts/apidoc/module.spec.ts @@ -4,12 +4,11 @@ import { analyzeModule } from '../../../scripts/apidoc/module-methods'; import * as ModuleTests from './module.example'; import { loadExampleModules } from './utils'; +beforeAll(initMarkdownRenderer); +const modules = await loadExampleModules(); + describe('module', () => { describe('analyzeModule()', () => { - const modules = loadExampleModules(); - - beforeAll(initMarkdownRenderer); - it('dummy dependency to rerun the test if the example changes', () => { expect(Object.keys(ModuleTests)).not.toEqual([]); }); diff --git a/test/scripts/apidoc/signature.debug.ts b/test/scripts/apidoc/signature.debug.ts index d72709b0754..9e99e8c6f93 100644 --- a/test/scripts/apidoc/signature.debug.ts +++ b/test/scripts/apidoc/signature.debug.ts @@ -8,10 +8,9 @@ import { loadExampleMethods } from './utils'; /* Run with `pnpm tsx test/scripts/apidoc/signature.debug.ts` */ -const methods = loadExampleMethods(); - initMarkdownRenderer() .then(async () => { + const methods = await loadExampleMethods(); for (const [name, method] of Object.entries(methods)) { console.log('Analyzing:', name); const result = await analyzeSignature(method, '', method.name); diff --git a/test/scripts/apidoc/signature.example.ts b/test/scripts/apidoc/signature.example.ts index 724f687d3a6..2f62057bc01 100644 --- a/test/scripts/apidoc/signature.example.ts +++ b/test/scripts/apidoc/signature.example.ts @@ -289,14 +289,24 @@ export class SignatureTest { } /** - * Test with throws + * Test with throws. * - * @throws a Faker error + * @throws Everytime. */ methodWithThrows(): number { throw new FakerError('Test error'); } + /** + * Test with multiple throws. + * + * @throws First error case. + * @throws Another error case. + */ + methodWithMultipleThrows(): number { + throw new FakerError('Another test error'); + } + /** * Test with deprecated option. * diff --git a/test/scripts/apidoc/signature.spec.ts b/test/scripts/apidoc/signature.spec.ts index 75abf23bd9a..51935fcf44b 100644 --- a/test/scripts/apidoc/signature.spec.ts +++ b/test/scripts/apidoc/signature.spec.ts @@ -4,12 +4,11 @@ import { analyzeSignature } from '../../../scripts/apidoc/signature'; import { SignatureTest } from './signature.example'; import { loadExampleMethods } from './utils'; +beforeAll(initMarkdownRenderer); +const methods = await loadExampleMethods(); + describe('signature', () => { describe('analyzeSignature()', () => { - const methods = loadExampleMethods(); - - beforeAll(initMarkdownRenderer); - it('dummy dependency to rerun the test if the example changes', () => { expect(new SignatureTest()).toBeTruthy(); }); diff --git a/test/scripts/apidoc/utils.ts b/test/scripts/apidoc/utils.ts index ade31120ad8..2752f25b648 100644 --- a/test/scripts/apidoc/utils.ts +++ b/test/scripts/apidoc/utils.ts @@ -16,14 +16,13 @@ import { mapByName } from '../../../scripts/apidoc/utils'; * @param options The TypeDoc options. * @param includeTestModules Whether to include the test modules. */ -export function loadProjectModules( +export async function loadProjectModules( options?: Partial, includeTestModules = false -): Record< - string, - [DeclarationReflection, Record] +): Promise< + Record]> > { - const [, project] = loadProject(options); + const [, project] = await loadProject(options); const modules = selectApiModules(project, includeTestModules); @@ -33,20 +32,25 @@ export function loadProjectModules( /** * Loads the example methods using TypeDoc. */ -export function loadExampleMethods(): Record { - return loadProjectModules( +export async function loadExampleMethods(): Promise< + Record +> { + const modules = await loadProjectModules( { entryPoints: ['test/scripts/apidoc/signature.example.ts'], }, true - )['SignatureTest'][1]; + ); + return modules['SignatureTest'][1]; } /** * Loads the example modules using TypeDoc. */ -export function loadExampleModules(): Record { - const modules = loadProjectModules( +export async function loadExampleModules(): Promise< + Record +> { + const modules = await loadProjectModules( { entryPoints: ['test/scripts/apidoc/module.example.ts'], }, diff --git a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts index 64cbcdb4ee5..b14523e1653 100644 --- a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts +++ b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts @@ -1,5 +1,7 @@ import { existsSync, mkdirSync, rmSync, writeFileSync } from 'node:fs'; -import { resolve } from 'node:path'; +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import type { ReflectionType, SomeType } from 'typedoc'; import validator from 'validator'; import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest'; import { initMarkdownRenderer } from '../../../scripts/apidoc/markdown'; @@ -9,8 +11,10 @@ import { extractDescription, extractJoinedRawExamples, extractModuleFieldName, + extractRawDefault, extractSeeAlsos, extractSince, + extractSummaryDefault, extractTagContent, MISSING_DESCRIPTION, } from '../../../scripts/apidoc/typedoc'; @@ -22,7 +26,7 @@ import { loadProjectModules } from './utils'; beforeAll(initMarkdownRenderer); -const tempDir = resolve(__dirname, 'temp'); +const tempDir = resolve(dirname(fileURLToPath(import.meta.url)), 'temp'); afterAll(() => { // Remove temp folder @@ -31,68 +35,111 @@ afterAll(() => { } }); -describe('verify JSDoc tags', () => { - const modules = loadProjectModules(); +const modules = await loadProjectModules(); - function resolveDirToModule(moduleName: string): string { - return resolve(tempDir, moduleName); - } +function resolveDirToModule(moduleName: string): string { + return resolve(tempDir, moduleName); +} + +function resolvePathToMethodFile( + moduleName: string, + methodName: string +): string { + const dir = resolveDirToModule(moduleName); + return resolve(dir, `${methodName}.ts`); +} + +const allowedReferences = new Set( + Object.values(modules).flatMap(([module, methods]) => { + const moduleFieldName = extractModuleFieldName(module); + return Object.keys(methods).map( + (methodName) => `faker.${moduleFieldName}.${methodName}` + ); + }) +); +const allowedLinks = new Set( + Object.values(modules).flatMap(([module, methods]) => { + const moduleFieldName = extractModuleFieldName(module); + return [ + `/api/${moduleFieldName}.html`, + ...Object.keys(methods).map( + (methodName) => + `/api/${moduleFieldName}.html#${methodName.toLowerCase()}` + ), + ]; + }) +); + +function assertDescription(description: string, isHtml: boolean): void { + const linkRegexp = isHtml ? /(href)="([^"]+)"/g : /\[([^\]]+)\]\(([^)]+)\)/g; + const links = [...description.matchAll(linkRegexp)].map((m) => m[2]); + + for (const link of links) { + if (!isHtml) { + expect(link).toMatch(/^https?:\/\//); + expect(link).toSatisfy(validator.isURL); + } - function resolvePathToMethodFile( - moduleName: string, - methodName: string - ): string { - const dir = resolveDirToModule(moduleName); - return resolve(dir, `${methodName}.ts`); + if (isHtml ? link.startsWith('/api/') : link.includes('fakerjs.dev/api/')) { + expect(allowedLinks, `${link} to point to a valid target`).toContain( + link.replace(/.*fakerjs.dev\//, '/') + ); + } } +} - const allowedReferences = new Set( - Object.values(modules).reduce((acc, [module, methods]) => { - const moduleFieldName = extractModuleFieldName(module); - return [ - ...acc, - ...Object.keys(methods).map( - (methodName) => `faker.${moduleFieldName}.${methodName}` - ), - ]; - }, [] as string[]) - ); - const allowedLinks = new Set( - Object.values(modules).reduce((acc, [module, methods]) => { - const moduleFieldName = extractModuleFieldName(module); - return [ - ...acc, - `/api/${moduleFieldName}.html`, - ...Object.keys(methods).map( - (methodName) => - `/api/${moduleFieldName}.html#${methodName.toLowerCase()}` - ), - ]; - }, [] as string[]) - ); +// keep in sync with analyzeParameterOptions +function assertNestedParameterDefault( + name: string, + parameterType?: SomeType +): void { + if (!parameterType) { + return; + } - function assertDescription(description: string, isHtml: boolean): void { - const linkRegexp = isHtml - ? /(href)="([^"]+)"/g - : /\[([^\]]+)\]\(([^)]+)\)/g; - const links = [...description.matchAll(linkRegexp)].map((m) => m[2]); + switch (parameterType.type) { + case 'array': + return assertNestedParameterDefault( + `${name}[]`, + parameterType.elementType + ); - for (const link of links) { - if (!isHtml) { - expect(link).toMatch(/^https?:\/\//); - expect(link).toSatisfy(validator.isURL); + case 'union': + for (const type of parameterType.types) { + assertNestedParameterDefault(name, type); } - if ( - isHtml ? link.startsWith('/api/') : link.includes('fakerjs.dev/api/') - ) { - expect(allowedLinks, `${link} to point to a valid target`).toContain( - link.replace(/.*fakerjs.dev\//, '/') - ); + return; + + case 'reflection': { + for (const property of parameterType.declaration.children ?? []) { + const reflection = property.comment + ? property + : (property.type as ReflectionType)?.declaration?.signatures?.[0]; + const comment = reflection?.comment; + const tagDefault = extractRawDefault({ comment }) || undefined; + const summaryDefault = extractSummaryDefault(comment, false); + + if (summaryDefault) { + expect( + tagDefault, + `Expect jsdoc summary default and @default for ${name}.${property.name} to be the same` + ).toBe(summaryDefault); + } } + + return; } + + case 'typeOperator': + return assertNestedParameterDefault(name, parameterType.target); + + default: + return; } +} +describe('verify JSDoc tags', () => { describe.each(Object.entries(modules))( '%s', (moduleName, [module, methodsByName]) => { @@ -110,7 +157,7 @@ describe('verify JSDoc tags', () => { // Write temp files to disk // Extract examples and make them runnable - const examples = extractJoinedRawExamples(signature); + const examples = extractJoinedRawExamples(signature) ?? ''; // Save examples to a file to run them later in the specific tests const dir = resolveDirToModule(moduleName); @@ -176,6 +223,31 @@ describe('verify JSDoc tags', () => { }); it('verify @param tags', async () => { + // This must run before analyzeSignature + for (const param of signature.parameters ?? []) { + const type = param.type; + const paramDefault = param.defaultValue; + const commentDefault = extractSummaryDefault( + param.comment, + false + ); + if (paramDefault) { + if ( + /^{.*}$/.test(paramDefault) || + paramDefault.includes('\n') + ) { + expect(commentDefault).toBeUndefined(); + } else { + expect( + commentDefault, + `Expect '${param.name}'s js implementation default to be the same as the jsdoc summary default.` + ).toBe(paramDefault); + } + } + + assertNestedParameterDefault(param.name, type); + } + for (const param of ( await analyzeSignature(signature, '', methodName) ).parameters) { @@ -201,6 +273,24 @@ describe('verify JSDoc tags', () => { expect(link, 'Expect method reference to contain ()').toContain( ')' ); + expect( + link, + "Expect method reference to have a ': ' after the parenthesis" + ).toContain('): '); + expect( + link, + 'Expect method reference to have a description starting with a capital letter' + ).toMatch(/\): [A-Z]/); + expect( + link, + 'Expect method reference to start with a standard description phrase' + ).toMatch( + /\): (?:For generating |For more information about |For using |For the replacement method)/ + ); + expect( + link, + 'Expect method reference to have a description ending with a dot' + ).toMatch(/\.$/); expect(allowedReferences).toContain(link.replace(/\(.*/, '')); } } @@ -209,6 +299,7 @@ describe('verify JSDoc tags', () => { it('verify @since tag', () => { const since = extractSince(signature); expect(since, '@since to be present').toBeTruthy(); + expect(since).not.toBe(MISSING_DESCRIPTION); expect(since, '@since to be a valid semver').toSatisfy( validator.isSemVer ); diff --git a/test/simple-faker.spec.ts b/test/simple-faker.spec.ts index c416f4fed4c..ec1247cf474 100644 --- a/test/simple-faker.spec.ts +++ b/test/simple-faker.spec.ts @@ -1,16 +1,15 @@ import type { SpyInstance } from 'vitest'; import { describe, expect, it, vi } from 'vitest'; import { SimpleFaker, simpleFaker } from '../src'; +import { keys } from '../src/internal/keys'; describe('simpleFaker', () => { it('should not log anything on startup', () => { - const spies: SpyInstance[] = Object.keys(console) + const spies: SpyInstance[] = keys(console) .filter((key) => typeof console[key] === 'function') - .map((methodName) => - vi.spyOn(console, methodName as keyof typeof console) - ); + .map((methodName) => vi.spyOn(console, methodName)); - // eslint-disable-next-line @typescript-eslint/no-var-requires + // eslint-disable-next-line @typescript-eslint/no-var-requires, unicorn/prefer-module -- Using import() requires types being build but the CI / TS-Check runs without them. require('..').simpleFaker; new SimpleFaker(); diff --git a/test/support/seeded-runs.ts b/test/support/seeded-runs.ts index 4b014cb6d03..e95a522f9f3 100644 --- a/test/support/seeded-runs.ts +++ b/test/support/seeded-runs.ts @@ -11,8 +11,8 @@ type FakerModule = { [Key in keyof Faker]: Faker[Key] extends Callable | string | number | number[] ? never : Key extends 'definitions' | 'locales' - ? never - : Key; + ? never + : Key; }[keyof Faker]; /** diff --git a/test/vitest-extensions.ts b/test/vitest-extensions.ts index e23b9c09c81..0a441d87425 100644 --- a/test/vitest-extensions.ts +++ b/test/vitest-extensions.ts @@ -2,7 +2,7 @@ import { expect } from 'vitest'; expect.extend({ toContainDuplicates(received: T[]) { - const { isNot } = this; + const { isNot = false } = this; const uniques = new Set(received); const duplications = received.filter((entry) => !uniques.delete(entry)); diff --git a/tsconfig.build.json b/tsconfig.build.json index aa1bfb29830..ce2dcfba1a7 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -8,7 +8,6 @@ "outDir": "dist/types", // This negates what is set in the extended tsconfig.json - "noImplicitAny": true, "skipLibCheck": false, "allowSyntheticDefaultImports": false, "resolveJsonModule": false diff --git a/tsconfig.json b/tsconfig.json index cda27929e8f..a290fc07b56 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,10 +8,6 @@ "declaration": true, "stripInternal": true, - // We need to disable these for now, and need to tackle them in another PR - "strictNullChecks": false, - "noImplicitAny": false, - // These are configs specifically for !build and have to be reverted in the tsconfig.build.json "skipLibCheck": true, "allowSyntheticDefaultImports": true, diff --git a/vite.config.ts b/vite.config.ts index 4cbe0c4fcc5..ca3339f2c7e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,6 +5,17 @@ const VITEST_SEQUENCE_SEED = Date.now(); console.log('VITEST_SEQUENCE_SEED', VITEST_SEQUENCE_SEED); +// TODO @Shinigami92 2023-12-28: remove when we drop support for Node 14 +const [nodeVersionMajor] = process.versions.node.split('.').map(Number); +const excludedTests: string[] = []; +if (nodeVersionMajor < 16) { + excludedTests.push( + 'test/scripts/apidoc/module.spec.ts', + 'test/scripts/apidoc/signature.spec.ts', + 'test/scripts/apidoc/verify-jsdoc-tags.spec.ts' + ); +} + // https://vitejs.dev/config/ export default defineConfig({ test: { @@ -20,6 +31,16 @@ export default defineConfig({ seed: VITEST_SEQUENCE_SEED, shuffle: true, }, + // TODO @Shinigami92 2023-12-28: remove the whole `exclude` when we drop support for Node 14 + exclude: [ + // should be originally `...configDefaults.exclude` from `'vitest/config'`, but esm... + 'node_modules', + 'dist', + '.idea', + '.git', + '.cache', + ...excludedTests, + ], onConsoleLog(log, type) { if ( type === 'stderr' &&