diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d11ef145f01..445baf8ab82 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,7 @@ // README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node { "name": "FakerJs", - "image": "mcr.microsoft.com/devcontainers/typescript-node:22@sha256:dc2c3654370fe92a55daeefe9d2d95839d85bdc1f68f7fd4ab86621f49e5818a", + "image": "mcr.microsoft.com/devcontainers/typescript-node:22@sha256:9791f4aa527774bc370c6bd2f6705ce5a686f1e6f204badd8dfaacce28c631ae", // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05989bea3e0..2112a21492e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -211,7 +211,7 @@ jobs: run: pnpm vitest run --coverage - name: Upload coverage to Codecov - uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7 + uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2 with: token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true diff --git a/.gitignore b/.gitignore index a26870e4325..df1219d9d09 100644 --- a/.gitignore +++ b/.gitignore @@ -80,6 +80,11 @@ versions.json /dist /docs/.vitepress/cache /docs/.vitepress/dist +/docs/api/*.ts +!/docs/api/api-types.ts +/docs/api/*.md +!/docs/api/index.md +/docs/api/api-search-index.json /docs/public/api-diff-index.json # Faker diff --git a/LICENSE b/LICENSE index 06104afe95e..3e954766f2d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,45 +1,6 @@ -Faker - Copyright (c) 2022-2024 +MIT License -This software consists of voluntary contributions made by many individuals. -For exact contribution history, see the revision history -available at https://github.com/faker-js/faker - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -=== - -From: https://github.com/faker-js/faker/commit/a9f98046c7d5eeaabe12fc587024c06d683800b8 -To: https://github.com/faker-js/faker/commit/29234378807c4141588861f69421bf20b5ac635e - -Based on faker.js, copyright Marak Squires and contributor, what follows below is the original license. - -=== - -faker.js - Copyright (c) 2020 -Marak Squires -http://github.com/marak/faker.js/ - -faker.js was inspired by and has used data definitions from: - - * https://github.com/stympy/faker/ - Copyright (c) 2007-2010 Benjamin Curtis - * http://search.cpan.org/~jasonk/Data-Faker-0.07/ - Copyright 2004-2005 by Jason Kohles +Copyright 2022-2025 FakerJS Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/cypress/e2e/example-refresh.cy.ts b/cypress/e2e/example-refresh.cy.ts new file mode 100644 index 00000000000..df792eba5b2 --- /dev/null +++ b/cypress/e2e/example-refresh.cy.ts @@ -0,0 +1,32 @@ +describe('example-refresh', () => { + it('should refresh the example', () => { + // given + cy.visit('/api/faker.html#constructor'); + cy.get('.refresh').first().as('refresh'); + cy.get('@refresh').next().find('code').as('codeBlock'); + cy.get('@codeBlock').then(($el) => { + const originalCodeText = $el.text(); + + cy.get('@refresh') + .click() + .should('not.be.disabled') // stays disabled on error + .then(() => { + cy.get('@codeBlock').then(($el) => { + const newCodeText = $el.text(); + expect(newCodeText).not.to.equal(originalCodeText); + + cy.get('@refresh') + .click() + .should('not.be.disabled') // stays disabled on error + .then(() => { + cy.get('@codeBlock').then(($el) => { + const newCodeText2 = $el.text(); + expect(newCodeText2).not.to.equal(originalCodeText); + expect(newCodeText2).not.to.equal(newCodeText); + }); + }); + }); + }); + }); + }); +}); diff --git a/docs/.vitepress/components/api-docs/format.ts b/docs/.vitepress/components/api-docs/format.ts new file mode 100644 index 00000000000..34de1e0c494 --- /dev/null +++ b/docs/.vitepress/components/api-docs/format.ts @@ -0,0 +1,14 @@ +export function formatResult(result: unknown): string { + return result === undefined + ? 'undefined' + : typeof result === 'bigint' + ? `${result}n` + : JSON.stringify(result, undefined, 2) + .replaceAll('\\r', '') + .replaceAll('<', '<') + .replaceAll( + /(^ *|: )"([^'\n]*?)"(?=,?$|: )/gm, + (_, p1, p2) => `${p1}'${p2.replace(/\\"/g, '"')}'` + ) + .replaceAll(/\n */g, ' '); +} diff --git a/docs/.vitepress/components/api-docs/method.ts b/docs/.vitepress/components/api-docs/method.ts index 4da480b806e..91f99d4ee8f 100644 --- a/docs/.vitepress/components/api-docs/method.ts +++ b/docs/.vitepress/components/api-docs/method.ts @@ -8,6 +8,7 @@ export interface ApiDocsMethod { readonly throws: string | undefined; // HTML readonly signature: string; // HTML readonly examples: string; // HTML + readonly refresh: (() => Promise) | undefined; readonly seeAlsos: string[]; readonly sourcePath: string; // URL-Suffix } diff --git a/docs/.vitepress/components/api-docs/method.vue b/docs/.vitepress/components/api-docs/method.vue index 83a4100cfde..37b447482c7 100644 --- a/docs/.vitepress/components/api-docs/method.vue +++ b/docs/.vitepress/components/api-docs/method.vue @@ -1,8 +1,11 @@ + + + + diff --git a/docs/.vitepress/components/api-docs/refresh.svg b/docs/.vitepress/components/api-docs/refresh.svg new file mode 100644 index 00000000000..8320a2b2ba6 --- /dev/null +++ b/docs/.vitepress/components/api-docs/refresh.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 746803ad594..4fcc469eb92 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -133,6 +133,7 @@ async function enableFaker() { e.g. 'faker.food.description()' or 'fakerZH_CN.person.firstName()' For other languages please refer to https://fakerjs.dev/guide/localization.html#available-locales For a full list of all methods please refer to https://fakerjs.dev/api/\`, logStyle); + enableFaker = () => imported; // Init only once return imported; } `, diff --git a/docs/api/.gitignore b/docs/api/.gitignore deleted file mode 100644 index 47b11a83ed7..00000000000 --- a/docs/api/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Markdown -*.md -!index.md - -# TypeScript -*.ts -!api-types.ts - -# JSON -*.json diff --git a/eslint.config.ts b/eslint.config.ts index 812c8a92937..8c980b2c08b 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -24,6 +24,7 @@ const config: ReturnType = tseslint.config( '.github/workflows/commentCodeGeneration.ts', '.prettierrc.js', 'docs/.vitepress/components/shims.d.ts', + 'docs/.vitepress/components/api-docs/format.ts', 'docs/.vitepress/shared/utils/slugify.ts', 'docs/.vitepress/theme/index.ts', 'eslint.config.js', diff --git a/package.json b/package.json index 4688654bc27..696804939c3 100644 --- a/package.json +++ b/package.json @@ -104,46 +104,46 @@ "dist" ], "devDependencies": { - "@eslint/compat": "1.2.3", - "@eslint/js": "9.16.0", - "@stylistic/eslint-plugin": "2.11.0", + "@eslint/compat": "1.2.4", + "@eslint/js": "9.17.0", + "@stylistic/eslint-plugin": "2.12.1", "@types/eslint__js": "8.42.3", - "@types/node": "22.10.1", + "@types/node": "22.10.3", "@types/sanitize-html": "2.13.0", "@types/semver": "7.5.8", "@types/validator": "13.12.2", - "@vitest/coverage-v8": "2.1.7", - "@vitest/eslint-plugin": "1.1.13", - "@vitest/ui": "2.1.7", - "@vueuse/core": "12.0.0", + "@vitest/coverage-v8": "2.1.8", + "@vitest/eslint-plugin": "1.1.20", + "@vitest/ui": "2.1.8", + "@vueuse/core": "12.2.0", "commit-and-tag-version": "12.5.0", - "cypress": "13.16.0", - "eslint": "9.16.0", + "cypress": "13.17.0", + "eslint": "9.17.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-file-progress": "3.0.1", - "eslint-plugin-jsdoc": "50.6.0", + "eslint-plugin-jsdoc": "50.6.1", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-unicorn": "56.0.1", - "jiti": "2.4.1", - "npm-run-all2": "7.0.1", - "prettier": "3.4.1", + "jiti": "2.4.2", + "npm-run-all2": "7.0.2", + "prettier": "3.4.2", "prettier-plugin-organize-imports": "4.1.0", "prettier-plugin-packagejson": "2.5.6", "rimraf": "5.0.10", - "sanitize-html": "2.13.1", + "sanitize-html": "2.14.0", "semver": "7.6.3", - "ts-morph": "24.0.0", + "ts-morph": "25.0.0", "tsup": "8.3.5", "tsx": "4.19.2", "typescript": "5.7.2", - "typescript-eslint": "8.16.0", + "typescript-eslint": "8.19.0", "validator": "13.12.0", "vitepress": "1.5.0", - "vitest": "2.1.7", + "vitest": "2.1.8", "vue": "3.5.13", - "vue-tsc": "2.1.10" + "vue-tsc": "2.2.0" }, - "packageManager": "pnpm@9.14.4", + "packageManager": "pnpm@9.15.2", "engines": { "node": ">=18.0.0", "npm": ">=9.0.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eee831f5329..a2dd5600dfd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,20 +9,20 @@ importers: .: devDependencies: '@eslint/compat': - specifier: 1.2.3 - version: 1.2.3(eslint@9.16.0(jiti@2.4.1)) + specifier: 1.2.4 + version: 1.2.4(eslint@9.17.0(jiti@2.4.2)) '@eslint/js': - specifier: 9.16.0 - version: 9.16.0 + specifier: 9.17.0 + version: 9.17.0 '@stylistic/eslint-plugin': - specifier: 2.11.0 - version: 2.11.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) + specifier: 2.12.1 + version: 2.12.1(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) '@types/eslint__js': specifier: 8.42.3 version: 8.42.3 '@types/node': - specifier: 22.10.1 - version: 22.10.1 + specifier: 22.10.3 + version: 22.10.3 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -33,71 +33,71 @@ importers: specifier: 13.12.2 version: 13.12.2 '@vitest/coverage-v8': - specifier: 2.1.7 - version: 2.1.7(vitest@2.1.7) + specifier: 2.1.8 + version: 2.1.8(vitest@2.1.8) '@vitest/eslint-plugin': - specifier: 1.1.13 - version: 1.1.13(@typescript-eslint/utils@8.18.1(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.7) + specifier: 1.1.20 + version: 1.1.20(@typescript-eslint/utils@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)(vitest@2.1.8) '@vitest/ui': - specifier: 2.1.7 - version: 2.1.7(vitest@2.1.7) + specifier: 2.1.8 + version: 2.1.8(vitest@2.1.8) '@vueuse/core': - specifier: 12.0.0 - version: 12.0.0(typescript@5.7.2) + specifier: 12.2.0 + version: 12.2.0(typescript@5.7.2) commit-and-tag-version: specifier: 12.5.0 version: 12.5.0 cypress: - specifier: 13.16.0 - version: 13.16.0 + specifier: 13.17.0 + version: 13.17.0 eslint: - specifier: 9.16.0 - version: 9.16.0(jiti@2.4.1) + specifier: 9.17.0 + version: 9.17.0(jiti@2.4.2) eslint-config-prettier: specifier: 9.1.0 - version: 9.1.0(eslint@9.16.0(jiti@2.4.1)) + version: 9.1.0(eslint@9.17.0(jiti@2.4.2)) eslint-plugin-file-progress: specifier: 3.0.1 - version: 3.0.1(eslint@9.16.0(jiti@2.4.1)) + version: 3.0.1(eslint@9.17.0(jiti@2.4.2)) eslint-plugin-jsdoc: - specifier: 50.6.0 - version: 50.6.0(eslint@9.16.0(jiti@2.4.1)) + specifier: 50.6.1 + version: 50.6.1(eslint@9.17.0(jiti@2.4.2)) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.16.0(jiti@2.4.1)))(eslint@9.16.0(jiti@2.4.1))(prettier@3.4.1) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.2)))(eslint@9.17.0(jiti@2.4.2))(prettier@3.4.2) eslint-plugin-unicorn: specifier: 56.0.1 - version: 56.0.1(eslint@9.16.0(jiti@2.4.1)) + version: 56.0.1(eslint@9.17.0(jiti@2.4.2)) jiti: - specifier: 2.4.1 - version: 2.4.1 + specifier: 2.4.2 + version: 2.4.2 npm-run-all2: - specifier: 7.0.1 - version: 7.0.1 + specifier: 7.0.2 + version: 7.0.2 prettier: - specifier: 3.4.1 - version: 3.4.1 + specifier: 3.4.2 + version: 3.4.2 prettier-plugin-organize-imports: specifier: 4.1.0 - version: 4.1.0(prettier@3.4.1)(typescript@5.7.2)(vue-tsc@2.1.10(typescript@5.7.2)) + version: 4.1.0(prettier@3.4.2)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2)) prettier-plugin-packagejson: specifier: 2.5.6 - version: 2.5.6(prettier@3.4.1) + version: 2.5.6(prettier@3.4.2) rimraf: specifier: 5.0.10 version: 5.0.10 sanitize-html: - specifier: 2.13.1 - version: 2.13.1 + specifier: 2.14.0 + version: 2.14.0 semver: specifier: 7.6.3 version: 7.6.3 ts-morph: - specifier: 24.0.0 - version: 24.0.0 + specifier: 25.0.0 + version: 25.0.0 tsup: specifier: 8.3.5 - version: 8.3.5(jiti@2.4.1)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.7.2)(yaml@2.6.1) + version: 8.3.5(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.7.2)(yaml@2.7.0) tsx: specifier: 4.19.2 version: 4.19.2 @@ -105,23 +105,23 @@ importers: specifier: 5.7.2 version: 5.7.2 typescript-eslint: - specifier: 8.16.0 - version: 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) + specifier: 8.19.0 + version: 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) validator: specifier: 13.12.0 version: 13.12.0 vitepress: specifier: 1.5.0 - version: 1.5.0(@algolia/client-search@5.18.0)(@types/node@22.10.1)(postcss@8.4.49)(search-insights@2.17.3)(typescript@5.7.2) + version: 1.5.0(@algolia/client-search@5.18.0)(@types/node@22.10.3)(postcss@8.4.49)(search-insights@2.17.3)(typescript@5.7.2) vitest: - specifier: 2.1.7 - version: 2.1.7(@types/node@22.10.1)(@vitest/ui@2.1.7)(jsdom@25.0.1) + specifier: 2.1.8 + version: 2.1.8(@types/node@22.10.3)(@vitest/ui@2.1.8)(jsdom@25.0.1) vue: specifier: 3.5.13 version: 3.5.13(typescript@5.7.2) vue-tsc: - specifier: 2.1.10 - version: 2.1.10(typescript@5.7.2) + specifier: 2.2.0 + version: 2.2.0(typescript@5.7.2) packages: @@ -705,8 +705,8 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/compat@1.2.3': - resolution: {integrity: sha512-wlZhwlDFxkxIZ571aH0FoK4h4Vwx7P3HJx62Gp8hTc10bfpwT2x0nULuAHmQSJBOWPgPeVf+9YtnD4j50zVHmA==} + '@eslint/compat@1.2.4': + resolution: {integrity: sha512-S8ZdQj/N69YAtuqFt7653jwcvuUj131+6qGLUyDqfDg1OIoBQ66OCuXC473YQfO2AaxITTutiRQiDwoo7ZLYyg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^9.10.0 @@ -726,8 +726,8 @@ packages: resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.16.0': - resolution: {integrity: sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==} + '@eslint/js@9.17.0': + resolution: {integrity: sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.5': @@ -762,8 +762,8 @@ packages: resolution: {integrity: sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==} engines: {node: '>=6.9.0'} - '@iconify-json/simple-icons@1.2.16': - resolution: {integrity: sha512-mnQ0Ih8CDIgOqbi0qz01AJNOeFVuGFRimelg3JmJtD0y5EpZVw+enPPcpcxJKipsRZ/oqhcP3AhYkF1kM7yomg==} + '@iconify-json/simple-icons@1.2.17': + resolution: {integrity: sha512-1vXbM6a6HV2rwXxu8ptD2OYhqrqX0ZZRepOg7nIjkvKlKq90Iici4X++A8h36bEVlV2wGjqx8uVYB0pwnPZVSw==} '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} @@ -930,14 +930,14 @@ packages: '@shikijs/vscode-textmate@9.3.1': resolution: {integrity: sha512-79QfK1393x9Ho60QFyLti+QfdJzRQCVLFb97kOIV7Eo9vQU/roINgk7m24uv0a7AUvN//RDH36FLjjK48v0s9g==} - '@stylistic/eslint-plugin@2.11.0': - resolution: {integrity: sha512-PNRHbydNG5EH8NK4c+izdJlxajIR6GxcUhzsYNRsn6Myep4dsZt0qFCz3rCPnkvgO5FYibDcMqgNHUT+zvjYZw==} + '@stylistic/eslint-plugin@2.12.1': + resolution: {integrity: sha512-fubZKIHSPuo07FgRTn6S4Nl0uXPRPYVNpyZzIDGfp7Fny6JjNus6kReLD7NI380JXi4HtUTSOZ34LBuNPO1XLQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' - '@ts-morph/common@0.25.0': - resolution: {integrity: sha512-kMnZz+vGGHi4GoHnLmMhGNjm44kGtKUXGnOvrKmMwAuvNjM/PgKVGfUnL7IDvK7Jb2QQ82jq3Zmp04Gy+r3Dkg==} + '@ts-morph/common@0.26.0': + resolution: {integrity: sha512-/RmKAtctStXqM5nECMQ46duT74Hoig/DBzhWXGHcodlDNrgRbsbwwHqSKFNbca6z9Xt/CUWMeXOsC9QEN1+rqw==} '@types/eslint@9.6.1': resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} @@ -969,8 +969,8 @@ packages: '@types/minimist@1.2.5': resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/node@22.10.1': - resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + '@types/node@22.10.3': + resolution: {integrity: sha512-DifAyw4BkrufCILvD3ucnuN8eydUfc/C1GlyrnI+LK6543w5/L3VeVgf05o3B4fqSXP1dKYLOZsKfutpxPzZrw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -999,91 +999,51 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.16.0': - resolution: {integrity: sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==} + '@typescript-eslint/eslint-plugin@8.19.0': + resolution: {integrity: sha512-NggSaEZCdSrFddbctrVjkVZvFC6KGfKfNK0CU7mNK/iKHGKbzT4Wmgm08dKpcZECBu9f5FypndoMyRHkdqfT1Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/parser@8.16.0': - resolution: {integrity: sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==} + '@typescript-eslint/parser@8.19.0': + resolution: {integrity: sha512-6M8taKyOETY1TKHp0x8ndycipTVgmp4xtg5QpEZzXxDhNvvHOJi5rLRkLr8SK3jTgD5l4fTlvBiRdfsuWydxBw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/scope-manager@8.16.0': - resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/scope-manager@8.18.1': - resolution: {integrity: sha512-HxfHo2b090M5s2+/9Z3gkBhI6xBH8OJCFjH9MhQ+nnoZqxU3wNxkLT+VWXWSFWc3UF3Z+CfPAyqdCTdoXtDPCQ==} + '@typescript-eslint/scope-manager@8.19.0': + resolution: {integrity: sha512-hkoJiKQS3GQ13TSMEiuNmSCvhz7ujyqD1x3ShbaETATHrck+9RaDdUbt+osXaUuns9OFwrDTTrjtwsU8gJyyRA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.16.0': - resolution: {integrity: sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==} + '@typescript-eslint/type-utils@8.19.0': + resolution: {integrity: sha512-TZs0I0OSbd5Aza4qAMpp1cdCYVnER94IziudE3JU328YUHgWu9gwiwhag+fuLeJ2LkWLXI+F/182TbG+JaBdTg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/types@8.16.0': - resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/types@8.18.1': - resolution: {integrity: sha512-7uoAUsCj66qdNQNpH2G8MyTFlgerum8ubf21s3TSM3XmKXuIn+H2Sifh/ES2nPOPiYSRJWAk0fDkW0APBWcpfw==} + '@typescript-eslint/types@8.19.0': + resolution: {integrity: sha512-8XQ4Ss7G9WX8oaYvD4OOLCjIQYgRQxO+qCiR2V2s2GxI9AUpo7riNwo6jDhKtTcaJjT8PY54j2Yb33kWtSJsmA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.16.0': - resolution: {integrity: sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/typescript-estree@8.18.1': - resolution: {integrity: sha512-z8U21WI5txzl2XYOW7i9hJhxoKKNG1kcU4RzyNvKrdZDmbjkmLBo8bgeiOJmA06kizLI76/CCBAAGlTlEeUfyg==} + '@typescript-eslint/typescript-estree@8.19.0': + resolution: {integrity: sha512-WW9PpDaLIFW9LCbucMSdYUuGeFUz1OkWYS/5fwZwTA+l2RwlWFdJvReQqMUMBw4yJWJOfqd7An9uwut2Oj8sLw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/utils@8.16.0': - resolution: {integrity: sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/utils@8.18.1': - resolution: {integrity: sha512-8vikiIj2ebrC4WRdcAdDcmnu9Q/MXXwg+STf40BVfT8exDqBCUPdypvzcUPxEqRGKg9ALagZ0UWcYCtn+4W2iQ==} + '@typescript-eslint/utils@8.19.0': + resolution: {integrity: sha512-PTBG+0oEMPH9jCZlfg07LCB2nYI0I317yyvXGfxnvGvw4SHIOuRnQ3kadyyXY6tGdChusIHIbM5zfIbp4M6tCg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/visitor-keys@8.16.0': - resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/visitor-keys@8.18.1': - resolution: {integrity: sha512-Vj0WLm5/ZsD013YeUKn+K0y8p1M0jPpxOkKdbD1wB0ns53a5piVY02zjf072TblEweAbcYiFiPoSMF3kp+VhhQ==} + '@typescript-eslint/visitor-keys@8.19.0': + resolution: {integrity: sha512-mCFtBbFBJDCNCWUl5y6sZSCHXw1DEFEk3c/M3nRK2a4XUB8StGFtmcEMizdjKuBzB6e/smJAAWYug3VrdLMr1w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.1': @@ -1096,17 +1056,17 @@ packages: vite: ^5.0.0 || ^6.0.0 vue: ^3.2.25 - '@vitest/coverage-v8@2.1.7': - resolution: {integrity: sha512-deQ4J+yu6nEjmEfcBndbgrRM95IZoRpV1dDVRbZhjUcgYVZz/Wc4YaLiDDt9Sy5qcikrJUZMlrUxDy7dBojebg==} + '@vitest/coverage-v8@2.1.8': + resolution: {integrity: sha512-2Y7BPlKH18mAZYAW1tYByudlCYrQyl5RGvnnDYJKW5tCiO5qg3KSAy3XAxcxKz900a0ZXxWtKrMuZLe3lKBpJw==} peerDependencies: - '@vitest/browser': 2.1.7 - vitest: 2.1.7 + '@vitest/browser': 2.1.8 + vitest: 2.1.8 peerDependenciesMeta: '@vitest/browser': optional: true - '@vitest/eslint-plugin@1.1.13': - resolution: {integrity: sha512-oabbCT4fCQfmFNtH2UuDfHx1d7dzi+VD3qwCpBfECfyzQq/Re9u7qTtE2WqV/hAuAOALw3ZVRiub2mXmpTyn/Q==} + '@vitest/eslint-plugin@1.1.20': + resolution: {integrity: sha512-2eLsgUm+GVOpDfNyH2do//MiNO/WZkXrPi+EjDmXEdUt6Jwnziq4H221L8vJE0aJys+l1FRfSkm4QbaIyDCfBg==} peerDependencies: '@typescript-eslint/utils': '>= 8.0' eslint: '>= 8.57.0' @@ -1118,11 +1078,11 @@ packages: vitest: optional: true - '@vitest/expect@2.1.7': - resolution: {integrity: sha512-folWk4qQDEedgUyvaZw94LIJuNLoDtY+rhKhhNy0csdwifn/pQz8EWVRnyrW3j0wMpy+xwJT8WiwiYxk+i+s7w==} + '@vitest/expect@2.1.8': + resolution: {integrity: sha512-8ytZ/fFHq2g4PJVAtDX57mayemKgDR6X3Oa2Foro+EygiOJHUXhCqBAAKQYYajZpFoIfvBCF1j6R6IYRSIUFuw==} - '@vitest/mocker@2.1.7': - resolution: {integrity: sha512-nKMTnuJrarFH+7llWxeLmYRldIwTY3OM1DzdytHj0f2+fah6Cyk4XbswhjOiTCnAvXsZAEoo1OaD6rneSSU+3Q==} + '@vitest/mocker@2.1.8': + resolution: {integrity: sha512-7guJ/47I6uqfttp33mgo6ga5Gr1VnL58rcqYKyShoRK9ebu8T5Rs6HN3s1NABiBeVTdWNrwUMcHH54uXZBN4zA==} peerDependencies: msw: ^2.4.9 vite: ^5.0.0 @@ -1132,28 +1092,25 @@ packages: vite: optional: true - '@vitest/pretty-format@2.1.7': - resolution: {integrity: sha512-HoqRIyfQlXPrRDB43h0lC8eHPUDPwFweMaD6t+psOvwClCC+oZZim6wPMjuoMnRdiFxXqbybg/QbuewgTwK1vA==} - '@vitest/pretty-format@2.1.8': resolution: {integrity: sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==} - '@vitest/runner@2.1.7': - resolution: {integrity: sha512-MrDNpXUIXksR57qipYh068SOX4N1hVw6oVILlTlfeTyA1rp0asuljyp15IZwKqhjpWLObFj+tiNrOM4R8UnSqg==} + '@vitest/runner@2.1.8': + resolution: {integrity: sha512-17ub8vQstRnRlIU5k50bG+QOMLHRhYPAna5tw8tYbj+jzjcspnwnwtPtiOlkuKC4+ixDPTuLZiqiWWQ2PSXHVg==} - '@vitest/snapshot@2.1.7': - resolution: {integrity: sha512-OioIxV/xS393DKdlkRNhmtY0K37qVdCv8w1M2SlLTBSX+fNK6zgcd01VlT1nXdbKVDaB8Zb6BOfQYYoGeGTEGg==} + '@vitest/snapshot@2.1.8': + resolution: {integrity: sha512-20T7xRFbmnkfcmgVEz+z3AU/3b0cEzZOt/zmnvZEctg64/QZbSDJEVm9fLnnlSi74KibmRsO9/Qabi+t0vCRPg==} - '@vitest/spy@2.1.7': - resolution: {integrity: sha512-e5pzIaIC0LBrb/j1FaF7HXlPJLGtltiAkwXTMqNEHALJc7USSLEwziJ+aIWTmjsWNg89zazg37h7oZITnublsQ==} + '@vitest/spy@2.1.8': + resolution: {integrity: sha512-5swjf2q95gXeYPevtW0BLk6H8+bPlMb4Vw/9Em4hFxDcaOxS+e0LOX4yqNxoHzMR2akEB2xfpnWUzkZokmgWDg==} - '@vitest/ui@2.1.7': - resolution: {integrity: sha512-0QUttW85GkdG9d11sEa3HHtNiKLYNMl9YXaho33W6lAy9Pu0n1U6BU09aZmxez/b6YzX9GXHF0MuhvMZl2tjdw==} + '@vitest/ui@2.1.8': + resolution: {integrity: sha512-5zPJ1fs0ixSVSs5+5V2XJjXLmNzjugHRyV11RqxYVR+oMcogZ9qTuSfKW+OcTV0JeFNznI83BNylzH6SSNJ1+w==} peerDependencies: - vitest: 2.1.7 + vitest: 2.1.8 - '@vitest/utils@2.1.7': - resolution: {integrity: sha512-7gUdvIzCCuIrMZu0WHTvDJo8C1NsUtOqmwmcS3bRHUcfHemj29wmkzLVNuWQD7WHoBD/+I7WIgrnzt7kxR54ow==} + '@vitest/utils@2.1.8': + resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} '@volar/language-core@2.4.11': resolution: {integrity: sha512-lN2C1+ByfW9/JRPpqScuZt/4OrUUse57GLI6TbLgTIqBVemdl1wNcZ1qYGEo2+Gw8coYLgCy7SuKqn6IrQcQgg==} @@ -1188,8 +1145,8 @@ packages: '@vue/devtools-shared@7.6.8': resolution: {integrity: sha512-9MBPO5Z3X1nYGFqTJyohl6Gmf/J7UNN1oicHdyzBVZP4jnhZ4c20MgtaHDIzWmHDHCMYVS5bwKxT3jxh7gOOKA==} - '@vue/language-core@2.1.10': - resolution: {integrity: sha512-DAI289d0K3AB5TUG3xDp9OuQ71CnrujQwJrQnfuZDwo6eGNf0UoRlPuaVNO+Zrn65PC3j0oB2i7mNmVPggeGeQ==} + '@vue/language-core@2.2.0': + resolution: {integrity: sha512-O1ZZFaaBGkKbsRfnVH1ifOK1/1BUkyK+3SQsfnh6PmMmD4qJcTU8godCeA96jjDRTL6zgnK7YzCHfaUlH2r0Mw==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -1216,8 +1173,8 @@ packages: '@vueuse/core@11.3.0': resolution: {integrity: sha512-7OC4Rl1f9G8IT6rUfi9JrKiXy4bfmHhZ5x2Ceojy0jnd3mHNEvV4JaRygH362ror6/NZ+Nl+n13LPzGiPN8cKA==} - '@vueuse/core@12.0.0': - resolution: {integrity: sha512-C12RukhXiJCbx4MGhjmd/gH52TjJsc3G0E0kQj/kb19H3Nt6n1CA4DRWuTdWWcaFRdlTe0npWDS942mvacvNBw==} + '@vueuse/core@12.2.0': + resolution: {integrity: sha512-jksyNu+5EGwggNkRWd6xX+8qBkYbmrwdFQMgCABsz+wq8bKF6w3soPFLB8vocFp3wFIzn0OYkSPM9JP+AFKwsg==} '@vueuse/integrations@11.3.0': resolution: {integrity: sha512-5fzRl0apQWrDezmobchoiGTkGw238VWESxZHazfhP3RM7pDSiyXy18QbfYkILoYNTd23HPAfQTJpkUc5QbkwTw==} @@ -1263,14 +1220,14 @@ packages: '@vueuse/metadata@11.3.0': resolution: {integrity: sha512-pwDnDspTqtTo2HwfLw4Rp6yywuuBdYnPYDq+mO38ZYKGebCUQC/nVj/PXSiK9HX5otxLz8Fn7ECPbjiRz2CC3g==} - '@vueuse/metadata@12.0.0': - resolution: {integrity: sha512-Yzimd1D3sjxTDOlF05HekU5aSGdKjxhuhRFHA7gDWLn57PRbBIh+SF5NmjhJ0WRgF3my7T8LBucyxdFJjIfRJQ==} + '@vueuse/metadata@12.2.0': + resolution: {integrity: sha512-x6zynZtTh1l52m0y8d/EgzpshnMjg8cNZ2KWoncJ62Z5qPSGoc4FUunmMVrrRM/I/5542rTEY89CGftngZvrkQ==} '@vueuse/shared@11.3.0': resolution: {integrity: sha512-P8gSSWQeucH5821ek2mn/ciCk+MS/zoRKqdQIM3bHq6p7GXDAJLmnRRKmF5F65sAVJIfzQlwR3aDzwCn10s8hA==} - '@vueuse/shared@12.0.0': - resolution: {integrity: sha512-3i6qtcq2PIio5i/vVYidkkcgvmTjCqrf26u+Fd4LhnbBmIT6FN8y6q/GJERp8lfcB9zVEfjdV0Br0443qZuJpw==} + '@vueuse/shared@12.2.0': + resolution: {integrity: sha512-SRr4AZwv/giS+EmyA1ZIzn3/iALjjnWAGaBNmoDTMEob9JwQaevAocuaMDnPAvU7Z35Y5g3CFRusCWgp1gVJ3Q==} JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} @@ -1304,8 +1261,8 @@ packages: resolution: {integrity: sha512-/tfpK2A4FpS0o+S78o3YSdlqXr0MavJIDlFK3XZrlXLy7vaRXJvW5jYg3v5e/wCaF8y0IpMjkYLhoV6QqfpOgw==} engines: {node: '>= 14.0.0'} - alien-signals@0.2.2: - resolution: {integrity: sha512-cZIRkbERILsBOXTQmMrxc9hgpxglstn69zm+F1ARf4aPAzdAFYd6sBq87ErO0Fj3DV94tglcyHG5kQz9nDC/8A==} + alien-signals@0.4.12: + resolution: {integrity: sha512-Og0PgAihxlp1R22bsoBsyhhMG4+qhU+fkkLPoGBQkYVc3qt9rYnrwYTf+M6kqUqUZpf3rXDnpL90iKa0QcSVVg==} ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} @@ -1593,8 +1550,8 @@ packages: resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} engines: {'0': node >= 6.0} - consola@3.3.0: - resolution: {integrity: sha512-kxltocVQCwQNFvw40dlVRYeAkAvtYjMFZYNlOcsF5wExPpGwPxMwgx4IfDJvBRPtBpnQwItd5WkTaR0ZwT/TmQ==} + consola@3.3.3: + resolution: {integrity: sha512-Qil5KwghMzlqd51UXM0b6fyaGHtOC22scxrwrz4A2882LyUMwQjnvaedN1HAeXzphspQ6CpHkzMAWxBTUruDLg==} engines: {node: ^14.18.0 || >=16.10.0} conventional-changelog-angular@6.0.0: @@ -1691,8 +1648,8 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - cypress@13.16.0: - resolution: {integrity: sha512-g6XcwqnvzXrqiBQR/5gN+QsyRmKRhls1y5E42fyOvsmU7JuY+wM6uHJWj4ZPttjabzbnRvxcik2WemR8+xT6FA==} + cypress@13.17.0: + resolution: {integrity: sha512-5xWkaPurwkIljojFidhw8lFScyxhtiFHl/i/3zov+1Z5CmY4t9tjIdvSXfu82Y3w7wt0uR9KkucbhkVvJZLQSA==} engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} hasBin: true @@ -1793,8 +1750,8 @@ packages: resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} engines: {node: '>= 4'} - domutils@3.1.0: - resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} + domutils@3.2.1: + resolution: {integrity: sha512-xWXmuRnN9OMP6ptPd2+H0cCbcYBULa5YDTbMm/2lvkWvNA3O4wcW+GvzooqBuNM8yy6pl3VIAeJTUUWUbfI5Fw==} dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} @@ -1814,8 +1771,8 @@ packages: ecc-jsbn@0.1.2: resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} - electron-to-chromium@1.5.75: - resolution: {integrity: sha512-Lf3++DumRE/QmweGjU+ZcKqQ+3bKkU/qjaKYhIJKEOhgIO9Xs6IiAQFkfFoj+RhgDk4LUeNsLo6plExHqSyu6Q==} + electron-to-chromium@1.5.76: + resolution: {integrity: sha512-CjVQyG7n7Sr+eBXE86HIulnL5N8xZY1sgmOPGuq/F0Rr0FJq63lg0kEtOIDfZBk44FnDLf6FUJ+dsJcuiUDdDQ==} emoji-regex-xs@1.0.0: resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} @@ -1848,8 +1805,8 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-module-lexer@1.5.4: - resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + es-module-lexer@1.6.0: + resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==} es-object-atoms@1.0.0: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} @@ -1894,8 +1851,8 @@ packages: peerDependencies: eslint: ^9.0.0 - eslint-plugin-jsdoc@50.6.0: - resolution: {integrity: sha512-tCNp4fR79Le3dYTPB0dKEv7yFyvGkUCa+Z3yuTrrNGGOxBlXo9Pn0PEgroOZikUQOGjxoGMVKNjrOHcYEdfszg==} + eslint-plugin-jsdoc@50.6.1: + resolution: {integrity: sha512-UWyaYi6iURdSfdVVqvfOs2vdCVz0J40O/z/HTsv2sFjdjmdlUI/qlKLOTmwbPQ2tAfQnE5F9vqx+B+poF71DBQ==} engines: {node: '>=18'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -1932,8 +1889,8 @@ packages: resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.16.0: - resolution: {integrity: sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==} + eslint@9.17.0: + resolution: {integrity: sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -2011,8 +1968,8 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fastq@1.18.0: + resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==} fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} @@ -2385,8 +2342,8 @@ packages: jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - jiti@2.4.1: - resolution: {integrity: sha512-yPBThwecp1wS9DmoA4x4KR2h3QoslacnDR8ypuFM962kI4/456Iy1oHx2RAgh4jfZNdn0bctsdadceiBUgpU1g==} + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} hasBin: true joycon@3.1.1: @@ -2696,8 +2653,8 @@ packages: resolution: {integrity: sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==} engines: {node: ^18.17.0 || >=20.5.0} - npm-run-all2@7.0.1: - resolution: {integrity: sha512-Adbv+bJQ8UTAM03rRODqrO5cx0YU5KCG2CvHtSURiadvdTjjgGJXdbc1oQ9CXBh9dnGfHSoSB1Web/0Dzp6kOQ==} + npm-run-all2@7.0.2: + resolution: {integrity: sha512-7tXR+r9hzRNOPNTvXegM+QzCuMjzUIIq66VDunL6j60O4RrExx32XUhlrS7UK4VcdGw5/Wxzb3kfNcFix9JKDA==} engines: {node: ^18.17.0 || >=20.5.0, npm: '>= 9'} hasBin: true @@ -2894,8 +2851,8 @@ packages: resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} engines: {node: ^10 || ^12 || >=14} - preact@10.25.3: - resolution: {integrity: sha512-dzQmIFtM970z+fP9ziQ3yG4e3ULIbwZzJ734vaMVUTaKQ2+Ru1Ou/gjshOYVHCcd1rpAelC6ngjvjDXph98unQ==} + preact@10.25.4: + resolution: {integrity: sha512-jLdZDb+Q+odkHJ+MpW/9U5cODzqnB+fy2EiHSZES7ldV5LK7yjlVzTp7R8Xy6W6y75kfK8iWYtFVH7lvjwrCMA==} prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -2923,8 +2880,8 @@ packages: prettier: optional: true - prettier@3.4.1: - resolution: {integrity: sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==} + prettier@3.4.2: + resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} engines: {node: '>=14'} hasBin: true @@ -2998,14 +2955,14 @@ packages: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} - regex-recursion@5.0.0: - resolution: {integrity: sha512-UwyOqeobrCCqTXPcsSqH4gDhOjD5cI/b8kjngWgSZbxYh5yVjAwTjO5+hAuPRNiuR70+5RlWSs+U9PVcVcW9Lw==} + regex-recursion@5.1.1: + resolution: {integrity: sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==} regex-utilities@2.3.0: resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} - regex@5.0.2: - resolution: {integrity: sha512-/pczGbKIQgfTMRV0XjABvc5RzLqQmwqxLHdQao2RTXPk+pmTXB2P0IaUHYdYyk412YLwUIkaeMd5T+RzVgTqnQ==} + regex@5.1.1: + resolution: {integrity: sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==} regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} @@ -3076,8 +3033,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sanitize-html@2.13.1: - resolution: {integrity: sha512-ZXtKq89oue4RP7abL9wp/9URJcqQNABB5GGJ2acW1sdO8JTVl92f4ygD7Yc9Ze09VAZhnt2zegeU0tbNsdcLYg==} + sanitize-html@2.14.0: + resolution: {integrity: sha512-CafX+IUPxZshXqqRaG9ZClSlfPVjSxI0td7n07hk8QO2oO+9JDnlcL8iM8TWeOXOIBFgIOx6zioTzM53AOMn3g==} saxes@6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} @@ -3312,8 +3269,8 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinyexec@0.3.1: - resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} tinyglobby@0.2.10: resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} @@ -3331,11 +3288,11 @@ packages: resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} - tldts-core@6.1.69: - resolution: {integrity: sha512-nygxy9n2PBUFQUtAXAc122gGo+04/j5qr5TGQFZTHafTKYvmARVXt2cA5rgero2/dnXUfkdPtiJoKmrd3T+wdA==} + tldts-core@6.1.70: + resolution: {integrity: sha512-RNnIXDB1FD4T9cpQRErEqw6ZpjLlGdMOitdV+0xtbsnwr4YFka1zpc7D4KD+aAn8oSG5JyFrdasZTE04qDE9Yg==} - tldts@6.1.69: - resolution: {integrity: sha512-Oh/CqRQ1NXNY7cy9NkTPUauOWiTro0jEYZTioGbOmcQh6EC45oribyIMJp0OJO3677r13tO6SKdWoGZUx2BDFw==} + tldts@6.1.70: + resolution: {integrity: sha512-/W1YVgYVJd9ZDjey5NXadNh0mJXkiUMUue9Zebd0vpdo1sU+H4zFFTaJ1RKD4N6KFoHfcXy6l+Vu7bh+bdWCzA==} hasBin: true tmp@0.2.3: @@ -3381,8 +3338,8 @@ packages: ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - ts-morph@24.0.0: - resolution: {integrity: sha512-2OAOg/Ob5yx9Et7ZX4CvTCc0UFoZHwLEJ+dpDPSUi5TgwwlTlX47w+iFRrEwzUZwYACjq83cgjS/Da50Ga37uw==} + ts-morph@25.0.0: + resolution: {integrity: sha512-ERPTUVO5qF8cEGJgAejGOsCVlbk8d0SDyiJsucKQT5XgqoZslv0Qml+gnui6Yy6o+uQqw5SestyW2HvlVtT/Sg==} tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -3440,15 +3397,12 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typescript-eslint@8.16.0: - resolution: {integrity: sha512-wDkVmlY6O2do4V+lZd0GtRfbtXbeD0q9WygwXXSJnC1xorE8eqyC2L1tJimqpSeFrOzRlYtWnUp/uzgHQOgfBQ==} + typescript-eslint@8.19.0: + resolution: {integrity: sha512-Ni8sUkVWYK4KAcTtPjQ/UTiRk6jcsuDhPpxULapUDi8A/l8TSBk+t1GtJA1RsCzIJg0q6+J7bf35AwQigENWRQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.8.0' typescript@5.7.2: resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} @@ -3519,9 +3473,9 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite-node@2.1.7: - resolution: {integrity: sha512-b/5MxSWd0ftWt1B1LHfzCw0ASzaxHztUwP0rcsBhkDSGy9ZDEDieSIjFG3I78nI9dUN0eSeD6LtuKPZGjwwpZQ==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + vite-node@2.1.8: + resolution: {integrity: sha512-uPAwSr57kYjAUux+8E2j0q0Fxpn8M9VoyfGiRI8Kfktz9NcYMCenwY5RnZxnF1WTu3TGiYipirIzacLL3VVGFg==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true vite@5.4.11: @@ -3567,15 +3521,15 @@ packages: postcss: optional: true - vitest@2.1.7: - resolution: {integrity: sha512-wzJ7Wri44ufkzTZbI1lHsdHfiGdFRmnJ9qIudDQ6tknjJeHhF5QgNSSjk7KRZUU535qEiEXFJ7tSHqyzyIv0jQ==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + vitest@2.1.8: + resolution: {integrity: sha512-1vBKTZskHw/aosXqQUlVWWlGUxSJR8YtiyZDJAFeW2kPAeX6S3Sool0mjspO+kXLuxVWlEDDowBAeqeAQefqLQ==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' - '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - '@vitest/browser': 2.1.7 - '@vitest/ui': 2.1.7 + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.1.8 + '@vitest/ui': 2.1.8 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -3606,8 +3560,8 @@ packages: '@vue/composition-api': optional: true - vue-tsc@2.1.10: - resolution: {integrity: sha512-RBNSfaaRHcN5uqVqJSZh++Gy/YUzryuv9u1aFWhsammDJXNtUiJMNoJ747lZcQ68wUQFx6E73y4FY3D8E7FGMA==} + vue-tsc@2.2.0: + resolution: {integrity: sha512-gtmM1sUuJ8aSb0KoAFmK9yMxb8TxjewmxqTJ1aKphD5Cbu0rULFY6+UQT51zW7SpUcenfPUuflKyVwyx9Qdnxg==} hasBin: true peerDependencies: typescript: '>=5.0.0' @@ -3713,8 +3667,8 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml@2.6.1: - resolution: {integrity: sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==} + yaml@2.7.0: + resolution: {integrity: sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==} engines: {node: '>= 14'} hasBin: true @@ -3913,7 +3867,7 @@ snapshots: '@docsearch/js@3.8.2(@algolia/client-search@5.18.0)(search-insights@2.17.3)': dependencies: '@docsearch/react': 3.8.2(@algolia/client-search@5.18.0)(search-insights@2.17.3) - preact: 10.25.3 + preact: 10.25.4 transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -4154,16 +4108,16 @@ snapshots: '@esbuild/win32-x64@0.24.2': optional: true - '@eslint-community/eslint-utils@4.4.1(eslint@9.16.0(jiti@2.4.1))': + '@eslint-community/eslint-utils@4.4.1(eslint@9.17.0(jiti@2.4.2))': dependencies: - eslint: 9.16.0(jiti@2.4.1) + eslint: 9.17.0(jiti@2.4.2) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/compat@1.2.3(eslint@9.16.0(jiti@2.4.1))': + '@eslint/compat@1.2.4(eslint@9.17.0(jiti@2.4.2))': optionalDependencies: - eslint: 9.16.0(jiti@2.4.1) + eslint: 9.17.0(jiti@2.4.2) '@eslint/config-array@0.19.1': dependencies: @@ -4191,7 +4145,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.16.0': {} + '@eslint/js@9.17.0': {} '@eslint/object-schema@2.1.5': {} @@ -4214,7 +4168,7 @@ snapshots: '@hutson/parse-repository-url@3.0.2': {} - '@iconify-json/simple-icons@1.2.16': + '@iconify-json/simple-icons@1.2.17': dependencies: '@iconify/types': 2.0.0 @@ -4258,7 +4212,7 @@ snapshots: '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 + fastq: 1.18.0 '@pkgjs/parseargs@0.11.0': optional: true @@ -4355,10 +4309,10 @@ snapshots: '@shikijs/vscode-textmate@9.3.1': {} - '@stylistic/eslint-plugin@2.11.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2)': + '@stylistic/eslint-plugin@2.12.1(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)': dependencies: - '@typescript-eslint/utils': 8.18.1(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) - eslint: 9.16.0(jiti@2.4.1) + '@typescript-eslint/utils': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) + eslint: 9.17.0(jiti@2.4.2) eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -4367,11 +4321,11 @@ snapshots: - supports-color - typescript - '@ts-morph/common@0.25.0': + '@ts-morph/common@0.26.0': dependencies: + fast-glob: 3.3.2 minimatch: 9.0.5 path-browserify: 1.0.1 - tinyglobby: 0.2.10 '@types/eslint@9.6.1': dependencies: @@ -4405,7 +4359,7 @@ snapshots: '@types/minimist@1.2.5': {} - '@types/node@22.10.1': + '@types/node@22.10.3': dependencies: undici-types: 6.20.0 @@ -4429,85 +4383,60 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.3 optional: true - '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/type-utils': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.16.0 - eslint: 9.16.0(jiti@2.4.1) + '@typescript-eslint/parser': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.19.0 + '@typescript-eslint/type-utils': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) + '@typescript-eslint/utils': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.19.0 + eslint: 9.17.0(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 ts-api-utils: 1.4.3(typescript@5.7.2) - optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2)': + '@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)': dependencies: - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.16.0 + '@typescript-eslint/scope-manager': 8.19.0 + '@typescript-eslint/types': 8.19.0 + '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.19.0 debug: 4.4.0(supports-color@8.1.1) - eslint: 9.16.0(jiti@2.4.1) - optionalDependencies: + eslint: 9.17.0(jiti@2.4.2) typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.16.0': - dependencies: - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/visitor-keys': 8.16.0 - - '@typescript-eslint/scope-manager@8.18.1': + '@typescript-eslint/scope-manager@8.19.0': dependencies: - '@typescript-eslint/types': 8.18.1 - '@typescript-eslint/visitor-keys': 8.18.1 + '@typescript-eslint/types': 8.19.0 + '@typescript-eslint/visitor-keys': 8.19.0 - '@typescript-eslint/type-utils@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2)': + '@typescript-eslint/type-utils@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) debug: 4.4.0(supports-color@8.1.1) - eslint: 9.16.0(jiti@2.4.1) + eslint: 9.17.0(jiti@2.4.2) ts-api-utils: 1.4.3(typescript@5.7.2) - optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.16.0': {} - - '@typescript-eslint/types@8.18.1': {} - - '@typescript-eslint/typescript-estree@8.16.0(typescript@5.7.2)': - dependencies: - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/visitor-keys': 8.16.0 - debug: 4.4.0(supports-color@8.1.1) - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.3(typescript@5.7.2) - optionalDependencies: - typescript: 5.7.2 - transitivePeerDependencies: - - supports-color + '@typescript-eslint/types@8.19.0': {} - '@typescript-eslint/typescript-estree@8.18.1(typescript@5.7.2)': + '@typescript-eslint/typescript-estree@8.19.0(typescript@5.7.2)': dependencies: - '@typescript-eslint/types': 8.18.1 - '@typescript-eslint/visitor-keys': 8.18.1 + '@typescript-eslint/types': 8.19.0 + '@typescript-eslint/visitor-keys': 8.19.0 debug: 4.4.0(supports-color@8.1.1) fast-glob: 3.3.2 is-glob: 4.0.3 @@ -4518,47 +4447,30 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@2.4.1)) - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - eslint: 9.16.0(jiti@2.4.1) - optionalDependencies: - typescript: 5.7.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.18.1(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2)': + '@typescript-eslint/utils@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@2.4.1)) - '@typescript-eslint/scope-manager': 8.18.1 - '@typescript-eslint/types': 8.18.1 - '@typescript-eslint/typescript-estree': 8.18.1(typescript@5.7.2) - eslint: 9.16.0(jiti@2.4.1) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0(jiti@2.4.2)) + '@typescript-eslint/scope-manager': 8.19.0 + '@typescript-eslint/types': 8.19.0 + '@typescript-eslint/typescript-estree': 8.19.0(typescript@5.7.2) + eslint: 9.17.0(jiti@2.4.2) typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.16.0': + '@typescript-eslint/visitor-keys@8.19.0': dependencies: - '@typescript-eslint/types': 8.16.0 - eslint-visitor-keys: 4.2.0 - - '@typescript-eslint/visitor-keys@8.18.1': - dependencies: - '@typescript-eslint/types': 8.18.1 + '@typescript-eslint/types': 8.19.0 eslint-visitor-keys: 4.2.0 '@ungap/structured-clone@1.2.1': {} - '@vitejs/plugin-vue@5.2.1(vite@5.4.11(@types/node@22.10.1))(vue@3.5.13(typescript@5.7.2))': + '@vitejs/plugin-vue@5.2.1(vite@5.4.11(@types/node@22.10.3))(vue@3.5.13(typescript@5.7.2))': dependencies: - vite: 5.4.11(@types/node@22.10.1) + vite: 5.4.11(@types/node@22.10.3) vue: 3.5.13(typescript@5.7.2) - '@vitest/coverage-v8@2.1.7(vitest@2.1.7)': + '@vitest/coverage-v8@2.1.8(vitest@2.1.8)': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -4572,70 +4484,66 @@ snapshots: std-env: 3.8.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.7(@types/node@22.10.1)(@vitest/ui@2.1.7)(jsdom@25.0.1) + vitest: 2.1.8(@types/node@22.10.3)(@vitest/ui@2.1.8)(jsdom@25.0.1) transitivePeerDependencies: - supports-color - '@vitest/eslint-plugin@1.1.13(@typescript-eslint/utils@8.18.1(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.7)': + '@vitest/eslint-plugin@1.1.20(@typescript-eslint/utils@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)(vitest@2.1.8)': dependencies: - '@typescript-eslint/utils': 8.18.1(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) - eslint: 9.16.0(jiti@2.4.1) + '@typescript-eslint/utils': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) + eslint: 9.17.0(jiti@2.4.2) optionalDependencies: typescript: 5.7.2 - vitest: 2.1.7(@types/node@22.10.1)(@vitest/ui@2.1.7)(jsdom@25.0.1) + vitest: 2.1.8(@types/node@22.10.3)(@vitest/ui@2.1.8)(jsdom@25.0.1) - '@vitest/expect@2.1.7': + '@vitest/expect@2.1.8': dependencies: - '@vitest/spy': 2.1.7 - '@vitest/utils': 2.1.7 + '@vitest/spy': 2.1.8 + '@vitest/utils': 2.1.8 chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.7(vite@5.4.11(@types/node@22.10.1))': + '@vitest/mocker@2.1.8(vite@5.4.11(@types/node@22.10.3))': dependencies: - '@vitest/spy': 2.1.7 + '@vitest/spy': 2.1.8 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 5.4.11(@types/node@22.10.1) - - '@vitest/pretty-format@2.1.7': - dependencies: - tinyrainbow: 1.2.0 + vite: 5.4.11(@types/node@22.10.3) '@vitest/pretty-format@2.1.8': dependencies: tinyrainbow: 1.2.0 - '@vitest/runner@2.1.7': + '@vitest/runner@2.1.8': dependencies: - '@vitest/utils': 2.1.7 + '@vitest/utils': 2.1.8 pathe: 1.1.2 - '@vitest/snapshot@2.1.7': + '@vitest/snapshot@2.1.8': dependencies: - '@vitest/pretty-format': 2.1.7 + '@vitest/pretty-format': 2.1.8 magic-string: 0.30.17 pathe: 1.1.2 - '@vitest/spy@2.1.7': + '@vitest/spy@2.1.8': dependencies: tinyspy: 3.0.2 - '@vitest/ui@2.1.7(vitest@2.1.7)': + '@vitest/ui@2.1.8(vitest@2.1.8)': dependencies: - '@vitest/utils': 2.1.7 + '@vitest/utils': 2.1.8 fflate: 0.8.2 flatted: 3.3.2 pathe: 1.1.2 sirv: 3.0.0 tinyglobby: 0.2.10 tinyrainbow: 1.2.0 - vitest: 2.1.7(@types/node@22.10.1)(@vitest/ui@2.1.7)(jsdom@25.0.1) + vitest: 2.1.8(@types/node@22.10.3)(@vitest/ui@2.1.8)(jsdom@25.0.1) - '@vitest/utils@2.1.7': + '@vitest/utils@2.1.8': dependencies: - '@vitest/pretty-format': 2.1.7 + '@vitest/pretty-format': 2.1.8 loupe: 3.1.2 tinyrainbow: 1.2.0 @@ -4704,13 +4612,13 @@ snapshots: dependencies: rfdc: 1.4.1 - '@vue/language-core@2.1.10(typescript@5.7.2)': + '@vue/language-core@2.2.0(typescript@5.7.2)': dependencies: '@volar/language-core': 2.4.11 '@vue/compiler-dom': 3.5.13 '@vue/compiler-vue2': 2.7.16 '@vue/shared': 3.5.13 - alien-signals: 0.2.2 + alien-signals: 0.4.12 minimatch: 9.0.5 muggle-string: 0.4.1 path-browserify: 1.0.1 @@ -4751,11 +4659,11 @@ snapshots: - '@vue/composition-api' - vue - '@vueuse/core@12.0.0(typescript@5.7.2)': + '@vueuse/core@12.2.0(typescript@5.7.2)': dependencies: '@types/web-bluetooth': 0.0.20 - '@vueuse/metadata': 12.0.0 - '@vueuse/shared': 12.0.0(typescript@5.7.2) + '@vueuse/metadata': 12.2.0 + '@vueuse/shared': 12.2.0(typescript@5.7.2) vue: 3.5.13(typescript@5.7.2) transitivePeerDependencies: - typescript @@ -4773,7 +4681,7 @@ snapshots: '@vueuse/metadata@11.3.0': {} - '@vueuse/metadata@12.0.0': {} + '@vueuse/metadata@12.2.0': {} '@vueuse/shared@11.3.0(vue@3.5.13(typescript@5.7.2))': dependencies: @@ -4782,7 +4690,7 @@ snapshots: - '@vue/composition-api' - vue - '@vueuse/shared@12.0.0(typescript@5.7.2)': + '@vueuse/shared@12.2.0(typescript@5.7.2)': dependencies: vue: 3.5.13(typescript@5.7.2) transitivePeerDependencies: @@ -4831,7 +4739,7 @@ snapshots: '@algolia/requester-fetch': 5.18.0 '@algolia/requester-node-http': 5.18.0 - alien-signals@0.2.2: {} + alien-signals@0.4.12: {} ansi-colors@4.1.3: {} @@ -4915,7 +4823,7 @@ snapshots: browserslist@4.24.3: dependencies: caniuse-lite: 1.0.30001690 - electron-to-chromium: 1.5.75 + electron-to-chromium: 1.5.76 node-releases: 2.0.19 update-browserslist-db: 1.1.1(browserslist@4.24.3) @@ -5075,7 +4983,7 @@ snapshots: jsdom: 25.0.1 semver: 7.6.3 w3c-xmlserializer: 5.0.0 - yaml: 2.6.1 + yaml: 2.7.0 yargs: 17.7.2 transitivePeerDependencies: - bufferutil @@ -5099,7 +5007,7 @@ snapshots: readable-stream: 3.6.2 typedarray: 0.0.6 - consola@3.3.0: {} + consola@3.3.3: {} conventional-changelog-angular@6.0.0: dependencies: @@ -5213,7 +5121,7 @@ snapshots: csstype@3.1.3: {} - cypress@13.16.0: + cypress@13.17.0: dependencies: '@cypress/request': 3.0.7 '@cypress/xvfb': 1.2.4(supports-color@8.1.1) @@ -5331,7 +5239,7 @@ snapshots: dependencies: domelementtype: 2.3.0 - domutils@3.1.0: + domutils@3.2.1: dependencies: dom-serializer: 2.0.0 domelementtype: 2.3.0 @@ -5359,7 +5267,7 @@ snapshots: jsbn: 0.1.1 safer-buffer: 2.1.2 - electron-to-chromium@1.5.75: {} + electron-to-chromium@1.5.76: {} emoji-regex-xs@1.0.0: {} @@ -5386,7 +5294,7 @@ snapshots: es-errors@1.3.0: {} - es-module-lexer@1.5.4: {} + es-module-lexer@1.6.0: {} es-object-atoms@1.0.0: dependencies: @@ -5479,24 +5387,24 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-prettier@9.1.0(eslint@9.16.0(jiti@2.4.1)): + eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.2)): dependencies: - eslint: 9.16.0(jiti@2.4.1) + eslint: 9.17.0(jiti@2.4.2) - eslint-plugin-file-progress@3.0.1(eslint@9.16.0(jiti@2.4.1)): + eslint-plugin-file-progress@3.0.1(eslint@9.17.0(jiti@2.4.2)): dependencies: - eslint: 9.16.0(jiti@2.4.1) + eslint: 9.17.0(jiti@2.4.2) nanospinner: 1.2.2 picocolors: 1.1.1 - eslint-plugin-jsdoc@50.6.0(eslint@9.16.0(jiti@2.4.1)): + eslint-plugin-jsdoc@50.6.1(eslint@9.17.0(jiti@2.4.2)): dependencies: '@es-joy/jsdoccomment': 0.49.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 debug: 4.4.0(supports-color@8.1.1) escape-string-regexp: 4.0.0 - eslint: 9.16.0(jiti@2.4.1) + eslint: 9.17.0(jiti@2.4.2) espree: 10.3.0 esquery: 1.6.0 parse-imports: 2.2.1 @@ -5506,24 +5414,24 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.16.0(jiti@2.4.1)))(eslint@9.16.0(jiti@2.4.1))(prettier@3.4.1): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.2)))(eslint@9.17.0(jiti@2.4.2))(prettier@3.4.2): dependencies: - eslint: 9.16.0(jiti@2.4.1) - prettier: 3.4.1 + eslint: 9.17.0(jiti@2.4.2) + prettier: 3.4.2 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 9.1.0(eslint@9.16.0(jiti@2.4.1)) + eslint-config-prettier: 9.1.0(eslint@9.17.0(jiti@2.4.2)) - eslint-plugin-unicorn@56.0.1(eslint@9.16.0(jiti@2.4.1)): + eslint-plugin-unicorn@56.0.1(eslint@9.17.0(jiti@2.4.2)): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@2.4.1)) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0(jiti@2.4.2)) ci-info: 4.1.0 clean-regexp: 1.0.0 core-js-compat: 3.39.0 - eslint: 9.16.0(jiti@2.4.1) + eslint: 9.17.0(jiti@2.4.2) esquery: 1.6.0 globals: 15.14.0 indent-string: 4.0.0 @@ -5545,14 +5453,14 @@ snapshots: eslint-visitor-keys@4.2.0: {} - eslint@9.16.0(jiti@2.4.1): + eslint@9.17.0(jiti@2.4.2): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@2.4.1)) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.19.1 '@eslint/core': 0.9.1 '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.16.0 + '@eslint/js': 9.17.0 '@eslint/plugin-kit': 0.2.4 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 @@ -5582,7 +5490,7 @@ snapshots: natural-compare: 1.4.0 optionator: 0.9.4 optionalDependencies: - jiti: 2.4.1 + jiti: 2.4.2 transitivePeerDependencies: - supports-color @@ -5660,7 +5568,7 @@ snapshots: fast-levenshtein@2.0.6: {} - fastq@1.17.1: + fastq@1.18.0: dependencies: reusify: 1.0.4 @@ -5894,7 +5802,7 @@ snapshots: dependencies: domelementtype: 2.3.0 domhandler: 5.0.3 - domutils: 3.1.0 + domutils: 3.2.1 entities: 4.5.0 http-proxy-agent@7.0.2: @@ -6026,7 +5934,7 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jiti@2.4.1: {} + jiti@2.4.2: {} joycon@3.1.1: {} @@ -6340,7 +6248,7 @@ snapshots: npm-normalize-package-bin@4.0.0: {} - npm-run-all2@7.0.1: + npm-run-all2@7.0.2: dependencies: ansi-styles: 6.2.1 cross-spawn: 7.0.6 @@ -6372,8 +6280,8 @@ snapshots: oniguruma-to-es@0.8.1: dependencies: emoji-regex-xs: 1.0.0 - regex: 5.0.2 - regex-recursion: 5.0.0 + regex: 5.1.1 + regex-recursion: 5.1.1 optionator@0.9.4: dependencies: @@ -6430,7 +6338,7 @@ snapshots: parse-imports@2.2.1: dependencies: - es-module-lexer: 1.5.4 + es-module-lexer: 1.6.0 slashes: 3.0.12 parse-json@4.0.0: @@ -6496,14 +6404,14 @@ snapshots: pluralize@8.0.0: {} - postcss-load-config@6.0.1(jiti@2.4.1)(postcss@8.4.49)(tsx@4.19.2)(yaml@2.6.1): + postcss-load-config@6.0.1(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(yaml@2.7.0): dependencies: lilconfig: 3.1.3 optionalDependencies: - jiti: 2.4.1 + jiti: 2.4.2 postcss: 8.4.49 tsx: 4.19.2 - yaml: 2.6.1 + yaml: 2.7.0 postcss@8.4.49: dependencies: @@ -6511,7 +6419,7 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - preact@10.25.3: {} + preact@10.25.4: {} prelude-ls@1.2.1: {} @@ -6519,21 +6427,21 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier-plugin-organize-imports@4.1.0(prettier@3.4.1)(typescript@5.7.2)(vue-tsc@2.1.10(typescript@5.7.2)): + prettier-plugin-organize-imports@4.1.0(prettier@3.4.2)(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2)): dependencies: - prettier: 3.4.1 + prettier: 3.4.2 typescript: 5.7.2 optionalDependencies: - vue-tsc: 2.1.10(typescript@5.7.2) + vue-tsc: 2.2.0(typescript@5.7.2) - prettier-plugin-packagejson@2.5.6(prettier@3.4.1): + prettier-plugin-packagejson@2.5.6(prettier@3.4.2): dependencies: sort-package-json: 2.12.0 synckit: 0.9.2 optionalDependencies: - prettier: 3.4.1 + prettier: 3.4.2 - prettier@3.4.1: {} + prettier@3.4.2: {} pretty-bytes@5.6.0: {} @@ -6612,13 +6520,14 @@ snapshots: indent-string: 4.0.0 strip-indent: 3.0.0 - regex-recursion@5.0.0: + regex-recursion@5.1.1: dependencies: + regex: 5.1.1 regex-utilities: 2.3.0 regex-utilities@2.3.0: {} - regex@5.0.2: + regex@5.1.1: dependencies: regex-utilities: 2.3.0 @@ -6700,7 +6609,7 @@ snapshots: safer-buffer@2.1.2: {} - sanitize-html@2.13.1: + sanitize-html@2.14.0: dependencies: deepmerge: 4.3.1 escape-string-regexp: 4.0.0 @@ -6965,7 +6874,7 @@ snapshots: tinybench@2.9.0: {} - tinyexec@0.3.1: {} + tinyexec@0.3.2: {} tinyglobby@0.2.10: dependencies: @@ -6978,11 +6887,11 @@ snapshots: tinyspy@3.0.2: {} - tldts-core@6.1.69: {} + tldts-core@6.1.70: {} - tldts@6.1.69: + tldts@6.1.70: dependencies: - tldts-core: 6.1.69 + tldts-core: 6.1.70 tmp@0.2.3: {} @@ -6994,7 +6903,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.69 + tldts: 6.1.70 tr46@1.0.1: dependencies: @@ -7016,29 +6925,29 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-morph@24.0.0: + ts-morph@25.0.0: dependencies: - '@ts-morph/common': 0.25.0 + '@ts-morph/common': 0.26.0 code-block-writer: 13.0.3 tslib@2.8.1: {} - tsup@8.3.5(jiti@2.4.1)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.7.2)(yaml@2.6.1): + tsup@8.3.5(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.7.2)(yaml@2.7.0): dependencies: bundle-require: 5.1.0(esbuild@0.24.2) cac: 6.7.14 chokidar: 4.0.3 - consola: 3.3.0 + consola: 3.3.3 debug: 4.4.0(supports-color@8.1.1) esbuild: 0.24.2 joycon: 3.1.1 picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@2.4.1)(postcss@8.4.49)(tsx@4.19.2)(yaml@2.6.1) + postcss-load-config: 6.0.1(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(yaml@2.7.0) resolve-from: 5.0.0 rollup: 4.29.1 source-map: 0.8.0-beta.0 sucrase: 3.35.0 - tinyexec: 0.3.1 + tinyexec: 0.3.2 tinyglobby: 0.2.10 tree-kill: 1.2.2 optionalDependencies: @@ -7077,13 +6986,12 @@ snapshots: typedarray@0.0.6: {} - typescript-eslint@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2): + typescript-eslint@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) - '@typescript-eslint/parser': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) - eslint: 9.16.0(jiti@2.4.1) - optionalDependencies: + '@typescript-eslint/eslint-plugin': 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) + '@typescript-eslint/parser': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) + '@typescript-eslint/utils': 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2) + eslint: 9.17.0(jiti@2.4.2) typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -7159,13 +7067,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.7(@types/node@22.10.1): + vite-node@2.1.8(@types/node@22.10.3): dependencies: cac: 6.7.14 debug: 4.4.0(supports-color@8.1.1) - es-module-lexer: 1.5.4 + es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.11(@types/node@22.10.1) + vite: 5.4.11(@types/node@22.10.3) transitivePeerDependencies: - '@types/node' - less @@ -7177,25 +7085,25 @@ snapshots: - supports-color - terser - vite@5.4.11(@types/node@22.10.1): + vite@5.4.11(@types/node@22.10.3): dependencies: esbuild: 0.21.5 postcss: 8.4.49 rollup: 4.29.1 optionalDependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.3 fsevents: 2.3.3 - vitepress@1.5.0(@algolia/client-search@5.18.0)(@types/node@22.10.1)(postcss@8.4.49)(search-insights@2.17.3)(typescript@5.7.2): + vitepress@1.5.0(@algolia/client-search@5.18.0)(@types/node@22.10.3)(postcss@8.4.49)(search-insights@2.17.3)(typescript@5.7.2): dependencies: '@docsearch/css': 3.8.2 '@docsearch/js': 3.8.2(@algolia/client-search@5.18.0)(search-insights@2.17.3) - '@iconify-json/simple-icons': 1.2.16 + '@iconify-json/simple-icons': 1.2.17 '@shikijs/core': 1.24.4 '@shikijs/transformers': 1.24.4 '@shikijs/types': 1.24.4 '@types/markdown-it': 14.1.2 - '@vitejs/plugin-vue': 5.2.1(vite@5.4.11(@types/node@22.10.1))(vue@3.5.13(typescript@5.7.2)) + '@vitejs/plugin-vue': 5.2.1(vite@5.4.11(@types/node@22.10.3))(vue@3.5.13(typescript@5.7.2)) '@vue/devtools-api': 7.6.8 '@vue/shared': 3.5.13 '@vueuse/core': 11.3.0(vue@3.5.13(typescript@5.7.2)) @@ -7204,7 +7112,7 @@ snapshots: mark.js: 8.11.1 minisearch: 7.1.1 shiki: 1.24.4 - vite: 5.4.11(@types/node@22.10.1) + vite: 5.4.11(@types/node@22.10.3) vue: 3.5.13(typescript@5.7.2) optionalDependencies: postcss: 8.4.49 @@ -7236,15 +7144,15 @@ snapshots: - typescript - universal-cookie - vitest@2.1.7(@types/node@22.10.1)(@vitest/ui@2.1.7)(jsdom@25.0.1): + vitest@2.1.8(@types/node@22.10.3)(@vitest/ui@2.1.8)(jsdom@25.0.1): dependencies: - '@vitest/expect': 2.1.7 - '@vitest/mocker': 2.1.7(vite@5.4.11(@types/node@22.10.1)) + '@vitest/expect': 2.1.8 + '@vitest/mocker': 2.1.8(vite@5.4.11(@types/node@22.10.3)) '@vitest/pretty-format': 2.1.8 - '@vitest/runner': 2.1.7 - '@vitest/snapshot': 2.1.7 - '@vitest/spy': 2.1.7 - '@vitest/utils': 2.1.7 + '@vitest/runner': 2.1.8 + '@vitest/snapshot': 2.1.8 + '@vitest/spy': 2.1.8 + '@vitest/utils': 2.1.8 chai: 5.1.2 debug: 4.4.0(supports-color@8.1.1) expect-type: 1.1.0 @@ -7252,15 +7160,15 @@ snapshots: pathe: 1.1.2 std-env: 3.8.0 tinybench: 2.9.0 - tinyexec: 0.3.1 + tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.11(@types/node@22.10.1) - vite-node: 2.1.7(@types/node@22.10.1) + vite: 5.4.11(@types/node@22.10.3) + vite-node: 2.1.8(@types/node@22.10.3) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.1 - '@vitest/ui': 2.1.7(vitest@2.1.7) + '@types/node': 22.10.3 + '@vitest/ui': 2.1.8(vitest@2.1.8) jsdom: 25.0.1 transitivePeerDependencies: - less @@ -7279,11 +7187,10 @@ snapshots: dependencies: vue: 3.5.13(typescript@5.7.2) - vue-tsc@2.1.10(typescript@5.7.2): + vue-tsc@2.2.0(typescript@5.7.2): dependencies: '@volar/typescript': 2.4.11 - '@vue/language-core': 2.1.10(typescript@5.7.2) - semver: 7.6.3 + '@vue/language-core': 2.2.0(typescript@5.7.2) typescript: 5.7.2 vue@3.5.13(typescript@5.7.2): @@ -7370,7 +7277,7 @@ snapshots: yallist@4.0.0: {} - yaml@2.6.1: {} + yaml@2.7.0: {} yargs-parser@20.2.9: {} diff --git a/scripts/apidocs/output/page.ts b/scripts/apidocs/output/page.ts index c00ba4d23ad..a95703099c4 100644 --- a/scripts/apidocs/output/page.ts +++ b/scripts/apidocs/output/page.ts @@ -33,7 +33,7 @@ export async function writePages(pages: RawApiDocsPage[]): Promise { async function writePage(page: RawApiDocsPage): Promise { try { await writePageMarkdown(page); - await writePageJsonData(page); + await writePageData(page); } catch (error) { throw new Error(`Error writing page ${page.title}`, { cause: error }); } @@ -51,7 +51,7 @@ async function writePageMarkdown(page: RawApiDocsPage): Promise { let content = ` @@ -98,16 +98,33 @@ async function writePageMarkdown(page: RawApiDocsPage): Promise { * * @param page The page to write. */ -async function writePageJsonData(page: RawApiDocsPage): Promise { +async function writePageData(page: RawApiDocsPage): Promise { const { camelTitle, methods } = page; const pageData: Record = Object.fromEntries( await Promise.all( methods.map(async (method) => [method.name, await toMethodData(method)]) ) ); - const content = JSON.stringify(pageData, null, 2); - writeFileSync(resolve(FILE_PATH_API_DOCS, `${camelTitle}.json`), content); + const refreshFunctions: Record = Object.fromEntries( + await Promise.all( + methods.map(async (method) => [ + method.name, + await toRefreshFunction(method), + ]) + ) + ); + + const content = + `export default ${JSON.stringify(pageData, undefined, 2)}`.replaceAll( + /"refresh-([^"-]+)-placeholder"/g, + (_, name) => refreshFunctions[name] + ); + + writeFileSync( + resolve(FILE_PATH_API_DOCS, `${camelTitle}.ts`), + await formatTypescript(content) + ); } const defaultCommentRegex = /\s+Defaults to `([^`]+)`\..*/; @@ -130,6 +147,12 @@ async function toMethodData(method: RawApiDocsMethod): Promise { let formattedSignature = await formatTypescript(signature); formattedSignature = formattedSignature.trim(); + // eslint-disable-next-line @typescript-eslint/require-await + const refresh = async () => ['refresh', name, 'placeholder']; + // This is a placeholder to be replaced by the actual refresh function code + // If we put the actual code here, it would be a string and not executable + refresh.toJSON = () => `refresh-${name}-placeholder`; + /* Target order, omitted to improve diff to old files return { name, @@ -167,6 +190,7 @@ async function toMethodData(method: RawApiDocsMethod): Promise { returns: returns.text, signature: codeToHtml(formattedSignature), examples: codeToHtml(examples.join('\n')), + refresh, deprecated: mdToHtml(deprecated), seeAlsos: seeAlsos.map((seeAlso) => mdToHtml(seeAlso, true)), }; @@ -175,3 +199,49 @@ async function toMethodData(method: RawApiDocsMethod): Promise { export function extractSummaryDefault(description: string): string | undefined { return defaultCommentRegex.exec(description)?.[1]; } + +export async function toRefreshFunction( + method: RawApiDocsMethod +): Promise { + const { name, signatures } = method; + const signatureData = required(signatures.at(-1), 'method signature'); + const { examples } = signatureData; + + const exampleCode = examples.join('\n'); + if (!/^\w*faker\w*\./im.test(exampleCode)) { + // No recordable faker calls in examples + return 'undefined'; + } + + const exampleLines = exampleCode + .replaceAll(/ ?\/\/.*$/gm, '') // Remove comments + .replaceAll(/^import .*$/gm, '') // Remove imports + .replaceAll( + // record results of faker calls + /^(\w*faker\w*\..+(?:(?:.|\n..)*\n[^ ])?\)(?:\.\w+)?);?$/gim, + `try { result.push($1); } catch (error: unknown) { result.push(error instanceof Error ? error.name : 'Error'); }\n` + ); + + const fullMethod = `async (): Promise => { +await enableFaker(); +faker.seed(); +faker.setDefaultRefDate(); +const result: unknown[] = []; + +${exampleLines} + +return result; +}`; + try { + const formattedMethod = await formatTypescript(fullMethod); + return formattedMethod.replace(/;\s+$/, ''); // Remove trailing semicolon + } catch (error: unknown) { + console.error( + 'Failed to format refresh function for', + name, + fullMethod, + error + ); + return 'undefined'; + } +} diff --git a/src/modules/color/index.ts b/src/modules/color/index.ts index 10d7023a245..0bfdc8858b7 100644 --- a/src/modules/color/index.ts +++ b/src/modules/color/index.ts @@ -445,7 +445,7 @@ export class ColorModule extends ModuleBase { * * @example * faker.color.cmyk() // [0.31, 0.52, 0.32, 0.43] - * faker.color.cmyk({ format: 'css' }) // cmyk(100%, 0%, 0%, 0%) + * faker.color.cmyk({ format: 'css' }) // 'cmyk(35%, 39%, 68%, 60%)' * faker.color.cmyk({ format: 'binary' }) // (8-32 bits) x 4 * * @since 7.0.0 @@ -487,7 +487,7 @@ export class ColorModule extends ModuleBase { * @example * faker.color.cmyk() // [0.31, 0.52, 0.32, 0.43] * faker.color.cmyk({ format: 'decimal' }) // [0.31, 0.52, 0.32, 0.43] - * faker.color.cmyk({ format: 'css' }) // cmyk(100%, 0%, 0%, 0%) + * faker.color.cmyk({ format: 'css' }) // 'cmyk(35%, 39%, 68%, 60%)' * faker.color.cmyk({ format: 'binary' }) // (8-32 bits) x 4 * * @since 7.0.0 @@ -639,7 +639,7 @@ export class ColorModule extends ModuleBase { * * @example * faker.color.hwb() // [201, 0.21, 0.31] - * faker.color.hwb({ format: 'css' }) // hwb(194 0% 0%) + * faker.color.hwb({ format: 'css' }) // 'hwb(354 72% 41%)' * faker.color.hwb({ format: 'binary' }) // (8-32 bits x 3) * * @since 7.0.0 @@ -681,7 +681,7 @@ export class ColorModule extends ModuleBase { * @example * faker.color.hwb() // [201, 0.21, 0.31] * faker.color.hwb({ format: 'decimal' }) // [201, 0.21, 0.31] - * faker.color.hwb({ format: 'css' }) // hwb(194 0% 0%) + * faker.color.hwb({ format: 'css' }) // 'hwb(354 72% 41%)' * faker.color.hwb({ format: 'binary' }) // (8-32 bits x 3) * * @since 7.0.0 @@ -703,7 +703,7 @@ export class ColorModule extends ModuleBase { * @example * faker.color.hwb() // [201, 0.21, 0.31] * faker.color.hwb({ format: 'decimal' }) // [201, 0.21, 0.31] - * faker.color.hwb({ format: 'css' }) // hwb(194 0% 0%) + * faker.color.hwb({ format: 'css' }) // 'hwb(354 72% 41%)' * faker.color.hwb({ format: 'binary' }) // (8-32 bits x 3) * * @since 7.0.0 @@ -744,7 +744,7 @@ export class ColorModule extends ModuleBase { * * @example * faker.color.lab() // [0.832133, -80.3245, 100.1234] - * faker.color.lab({ format: 'css' }) // lab(29.2345% 39.3825 20.0664) + * faker.color.lab({ format: 'css' }) // 'lab(29.2345% 39.3825 20.0664)' * faker.color.lab({ format: 'binary' }) // (8-32 bits x 3) * * @since 7.0.0 @@ -786,7 +786,7 @@ export class ColorModule extends ModuleBase { * @example * faker.color.lab() // [0.832133, -80.3245, 100.1234] * faker.color.lab({ format: 'decimal' }) // [0.856773, -80.2345, 100.2341] - * faker.color.lab({ format: 'css' }) // lab(29.2345% 39.3825 20.0664) + * faker.color.lab({ format: 'css' }) // 'lab(29.2345% 39.3825 20.0664)' * faker.color.lab({ format: 'binary' }) // (8-32 bits x 3) * * @since 7.0.0 @@ -834,7 +834,7 @@ export class ColorModule extends ModuleBase { * * @example * faker.color.lch() // [0.522345, 72.2, 56.2] - * faker.color.lch({ format: 'css' }) // lch(52.2345% 72.2 56.2) + * faker.color.lch({ format: 'css' }) // 'lch(52.2345% 72.2 56.2)' * faker.color.lch({ format: 'binary' }) // (8-32 bits x 3) * * @since 7.0.0 @@ -882,7 +882,7 @@ export class ColorModule extends ModuleBase { * @example * faker.color.lch() // [0.522345, 72.2, 56.2] * faker.color.lch({ format: 'decimal' }) // [0.522345, 72.2, 56.2] - * faker.color.lch({ format: 'css' }) // lch(52.2345% 72.2 56.2) + * faker.color.lch({ format: 'css' }) // 'lch(52.2345% 72.2 56.2)' * faker.color.lch({ format: 'binary' }) // (8-32 bits x 3) * * @since 7.0.0 diff --git a/src/modules/commerce/index.ts b/src/modules/commerce/index.ts index 61dd9a9c2b9..70482d8008d 100644 --- a/src/modules/commerce/index.ts +++ b/src/modules/commerce/index.ts @@ -129,11 +129,11 @@ export class CommerceModule extends ModuleBase { * @param options.symbol The currency value to use. Defaults to `''`. * * @example - * faker.commerce.price() // 828.07 - * faker.commerce.price({ min: 100 }) // 904.19 - * faker.commerce.price({ min: 100, max: 200 }) // 154.55 - * faker.commerce.price({ min: 100, max: 200, dec: 0 }) // 133 - * faker.commerce.price({ min: 100, max: 200, dec: 0, symbol: '$' }) // $114 + * faker.commerce.price() // '828.07' + * faker.commerce.price({ min: 100 }) // '904.19' + * faker.commerce.price({ min: 100, max: 200 }) // '154.55' + * faker.commerce.price({ min: 100, max: 200, dec: 0 }) // '133' + * faker.commerce.price({ min: 100, max: 200, dec: 0, symbol: '$' }) // '$114' * * @since 3.0.0 */ diff --git a/src/modules/date/index.ts b/src/modules/date/index.ts index e2565cf4518..65d4a7d9135 100644 --- a/src/modules/date/index.ts +++ b/src/modules/date/index.ts @@ -192,12 +192,12 @@ export class SimpleDateModule extends SimpleModuleBase { * @example * faker.date.betweens({ from: '2020-01-01T00:00:00.000Z', to: '2030-01-01T00:00:00.000Z' }) * // [ - * // 2022-07-02T06:00:00.000Z, - * // 2024-12-31T12:00:00.000Z, - * // 2027-07-02T18:00:00.000Z + * // '2022-07-02T06:00:00.000Z', + * // '2024-12-31T12:00:00.000Z', + * // '2027-07-02T18:00:00.000Z' * // ] * faker.date.betweens({ from: '2020-01-01T00:00:00.000Z', to: '2030-01-01T00:00:00.000Z', count: 2 }) - * // [ 2023-05-02T16:00:00.000Z, 2026-09-01T08:00:00.000Z ] + * // [ '2023-05-02T16:00:00.000Z', '2026-09-01T08:00:00.000Z' ] * faker.date.betweens({ from: '2020-01-01T00:00:00.000Z', to: '2030-01-01T00:00:00.000Z', count: { min: 2, max: 5 }}) * // [ * // 2021-12-19T06:35:40.191Z, @@ -347,7 +347,7 @@ export class SimpleDateModule extends SimpleModuleBase { * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * * @example - * faker.date.birthdate() // 1977-07-10T01:37:30.719Z + * faker.date.birthdate() // '1977-07-10T01:37:30.719Z' * * @since 7.0.0 */ @@ -369,7 +369,7 @@ export class SimpleDateModule extends SimpleModuleBase { * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. * * @example - * faker.date.birthdate({ mode: 'age', min: 18, max: 65 }) // 2003-11-02T20:03:20.116Z + * faker.date.birthdate({ mode: 'age', min: 18, max: 65 }) // '2003-11-02T20:03:20.116Z' * * @since 7.0.0 */ @@ -403,7 +403,7 @@ export class SimpleDateModule extends SimpleModuleBase { * @param options.max The maximum year to generate a birthdate in. * * @example - * faker.date.birthdate({ mode: 'year', min: 1900, max: 2000 }) // 1940-08-20T08:53:07.538Z + * faker.date.birthdate({ mode: 'year', min: 1900, max: 2000 }) // '1940-08-20T08:53:07.538Z' * * @since 7.0.0 */ @@ -435,9 +435,9 @@ export class SimpleDateModule extends SimpleModuleBase { * Defaults to `faker.defaultRefDate()`. * * @example - * faker.date.birthdate() // 1977-07-10T01:37:30.719Z - * faker.date.birthdate({ mode: 'age', min: 18, max: 65 }) // 2003-11-02T20:03:20.116Z - * faker.date.birthdate({ mode: 'year', min: 1900, max: 2000 }) // 1940-08-20T08:53:07.538Z + * faker.date.birthdate() // '1977-07-10T01:37:30.719Z' + * faker.date.birthdate({ mode: 'age', min: 18, max: 65 }) // '2003-11-02T20:03:20.116Z' + * faker.date.birthdate({ mode: 'year', min: 1900, max: 2000 }) // '1940-08-20T08:53:07.538Z' * * @since 7.0.0 */ diff --git a/src/modules/finance/index.ts b/src/modules/finance/index.ts index cc4068089e1..ad28747b4b5 100644 --- a/src/modules/finance/index.ts +++ b/src/modules/finance/index.ts @@ -65,8 +65,8 @@ export class FinanceModule extends ModuleBase { * @param length The length of the account number. Defaults to `8`. * * @example - * faker.finance.accountNumber() // 92842238 - * faker.finance.accountNumber(5) // 32564 + * faker.finance.accountNumber() // '92842238' + * faker.finance.accountNumber(5) // '32564' * * @since 8.0.0 */ @@ -78,8 +78,8 @@ export class FinanceModule extends ModuleBase { * @param options.length The length of the account number. Defaults to `8`. * * @example - * faker.finance.accountNumber() // 92842238 - * faker.finance.accountNumber({ length: 5 }) // 32564 + * faker.finance.accountNumber() // '92842238' + * faker.finance.accountNumber({ length: 5 }) // '32564' * * @since 8.0.0 */ @@ -98,9 +98,9 @@ export class FinanceModule extends ModuleBase { * @param optionsOrLength.length The length of the account number. Defaults to `8`. * * @example - * faker.finance.accountNumber() // 92842238 - * faker.finance.accountNumber(5) // 28736 - * faker.finance.accountNumber({ length: 5 }) // 32564 + * faker.finance.accountNumber() // '92842238' + * faker.finance.accountNumber(5) // '28736' + * faker.finance.accountNumber({ length: 5 }) // '32564' * * @since 8.0.0 */ @@ -123,9 +123,9 @@ export class FinanceModule extends ModuleBase { * @param options.length The length of the account number. Defaults to `8`. * * @example - * faker.finance.accountNumber() // 92842238 - * faker.finance.accountNumber(5) // 28736 - * faker.finance.accountNumber({ length: 5 }) // 32564 + * faker.finance.accountNumber() // '92842238' + * faker.finance.accountNumber(5) // '28736' + * faker.finance.accountNumber({ length: 5 }) // '32564' * * @since 8.0.0 */ diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index 473927c3e69..6bb7e1ba977 100644 --- a/src/modules/helpers/index.ts +++ b/src/modules/helpers/index.ts @@ -394,9 +394,21 @@ export class SimpleHelpersModule extends SimpleModuleBase { quantifierMax ); + let replacement: string; + if (token[1] === '.') { + replacement = this.faker.string.alphanumeric(repetitions); + } else if (isCaseInsensitive) { + replacement = this.faker.string.fromCharacters( + [token[1].toLowerCase(), token[1].toUpperCase()], + repetitions + ); + } else { + replacement = token[1].repeat(repetitions); + } + pattern = pattern.slice(0, token.index) + - token[1].repeat(repetitions) + + replacement + pattern.slice(token.index + token[0].length); token = SINGLE_CHAR_REG.exec(pattern); } diff --git a/src/modules/image/index.ts b/src/modules/image/index.ts index 67d0e2d8150..2275cbeba50 100644 --- a/src/modules/image/index.ts +++ b/src/modules/image/index.ts @@ -241,8 +241,8 @@ export class ImageModule extends ModuleBase { * Generates a random image url provided via https://via.placeholder.com/. * * @param options Options for generating a URL for an image. - * @param options.width The width of the image. Defaults to a random number between 1 and 3999. - * @param options.height The height of the image. Defaults to a random number between 1 and 3999. + * @param options.width The width of the image. Defaults to a random number between 1 and 3500. + * @param options.height The height of the image. Defaults to a random number between 1 and 3500. * @param options.backgroundColor The background color of the image. Defaults to a random hex color. * @param options.textColor The text color of the image. Defaults to a random hex color. * @param options.format The format of the image. Defaults to a random format. @@ -259,19 +259,21 @@ export class ImageModule extends ModuleBase { * faker.image.urlPlaceholder({ width: 128, height: 128, backgroundColor: '000000', textColor: 'FF0000', format: 'png', text: 'lorem ipsum' }) // 'https://via.placeholder.com/128x128/000000/FF0000.png?text=lorem+ipsum' * * @since 8.0.0 + * + * @deprecated The service has bad uptime. Use `faker.image.url()` or `faker.image.dataUri()` instead. */ urlPlaceholder( options: { /** * The width of the image. * - * @default faker.number.int({ min: 1, max: 3999 }) + * @default faker.number.int({ min: 1, max: 3500 }) */ width?: number; /** * The height of the image. * - * @default faker.number.int({ min: 1, max: 3999 }) + * @default faker.number.int({ min: 1, max: 3500 }) */ height?: number; /** @@ -300,9 +302,16 @@ export class ImageModule extends ModuleBase { text?: string; } = {} ): string { + deprecated({ + deprecated: 'faker.image.urlPlaceholder()', + proposed: 'faker.image.url() or faker.image.dataUri()', + since: '9.4.0', + until: '10.0.0', + }); + const { - width = this.faker.number.int({ min: 1, max: 3999 }), - height = this.faker.number.int({ min: 1, max: 3999 }), + width = this.faker.number.int({ min: 1, max: 3500 }), + height = this.faker.number.int({ min: 1, max: 3500 }), backgroundColor = this.faker.color.rgb({ format: 'hex', prefix: '' }), textColor = this.faker.color.rgb({ format: 'hex', prefix: '' }), format = this.faker.helpers.arrayElement([ @@ -369,7 +378,7 @@ export class ImageModule extends ModuleBase { * The type of the image to return. Consisting of * the file extension and the used encoding. * - * @default faker.helpers.arrayElements(['svg-uri', 'svg-base64']) + * @default faker.helpers.arrayElement(['svg-uri', 'svg-base64']) */ type?: 'svg-uri' | 'svg-base64'; } = {} @@ -378,7 +387,7 @@ export class ImageModule extends ModuleBase { width = this.faker.number.int({ min: 1, max: 3999 }), height = this.faker.number.int({ min: 1, max: 3999 }), color = this.faker.color.rgb(), - type = this.faker.helpers.arrayElements(['svg-uri', 'svg-base64']), + type = this.faker.helpers.arrayElement(['svg-uri', 'svg-base64']), } = options; const svgString = ` should format array 1`] = `"[ 1, '2' ]"`; + +exports[`formatResult > should format bigint 1`] = `"135464154865415n"`; + +exports[`formatResult > should format number 1`] = `"123"`; + +exports[`formatResult > should format object 1`] = `"{ 'a': 1, 'b': '2' }"`; + +exports[`formatResult > should format string 1`] = `"'a simple string'"`; + +exports[`formatResult > should format string with new lines 1`] = `"'string\\nwith\\nnew\\nlines'"`; + +exports[`formatResult > should format string with special characters 1`] = `"'string with "special" characters'"`; + +exports[`formatResult > should format undefined 1`] = `"undefined"`; diff --git a/test/docs/format.spec.ts b/test/docs/format.spec.ts new file mode 100644 index 00000000000..bc4a0d6638e --- /dev/null +++ b/test/docs/format.spec.ts @@ -0,0 +1,69 @@ +import { describe, expect, it } from 'vitest'; +import { formatResult } from '../../docs/.vitepress/components/api-docs/format'; + +describe('formatResult', () => { + it('should format undefined', () => { + const value = undefined; + const actual = formatResult(value); + + expect(actual).toBeTypeOf('string'); + expect(actual).toBe('undefined'); + expect(actual).toMatchSnapshot(); + }); + + it('should format bigint', () => { + const actual = formatResult(135464154865415n); + + expect(actual).toBeTypeOf('string'); + expect(actual).toMatchSnapshot(); + }); + + it('should format object', () => { + const actual = formatResult({ a: 1, b: '2' }); + + expect(actual).toBeTypeOf('string'); + expect(actual).toMatchSnapshot(); + }); + + it('should format array', () => { + const actual = formatResult([1, '2']); + + expect(actual).toBeTypeOf('string'); + expect(actual).toMatchSnapshot(); + }); + + it('should format string', () => { + const actual = formatResult('a simple string'); + + expect(actual).toBeTypeOf('string'); + expect(actual).toMatchSnapshot(); + }); + + it('should format string with special characters', () => { + const actual = formatResult('string with "special" characters'); + + expect(actual).toBeTypeOf('string'); + expect(actual).toMatchSnapshot(); + }); + + it('should format string with new lines', () => { + const actual = formatResult('string\nwith\nnew\nlines'); + + expect(actual).toBeTypeOf('string'); + expect(actual).toMatchSnapshot(); + }); + + it('should format number', () => { + const actual = formatResult(123); + + expect(actual).toBeTypeOf('string'); + expect(actual).toMatchSnapshot(); + }); + + it('should format Date', () => { + const actual = formatResult(new Date(Date.UTC(2025, 0, 1))); + + expect(actual).toBeTypeOf('string'); + expect(actual).toMatchSnapshot(); + }); +}); diff --git a/test/integration/modules/image.spec.ts b/test/integration/modules/image.spec.ts index 13b37a70a79..611317c610b 100644 --- a/test/integration/modules/image.spec.ts +++ b/test/integration/modules/image.spec.ts @@ -112,6 +112,7 @@ describe('image', () => { describe('urlPlaceholder', () => { it('should return a random image url from Placeholder', async () => { + // eslint-disable-next-line @typescript-eslint/no-deprecated const actual = faker.image.urlPlaceholder(); await assertWorkingUrl(actual); }); diff --git a/test/modules/__snapshots__/helpers.spec.ts.snap b/test/modules/__snapshots__/helpers.spec.ts.snap index 92801e06703..44aa22a5314 100644 --- a/test/modules/__snapshots__/helpers.spec.ts.snap +++ b/test/modules/__snapshots__/helpers.spec.ts.snap @@ -71,9 +71,9 @@ exports[`helpers > 42 > fromRegExp > with static string 1`] = `"Hello World!"`; exports[`helpers > 42 > fromRegExp > with wildcard character 1`] = `"."`; -exports[`helpers > 42 > fromRegExp > with wildcard character and min max quantifier 1`] = `".."`; +exports[`helpers > 42 > fromRegExp > with wildcard character and min max quantifier 1`] = `"WJ"`; -exports[`helpers > 42 > fromRegExp > with wildcard character and quantifier 1`] = `"..."`; +exports[`helpers > 42 > fromRegExp > with wildcard character and quantifier 1`] = `"nWJ"`; exports[`helpers > 42 > maybe > with only value 1`] = `"Hello World!"`; @@ -293,9 +293,9 @@ exports[`helpers > 1211 > fromRegExp > with static string 1`] = `"Hello World!"` exports[`helpers > 1211 > fromRegExp > with wildcard character 1`] = `"."`; -exports[`helpers > 1211 > fromRegExp > with wildcard character and min max quantifier 1`] = `"....."`; +exports[`helpers > 1211 > fromRegExp > with wildcard character and min max quantifier 1`] = `"TdZFG"`; -exports[`helpers > 1211 > fromRegExp > with wildcard character and quantifier 1`] = `"..."`; +exports[`helpers > 1211 > fromRegExp > with wildcard character and quantifier 1`] = `"VTd"`; exports[`helpers > 1211 > maybe > with only value 1`] = `undefined`; @@ -510,9 +510,9 @@ exports[`helpers > 1337 > fromRegExp > with static string 1`] = `"Hello World!"` exports[`helpers > 1337 > fromRegExp > with wildcard character 1`] = `"."`; -exports[`helpers > 1337 > fromRegExp > with wildcard character and min max quantifier 1`] = `".."`; +exports[`helpers > 1337 > fromRegExp > with wildcard character and min max quantifier 1`] = `"9h"`; -exports[`helpers > 1337 > fromRegExp > with wildcard character and quantifier 1`] = `"..."`; +exports[`helpers > 1337 > fromRegExp > with wildcard character and quantifier 1`] = `"g9h"`; exports[`helpers > 1337 > maybe > with only value 1`] = `"Hello World!"`; diff --git a/test/modules/__snapshots__/image.spec.ts.snap b/test/modules/__snapshots__/image.spec.ts.snap index dac7d0783c4..bccdada46d1 100644 --- a/test/modules/__snapshots__/image.spec.ts.snap +++ b/test/modules/__snapshots__/image.spec.ts.snap @@ -20,7 +20,7 @@ exports[`image > 42 > dataUri > with type 1`] = `"data:image/svg+xml;base64,PHN2 exports[`image > 42 > dataUri > with width 1`] = `"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIxMjgiIGhlaWdodD0iMTQ5OCI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0iI2VhZDMzMSIvPjx0ZXh0IHg9IjY0IiB5PSI3NDkiIGZvbnQtc2l6ZT0iMjAiIGFsaWdubWVudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSJ3aGl0ZSI+MTI4eDE0OTg8L3RleHQ+PC9zdmc+"`; -exports[`image > 42 > dataUri > with width and height 1`] = `"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4Ij48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjOGVhZDMzIi8+PHRleHQgeD0iNjQiIHk9IjY0IiBmb250LXNpemU9IjIwIiBhbGlnbm1lbnQtYmFzZWxpbmU9Im1pZGRsZSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0id2hpdGUiPjEyOHgxMjg8L3RleHQ+PC9zdmc+"`; +exports[`image > 42 > dataUri > with width and height 1`] = `"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%22128%22%20height%3D%22128%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22%238ead33%22%2F%3E%3Ctext%20x%3D%2264%22%20y%3D%2264%22%20font-size%3D%2220%22%20alignment-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20fill%3D%22white%22%3E128x128%3C%2Ftext%3E%3C%2Fsvg%3E"`; exports[`image > 42 > url > noArgs 1`] = `"https://picsum.photos/seed/993RBH1Y/1498/3802"`; @@ -56,23 +56,23 @@ exports[`image > 42 > urlPicsumPhotos > with width 1`] = `"https://picsum.photos exports[`image > 42 > urlPicsumPhotos > with width and height 1`] = `"https://picsum.photos/seed/B993RBH1Y/128/128?grayscale&blur=10"`; -exports[`image > 42 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/1498x3802/ad331d/df0fc4.gif?text=auctus%20cognomen%20esse"`; +exports[`image > 42 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/1311x3328/ad331d/df0fc4.gif?text=auctus%20cognomen%20esse"`; exports[`image > 42 > urlPlaceholder > with all options 1`] = `"https://via.placeholder.com/128x128/FF0000/0000FF.png?text=hello"`; -exports[`image > 42 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/1498x3802/FF0000/ad331d.png?text=suggero%20accusator%20volubilis"`; +exports[`image > 42 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/1311x3328/FF0000/ad331d.png?text=suggero%20accusator%20volubilis"`; exports[`image > 42 > urlPlaceholder > with empty colors and text 1`] = `"https://via.placeholder.com/128x128//.png?text="`; -exports[`image > 42 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/1498x3802/ad331d/df0fc4.webp?text=attonbitus%20auctus%20cognomen"`; +exports[`image > 42 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/1311x3328/ad331d/df0fc4.webp?text=attonbitus%20auctus%20cognomen"`; -exports[`image > 42 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/1498x128/ead331/ddf0fc.jpeg?text=attonbitus%20auctus%20cognomen"`; +exports[`image > 42 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/1311x128/ead331/ddf0fc.jpeg?text=attonbitus%20auctus%20cognomen"`; -exports[`image > 42 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/1498x3802/ad331d/df0fc4.gif?text=Hello"`; +exports[`image > 42 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/1311x3328/ad331d/df0fc4.gif?text=Hello"`; -exports[`image > 42 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/1498x3802/ad331d/0000FF.png?text=suggero%20accusator%20volubilis"`; +exports[`image > 42 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/1311x3328/ad331d/0000FF.png?text=suggero%20accusator%20volubilis"`; -exports[`image > 42 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x1498/ead331/ddf0fc.jpeg?text=attonbitus%20auctus%20cognomen"`; +exports[`image > 42 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x1311/ead331/ddf0fc.jpeg?text=attonbitus%20auctus%20cognomen"`; exports[`image > 42 > urlPlaceholder > with width and height 1`] = `"https://via.placeholder.com/128x128/8ead33/1ddf0f.webp?text=benevolentia%20attonbitus%20auctus"`; @@ -88,13 +88,13 @@ exports[`image > 1211 > dataUri > with all options+base64 1`] = `"data:image/svg exports[`image > 1211 > dataUri > with all options+uri 1`] = `"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%2242%22%20height%3D%22314%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22red%22%2F%3E%3Ctext%20x%3D%2221%22%20y%3D%22157%22%20font-size%3D%2220%22%20alignment-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20fill%3D%22white%22%3E42x314%3C%2Ftext%3E%3C%2Fsvg%3E"`; -exports[`image > 1211 > dataUri > with color 1`] = `"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIzNzE0IiBoZWlnaHQ9IjM1NzMiPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9ImJsdWUiLz48dGV4dCB4PSIxODU3IiB5PSIxNzg2LjUiIGZvbnQtc2l6ZT0iMjAiIGFsaWdubWVudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSJ3aGl0ZSI+MzcxNHgzNTczPC90ZXh0Pjwvc3ZnPg=="`; +exports[`image > 1211 > dataUri > with color 1`] = `"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%223714%22%20height%3D%223573%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22blue%22%2F%3E%3Ctext%20x%3D%221857%22%20y%3D%221786.5%22%20font-size%3D%2220%22%20alignment-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20fill%3D%22white%22%3E3714x3573%3C%2Ftext%3E%3C%2Fsvg%3E"`; -exports[`image > 1211 > dataUri > with height 1`] = `"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIzNzE0IiBoZWlnaHQ9IjEyOCI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0iI2Q0ZmVmYSIvPjx0ZXh0IHg9IjE4NTciIHk9IjY0IiBmb250LXNpemU9IjIwIiBhbGlnbm1lbnQtYmFzZWxpbmU9Im1pZGRsZSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0id2hpdGUiPjM3MTR4MTI4PC90ZXh0Pjwvc3ZnPg=="`; +exports[`image > 1211 > dataUri > with height 1`] = `"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%223714%22%20height%3D%22128%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22%23d4fefa%22%2F%3E%3Ctext%20x%3D%221857%22%20y%3D%2264%22%20font-size%3D%2220%22%20alignment-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20fill%3D%22white%22%3E3714x128%3C%2Ftext%3E%3C%2Fsvg%3E"`; exports[`image > 1211 > dataUri > with type 1`] = `"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIzNzE0IiBoZWlnaHQ9IjM1NzMiPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9IiM0ZmVmYTciLz48dGV4dCB4PSIxODU3IiB5PSIxNzg2LjUiIGZvbnQtc2l6ZT0iMjAiIGFsaWdubWVudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSJ3aGl0ZSI+MzcxNHgzNTczPC90ZXh0Pjwvc3ZnPg=="`; -exports[`image > 1211 > dataUri > with width 1`] = `"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIxMjgiIGhlaWdodD0iMzcxNCI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0iI2Q0ZmVmYSIvPjx0ZXh0IHg9IjY0IiB5PSIxODU3IiBmb250LXNpemU9IjIwIiBhbGlnbm1lbnQtYmFzZWxpbmU9Im1pZGRsZSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0id2hpdGUiPjEyOHgzNzE0PC90ZXh0Pjwvc3ZnPg=="`; +exports[`image > 1211 > dataUri > with width 1`] = `"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%22128%22%20height%3D%223714%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22%23d4fefa%22%2F%3E%3Ctext%20x%3D%2264%22%20y%3D%221857%22%20font-size%3D%2220%22%20alignment-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20fill%3D%22white%22%3E128x3714%3C%2Ftext%3E%3C%2Fsvg%3E"`; exports[`image > 1211 > dataUri > with width and height 1`] = `"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4Ij48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZWQ0ZmVmIi8+PHRleHQgeD0iNjQiIHk9IjY0IiBmb250LXNpemU9IjIwIiBhbGlnbm1lbnQtYmFzZWxpbmU9Im1pZGRsZSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0id2hpdGUiPjEyOHgxMjg8L3RleHQ+PC9zdmc+"`; @@ -132,23 +132,23 @@ exports[`image > 1211 > urlPicsumPhotos > with width 1`] = `"https://picsum.phot exports[`image > 1211 > urlPicsumPhotos > with width and height 1`] = `"https://picsum.photos/seed/ZFGLlH/128/128?blur=9"`; -exports[`image > 1211 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/3714x3573/4fefa7/fbaec9.webp?text=unde%20blanditiis%20officia"`; +exports[`image > 1211 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/3250x3128/4fefa7/fbaec9.webp?text=unde%20blanditiis%20officia"`; exports[`image > 1211 > urlPlaceholder > with all options 1`] = `"https://via.placeholder.com/128x128/FF0000/0000FF.png?text=hello"`; -exports[`image > 1211 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/3714x3573/FF0000/4fefa7.png?text=tonsor%20tenuis%20sollers"`; +exports[`image > 1211 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/3250x3128/FF0000/4fefa7.png?text=tonsor%20tenuis%20sollers"`; exports[`image > 1211 > urlPlaceholder > with empty colors and text 1`] = `"https://via.placeholder.com/128x128//.png?text="`; -exports[`image > 1211 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/3714x3573/4fefa7/fbaec9.webp?text=usque%20unde%20blanditiis"`; +exports[`image > 1211 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/3250x3128/4fefa7/fbaec9.webp?text=usque%20unde%20blanditiis"`; -exports[`image > 1211 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/3714x128/d4fefa/7fbaec.jpg?text=usque%20unde%20blanditiis"`; +exports[`image > 1211 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/3250x128/d4fefa/7fbaec.jpg?text=usque%20unde%20blanditiis"`; -exports[`image > 1211 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/3714x3573/4fefa7/fbaec9.webp?text=Hello"`; +exports[`image > 1211 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/3250x3128/4fefa7/fbaec9.webp?text=Hello"`; -exports[`image > 1211 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/3714x3573/4fefa7/0000FF.png?text=tonsor%20tenuis%20sollers"`; +exports[`image > 1211 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/3250x3128/4fefa7/0000FF.png?text=tonsor%20tenuis%20sollers"`; -exports[`image > 1211 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x3714/d4fefa/7fbaec.jpg?text=usque%20unde%20blanditiis"`; +exports[`image > 1211 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x3250/d4fefa/7fbaec.jpg?text=usque%20unde%20blanditiis"`; exports[`image > 1211 > urlPlaceholder > with width and height 1`] = `"https://via.placeholder.com/128x128/ed4fef/a7fbae.webp?text=dapifer%20usque%20unde"`; @@ -164,7 +164,7 @@ exports[`image > 1337 > dataUri > with all options+base64 1`] = `"data:image/svg exports[`image > 1337 > dataUri > with all options+uri 1`] = `"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%2242%22%20height%3D%22314%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22red%22%2F%3E%3Ctext%20x%3D%2221%22%20y%3D%22157%22%20font-size%3D%2220%22%20alignment-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20fill%3D%22white%22%3E42x314%3C%2Ftext%3E%3C%2Fsvg%3E"`; -exports[`image > 1337 > dataUri > with color 1`] = `"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIxMDQ4IiBoZWlnaHQ9IjYzNSI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0iYmx1ZSIvPjx0ZXh0IHg9IjUyNCIgeT0iMzE3LjUiIGZvbnQtc2l6ZT0iMjAiIGFsaWdubWVudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSJ3aGl0ZSI+MTA0OHg2MzU8L3RleHQ+PC9zdmc+"`; +exports[`image > 1337 > dataUri > with color 1`] = `"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%221048%22%20height%3D%22635%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22blue%22%2F%3E%3Ctext%20x%3D%22524%22%20y%3D%22317.5%22%20font-size%3D%2220%22%20alignment-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20fill%3D%22white%22%3E1048x635%3C%2Ftext%3E%3C%2Fsvg%3E"`; exports[`image > 1337 > dataUri > with height 1`] = `"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIxMDQ4IiBoZWlnaHQ9IjEyOCI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0iIzM2YTdiNSIvPjx0ZXh0IHg9IjUyNCIgeT0iNjQiIGZvbnQtc2l6ZT0iMjAiIGFsaWdubWVudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSJ3aGl0ZSI+MTA0OHgxMjg8L3RleHQ+PC9zdmc+"`; @@ -172,7 +172,7 @@ exports[`image > 1337 > dataUri > with type 1`] = `"data:image/svg+xml;base64,PH exports[`image > 1337 > dataUri > with width 1`] = `"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIxMjgiIGhlaWdodD0iMTA0OCI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0iIzM2YTdiNSIvPjx0ZXh0IHg9IjY0IiB5PSI1MjQiIGZvbnQtc2l6ZT0iMjAiIGFsaWdubWVudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSJ3aGl0ZSI+MTI4eDEwNDg8L3RleHQ+PC9zdmc+"`; -exports[`image > 1337 > dataUri > with width and height 1`] = `"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4Ij48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjNTM2YTdiIi8+PHRleHQgeD0iNjQiIHk9IjY0IiBmb250LXNpemU9IjIwIiBhbGlnbm1lbnQtYmFzZWxpbmU9Im1pZGRsZSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0id2hpdGUiPjEyOHgxMjg8L3RleHQ+PC9zdmc+"`; +exports[`image > 1337 > dataUri > with width and height 1`] = `"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%22128%22%20height%3D%22128%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22%23536a7b%22%2F%3E%3Ctext%20x%3D%2264%22%20y%3D%2264%22%20font-size%3D%2220%22%20alignment-baseline%3D%22middle%22%20text-anchor%3D%22middle%22%20fill%3D%22white%22%3E128x128%3C%2Ftext%3E%3C%2Fsvg%3E"`; exports[`image > 1337 > url > noArgs 1`] = `"https://loremflickr.com/1048/635?lock=4137158724208997"`; @@ -208,22 +208,22 @@ exports[`image > 1337 > urlPicsumPhotos > with width 1`] = `"https://picsum.phot exports[`image > 1337 > urlPicsumPhotos > with width and height 1`] = `"https://picsum.photos/seed/sjwgYJ/128/128?grayscale&blur=1"`; -exports[`image > 1337 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/1048x635/6a7b5f/a28d2f.jpg?text=testimonium%20thalassinus%20contra"`; +exports[`image > 1337 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/918x556/6a7b5f/a28d2f.jpg?text=testimonium%20thalassinus%20contra"`; exports[`image > 1337 > urlPlaceholder > with all options 1`] = `"https://via.placeholder.com/128x128/FF0000/0000FF.png?text=hello"`; -exports[`image > 1337 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/1048x635/FF0000/6a7b5f.png?text=ancilla%20creptio%20quisquam"`; +exports[`image > 1337 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/918x556/FF0000/6a7b5f.png?text=ancilla%20creptio%20quisquam"`; exports[`image > 1337 > urlPlaceholder > with empty colors and text 1`] = `"https://via.placeholder.com/128x128//.png?text="`; -exports[`image > 1337 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/1048x635/6a7b5f/a28d2f.webp?text=decipio%20testimonium%20thalassinus"`; +exports[`image > 1337 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/918x556/6a7b5f/a28d2f.webp?text=decipio%20testimonium%20thalassinus"`; -exports[`image > 1337 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/1048x128/36a7b5/fa28d2.webp?text=decipio%20testimonium%20thalassinus"`; +exports[`image > 1337 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/918x128/36a7b5/fa28d2.webp?text=decipio%20testimonium%20thalassinus"`; -exports[`image > 1337 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/1048x635/6a7b5f/a28d2f.jpg?text=Hello"`; +exports[`image > 1337 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/918x556/6a7b5f/a28d2f.jpg?text=Hello"`; -exports[`image > 1337 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/1048x635/6a7b5f/0000FF.png?text=ancilla%20creptio%20quisquam"`; +exports[`image > 1337 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/918x556/6a7b5f/0000FF.png?text=ancilla%20creptio%20quisquam"`; -exports[`image > 1337 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x1048/36a7b5/fa28d2.webp?text=decipio%20testimonium%20thalassinus"`; +exports[`image > 1337 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x918/36a7b5/fa28d2.webp?text=decipio%20testimonium%20thalassinus"`; exports[`image > 1337 > urlPlaceholder > with width and height 1`] = `"https://via.placeholder.com/128x128/536a7b/5fa28d.gif?text=vorago%20decipio%20testimonium"`; diff --git a/test/modules/__snapshots__/internet.spec.ts.snap b/test/modules/__snapshots__/internet.spec.ts.snap index ffb6f56419c..37d8c074853 100644 --- a/test/modules/__snapshots__/internet.spec.ts.snap +++ b/test/modules/__snapshots__/internet.spec.ts.snap @@ -254,7 +254,7 @@ exports[`internet > 1211 > url > with slash appended 1`] = `"https://velvety-tar exports[`internet > 1211 > url > without slash appended and with http protocol 1`] = `"http://velvety-tarragon.biz"`; -exports[`internet > 1211 > userAgent 1`] = `"Mozilla/5.0 (Linux; Android 13; SM-G998B) AppleWebKit/605.67 (KHTML, like Gecko) Chrome/107.7.3.6 Mobile Safari/592.76"`; +exports[`internet > 1211 > userAgent 1`] = `"Mozilla/5.0 (Linux; Android 13; SM-G998B) AppleWebKit/605.67 (KHTML, like Gecko) Chrome/107.7.7.14 Mobile Safari/592.76"`; exports[`internet > 1211 > userName > noArgs 1`] = `"Dane35"`; diff --git a/test/modules/__snapshots__/system.spec.ts.snap b/test/modules/__snapshots__/system.spec.ts.snap index 94ef08ad521..a9985b2fc7e 100644 --- a/test/modules/__snapshots__/system.spec.ts.snap +++ b/test/modules/__snapshots__/system.spec.ts.snap @@ -78,7 +78,7 @@ exports[`system > 42 > networkInterface > with {"interfaceType":"ww"} 1`] = `"ww exports[`system > 42 > networkInterface > with {} 1`] = `"wlp5s1f0"`; -exports[`system > 42 > semver 1`] = `"3.9.7"`; +exports[`system > 42 > semver 1`] = `"3.19.15"`; exports[`system > 1211 > commonFileExt 1`] = `"shtml"`; @@ -158,7 +158,7 @@ exports[`system > 1211 > networkInterface > with {"interfaceType":"ww"} 1`] = `" exports[`system > 1211 > networkInterface > with {} 1`] = `"P9wwp6s6d6"`; -exports[`system > 1211 > semver 1`] = `"9.8.2"`; +exports[`system > 1211 > semver 1`] = `"9.18.4"`; exports[`system > 1337 > commonFileExt 1`] = `"wav"`; @@ -238,4 +238,4 @@ exports[`system > 1337 > networkInterface > with {"interfaceType":"ww"} 1`] = `" exports[`system > 1337 > networkInterface > with {} 1`] = `"eno2"`; -exports[`system > 1337 > semver 1`] = `"2.1.2"`; +exports[`system > 1337 > semver 1`] = `"2.3.5"`; diff --git a/test/modules/helpers.spec.ts b/test/modules/helpers.spec.ts index 13c66f371b8..241e8f52d84 100644 --- a/test/modules/helpers.spec.ts +++ b/test/modules/helpers.spec.ts @@ -543,29 +543,127 @@ describe('helpers', () => { }); describe('fromRegExp()', () => { - it('deals with range repeat', () => { - const string = faker.helpers.fromRegExp(/#{5,10}/); - expect(string.length).toBeLessThanOrEqual(10); - expect(string.length).toBeGreaterThanOrEqual(5); - expect(string).toMatch(/^#{5,10}$/); + describe('single character patterns', () => { + it('handles case sensitive characters', () => { + const actual = faker.helpers.fromRegExp(/w/); + expect(actual).toHaveLength(1); + expect(actual).not.toContain('W'); + expect(actual).toBe('w'); + expect(actual).toMatch(/^w$/); + }); + + it.skip('handles case insensitive characters', () => { + const set = new Set(); + for (let i = 0; i < 100; i++) { + const actual = faker.helpers.fromRegExp(/w/i); + expect(actual).toHaveLength(1); + expect(actual).toMatch(/^W$/i); + set.add(actual); + } + + expect(set.size).toBe(2); + }); + + it('handles case insensitive symbols', () => { + const actual = faker.helpers.fromRegExp(/%/i); + expect(actual).toHaveLength(1); + expect(actual).toBe('%'); + expect(actual).toMatch(/^%$/i); + }); + + it.skip('handles the wildcard character', () => { + const set = new Set(); + for (let i = 0; i < 100; i++) { + const actual = faker.helpers.fromRegExp(/./); + expect(actual).toHaveLength(1); + expect(actual).toMatch(/^.$/); + set.add(actual); + } + + expect(set.size).toBeGreaterThan(5); + }); + }); + + describe('fixed length patterns', () => { + it('handles case sensitive characters', () => { + const actual = faker.helpers.fromRegExp(/w{100}/); + expect(actual).toHaveLength(100); + expect(actual).not.toContain('W'); + expect(actual).toContain('w'); + expect(actual).toBe('w'.repeat(100)); + expect(actual).toMatch(/^w{100}$/); + }); + + it('handles case insensitive characters', () => { + const actual = faker.helpers.fromRegExp(/w{100}/i); + expect(actual).toHaveLength(100); + expect(actual).toContain('W'); + expect(actual).toContain('w'); + expect(actual).toMatch(/^W{100}$/i); + }); + + it('handles case insensitive symbols', () => { + const actual = faker.helpers.fromRegExp(/%{100}/i); + expect(actual).toHaveLength(100); + expect(actual).toBe('%'.repeat(100)); + expect(actual).toMatch(/^%{100}$/); + }); + + it('handles the wildcard character', () => { + const actual = faker.helpers.fromRegExp(/.{100}/); + expect(actual).toHaveLength(100); + expect(actual).toMatch(/^.{100}$/); + const set = new Set(actual); + expect(set.size).toBeGreaterThan(5); + }); }); - it('repeats string {n} number of times', () => { - expect(faker.helpers.fromRegExp('%{10}')).toBe('%'.repeat(10)); - expect(faker.helpers.fromRegExp('%{30}')).toBe('%'.repeat(30)); - expect(faker.helpers.fromRegExp('%{5}')).toBe('%'.repeat(5)); + describe('length range patterns', () => { + it('handles case sensitive characters', () => { + const actual = faker.helpers.fromRegExp(/w{5,10}/); + expect(actual.length).toBeGreaterThanOrEqual(5); + expect(actual.length).toBeLessThanOrEqual(10); + expect(actual).not.toContain('W'); + expect(actual).toContain('w'); + expect(actual).toMatch(/^w{5,10}$/); + }); + + it('handles case insensitive characters', () => { + const actual = faker.helpers.fromRegExp(/w{50,100}/i); + expect(actual.length).toBeGreaterThanOrEqual(50); + expect(actual.length).toBeLessThanOrEqual(100); + expect(actual).toContain('W'); + expect(actual).toContain('w'); + expect(actual).toMatch(/^W{50,100}$/i); + }); + + it('handles case insensitive symbols', () => { + const actual = faker.helpers.fromRegExp(/%{50,100}/i); + expect(actual.length).toBeGreaterThanOrEqual(50); + expect(actual.length).toBeLessThanOrEqual(100); + expect(actual).toMatch(/^%{50,100}$/); + }); + + it('handles the wildcard character', () => { + const actual = faker.helpers.fromRegExp(/.{50,100}/); + expect(actual.length).toBeGreaterThanOrEqual(50); + expect(actual.length).toBeLessThanOrEqual(100); + expect(actual).toMatch(/^.{50,100}$/); + const set = new Set(actual); + expect(set.size).toBeGreaterThan(5); + }); }); it('creates a numerical range', () => { - const string = faker.helpers.fromRegExp('Hello[0-9]'); - expect(string).toMatch(/^Hello[0-9]$/); + const actual = faker.helpers.fromRegExp('Hello[0-9]'); + expect(actual).toMatch(/^Hello[0-9]$/); }); it('deals with multiple tokens in one string', () => { - const string = faker.helpers.fromRegExp( + const actual = faker.helpers.fromRegExp( 'Test#{5}%{2,5}Testing*[1-5]{10}END' ); - expect(string).toMatch(/^Test#{5}%{2,5}Testing*[1-5]{10}END$/); + expect(actual).toMatch(/^Test#{5}%{2,5}Testing*[1-5]{10}END$/); }); it('throws error when min > max outside set', () => { @@ -577,18 +675,20 @@ describe('helpers', () => { }); it('deals with RegExp object', () => { - const string = faker.helpers.fromRegExp(/[A-D0-9]{4}-[A-D0-9]{4}/); - expect(string).toMatch(/^[A-D0-9]{4}-[A-D0-9]{4}$/); + const actual = faker.helpers.fromRegExp(/[A-D0-9]{4}-[A-D0-9]{4}/); + expect(actual).toMatch(/^[A-D0-9]{4}-[A-D0-9]{4}$/); }); it('doesnt include negated characters', () => { - const string = faker.helpers.fromRegExp(/[^a-t0-9]{4}/i); - expect(string).toMatch(/[^a-t0-9]{4}/); + const actual = faker.helpers.fromRegExp(/[^a-t0-9]{4}/i); + expect(actual).toHaveLength(4); + expect(actual).toMatch(/[^a-t0-9]{4}/); }); it('handles case insensitive flags', () => { - const string = faker.helpers.fromRegExp(/[A-D0-9]{4}-[A-D0-9]{4}/i); - expect(string).toMatch(/^[A-D0-9]{4}-[A-D0-9]{4}$/i); + const actual = faker.helpers.fromRegExp(/[A-D0-9]{4}-[A-D0-9]{4}/i); + expect(actual).toHaveLength(9); + expect(actual).toMatch(/^[A-D0-9]{4}-[A-D0-9]{4}$/i); }); }); diff --git a/test/modules/image.spec.ts b/test/modules/image.spec.ts index 36be582d8a5..2f9b0f024a8 100644 --- a/test/modules/image.spec.ts +++ b/test/modules/image.spec.ts @@ -202,6 +202,7 @@ describe('image', () => { describe('urlPlaceholder', () => { it('should return a random image url from Placeholder', () => { + // eslint-disable-next-line @typescript-eslint/no-deprecated const actual = faker.image.urlPlaceholder(); assertValidUrl(actual); diff --git a/test/scripts/apidocs/__snapshots__/page.spec.ts.snap b/test/scripts/apidocs/__snapshots__/page.spec.ts.snap new file mode 100644 index 00000000000..4824c101ab5 --- /dev/null +++ b/test/scripts/apidocs/__snapshots__/page.spec.ts.snap @@ -0,0 +1,97 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`toRefreshFunction > should handle multiline calls 1`] = ` +"async (): Promise => { + await enableFaker(); + faker.seed(); + faker.setDefaultRefDate(); + const result: unknown[] = []; + + try { + result.push( + faker.number.int({ + min: 1, + max: 10, + }) + ); + } catch (error: unknown) { + result.push(error instanceof Error ? error.name : 'Error'); + } + + return result; +}" +`; + +exports[`toRefreshFunction > should handle multiple calls 1`] = ` +"async (): Promise => { + await enableFaker(); + faker.seed(); + faker.setDefaultRefDate(); + const result: unknown[] = []; + + try { + result.push(faker.number.int()); + } catch (error: unknown) { + result.push(error instanceof Error ? error.name : 'Error'); + } + + try { + result.push(faker.number.int()); + } catch (error: unknown) { + result.push(error instanceof Error ? error.name : 'Error'); + } + + return result; +}" +`; + +exports[`toRefreshFunction > should handle properties after calls 1`] = ` +"async (): Promise => { + await enableFaker(); + faker.seed(); + faker.setDefaultRefDate(); + const result: unknown[] = []; + + try { + result.push(faker.airline.airport().name); + } catch (error: unknown) { + result.push(error instanceof Error ? error.name : 'Error'); + } + + return result; +}" +`; + +exports[`toRefreshFunction > should handle single line calls with semicolon 1`] = ` +"async (): Promise => { + await enableFaker(); + faker.seed(); + faker.setDefaultRefDate(); + const result: unknown[] = []; + + try { + result.push(faker.number.int()); + } catch (error: unknown) { + result.push(error instanceof Error ? error.name : 'Error'); + } + + return result; +}" +`; + +exports[`toRefreshFunction > should handle single line calls without semicolon 1`] = ` +"async (): Promise => { + await enableFaker(); + faker.seed(); + faker.setDefaultRefDate(); + const result: unknown[] = []; + + try { + result.push(faker.number.int()); + } catch (error: unknown) { + result.push(error instanceof Error ? error.name : 'Error'); + } + + return result; +}" +`; diff --git a/test/scripts/apidocs/page.spec.ts b/test/scripts/apidocs/page.spec.ts new file mode 100644 index 00000000000..00fd4da2277 --- /dev/null +++ b/test/scripts/apidocs/page.spec.ts @@ -0,0 +1,114 @@ +import { describe, expect, it } from 'vitest'; +import { toRefreshFunction } from '../../../scripts/apidocs/output/page'; +import type { RawApiDocsMethod } from '../../../scripts/apidocs/processing/method'; +import type { RawApiDocsSignature } from '../../../scripts/apidocs/processing/signature'; + +function newTestMethod( + signature: Partial +): RawApiDocsMethod { + return { + name: 'test', + signatures: [ + { + deprecated: 'deprecated', + description: 'description', + since: 'since', + parameters: [], + returns: { + type: 'simple', + text: 'returns', + }, + throws: [], + signature: 'signature', + examples: [], + seeAlsos: [], + ...signature, + }, + ], + source: { + filePath: 'test/page.spec.ts', + line: 1, + column: 1, + }, + }; +} + +describe('toRefreshFunction', () => { + it("should return 'undefined' when there are no faker calls", async () => { + // given + const method = newTestMethod({ + examples: ['const a = 1;'], + }); + + // when + const result = await toRefreshFunction(method); + + // then + expect(result).toBe('undefined'); + }); + + it('should handle single line calls with semicolon', async () => { + // given + const method = newTestMethod({ + examples: ['faker.number.int(); // 834135'], + }); + + // when + const result = await toRefreshFunction(method); + + // then + expect(result).toMatchSnapshot(); + }); + + it('should handle single line calls without semicolon', async () => { + // given + const method = newTestMethod({ + examples: ['faker.number.int() // 834135'], + }); + + // when + const result = await toRefreshFunction(method); + + // then + expect(result).toMatchSnapshot(); + }); + + it('should handle multiple calls', async () => { + // given + const method = newTestMethod({ + examples: ['faker.number.int()', 'faker.number.int()'], + }); + + // when + const result = await toRefreshFunction(method); + + // then + expect(result).toMatchSnapshot(); + }); + + it('should handle multiline calls', async () => { + // given + const method = newTestMethod({ + examples: 'faker.number.int({\n min: 1,\n max: 10\n})'.split('\n'), + }); + + // when + const result = await toRefreshFunction(method); + + // then + expect(result).toMatchSnapshot(); + }); + + it('should handle properties after calls', async () => { + // given + const method = newTestMethod({ + examples: ['faker.airline.airport().name'], + }); + + // when + const result = await toRefreshFunction(method); + + // then + expect(result).toMatchSnapshot(); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index c8ffb862324..388a8f79c31 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,6 +14,8 @@ "exclude": [ "node_modules", "dist", + // Ignore the generated API documentation + "docs/api", // required for the signature related tests on macOS #2280 "test/scripts/apidocs/temp" ]