From fa1ec54fd77ca0ca948359d1d4c65f86c0863b4a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 22:39:49 +0200 Subject: [PATCH 01/14] chore(deps): update doc-dependencies (#1482) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 6 +++--- pnpm-lock.yaml | 40 ++++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 6f770746a3f..2a83079484d 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@types/markdown-it": "~12.2.3", "@types/node": "~18.8.4", "@types/prettier": "~2.7.1", - "@types/react": "~18.0.21", + "@types/react": "~18.0.22", "@types/sanitize-html": "~2.6.2", "@types/semver": "~7.3.12", "@types/validator": "~13.7.9", @@ -132,12 +132,12 @@ "simple-git-hooks": "~2.8.1", "standard-version": "~9.5.0", "tsx": "~3.11.0", - "typedoc": "~0.23.16", + "typedoc": "~0.23.18", "typedoc-plugin-missing-exports": "~1.0.0", "typescript": "~4.8.4", "validator": "~13.7.0", "vite": "~3.1.8", - "vitepress": "1.0.0-alpha.21", + "vitepress": "1.0.0-alpha.22", "vitest": "~0.24.3" }, "packageManager": "pnpm@7.14.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d44860ec88a..7551fe2c0d4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,7 +7,7 @@ specifiers: '@types/markdown-it': ~12.2.3 '@types/node': ~18.8.4 '@types/prettier': ~2.7.1 - '@types/react': ~18.0.21 + '@types/react': ~18.0.22 '@types/sanitize-html': ~2.6.2 '@types/semver': ~7.3.12 '@types/validator': ~13.7.9 @@ -40,12 +40,12 @@ specifiers: simple-git-hooks: ~2.8.1 standard-version: ~9.5.0 tsx: ~3.11.0 - typedoc: ~0.23.16 + typedoc: ~0.23.18 typedoc-plugin-missing-exports: ~1.0.0 typescript: ~4.8.4 validator: ~13.7.0 vite: ~3.1.8 - vitepress: 1.0.0-alpha.21 + vitepress: 1.0.0-alpha.22 vitest: ~0.24.3 devDependencies: @@ -55,7 +55,7 @@ devDependencies: '@types/markdown-it': 12.2.3 '@types/node': 18.8.4 '@types/prettier': 2.7.1 - '@types/react': 18.0.21 + '@types/react': 18.0.22 '@types/sanitize-html': 2.6.2 '@types/semver': 7.3.12 '@types/validator': 13.7.9 @@ -88,12 +88,12 @@ devDependencies: simple-git-hooks: 2.8.1 standard-version: 9.5.0 tsx: 3.11.0 - typedoc: 0.23.16_typescript@4.8.4 - typedoc-plugin-missing-exports: 1.0.0_typedoc@0.23.16 + typedoc: 0.23.18_typescript@4.8.4 + typedoc-plugin-missing-exports: 1.0.0_typedoc@0.23.18 typescript: 4.8.4 validator: 13.7.0 vite: 3.1.8 - vitepress: 1.0.0-alpha.21_w6dk4dwpgdxdglls4cxrxtpqg4 + vitepress: 1.0.0-alpha.22_7s2zbo6pukdbh3jcjyutgyfrd4 vitest: 0.24.3_@vitest+ui@0.24.3 packages: @@ -317,10 +317,10 @@ packages: resolution: {integrity: sha512-gaP6TxxwQC+K8D6TRx5WULUWKrcbzECOPA2KCVMuI+6C7dNiGUk5yXXzVhc5sld79XKYLnO9DRTI4mjXDYkh+g==} dev: true - /@docsearch/js/3.2.1_w6dk4dwpgdxdglls4cxrxtpqg4: + /@docsearch/js/3.2.1_7s2zbo6pukdbh3jcjyutgyfrd4: resolution: {integrity: sha512-H1PekEtSeS0msetR2YGGey2w7jQ2wAKfGODJvQTygSwMgUZ+2DHpzUgeDyEBIXRIfaBcoQneqrzsljM62pm6Xg==} dependencies: - '@docsearch/react': 3.2.1_w6dk4dwpgdxdglls4cxrxtpqg4 + '@docsearch/react': 3.2.1_7s2zbo6pukdbh3jcjyutgyfrd4 preact: 10.11.1 transitivePeerDependencies: - '@algolia/client-search' @@ -329,7 +329,7 @@ packages: - react-dom dev: true - /@docsearch/react/3.2.1_w6dk4dwpgdxdglls4cxrxtpqg4: + /@docsearch/react/3.2.1_7s2zbo6pukdbh3jcjyutgyfrd4: resolution: {integrity: sha512-EzTQ/y82s14IQC5XVestiK/kFFMe2aagoYFuTAIfIb/e+4FU7kSMKonRtLwsCiLQHmjvNQq+HO+33giJ5YVtaQ==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' @@ -346,7 +346,7 @@ packages: '@algolia/autocomplete-core': 1.7.1 '@algolia/autocomplete-preset-algolia': 1.7.1_qs6lk5nhygj2o3hj4sf6xnr724 '@docsearch/css': 3.2.1 - '@types/react': 18.0.21 + '@types/react': 18.0.22 algoliasearch: 4.14.2 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -646,8 +646,8 @@ packages: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} dev: true - /@types/react/18.0.21: - resolution: {integrity: sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA==} + /@types/react/18.0.22: + resolution: {integrity: sha512-4yWc5PyCkZN8ke8K9rQHkTXxHIWHxLzzW6RI1kXVoepkD3vULpKzC2sDtAMKn78h92BRYuzf+7b/ms7ajE6hFw==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.2 @@ -4673,16 +4673,16 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true - /typedoc-plugin-missing-exports/1.0.0_typedoc@0.23.16: + /typedoc-plugin-missing-exports/1.0.0_typedoc@0.23.18: resolution: {integrity: sha512-7s6znXnuAj1eD9KYPyzVzR1lBF5nwAY8IKccP5sdoO9crG4lpd16RoFpLsh2PccJM+I2NASpr0+/NMka6ThwVA==} peerDependencies: typedoc: 0.22.x || 0.23.x dependencies: - typedoc: 0.23.16_typescript@4.8.4 + typedoc: 0.23.18_typescript@4.8.4 dev: true - /typedoc/0.23.16_typescript@4.8.4: - resolution: {integrity: sha512-rumYsCeNRXlyuZVzefD7050n7ptL2uudsCJg50dY0v/stKniqIlRpvx/F/6expC0/Q6Dbab+g/JpZuB7Sw90FA==} + /typedoc/0.23.18_typescript@4.8.4: + resolution: {integrity: sha512-0Tq/uFkUuWyRYyjOShTkhsOm6u5E8wf0i6L76/k5znEaxvWKHGeT2ywZThGrDrryV/skO/REM824D1gm8ccQuA==} engines: {node: '>= 14.14'} hasBin: true peerDependencies: @@ -4810,12 +4810,12 @@ packages: fsevents: 2.3.2 dev: true - /vitepress/1.0.0-alpha.21_w6dk4dwpgdxdglls4cxrxtpqg4: - resolution: {integrity: sha512-D/tkoDW16uUZ9pnWd28Kk1vX26zNiTml3m9oGbfx2pAfYg99PHd1GceZyEm4jZsJU0+n9S++1ctFxoQvsq376A==} + /vitepress/1.0.0-alpha.22_7s2zbo6pukdbh3jcjyutgyfrd4: + resolution: {integrity: sha512-IWqnAxMDNaiyl6Bz+/79l40Ho6xsjrqxRp/WZw0+5BXR0BTZbmHyhGtI3XrH6oSn8MisLPjCccikaj3mcmCoWg==} hasBin: true dependencies: '@docsearch/css': 3.2.1 - '@docsearch/js': 3.2.1_w6dk4dwpgdxdglls4cxrxtpqg4 + '@docsearch/js': 3.2.1_7s2zbo6pukdbh3jcjyutgyfrd4 '@vitejs/plugin-vue': 3.1.2_vite@3.1.8+vue@3.2.40 '@vue/devtools-api': 6.4.4 '@vueuse/core': 9.3.0_vue@3.2.40 From 64b031a9e385d1461b2c158abfa1851ba11a8397 Mon Sep 17 00:00:00 2001 From: Tyson Louth Date: Mon, 24 Oct 2022 16:47:12 -0400 Subject: [PATCH 02/14] docs: fix typo in usage section (#1485) --- docs/guide/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/usage.md b/docs/guide/usage.md index 471d905ea24..fcb51e98fc3 100644 --- a/docs/guide/usage.md +++ b/docs/guide/usage.md @@ -11,7 +11,7 @@ const randomName = faker.person.fullName(); // Rowan Nikolaus const randomEmail = faker.internet.email(); // Kassandra.Haley@erich.biz ``` -Or if you using CommonJS +Or if you're using CommonJS: ```js const { faker } = require('@faker-js/faker'); From 09e835664add0a342dd089f31bbae7d880198493 Mon Sep 17 00:00:00 2001 From: Eric Cheng Date: Wed, 26 Oct 2022 16:42:17 -0400 Subject: [PATCH 03/14] feat(internet): add options to url() (#1480) --- src/modules/internet/index.ts | 21 +++++++++++++++--- test/__snapshots__/internet.spec.ts.snap | 18 +++++++++++++--- test/internet.spec.ts | 27 +++++++++++++++++++++++- 3 files changed, 59 insertions(+), 7 deletions(-) diff --git a/src/modules/internet/index.ts b/src/modules/internet/index.ts index 1c7e85cc44b..60e3ac55a46 100644 --- a/src/modules/internet/index.ts +++ b/src/modules/internet/index.ts @@ -20,6 +20,8 @@ export type HTTPStatusCodeType = | 'serverError' | 'redirection'; +export type HTTPProtocolType = 'http' | 'https'; + /** * Module to generate internet related entries. */ @@ -226,15 +228,28 @@ export class InternetModule { } /** - * Generates a random url. + * Generates a random http(s) url. + * + * @param options Optional options object. + * @param options.appendSlash Whether to append a slash to the end of the url (path). Defaults to a random boolean value. + * @param options.protocol The protocol to use. Defaults to `'https'`. * * @example * faker.internet.url() // 'https://remarkable-hackwork.info' + * faker.internet.url({ appendSlash: true }) // 'https://slow-timer.info/' + * faker.internet.url({ protocol: 'http', appendSlash: false }) // 'http://www.terrible-idea.com' * * @since 2.1.5 */ - url(): string { - return `${this.protocol()}://${this.domainName()}`; + url( + options: { + appendSlash?: boolean; + protocol?: HTTPProtocolType; + } = {} + ): string { + const { appendSlash = this.faker.datatype.boolean(), protocol = 'https' } = + options; + return `${protocol}://${this.domainName()}${appendSlash ? '/' : ''}`; } /** diff --git a/test/__snapshots__/internet.spec.ts.snap b/test/__snapshots__/internet.spec.ts.snap index d2c4391163f..500f8d8c88e 100644 --- a/test/__snapshots__/internet.spec.ts.snap +++ b/test/__snapshots__/internet.spec.ts.snap @@ -52,7 +52,11 @@ exports[`internet > 42 > port 1`] = `24545`; exports[`internet > 42 > protocol 1`] = `"http"`; -exports[`internet > 42 > url 1`] = `"http://staid-veil.biz"`; +exports[`internet > 42 > url > noArgs 1`] = `"https://staid-veil.biz"`; + +exports[`internet > 42 > url > with slash appended 1`] = `"https://hasty-shin.org/"`; + +exports[`internet > 42 > url > without slash appended and with http protocol 1`] = `"http://hasty-shin.org"`; exports[`internet > 42 > userAgent 1`] = `"Mozilla/5.0 (Windows; U; Windows NT 6.2) AppleWebKit/538.0.2 (KHTML, like Gecko) Chrome/29.0.815.0 Safari/538.0.2"`; @@ -112,7 +116,11 @@ exports[`internet > 1211 > port 1`] = `60851`; exports[`internet > 1211 > protocol 1`] = `"https"`; -exports[`internet > 1211 > url 1`] = `"https://jubilant-temple.net"`; +exports[`internet > 1211 > url > noArgs 1`] = `"https://jubilant-temple.net/"`; + +exports[`internet > 1211 > url > with slash appended 1`] = `"https://vibrant-infix.org/"`; + +exports[`internet > 1211 > url > without slash appended and with http protocol 1`] = `"http://vibrant-infix.org"`; exports[`internet > 1211 > userAgent 1`] = `"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6 rv:3.0; PT) AppleWebKit/538.2.0 (KHTML, like Gecko) Version/4.1.0 Safari/538.2.0"`; @@ -172,7 +180,11 @@ exports[`internet > 1337 > port 1`] = `17172`; exports[`internet > 1337 > protocol 1`] = `"http"`; -exports[`internet > 1337 > url 1`] = `"http://neat-chopstick.biz"`; +exports[`internet > 1337 > url > noArgs 1`] = `"https://neat-chopstick.biz"`; + +exports[`internet > 1337 > url > with slash appended 1`] = `"https://fair-migration.com/"`; + +exports[`internet > 1337 > url > without slash appended and with http protocol 1`] = `"http://fair-migration.com"`; exports[`internet > 1337 > userAgent 1`] = `"Mozilla/5.0 (Windows; U; Windows NT 6.1) AppleWebKit/532.0.0 (KHTML, like Gecko) Chrome/13.0.832.0 Safari/532.0.0"`; diff --git a/test/internet.spec.ts b/test/internet.spec.ts index cbbf2745ddd..02f0edaa760 100644 --- a/test/internet.spec.ts +++ b/test/internet.spec.ts @@ -16,7 +16,6 @@ describe('internet', () => { 'avatar', 'protocol', 'httpMethod', - 'url', 'domainName', 'domainSuffix', 'domainWord', @@ -61,6 +60,15 @@ describe('internet', () => { t.describe('emoji', (t) => { t.it('noArgs').it('with options', { types: ['nature'] }); }); + + t.describe('url', (t) => { + t.it('noArgs') + .it('with slash appended', { appendSlash: true }) + .it('without slash appended and with http protocol', { + appendSlash: false, + protocol: 'http', + }); + }); }); describe(`random seeded tests for seed ${faker.seed()}`, () => { @@ -325,6 +333,23 @@ describe('internet', () => { expect(url).toBeTypeOf('string'); expect(url).toSatisfy(validator.isURL); }); + + it('should return a valid url with slash appended at the end', () => { + const url = faker.internet.url({ appendSlash: true }); + + expect(url).toBeTruthy(); + expect(url).toBeTypeOf('string'); + expect(url).toSatisfy(validator.isURL); + expect(url.endsWith('/')).toBeTruthy(); + }); + + it('should return a valid url with given protocol', () => { + const url = faker.internet.url({ protocol: 'http' }); + + expect(url).toBeTruthy(); + expect(url).toBeTypeOf('string'); + expect(url).toSatisfy(validator.isURL); + }); }); describe('domainName()', () => { From 97ebd29707dc022cf945b7e2d8c110ca90cdb3a9 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Fri, 28 Oct 2022 15:31:31 +0530 Subject: [PATCH 04/14] docs: add version banner (#1487) --- docs/.vitepress/components/Banner.vue | 108 ++++++++++ docs/.vitepress/components/shims.d.ts | 7 + docs/.vitepress/config.ts | 29 ++- docs/.vitepress/theme/index.ts | 20 +- docs/.vitepress/tsconfig.json | 1 + docs/.vitepress/versions.ts | 13 ++ package.json | 6 +- pnpm-lock.yaml | 207 +++++++++++--------- test/scripts/apidoc/signature.expected.json | 32 +-- 9 files changed, 305 insertions(+), 118 deletions(-) create mode 100644 docs/.vitepress/components/Banner.vue create mode 100644 docs/.vitepress/components/shims.d.ts diff --git a/docs/.vitepress/components/Banner.vue b/docs/.vitepress/components/Banner.vue new file mode 100644 index 00000000000..9eea81c9c8f --- /dev/null +++ b/docs/.vitepress/components/Banner.vue @@ -0,0 +1,108 @@ + + + + + + + diff --git a/docs/.vitepress/components/shims.d.ts b/docs/.vitepress/components/shims.d.ts new file mode 100644 index 00000000000..7ae275ab099 --- /dev/null +++ b/docs/.vitepress/components/shims.d.ts @@ -0,0 +1,7 @@ +declare const __BANNER__: string | false; + +declare module '*.vue' { + import type { DefineComponent } from 'vue'; + const component: DefineComponent; + export default component; +} diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 1191ddd182f..aa0045d81dd 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vitepress'; import { DefaultTheme } from 'vitepress/theme'; import { apiPages } from './api-pages'; -import { currentVersion, oldVersions } from './versions'; +import { currentVersion, oldVersions, versionBannerInfix } from './versions'; type SidebarGroup = DefaultTheme.SidebarGroup; @@ -51,7 +51,7 @@ function extendSideNav(current: SidebarGroup): SidebarGroup[] { return links; } -export default defineConfig({ +const config = defineConfig({ title: 'Faker', description, @@ -229,4 +229,29 @@ export default defineConfig({ }), }, }, + + vite: { + define: { + __BANNER__: versionBannerInfix ?? false, + }, + }, }); + +if (versionBannerInfix) { + config.head?.push([ + 'script', + { id: 'restore-banner-preference' }, + ` +(() => { + const restore = (key, cls, def = false) => { + const saved = localStorage.getItem(key); + if (saved ? saved !== 'false' && new Date() < saved : def) { + document.documentElement.classList.add(cls); + } + }; + restore('faker-version-banner', 'banner-dismissed'); +})();`, + ]); +} + +export default config; diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 2423da6bf18..8555a839b70 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,4 +1,22 @@ import DefaultTheme from 'vitepress/theme'; +import { defineAsyncComponent, h } from 'vue'; import './index.css'; -export default DefaultTheme; +export default { + ...DefaultTheme, + Layout() { + return h( + DefaultTheme.Layout, + null, + __BANNER__ + ? { + 'layout-top': () => + h( + defineAsyncComponent(() => import('../components/Banner.vue')), + { version: __BANNER__ } + ), + } + : null + ); + }, +}; diff --git a/docs/.vitepress/tsconfig.json b/docs/.vitepress/tsconfig.json index 74d4053ade1..75b15f9e2d4 100644 --- a/docs/.vitepress/tsconfig.json +++ b/docs/.vitepress/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "target": "ES2020", + "module": "ES2020", "moduleResolution": "Node", "resolveJsonModule": true } diff --git a/docs/.vitepress/versions.ts b/docs/.vitepress/versions.ts index 7d37619deff..2964557cee9 100644 --- a/docs/.vitepress/versions.ts +++ b/docs/.vitepress/versions.ts @@ -41,6 +41,19 @@ const hiddenLink = const otherVersions = readOtherLatestReleaseTagNames(); const isReleaseBranch = /^v\d+$/.test(branchName); +export const versionBannerInfix: string | null = (() => { + if (deployContext === 'production') { + return null; + } + if (isReleaseBranch) { + return '"an old version"'; + } + if (branchName === 'next') { + return '"the next (unreleased) version"'; + } + return '"a development version"'; +})(); + export const currentVersion = isReleaseBranch ? `v${version}` : branchName; export const oldVersions = [ { diff --git a/package.json b/package.json index 2a83079484d..a560ee90ee9 100644 --- a/package.json +++ b/package.json @@ -107,6 +107,7 @@ "@typescript-eslint/parser": "~5.40.1", "@vitest/coverage-c8": "~0.24.3", "@vitest/ui": "~0.24.3", + "@vueuse/core": "~9.4.0", "c8": "~7.12.0", "conventional-changelog-cli": "~2.2.2", "cypress": "~10.10.0", @@ -137,8 +138,9 @@ "typescript": "~4.8.4", "validator": "~13.7.0", "vite": "~3.1.8", - "vitepress": "1.0.0-alpha.22", - "vitest": "~0.24.3" + "vitepress": "1.0.0-alpha.26", + "vitest": "~0.24.3", + "vue": "~3.2.41" }, "packageManager": "pnpm@7.14.0", "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7551fe2c0d4..6418f9660f5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,6 +15,7 @@ specifiers: '@typescript-eslint/parser': ~5.40.1 '@vitest/coverage-c8': ~0.24.3 '@vitest/ui': ~0.24.3 + '@vueuse/core': ~9.4.0 c8: ~7.12.0 conventional-changelog-cli: ~2.2.2 cypress: ~10.10.0 @@ -45,8 +46,9 @@ specifiers: typescript: ~4.8.4 validator: ~13.7.0 vite: ~3.1.8 - vitepress: 1.0.0-alpha.22 + vitepress: 1.0.0-alpha.26 vitest: ~0.24.3 + vue: ~3.2.41 devDependencies: '@actions/github': 5.1.1 @@ -63,6 +65,7 @@ devDependencies: '@typescript-eslint/parser': 5.40.1_wyqvi574yv7oiwfeinomdzmc3m '@vitest/coverage-c8': 0.24.3_@vitest+ui@0.24.3 '@vitest/ui': 0.24.3 + '@vueuse/core': 9.4.0_vue@3.2.41 c8: 7.12.0 conventional-changelog-cli: 2.2.2 cypress: 10.10.0 @@ -93,8 +96,9 @@ devDependencies: typescript: 4.8.4 validator: 13.7.0 vite: 3.1.8 - vitepress: 1.0.0-alpha.22_7s2zbo6pukdbh3jcjyutgyfrd4 + vitepress: 1.0.0-alpha.26_7s2zbo6pukdbh3jcjyutgyfrd4 vitest: 0.24.3_@vitest+ui@0.24.3 + vue: 3.2.41 packages: @@ -115,25 +119,25 @@ packages: tunnel: 0.0.6 dev: true - /@algolia/autocomplete-core/1.7.1: - resolution: {integrity: sha512-eiZw+fxMzNQn01S8dA/hcCpoWCOCwcIIEUtHHdzN5TGB3IpzLbuhqFeTfh2OUhhgkE8Uo17+wH+QJ/wYyQmmzg==} + /@algolia/autocomplete-core/1.7.2: + resolution: {integrity: sha512-eclwUDC6qfApNnEfu1uWcL/rudQsn59tjEoUYZYE2JSXZrHLRjBUGMxiCoknobU2Pva8ejb0eRxpIYDtVVqdsw==} dependencies: - '@algolia/autocomplete-shared': 1.7.1 + '@algolia/autocomplete-shared': 1.7.2 dev: true - /@algolia/autocomplete-preset-algolia/1.7.1_qs6lk5nhygj2o3hj4sf6xnr724: - resolution: {integrity: sha512-pJwmIxeJCymU1M6cGujnaIYcY3QPOVYZOXhFkWVM7IxKzy272BwCvMFMyc5NpG/QmiObBxjo7myd060OeTNJXg==} + /@algolia/autocomplete-preset-algolia/1.7.2_qs6lk5nhygj2o3hj4sf6xnr724: + resolution: {integrity: sha512-+RYEG6B0QiGGfRb2G3MtPfyrl0dALF3cQNTWBzBX6p5o01vCCGTTinAm2UKG3tfc2CnOMAtnPLkzNZyJUpnVJw==} peerDependencies: - '@algolia/client-search': ^4.9.1 - algoliasearch: ^4.9.1 + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' dependencies: - '@algolia/autocomplete-shared': 1.7.1 + '@algolia/autocomplete-shared': 1.7.2 '@algolia/client-search': 4.14.2 algoliasearch: 4.14.2 dev: true - /@algolia/autocomplete-shared/1.7.1: - resolution: {integrity: sha512-eTmGVqY3GeyBTT8IWiB2K5EuURAqhnumfktAEoHxfDY2o7vg2rSnO16ZtIG0fMgt3py28Vwgq42/bVEuaQV7pg==} + /@algolia/autocomplete-shared/1.7.2: + resolution: {integrity: sha512-QCckjiC7xXHIUaIL3ektBtjJ0w7tTA3iqKcAE/Hjn1lZ5omp7i3Y4e09rAr9ZybqirL7AbxCLLq0Ra5DDPKeug==} dev: true /@algolia/cache-browser-local-storage/4.14.2: @@ -313,14 +317,14 @@ packages: - supports-color dev: true - /@docsearch/css/3.2.1: - resolution: {integrity: sha512-gaP6TxxwQC+K8D6TRx5WULUWKrcbzECOPA2KCVMuI+6C7dNiGUk5yXXzVhc5sld79XKYLnO9DRTI4mjXDYkh+g==} + /@docsearch/css/3.3.0: + resolution: {integrity: sha512-rODCdDtGyudLj+Va8b6w6Y85KE85bXRsps/R4Yjwt5vueXKXZQKYw0aA9knxLBT6a/bI/GMrAcmCR75KYOM6hg==} dev: true - /@docsearch/js/3.2.1_7s2zbo6pukdbh3jcjyutgyfrd4: - resolution: {integrity: sha512-H1PekEtSeS0msetR2YGGey2w7jQ2wAKfGODJvQTygSwMgUZ+2DHpzUgeDyEBIXRIfaBcoQneqrzsljM62pm6Xg==} + /@docsearch/js/3.3.0_7s2zbo6pukdbh3jcjyutgyfrd4: + resolution: {integrity: sha512-oFXWRPNvPxAzBhnFJ9UCFIYZiQNc3Yrv6912nZHw/UIGxsyzKpNRZgHq8HDk1niYmOSoLKtVFcxkccpQmYGFyg==} dependencies: - '@docsearch/react': 3.2.1_7s2zbo6pukdbh3jcjyutgyfrd4 + '@docsearch/react': 3.3.0_7s2zbo6pukdbh3jcjyutgyfrd4 preact: 10.11.1 transitivePeerDependencies: - '@algolia/client-search' @@ -329,8 +333,8 @@ packages: - react-dom dev: true - /@docsearch/react/3.2.1_7s2zbo6pukdbh3jcjyutgyfrd4: - resolution: {integrity: sha512-EzTQ/y82s14IQC5XVestiK/kFFMe2aagoYFuTAIfIb/e+4FU7kSMKonRtLwsCiLQHmjvNQq+HO+33giJ5YVtaQ==} + /@docsearch/react/3.3.0_7s2zbo6pukdbh3jcjyutgyfrd4: + resolution: {integrity: sha512-fhS5adZkae2SSdMYEMVg6pxI5a/cE+tW16ki1V0/ur4Fdok3hBRkmN/H8VvlXnxzggkQIIRIVvYPn00JPjen3A==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' react: '>= 16.8.0 < 19.0.0' @@ -343,9 +347,9 @@ packages: react-dom: optional: true dependencies: - '@algolia/autocomplete-core': 1.7.1 - '@algolia/autocomplete-preset-algolia': 1.7.1_qs6lk5nhygj2o3hj4sf6xnr724 - '@docsearch/css': 3.2.1 + '@algolia/autocomplete-core': 1.7.2 + '@algolia/autocomplete-preset-algolia': 1.7.2_qs6lk5nhygj2o3hj4sf6xnr724 + '@docsearch/css': 3.3.0 '@types/react': 18.0.22 algoliasearch: 4.14.2 react: 18.2.0 @@ -680,8 +684,8 @@ packages: resolution: {integrity: sha512-y5KJ1PjGXPpU4CZ7lThDu31s+FqvzhqwMOR6Go/x6xaQMFjgzwfzfOvCwABsylr/5n8sB1qFQm1Vi7TaCB8P+A==} dev: true - /@types/web-bluetooth/0.0.15: - resolution: {integrity: sha512-w7hEHXnPMEZ+4nGKl/KDRVpxkwYxYExuHOYXyzIzCDzEZ9ZCGMAewulr9IqJu2LR4N37fcnb1XVeuZ09qgOxhA==} + /@types/web-bluetooth/0.0.16: + resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==} dev: true /@types/yauzl/2.10.0: @@ -820,7 +824,7 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /@vitejs/plugin-vue/3.1.2_vite@3.1.8+vue@3.2.40: + /@vitejs/plugin-vue/3.1.2_vite@3.1.8+vue@3.2.41: resolution: {integrity: sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -828,7 +832,7 @@ packages: vue: ^3.2.25 dependencies: vite: 3.1.8 - vue: 3.2.40 + vue: 3.2.41 dev: true /@vitest/coverage-c8/0.24.3_@vitest+ui@0.24.3: @@ -855,113 +859,113 @@ packages: sirv: 2.0.2 dev: true - /@vue/compiler-core/3.2.40: - resolution: {integrity: sha512-2Dc3Stk0J/VyQ4OUr2yEC53kU28614lZS+bnrCbFSAIftBJ40g/2yQzf4mPBiFuqguMB7hyHaujdgZAQ67kZYA==} + /@vue/compiler-core/3.2.41: + resolution: {integrity: sha512-oA4mH6SA78DT+96/nsi4p9DX97PHcNROxs51lYk7gb9Z4BPKQ3Mh+BLn6CQZBw857Iuhu28BfMSRHAlPvD4vlw==} dependencies: '@babel/parser': 7.19.4 - '@vue/shared': 3.2.40 + '@vue/shared': 3.2.41 estree-walker: 2.0.2 source-map: 0.6.1 dev: true - /@vue/compiler-dom/3.2.40: - resolution: {integrity: sha512-OZCNyYVC2LQJy4H7h0o28rtk+4v+HMQygRTpmibGoG9wZyomQiS5otU7qo3Wlq5UfHDw2RFwxb9BJgKjVpjrQw==} + /@vue/compiler-dom/3.2.41: + resolution: {integrity: sha512-xe5TbbIsonjENxJsYRbDJvthzqxLNk+tb3d/c47zgREDa/PCp6/Y4gC/skM4H6PIuX5DAxm7fFJdbjjUH2QTMw==} dependencies: - '@vue/compiler-core': 3.2.40 - '@vue/shared': 3.2.40 + '@vue/compiler-core': 3.2.41 + '@vue/shared': 3.2.41 dev: true - /@vue/compiler-sfc/3.2.40: - resolution: {integrity: sha512-tzqwniIN1fu1PDHC3CpqY/dPCfN/RN1thpBC+g69kJcrl7mbGiHKNwbA6kJ3XKKy8R6JLKqcpVugqN4HkeBFFg==} + /@vue/compiler-sfc/3.2.41: + resolution: {integrity: sha512-+1P2m5kxOeaxVmJNXnBskAn3BenbTmbxBxWOtBq3mQTCokIreuMULFantBUclP0+KnzNCMOvcnKinqQZmiOF8w==} dependencies: '@babel/parser': 7.19.4 - '@vue/compiler-core': 3.2.40 - '@vue/compiler-dom': 3.2.40 - '@vue/compiler-ssr': 3.2.40 - '@vue/reactivity-transform': 3.2.40 - '@vue/shared': 3.2.40 + '@vue/compiler-core': 3.2.41 + '@vue/compiler-dom': 3.2.41 + '@vue/compiler-ssr': 3.2.41 + '@vue/reactivity-transform': 3.2.41 + '@vue/shared': 3.2.41 estree-walker: 2.0.2 magic-string: 0.25.9 postcss: 8.4.17 source-map: 0.6.1 dev: true - /@vue/compiler-ssr/3.2.40: - resolution: {integrity: sha512-80cQcgasKjrPPuKcxwuCx7feq+wC6oFl5YaKSee9pV3DNq+6fmCVwEEC3vvkf/E2aI76rIJSOYHsWSEIxK74oQ==} + /@vue/compiler-ssr/3.2.41: + resolution: {integrity: sha512-Y5wPiNIiaMz/sps8+DmhaKfDm1xgj6GrH99z4gq2LQenfVQcYXmHIOBcs5qPwl7jaW3SUQWjkAPKMfQemEQZwQ==} dependencies: - '@vue/compiler-dom': 3.2.40 - '@vue/shared': 3.2.40 + '@vue/compiler-dom': 3.2.41 + '@vue/shared': 3.2.41 dev: true - /@vue/devtools-api/6.4.4: - resolution: {integrity: sha512-Ku31WzpOV/8cruFaXaEZKF81WkNnvCSlBY4eOGtz5WMSdJvX1v1WWlSMGZeqUwPtQ27ZZz7B62erEMq8JDjcXw==} + /@vue/devtools-api/6.4.5: + resolution: {integrity: sha512-JD5fcdIuFxU4fQyXUu3w2KpAJHzTVdN+p4iOX2lMWSHMOoQdMAcpFLZzm9Z/2nmsoZ1a96QEhZ26e50xLBsgOQ==} dev: true - /@vue/reactivity-transform/3.2.40: - resolution: {integrity: sha512-HQUCVwEaacq6fGEsg2NUuGKIhUveMCjOk8jGHqLXPI2w6zFoPrlQhwWEaINTv5kkZDXKEnCijAp+4gNEHG03yw==} + /@vue/reactivity-transform/3.2.41: + resolution: {integrity: sha512-mK5+BNMsL4hHi+IR3Ft/ho6Za+L3FA5j8WvreJ7XzHrqkPq8jtF/SMo7tuc9gHjLDwKZX1nP1JQOKo9IEAn54A==} dependencies: '@babel/parser': 7.19.4 - '@vue/compiler-core': 3.2.40 - '@vue/shared': 3.2.40 + '@vue/compiler-core': 3.2.41 + '@vue/shared': 3.2.41 estree-walker: 2.0.2 magic-string: 0.25.9 dev: true - /@vue/reactivity/3.2.40: - resolution: {integrity: sha512-N9qgGLlZmtUBMHF9xDT4EkD9RdXde1Xbveb+niWMXuHVWQP5BzgRmE3SFyUBBcyayG4y1lhoz+lphGRRxxK4RA==} + /@vue/reactivity/3.2.41: + resolution: {integrity: sha512-9JvCnlj8uc5xRiQGZ28MKGjuCoPhhTwcoAdv3o31+cfGgonwdPNuvqAXLhlzu4zwqavFEG5tvaoINQEfxz+l6g==} dependencies: - '@vue/shared': 3.2.40 + '@vue/shared': 3.2.41 dev: true - /@vue/runtime-core/3.2.40: - resolution: {integrity: sha512-U1+rWf0H8xK8aBUZhnrN97yoZfHbjgw/bGUzfgKPJl69/mXDuSg8CbdBYBn6VVQdR947vWneQBFzdhasyzMUKg==} + /@vue/runtime-core/3.2.41: + resolution: {integrity: sha512-0LBBRwqnI0p4FgIkO9q2aJBBTKDSjzhnxrxHYengkAF6dMOjeAIZFDADAlcf2h3GDALWnblbeprYYpItiulSVQ==} dependencies: - '@vue/reactivity': 3.2.40 - '@vue/shared': 3.2.40 + '@vue/reactivity': 3.2.41 + '@vue/shared': 3.2.41 dev: true - /@vue/runtime-dom/3.2.40: - resolution: {integrity: sha512-AO2HMQ+0s2+MCec8hXAhxMgWhFhOPJ/CyRXnmTJ6XIOnJFLrH5Iq3TNwvVcODGR295jy77I6dWPj+wvFoSYaww==} + /@vue/runtime-dom/3.2.41: + resolution: {integrity: sha512-U7zYuR1NVIP8BL6jmOqmapRAHovEFp7CSw4pR2FacqewXNGqZaRfHoNLQsqQvVQ8yuZNZtxSZy0FFyC70YXPpA==} dependencies: - '@vue/runtime-core': 3.2.40 - '@vue/shared': 3.2.40 + '@vue/runtime-core': 3.2.41 + '@vue/shared': 3.2.41 csstype: 2.6.21 dev: true - /@vue/server-renderer/3.2.40_vue@3.2.40: - resolution: {integrity: sha512-gtUcpRwrXOJPJ4qyBpU3EyxQa4EkV8I4f8VrDePcGCPe4O/hd0BPS7v9OgjIQob6Ap8VDz9G+mGTKazE45/95w==} + /@vue/server-renderer/3.2.41_vue@3.2.41: + resolution: {integrity: sha512-7YHLkfJdTlsZTV0ae5sPwl9Gn/EGr2hrlbcS/8naXm2CDpnKUwC68i1wGlrYAfIgYWL7vUZwk2GkYLQH5CvFig==} peerDependencies: - vue: 3.2.40 + vue: 3.2.41 dependencies: - '@vue/compiler-ssr': 3.2.40 - '@vue/shared': 3.2.40 - vue: 3.2.40 + '@vue/compiler-ssr': 3.2.41 + '@vue/shared': 3.2.41 + vue: 3.2.41 dev: true - /@vue/shared/3.2.40: - resolution: {integrity: sha512-0PLQ6RUtZM0vO3teRfzGi4ltLUO5aO+kLgwh4Um3THSR03rpQWLTuRCkuO5A41ITzwdWeKdPHtSARuPkoo5pCQ==} + /@vue/shared/3.2.41: + resolution: {integrity: sha512-W9mfWLHmJhkfAmV+7gDjcHeAWALQtgGT3JErxULl0oz6R6+3ug91I7IErs93eCFhPCZPHBs4QJS7YWEV7A3sxw==} dev: true - /@vueuse/core/9.3.0_vue@3.2.40: - resolution: {integrity: sha512-64Rna8IQDWpdrJxgitDg7yv1yTp41ZmvV8zlLEylK4QQLWAhz1OFGZDPZ8bU4lwcGgbEJ2sGi2jrdNh4LttUSQ==} + /@vueuse/core/9.4.0_vue@3.2.41: + resolution: {integrity: sha512-JzgenGj1ZF2BHOen5rsFiAyyI9sXAv7aKhNLlm9b7SwYQeKTcxTWdhudonURCSP3Egl9NQaRBzes2lv/1JUt/Q==} dependencies: - '@types/web-bluetooth': 0.0.15 - '@vueuse/metadata': 9.3.0 - '@vueuse/shared': 9.3.0_vue@3.2.40 - vue-demi: 0.13.11_vue@3.2.40 + '@types/web-bluetooth': 0.0.16 + '@vueuse/metadata': 9.4.0 + '@vueuse/shared': 9.4.0_vue@3.2.41 + vue-demi: 0.13.11_vue@3.2.41 transitivePeerDependencies: - '@vue/composition-api' - vue dev: true - /@vueuse/metadata/9.3.0: - resolution: {integrity: sha512-GnnfjbzIPJIh9ngL9s9oGU1+Hx/h5/KFqTfJykzh/1xjaHkedV9g0MASpdmPZIP+ynNhKAcEfA6g5i8KXwtoMA==} + /@vueuse/metadata/9.4.0: + resolution: {integrity: sha512-7GKMdGAsJyQJl35MYOz/RDpP0FxuiZBRDSN79QIPbdqYx4Sd0sVTnIC68KJ6Oln0t0SouvSUMvRHuno216Ud2Q==} dev: true - /@vueuse/shared/9.3.0_vue@3.2.40: - resolution: {integrity: sha512-caGUWLY0DpPC6l31KxeUy6vPVNA0yKxx81jFYLoMpyP6cF84FG5Dkf69DfSUqL57wX8JcUkJDMnQaQIZPWFEQQ==} + /@vueuse/shared/9.4.0_vue@3.2.41: + resolution: {integrity: sha512-fTuem51KwMCnqUKkI8B57qAIMcFovtGgsCtAeqxIzH3i6nE9VYge+gVfneNHAAy7lj8twbkNfqQSygOPJTm4tQ==} dependencies: - vue-demi: 0.13.11_vue@3.2.40 + vue-demi: 0.13.11_vue@3.2.41 transitivePeerDependencies: - '@vue/composition-api' - vue @@ -4186,6 +4190,14 @@ packages: resolution: {integrity: sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==} dev: true + /shiki-processor/0.1.0_shiki@0.11.1: + resolution: {integrity: sha512-7ty3VouP7AQMlERKeiobVeyhjUW6rPMM1b+xFcFF/XwhkN4//Fg9Ju6hPfIOvO4ztylkbLqYufbJmLJmw7SfQA==} + peerDependencies: + shiki: ^0.11.1 + dependencies: + shiki: 0.11.1 + dev: true + /shiki/0.11.1: resolution: {integrity: sha512-EugY9VASFuDqOexOgXR18ZV+TbFrQHeCpEYaXamO+SZlsnT/2LxuLBX25GGtIrwaEVFXUAbUQ601SWE2rMwWHA==} dependencies: @@ -4810,19 +4822,20 @@ packages: fsevents: 2.3.2 dev: true - /vitepress/1.0.0-alpha.22_7s2zbo6pukdbh3jcjyutgyfrd4: - resolution: {integrity: sha512-IWqnAxMDNaiyl6Bz+/79l40Ho6xsjrqxRp/WZw0+5BXR0BTZbmHyhGtI3XrH6oSn8MisLPjCccikaj3mcmCoWg==} + /vitepress/1.0.0-alpha.26_7s2zbo6pukdbh3jcjyutgyfrd4: + resolution: {integrity: sha512-XpDpflrdmyBmUQrg06q29Mhez144NvoZ48pRvNhANy/wV7E7XJ1zenQROOSADnOsAlhV1gzcNjqiFNObCk7l8A==} hasBin: true dependencies: - '@docsearch/css': 3.2.1 - '@docsearch/js': 3.2.1_7s2zbo6pukdbh3jcjyutgyfrd4 - '@vitejs/plugin-vue': 3.1.2_vite@3.1.8+vue@3.2.40 - '@vue/devtools-api': 6.4.4 - '@vueuse/core': 9.3.0_vue@3.2.40 + '@docsearch/css': 3.3.0 + '@docsearch/js': 3.3.0_7s2zbo6pukdbh3jcjyutgyfrd4 + '@vitejs/plugin-vue': 3.1.2_vite@3.1.8+vue@3.2.41 + '@vue/devtools-api': 6.4.5 + '@vueuse/core': 9.4.0_vue@3.2.41 body-scroll-lock: 4.0.0-beta.0 shiki: 0.11.1 + shiki-processor: 0.1.0_shiki@0.11.1 vite: 3.1.8 - vue: 3.2.40 + vue: 3.2.41 transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -4885,7 +4898,7 @@ packages: resolution: {integrity: sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==} dev: true - /vue-demi/0.13.11_vue@3.2.40: + /vue-demi/0.13.11_vue@3.2.41: resolution: {integrity: sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==} engines: {node: '>=12'} hasBin: true @@ -4897,17 +4910,17 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.2.40 + vue: 3.2.41 dev: true - /vue/3.2.40: - resolution: {integrity: sha512-1mGHulzUbl2Nk3pfvI5aXYYyJUs1nm4kyvuz38u4xlQkLUn1i2R7nDbI4TufECmY8v1qNBHYy62bCaM+3cHP2A==} + /vue/3.2.41: + resolution: {integrity: sha512-uuuvnrDXEeZ9VUPljgHkqB5IaVO8SxhPpqF2eWOukVrBnRBx2THPSGQBnVRt0GrIG1gvCmFXMGbd7FqcT1ixNQ==} dependencies: - '@vue/compiler-dom': 3.2.40 - '@vue/compiler-sfc': 3.2.40 - '@vue/runtime-dom': 3.2.40 - '@vue/server-renderer': 3.2.40_vue@3.2.40 - '@vue/shared': 3.2.40 + '@vue/compiler-dom': 3.2.41 + '@vue/compiler-sfc': 3.2.41 + '@vue/runtime-dom': 3.2.41 + '@vue/server-renderer': 3.2.41_vue@3.2.41 + '@vue/shared': 3.2.41 dev: true /webidl-conversions/3.0.1: diff --git a/test/scripts/apidoc/signature.expected.json b/test/scripts/apidoc/signature.expected.json index 6268978988d..05809105a62 100644 --- a/test/scripts/apidoc/signature.expected.json +++ b/test/scripts/apidoc/signature.expected.json @@ -13,7 +13,7 @@ ], "since": "", "returns": "number", - "examples": "
ts
faker.defaultBooleanParamMethod(c: boolean = true): number\n
\n
", + "examples": "
ts
faker.defaultBooleanParamMethod(c: boolean = true): number\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -30,7 +30,7 @@ ], "since": "", "returns": "number", - "examples": "
ts
faker.functionParamMethod(fn: (a: string) => number): number\n
\n
", + "examples": "
ts
faker.functionParamMethod(fn: (a: string) => number): number\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -47,7 +47,7 @@ ], "since": "", "returns": "string", - "examples": "
ts
faker.literalUnionParamMethod(value: 'a' | 'b' | string): string\n
\n
", + "examples": "
ts
faker.literalUnionParamMethod(value: 'a' | 'b' | string): string\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -58,7 +58,7 @@ "parameters": [], "since": "", "returns": "number", - "examples": "
ts
faker.methodWithDeprecated(): number\n
\n
", + "examples": "
ts
faker.methodWithDeprecated(): number\n
\n
", "deprecated": true, "seeAlsos": ["test.apidoc.methodWithExample()"] }, @@ -69,7 +69,7 @@ "parameters": [], "since": "", "returns": "number", - "examples": "
ts
faker.methodWithExample(): number\ntest.apidoc.methodWithExample() // 0\n
\n
", + "examples": "
ts
faker.methodWithExample(): number\ntest.apidoc.methodWithExample() // 0\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -80,7 +80,7 @@ "parameters": [], "since": "", "returns": "number", - "examples": "
ts
faker.methodWithMultipleSeeMarkers(): number\n
\n
", + "examples": "
ts
faker.methodWithMultipleSeeMarkers(): number\n
\n
", "deprecated": false, "seeAlsos": [ "test.apidoc.methodWithExample()", @@ -94,7 +94,7 @@ "parameters": [], "since": "1.0.0", "returns": "number", - "examples": "
ts
faker.methodWithSinceMarker(): number\n
\n
", + "examples": "
ts
faker.methodWithSinceMarker(): number\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -122,7 +122,7 @@ ], "since": "", "returns": "number", - "examples": "
ts
faker.multiParamMethod(a: number, b?: string, c: boolean = true): number\n
\n
", + "examples": "
ts
faker.multiParamMethod(a: number, b?: string, c: boolean = true): number\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -133,7 +133,7 @@ "parameters": [], "since": "", "returns": "number", - "examples": "
ts
faker.noParamMethod(): number\n
\n
", + "examples": "
ts
faker.noParamMethod(): number\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -150,7 +150,7 @@ ], "since": "", "returns": "number", - "examples": "
ts
faker.optionalStringParamMethod(b?: string): number\n
\n
", + "examples": "
ts
faker.optionalStringParamMethod(b?: string): number\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -195,7 +195,7 @@ ], "since": "", "returns": "number", - "examples": "
ts
faker.optionsInlineParamMethodWithDefaults(a: {\n  value: number\n} = { value: 1 }, b: {\n  value: number\n} = { value: 1 }, c: {\n  value: number\n}): number\n
\n
", + "examples": "
ts
faker.optionsInlineParamMethodWithDefaults(a: {\n  value: number\n} = { value: 1 }, b: {\n  value: number\n} = { value: 1 }, c: {\n  value: number\n}): number\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -224,7 +224,7 @@ ], "since": "", "returns": "number", - "examples": "
ts
faker.optionsInterfaceParamMethodWithDefaults(a: ParameterOptionsInterfaceA = { value: 1 }, b: ParameterOptionsInterfaceB = { value: 1 }, c: ParameterOptionsInterfaceC): number\n
\n
", + "examples": "
ts
faker.optionsInterfaceParamMethodWithDefaults(a: ParameterOptionsInterfaceA = { value: 1 }, b: ParameterOptionsInterfaceB = { value: 1 }, c: ParameterOptionsInterfaceC): number\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -261,7 +261,7 @@ ], "since": "", "returns": "number", - "examples": "
ts
faker.optionsParamMethod(options: {\n  a: number,\n  b: string,\n  c: boolean,\n  d: () => string\n}): number\n
\n
", + "examples": "
ts
faker.optionsParamMethod(options: {\n  a: number,\n  b: string,\n  c: boolean,\n  d: () => string\n}): number\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -290,7 +290,7 @@ ], "since": "", "returns": "number", - "examples": "
ts
faker.optionsTypeParamMethodWithDefaults(a: ParameterOptionsTypeA = { value: 1 }, b: ParameterOptionsTypeB = { value: 1 }, c: ParameterOptionsTypeC): number\n
\n
", + "examples": "
ts
faker.optionsTypeParamMethodWithDefaults(a: ParameterOptionsTypeA = { value: 1 }, b: ParameterOptionsTypeB = { value: 1 }, c: ParameterOptionsTypeC): number\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -307,7 +307,7 @@ ], "since": "", "returns": "number", - "examples": "
ts
faker.requiredNumberParamMethod(a: number): number\n
\n
", + "examples": "
ts
faker.requiredNumberParamMethod(a: number): number\n
\n
", "deprecated": false, "seeAlsos": [] }, @@ -324,7 +324,7 @@ ], "since": "", "returns": "string", - "examples": "
ts
faker.stringUnionParamMethod(value: 'a' | 'b'): string\n
\n
", + "examples": "
ts
faker.stringUnionParamMethod(value: 'a' | 'b'): string\n
\n
", "deprecated": false, "seeAlsos": [] } From 036b4dd8dd336946457f88e9c5cb41213452109d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 28 Oct 2022 23:06:19 +0200 Subject: [PATCH 05/14] chore(deps): update devdependencies (#1495) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 12 +++--- pnpm-lock.yaml | 101 ++++++++++++++++++++++++++++--------------------- 2 files changed, 64 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index a560ee90ee9..619a5a0e26f 100644 --- a/package.json +++ b/package.json @@ -97,11 +97,11 @@ "@algolia/client-search": "~4.14.2", "@types/glob": "~8.0.0", "@types/markdown-it": "~12.2.3", - "@types/node": "~18.8.4", + "@types/node": "~18.11.7", "@types/prettier": "~2.7.1", "@types/react": "~18.0.22", "@types/sanitize-html": "~2.6.2", - "@types/semver": "~7.3.12", + "@types/semver": "~7.3.13", "@types/validator": "~13.7.9", "@typescript-eslint/eslint-plugin": "~5.40.1", "@typescript-eslint/parser": "~5.40.1", @@ -110,13 +110,13 @@ "@vueuse/core": "~9.4.0", "c8": "~7.12.0", "conventional-changelog-cli": "~2.2.2", - "cypress": "~10.10.0", + "cypress": "~10.11.0", "esbuild": "~0.15.12", "eslint": "~8.26.0", "eslint-config-prettier": "~8.5.0", "eslint-define-config": "~1.8.0", "eslint-gitignore": "~0.1.0", - "eslint-plugin-jsdoc": "~39.3.23", + "eslint-plugin-jsdoc": "~39.3.25", "eslint-plugin-prettier": "~4.2.1", "glob": "~8.0.3", "lint-staged": "~13.0.3", @@ -128,7 +128,7 @@ "react": "~18.2.0", "react-dom": "~18.2.0", "rimraf": "~3.0.2", - "sanitize-html": "~2.7.2", + "sanitize-html": "~2.7.3", "semver": "~7.3.8", "simple-git-hooks": "~2.8.1", "standard-version": "~9.5.0", @@ -137,7 +137,7 @@ "typedoc-plugin-missing-exports": "~1.0.0", "typescript": "~4.8.4", "validator": "~13.7.0", - "vite": "~3.1.8", + "vite": "~3.2.1", "vitepress": "1.0.0-alpha.26", "vitest": "~0.24.3", "vue": "~3.2.41" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6418f9660f5..09a9fbc83b6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,11 +5,11 @@ specifiers: '@algolia/client-search': ~4.14.2 '@types/glob': ~8.0.0 '@types/markdown-it': ~12.2.3 - '@types/node': ~18.8.4 + '@types/node': ~18.11.7 '@types/prettier': ~2.7.1 '@types/react': ~18.0.22 '@types/sanitize-html': ~2.6.2 - '@types/semver': ~7.3.12 + '@types/semver': ~7.3.13 '@types/validator': ~13.7.9 '@typescript-eslint/eslint-plugin': ~5.40.1 '@typescript-eslint/parser': ~5.40.1 @@ -18,13 +18,13 @@ specifiers: '@vueuse/core': ~9.4.0 c8: ~7.12.0 conventional-changelog-cli: ~2.2.2 - cypress: ~10.10.0 + cypress: ~10.11.0 esbuild: ~0.15.12 eslint: ~8.26.0 eslint-config-prettier: ~8.5.0 eslint-define-config: ~1.8.0 eslint-gitignore: ~0.1.0 - eslint-plugin-jsdoc: ~39.3.23 + eslint-plugin-jsdoc: ~39.3.25 eslint-plugin-prettier: ~4.2.1 glob: ~8.0.3 lint-staged: ~13.0.3 @@ -36,7 +36,7 @@ specifiers: react: ~18.2.0 react-dom: ~18.2.0 rimraf: ~3.0.2 - sanitize-html: ~2.7.2 + sanitize-html: ~2.7.3 semver: ~7.3.8 simple-git-hooks: ~2.8.1 standard-version: ~9.5.0 @@ -45,7 +45,7 @@ specifiers: typedoc-plugin-missing-exports: ~1.0.0 typescript: ~4.8.4 validator: ~13.7.0 - vite: ~3.1.8 + vite: ~3.2.1 vitepress: 1.0.0-alpha.26 vitest: ~0.24.3 vue: ~3.2.41 @@ -55,11 +55,11 @@ devDependencies: '@algolia/client-search': 4.14.2 '@types/glob': 8.0.0 '@types/markdown-it': 12.2.3 - '@types/node': 18.8.4 + '@types/node': 18.11.7 '@types/prettier': 2.7.1 '@types/react': 18.0.22 '@types/sanitize-html': 2.6.2 - '@types/semver': 7.3.12 + '@types/semver': 7.3.13 '@types/validator': 13.7.9 '@typescript-eslint/eslint-plugin': 5.40.1_c4zyna56jjjrggqkyejnaxjxfu '@typescript-eslint/parser': 5.40.1_wyqvi574yv7oiwfeinomdzmc3m @@ -68,13 +68,13 @@ devDependencies: '@vueuse/core': 9.4.0_vue@3.2.41 c8: 7.12.0 conventional-changelog-cli: 2.2.2 - cypress: 10.10.0 + cypress: 10.11.0 esbuild: 0.15.12 eslint: 8.26.0 eslint-config-prettier: 8.5.0_eslint@8.26.0 eslint-define-config: 1.8.0 eslint-gitignore: 0.1.0_eslint@8.26.0 - eslint-plugin-jsdoc: 39.3.23_eslint@8.26.0 + eslint-plugin-jsdoc: 39.3.25_eslint@8.26.0 eslint-plugin-prettier: 4.2.1_aniwkeyvlpmwkidetuytnokvcm glob: 8.0.3 lint-staged: 13.0.3 @@ -86,7 +86,7 @@ devDependencies: react: 18.2.0 react-dom: 18.2.0_react@18.2.0 rimraf: 3.0.2 - sanitize-html: 2.7.2 + sanitize-html: 2.7.3 semver: 7.3.8 simple-git-hooks: 2.8.1 standard-version: 9.5.0 @@ -95,7 +95,7 @@ devDependencies: typedoc-plugin-missing-exports: 1.0.0_typedoc@0.23.18 typescript: 4.8.4 validator: 13.7.0 - vite: 3.1.8 + vite: 3.2.1 vitepress: 1.0.0-alpha.26_7s2zbo6pukdbh3jcjyutgyfrd4 vitest: 0.24.3_@vitest+ui@0.24.3 vue: 3.2.41 @@ -358,8 +358,8 @@ packages: - '@algolia/client-search' dev: true - /@es-joy/jsdoccomment/0.33.0: - resolution: {integrity: sha512-bkxMGTlHPE4vfarXt1L1fOm81O18jTRFNgh3Fm4iPKctfWxcpJw4cpth5BhLkGZy4HFzGn/KfD/zGks/J+ZIIw==} + /@es-joy/jsdoccomment/0.33.4: + resolution: {integrity: sha512-02XyYuvR/Gn+3BT6idHVNQ4SSQlA1X1FeEfeKm2ypv8ANB6Lt9KRFZ2S7y5xjwR+EPQ/Rzb0XFaD+xKyqe4ALw==} engines: {node: ^14 || ^16 || ^17 || ^18 || ^19} dependencies: comment-parser: 1.3.1 @@ -596,7 +596,7 @@ packages: resolution: {integrity: sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.8.4 + '@types/node': 18.11.7 dev: true /@types/istanbul-lib-coverage/2.0.4: @@ -634,8 +634,8 @@ packages: resolution: {integrity: sha512-Y6S38pFr04yb13qqHf8uk1nHE3lXgQ30WZbv1mLliV9pt0NjvqdWttLcrOYLnXbOafknVYRHZGoMSpR9UwfYow==} dev: true - /@types/node/18.8.4: - resolution: {integrity: sha512-WdlVphvfR/GJCLEMbNA8lJ0lhFNBj4SW3O+O5/cEGw9oYrv0al9zTwuQsq+myDUXgNx2jgBynoVgZ2MMJ6pbow==} + /@types/node/18.11.7: + resolution: {integrity: sha512-LhFTglglr63mNXUSRYD8A+ZAIu5sFqNJ4Y2fPuY7UlrySJH87rRRlhtVmMHplmfk5WkoJGmDjE9oiTfyX94CpQ==} dev: true /@types/normalize-package-data/2.4.1: @@ -668,8 +668,8 @@ packages: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} dev: true - /@types/semver/7.3.12: - resolution: {integrity: sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A==} + /@types/semver/7.3.13: + resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} dev: true /@types/sinonjs__fake-timers/8.1.1: @@ -692,7 +692,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 18.8.4 + '@types/node': 18.11.7 dev: true optional: true @@ -803,7 +803,7 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@types/semver': 7.3.12 + '@types/semver': 7.3.13 '@typescript-eslint/scope-manager': 5.40.1 '@typescript-eslint/types': 5.40.1 '@typescript-eslint/typescript-estree': 5.40.1_typescript@4.8.4 @@ -824,14 +824,14 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /@vitejs/plugin-vue/3.1.2_vite@3.1.8+vue@3.2.41: + /@vitejs/plugin-vue/3.1.2_vite@3.2.1+vue@3.2.41: resolution: {integrity: sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^3.0.0 vue: ^3.2.25 dependencies: - vite: 3.1.8 + vite: 3.2.1 vue: 3.2.41 dev: true @@ -849,6 +849,7 @@ packages: - less - sass - stylus + - sugarss - supports-color - terser dev: true @@ -886,7 +887,7 @@ packages: '@vue/shared': 3.2.41 estree-walker: 2.0.2 magic-string: 0.25.9 - postcss: 8.4.17 + postcss: 8.4.18 source-map: 0.6.1 dev: true @@ -1644,8 +1645,8 @@ packages: resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} dev: true - /cypress/10.10.0: - resolution: {integrity: sha512-bU8r44x1NIYAUNNXt3CwJpLOVth7HUv2hUhYCxZmgZ1IugowDvuHNpevnoZRQx1KKOEisLvIJW+Xen5Pjn41pg==} + /cypress/10.11.0: + resolution: {integrity: sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==} engines: {node: '>=12.0.0'} hasBin: true requiresBuild: true @@ -2203,13 +2204,13 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc/39.3.23_eslint@8.26.0: - resolution: {integrity: sha512-ZwutuEmsdz8sj9fCXz4r/4x3uZ4qrB6+ca3rIyH3HHEEj5t6xgOSBWIj8IkxZkBUKvoadWHM6iCPzkmXgPHpsA==} + /eslint-plugin-jsdoc/39.3.25_eslint@8.26.0: + resolution: {integrity: sha512-7JiFOOaipz7Z7lNQ9sMJ6cdvclmVUwNYtFWGS3a0k0uEFcdZPPD64WOfENuyNHpl86C0AKIEPgOpZby5kd+pew==} engines: {node: ^14 || ^16 || ^17 || ^18 || ^19} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@es-joy/jsdoccomment': 0.33.0 + '@es-joy/jsdoccomment': 0.33.4 comment-parser: 1.3.1 debug: 4.3.4 escape-string-regexp: 4.0.0 @@ -3858,6 +3859,15 @@ packages: source-map-js: 1.0.2 dev: true + /postcss/8.4.18: + resolution: {integrity: sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.4 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + /preact/10.11.1: resolution: {integrity: sha512-1Wz5PCRm6Fg+6BTXWJHhX4wRK9MZbZBHuwBqfZlOdVm2NqPe8/rjYpufvYCwJSGb9layyzB2jTTXfpCTynLqFQ==} dev: true @@ -3904,7 +3914,7 @@ packages: dev: true /proxy-from-env/1.0.0: - resolution: {integrity: sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=} + resolution: {integrity: sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==} dev: true /psl/1.9.0: @@ -4087,8 +4097,8 @@ packages: glob: 7.2.3 dev: true - /rollup/2.78.1: - resolution: {integrity: sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==} + /rollup/2.79.1: + resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: @@ -4127,8 +4137,8 @@ packages: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true - /sanitize-html/2.7.2: - resolution: {integrity: sha512-DggSTe7MviO+K4YTCwprG6W1vsG+IIX67yp/QY55yQqKCJYSWzCA1rZbaXzkjoKeL9+jqwm56wD6srYLtUNivg==} + /sanitize-html/2.7.3: + resolution: {integrity: sha512-jMaHG29ak4miiJ8wgqA1849iInqORgNv7SLfSw9LtfOhEUQ1C0YHKH73R+hgyufBW9ZFeJrb057k9hjlfBCVlw==} dependencies: deepmerge: 4.2.2 escape-string-regexp: 4.0.0 @@ -4787,7 +4797,7 @@ packages: dev: true /verror/1.10.0: - resolution: {integrity: sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=} + resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} engines: {'0': node >=0.6.0} dependencies: assert-plus: 1.0.0 @@ -4795,14 +4805,15 @@ packages: extsprintf: 1.3.0 dev: true - /vite/3.1.8: - resolution: {integrity: sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg==} + /vite/3.2.1: + resolution: {integrity: sha512-ADtMkfHuWq4tskJsri2n2FZkORO8ZyhI+zIz7zTrDAgDEtct1jdxOg3YsZBfHhKjmMoWLOSCr+64qrEDGo/DbQ==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: less: '*' sass: '*' stylus: '*' + sugarss: '*' terser: ^5.4.0 peerDependenciesMeta: less: @@ -4811,13 +4822,15 @@ packages: optional: true stylus: optional: true + sugarss: + optional: true terser: optional: true dependencies: esbuild: 0.15.12 - postcss: 8.4.17 + postcss: 8.4.18 resolve: 1.22.1 - rollup: 2.78.1 + rollup: 2.79.1 optionalDependencies: fsevents: 2.3.2 dev: true @@ -4828,13 +4841,13 @@ packages: dependencies: '@docsearch/css': 3.3.0 '@docsearch/js': 3.3.0_7s2zbo6pukdbh3jcjyutgyfrd4 - '@vitejs/plugin-vue': 3.1.2_vite@3.1.8+vue@3.2.41 + '@vitejs/plugin-vue': 3.1.2_vite@3.2.1+vue@3.2.41 '@vue/devtools-api': 6.4.5 '@vueuse/core': 9.4.0_vue@3.2.41 body-scroll-lock: 4.0.0-beta.0 shiki: 0.11.1 shiki-processor: 0.1.0_shiki@0.11.1 - vite: 3.1.8 + vite: 3.2.1 vue: 3.2.41 transitivePeerDependencies: - '@algolia/client-search' @@ -4845,6 +4858,7 @@ packages: - react-dom - sass - stylus + - sugarss - terser dev: true @@ -4872,7 +4886,7 @@ packages: dependencies: '@types/chai': 4.3.3 '@types/chai-subset': 1.3.3 - '@types/node': 18.8.4 + '@types/node': 18.11.7 '@vitest/ui': 0.24.3 chai: 4.3.6 debug: 4.3.4 @@ -4881,11 +4895,12 @@ packages: tinybench: 2.3.0 tinypool: 0.3.0 tinyspy: 1.0.2 - vite: 3.1.8 + vite: 3.2.1 transitivePeerDependencies: - less - sass - stylus + - sugarss - supports-color - terser dev: true From ba5e29e69169906ba2cac9d371774c5619a1b539 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 28 Oct 2022 21:14:50 +0000 Subject: [PATCH 06/14] chore(deps): update doc-dependencies (#1493) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 ++-- pnpm-lock.yaml | 36 ++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 619a5a0e26f..ef18e967ebb 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@types/markdown-it": "~12.2.3", "@types/node": "~18.11.7", "@types/prettier": "~2.7.1", - "@types/react": "~18.0.22", + "@types/react": "~18.0.24", "@types/sanitize-html": "~2.6.2", "@types/semver": "~7.3.13", "@types/validator": "~13.7.9", @@ -133,7 +133,7 @@ "simple-git-hooks": "~2.8.1", "standard-version": "~9.5.0", "tsx": "~3.11.0", - "typedoc": "~0.23.18", + "typedoc": "~0.23.19", "typedoc-plugin-missing-exports": "~1.0.0", "typescript": "~4.8.4", "validator": "~13.7.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 09a9fbc83b6..b18d1583fcd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,7 +7,7 @@ specifiers: '@types/markdown-it': ~12.2.3 '@types/node': ~18.11.7 '@types/prettier': ~2.7.1 - '@types/react': ~18.0.22 + '@types/react': ~18.0.24 '@types/sanitize-html': ~2.6.2 '@types/semver': ~7.3.13 '@types/validator': ~13.7.9 @@ -41,7 +41,7 @@ specifiers: simple-git-hooks: ~2.8.1 standard-version: ~9.5.0 tsx: ~3.11.0 - typedoc: ~0.23.18 + typedoc: ~0.23.19 typedoc-plugin-missing-exports: ~1.0.0 typescript: ~4.8.4 validator: ~13.7.0 @@ -57,7 +57,7 @@ devDependencies: '@types/markdown-it': 12.2.3 '@types/node': 18.11.7 '@types/prettier': 2.7.1 - '@types/react': 18.0.22 + '@types/react': 18.0.24 '@types/sanitize-html': 2.6.2 '@types/semver': 7.3.13 '@types/validator': 13.7.9 @@ -91,12 +91,12 @@ devDependencies: simple-git-hooks: 2.8.1 standard-version: 9.5.0 tsx: 3.11.0 - typedoc: 0.23.18_typescript@4.8.4 - typedoc-plugin-missing-exports: 1.0.0_typedoc@0.23.18 + typedoc: 0.23.19_typescript@4.8.4 + typedoc-plugin-missing-exports: 1.0.0_typedoc@0.23.19 typescript: 4.8.4 validator: 13.7.0 vite: 3.2.1 - vitepress: 1.0.0-alpha.26_7s2zbo6pukdbh3jcjyutgyfrd4 + vitepress: 1.0.0-alpha.26_xx3kjywz6sp4etd6h74iqxwu3u vitest: 0.24.3_@vitest+ui@0.24.3 vue: 3.2.41 @@ -321,10 +321,10 @@ packages: resolution: {integrity: sha512-rODCdDtGyudLj+Va8b6w6Y85KE85bXRsps/R4Yjwt5vueXKXZQKYw0aA9knxLBT6a/bI/GMrAcmCR75KYOM6hg==} dev: true - /@docsearch/js/3.3.0_7s2zbo6pukdbh3jcjyutgyfrd4: + /@docsearch/js/3.3.0_xx3kjywz6sp4etd6h74iqxwu3u: resolution: {integrity: sha512-oFXWRPNvPxAzBhnFJ9UCFIYZiQNc3Yrv6912nZHw/UIGxsyzKpNRZgHq8HDk1niYmOSoLKtVFcxkccpQmYGFyg==} dependencies: - '@docsearch/react': 3.3.0_7s2zbo6pukdbh3jcjyutgyfrd4 + '@docsearch/react': 3.3.0_xx3kjywz6sp4etd6h74iqxwu3u preact: 10.11.1 transitivePeerDependencies: - '@algolia/client-search' @@ -333,7 +333,7 @@ packages: - react-dom dev: true - /@docsearch/react/3.3.0_7s2zbo6pukdbh3jcjyutgyfrd4: + /@docsearch/react/3.3.0_xx3kjywz6sp4etd6h74iqxwu3u: resolution: {integrity: sha512-fhS5adZkae2SSdMYEMVg6pxI5a/cE+tW16ki1V0/ur4Fdok3hBRkmN/H8VvlXnxzggkQIIRIVvYPn00JPjen3A==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' @@ -350,7 +350,7 @@ packages: '@algolia/autocomplete-core': 1.7.2 '@algolia/autocomplete-preset-algolia': 1.7.2_qs6lk5nhygj2o3hj4sf6xnr724 '@docsearch/css': 3.3.0 - '@types/react': 18.0.22 + '@types/react': 18.0.24 algoliasearch: 4.14.2 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -650,8 +650,8 @@ packages: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} dev: true - /@types/react/18.0.22: - resolution: {integrity: sha512-4yWc5PyCkZN8ke8K9rQHkTXxHIWHxLzzW6RI1kXVoepkD3vULpKzC2sDtAMKn78h92BRYuzf+7b/ms7ajE6hFw==} + /@types/react/18.0.24: + resolution: {integrity: sha512-wRJWT6ouziGUy+9uX0aW4YOJxAY0bG6/AOk5AW5QSvZqI7dk6VBIbXvcVgIw/W5Jrl24f77df98GEKTJGOLx7Q==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.2 @@ -4695,16 +4695,16 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true - /typedoc-plugin-missing-exports/1.0.0_typedoc@0.23.18: + /typedoc-plugin-missing-exports/1.0.0_typedoc@0.23.19: resolution: {integrity: sha512-7s6znXnuAj1eD9KYPyzVzR1lBF5nwAY8IKccP5sdoO9crG4lpd16RoFpLsh2PccJM+I2NASpr0+/NMka6ThwVA==} peerDependencies: typedoc: 0.22.x || 0.23.x dependencies: - typedoc: 0.23.18_typescript@4.8.4 + typedoc: 0.23.19_typescript@4.8.4 dev: true - /typedoc/0.23.18_typescript@4.8.4: - resolution: {integrity: sha512-0Tq/uFkUuWyRYyjOShTkhsOm6u5E8wf0i6L76/k5znEaxvWKHGeT2ywZThGrDrryV/skO/REM824D1gm8ccQuA==} + /typedoc/0.23.19_typescript@4.8.4: + resolution: {integrity: sha512-70jPL0GQnSJtgQqI7ifOWxpTXrB3sxc4SWPPRn3K0wdx3txI6ZIT/ZYMF39dNg2Gjmql45cO+cAKXJp0TpqOVA==} engines: {node: '>= 14.14'} hasBin: true peerDependencies: @@ -4835,12 +4835,12 @@ packages: fsevents: 2.3.2 dev: true - /vitepress/1.0.0-alpha.26_7s2zbo6pukdbh3jcjyutgyfrd4: + /vitepress/1.0.0-alpha.26_xx3kjywz6sp4etd6h74iqxwu3u: resolution: {integrity: sha512-XpDpflrdmyBmUQrg06q29Mhez144NvoZ48pRvNhANy/wV7E7XJ1zenQROOSADnOsAlhV1gzcNjqiFNObCk7l8A==} hasBin: true dependencies: '@docsearch/css': 3.3.0 - '@docsearch/js': 3.3.0_7s2zbo6pukdbh3jcjyutgyfrd4 + '@docsearch/js': 3.3.0_xx3kjywz6sp4etd6h74iqxwu3u '@vitejs/plugin-vue': 3.1.2_vite@3.2.1+vue@3.2.41 '@vue/devtools-api': 6.4.5 '@vueuse/core': 9.4.0_vue@3.2.41 From 2ce8056cc5f1fa874447da6077338eb793663179 Mon Sep 17 00:00:00 2001 From: thilllon Date: Sat, 29 Oct 2022 07:04:55 +0900 Subject: [PATCH 07/14] feat(locale): update Korean color, date, location, word, company (#1492) --- src/locales/ko/color/human.ts | 27 +++ src/locales/ko/color/index.ts | 12 ++ src/locales/ko/company/suffix.ts | 13 +- src/locales/ko/date/index.ts | 14 ++ src/locales/ko/date/month.ts | 36 ++++ src/locales/ko/date/weekday.ts | 10 + src/locales/ko/index.ts | 6 + src/locales/ko/location/index.ts | 2 + src/locales/ko/location/secondary_address.ts | 1 + src/locales/ko/word/adjective.ts | 207 +++++++++++++++++++ src/locales/ko/word/adverb.ts | 47 +++++ src/locales/ko/word/index.ts | 16 ++ src/locales/ko/word/noun.ts | 111 ++++++++++ 13 files changed, 501 insertions(+), 1 deletion(-) create mode 100644 src/locales/ko/color/human.ts create mode 100644 src/locales/ko/color/index.ts create mode 100644 src/locales/ko/date/index.ts create mode 100644 src/locales/ko/date/month.ts create mode 100644 src/locales/ko/date/weekday.ts create mode 100644 src/locales/ko/location/secondary_address.ts create mode 100644 src/locales/ko/word/adjective.ts create mode 100644 src/locales/ko/word/adverb.ts create mode 100644 src/locales/ko/word/index.ts create mode 100644 src/locales/ko/word/noun.ts diff --git a/src/locales/ko/color/human.ts b/src/locales/ko/color/human.ts new file mode 100644 index 00000000000..49d2012ac47 --- /dev/null +++ b/src/locales/ko/color/human.ts @@ -0,0 +1,27 @@ +export default [ + '검은색', + '금색', + '난초색', + '노란색', + '라임색', + '마젠타', + '민트색', + '분홍색', + '빨간색', + '상아색', + '연보라색', + '연어색', + '옥색', + '올리브', + '은색', + '자두색', + '자주색', + '적갈색', + '주황색', + '청록색', + '초록색', + '푸른색', + '하늘색', + '하얀색', + '회색', +]; diff --git a/src/locales/ko/color/index.ts b/src/locales/ko/color/index.ts new file mode 100644 index 00000000000..79cc39f02f3 --- /dev/null +++ b/src/locales/ko/color/index.ts @@ -0,0 +1,12 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ +import type { ColorDefinitions } from '../../..'; +import human from './human'; + +const color: ColorDefinitions = { + human, +}; + +export default color; diff --git a/src/locales/ko/company/suffix.ts b/src/locales/ko/company/suffix.ts index 10b29c85334..c7523d1df67 100644 --- a/src/locales/ko/company/suffix.ts +++ b/src/locales/ko/company/suffix.ts @@ -1 +1,12 @@ -export default ['연구소', '게임즈', '그룹', '전자', '물산', '코리아']; +export default [ + '연구소', + '게임즈', + '그룹', + '전자', + '물산', + '코리아', + '공사', + '증권', + '은행', + '중공업', +]; diff --git a/src/locales/ko/date/index.ts b/src/locales/ko/date/index.ts new file mode 100644 index 00000000000..cd296b42a45 --- /dev/null +++ b/src/locales/ko/date/index.ts @@ -0,0 +1,14 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ +import type { DateDefinitions } from '../../..'; +import month from './month'; +import weekday from './weekday'; + +const date: DateDefinitions = { + month, + weekday, +}; + +export default date; diff --git a/src/locales/ko/date/month.ts b/src/locales/ko/date/month.ts new file mode 100644 index 00000000000..c5ba13e56a9 --- /dev/null +++ b/src/locales/ko/date/month.ts @@ -0,0 +1,36 @@ +export default { + wide: [ + '1월', + '2월', + '3월', + '4월', + '5월', + '6월', + '7월', + '8월', + '9월', + '10월', + '11월', + '12월', + ], + // Property "wide_context" is optional, if not set then "wide" will be used instead + // It is used to specify a word in context, which may differ from a stand-alone word + // wide_context: [], + abbr: [ + '1월', + '2월', + '3월', + '4월', + '5월', + '6월', + '7월', + '8월', + '9월', + '10월', + '11월', + '12월', + ], + // Property "abbr_context" is optional, if not set then "abbr" will be used instead + // It is used to specify a word in context, which may differ from a stand-alone word + // abbr_context: [], +}; diff --git a/src/locales/ko/date/weekday.ts b/src/locales/ko/date/weekday.ts new file mode 100644 index 00000000000..ad46f425754 --- /dev/null +++ b/src/locales/ko/date/weekday.ts @@ -0,0 +1,10 @@ +export default { + wide: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'], + // Property "wide_context" is optional, if not set then "wide" will be used instead + // It is used to specify a word in context, which may differ from a stand-alone word + // wide_context: [], + abbr: ['일', '월', '화', '수', '목', '금', '토'], + // Property "abbr_context" is optional, if not set then "abbr" will be used instead + // It is used to specify a word in context, which may differ from a stand-alone word + // abbr_context: [], +}; diff --git a/src/locales/ko/index.ts b/src/locales/ko/index.ts index 47bc6286da5..05aacdf0ca5 100644 --- a/src/locales/ko/index.ts +++ b/src/locales/ko/index.ts @@ -3,21 +3,27 @@ * Run 'pnpm run generate:locales' to update. */ import type { LocaleDefinition } from '../..'; +import color from './color'; import company from './company'; +import date from './date'; import internet from './internet'; import location from './location'; import lorem from './lorem'; import person from './person'; import phone_number from './phone_number'; +import word from './word'; const ko: LocaleDefinition = { title: 'Korean', + color, company, + date, internet, location, lorem, person, phone_number, + word, }; export default ko; diff --git a/src/locales/ko/location/index.ts b/src/locales/ko/location/index.ts index 1a954b76598..3d3789970c1 100644 --- a/src/locales/ko/location/index.ts +++ b/src/locales/ko/location/index.ts @@ -7,6 +7,7 @@ import city from './city'; import city_name from './city_name'; import city_suffix from './city_suffix'; import postcode from './postcode'; +import secondary_address from './secondary_address'; import state from './state'; import state_abbr from './state_abbr'; import street from './street'; @@ -18,6 +19,7 @@ const location: LocationDefinitions = { city_name, city_suffix, postcode, + secondary_address, state, state_abbr, street, diff --git a/src/locales/ko/location/secondary_address.ts b/src/locales/ko/location/secondary_address.ts new file mode 100644 index 00000000000..bd9383b1b86 --- /dev/null +++ b/src/locales/ko/location/secondary_address.ts @@ -0,0 +1 @@ +export default ['아파트 ###동', '###호']; diff --git a/src/locales/ko/word/adjective.ts b/src/locales/ko/word/adjective.ts new file mode 100644 index 00000000000..00e16a3d461 --- /dev/null +++ b/src/locales/ko/word/adjective.ts @@ -0,0 +1,207 @@ +export default [ + '감정적인', + '같은', + '거대한', + '거창한', + '건조한', + '겁 없는', + '격렬한', + '결정적인', + '경솔한', + '경험한', + '고귀한', + '고급의', + '고대의', + '공정한', + '관심 있는', + '굉장한', + '교양 있는', + '교육받은', + '교활한', + '구부러진', + '굴곡진', + '굵은', + '권위 있는', + '귀여운', + '극적인', + '금발의', + '기민한', + '기분 좋은', + '기쁜', + '기초적인', + '깊은', + '깨끗한', + '깨진', + '끊임없는', + '끔찍한', + '나쁜', + '날씬한', + '냉담한', + '넓은 마음을 가진', + '놀라운', + '눈부신', + '눈이 먼', + '늙은', + '능숙한', + '다른', + '단조로운', + '단호한', + '닫힌', + '당황스러운', + '대담한', + '대량', + '더러운', + '동굴 같은', + '두려운', + '뛰어난', + '마른', + '막대한', + '맛있는', + '매력적인', + '매혹적인', + '먹을 수 있는', + '먼', + '멍든', + '메마른', + '명확한', + '모범적인', + '무더운', + '무서운', + '무심한', + '미친', + '밀집한', + '밝은', + '방어', + '방음', + '버려진', + '별개의', + '복잡한', + '부끄러운', + '부담스러운', + '부드러운', + '부러워하는', + '부정한', + '부족한', + '분명한', + '분주한', + '불결한', + '불룩한', + '불안한', + '불충실한', + '붐비는', + '비뚤어진', + '비싼', + '비어 있는', + '비참한', + '빠른', + '사랑스러운', + '사랑하는', + '사려 깊은', + '사악한', + '살아 있는', + '상세한', + '상쾌한', + '생기 있는', + '생분해성', + '성실한', + '세련된', + '소름 끼치는', + '솔직한', + '순수한', + '쉬운', + '습한', + '시원한', + '신나는', + '신뢰할 수 있는', + '싼', + '아름다운', + '알고 있는', + '약간의', + '어느', + '어두운', + '어려운', + '어리석은', + '어색한', + '어설픈', + '어지러운', + '억센', + '엄청난', + '역겨운', + '열심히', + '영리한', + '예술적인', + '예의 바른', + '온화한', + '완벽한', + '외향적인', + '용감한', + '용기 있는', + '우아한', + '원통형', + '위독한', + '윙윙', + '유리한', + '유명한', + '유익한', + '유치한', + '윤리적', + '음침한', + '의기 양양한', + '의식하는', + '이국적인', + '이타적인', + '인기 많은', + '인정 많은', + '일찍', + '자신 있는', + '잔혹한', + '저명한', + '저주받은', + '적극적인', + '적절한', + '전통적인', + '젊은', + '정교한', + '정통한', + '정확한', + '조잡한', + '존경하는', + '주의 깊은', + '죽은', + '즐거운', + '지루한', + '진지한', + '짧은', + '차가운', + '창의적인', + '철저한', + '추운', + '충실한', + '치명적인', + '친숙한', + '친절한', + '침착한', + '쾌활한', + '큰', + '타원형의', + '탄력 있는', + '탈진한', + '탐욕스러운', + '통통한', + '편안한', + '품위 있는', + '풍부한', + '필수적인', + '행복한', + '향긋한', + '혼란스러운', + '화난', + '화려한', + '환상적', + '활동적인', + '활발한', + '훌륭한', + '흔한', + '흥분한', + '희미한', +]; diff --git a/src/locales/ko/word/adverb.ts b/src/locales/ko/word/adverb.ts new file mode 100644 index 00000000000..6421274aefe --- /dev/null +++ b/src/locales/ko/word/adverb.ts @@ -0,0 +1,47 @@ +export default [ + '간단히', + '거꾸로', + '거만하게', + '거의', + '고요히', + '고의로', + '극진히', + '깊이', + '나중에', + '노하여', + '다소', + '다채롭게', + '대담하게', + '대체로', + '도전적으로', + '똑똑하게', + '마구', + '맹목적으로', + '면밀히', + '명랑하게', + '몹시', + '바르게', + '바쁘게', + '밝게', + '분명히', + '비정상적으로', + '빠르게', + '심하게', + '아름답게', + '어색하게', + '언제나', + '열심히', + '용감하게', + '우연히', + '유감스럽게', + '의심스럽게', + '자랑스럽게', + '잔인하게', + '즐겁게', + '지속적으로', + '천하게', + '쿨하게', + '행복하게', + '흥미롭게', + '희미하게', +]; diff --git a/src/locales/ko/word/index.ts b/src/locales/ko/word/index.ts new file mode 100644 index 00000000000..fe65880a4b8 --- /dev/null +++ b/src/locales/ko/word/index.ts @@ -0,0 +1,16 @@ +/* + * This file is automatically generated. + * Run 'pnpm run generate:locales' to update. + */ +import type { WordDefinitions } from '../../..'; +import adjective from './adjective'; +import adverb from './adverb'; +import noun from './noun'; + +const word: WordDefinitions = { + adjective, + adverb, + noun, +}; + +export default word; diff --git a/src/locales/ko/word/noun.ts b/src/locales/ko/word/noun.ts new file mode 100644 index 00000000000..e2caa2bf199 --- /dev/null +++ b/src/locales/ko/word/noun.ts @@ -0,0 +1,111 @@ +export default [ + '가입', + '경보', + '고뇌', + '고도', + '고문', + '골목', + '공군', + '공기', + '공적', + '공항', + '관리', + '관리자', + '광고', + '구급차', + '구실', + '나이', + '내세', + '놀람', + '농업', + '달력', + '대사', + '대수학', + '대안', + '대행사', + '도토리', + '동맹', + '동작', + '무정부주의자', + '반침', + '배당', + '배우', + '변경', + '별명', + '보적', + '보좌관', + '부사', + '분석', + '분석자', + '분위기', + '불쌍한', + '비행기', + '비행사', + '비행선', + '비행장', + '성인', + '성취', + '성취자', + '쇠붙이', + '술', + '승인', + '아드레날린', + '아마존', + '아몬드', + '악어', + '안건', + '알파벳', + '알파카', + '애프터셰이브', + '앨범', + '양', + '양자', + '어댑터', + '에어백', + '에이전트', + '에일', + '여배우', + '여진', + '여파', + '연산', + '예의', + '오후', + '옹호', + '외계인', + '용돈', + '유연', + '유추', + '음향학', + '응집', + '이점', + '일', + '적응', + '전능자', + '전진', + '제단', + '조언', + '조정', + '주소', + '즐거움', + '지원', + '진보', + '진술', + '진술서', + '출현', + '침략', + '탄약', + '탐닉', + '특사', + '합금', + '합의', + '항공기', + '항공료', + '항공편', + '해석학', + '행동', + '형용사', + '호박색', + '활동', + '활동가', + '활성화', +]; From 4da3d5eac3805f609f4e40385aee6a645fd93540 Mon Sep 17 00:00:00 2001 From: EL JABIRI Tarik Date: Sat, 29 Oct 2022 17:17:08 +0100 Subject: [PATCH 08/14] docs: fix snippets of codes in usage guide (#1496) --- docs/guide/usage.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/usage.md b/docs/guide/usage.md index fcb51e98fc3..fca9315d3dc 100644 --- a/docs/guide/usage.md +++ b/docs/guide/usage.md @@ -142,7 +142,7 @@ Let's refactor our current code: import { faker } from '@faker-js/faker'; function createRandomUser(): User { - const sex = this.faker.person.sexType(); + const sex = faker.person.sexType(); const firstName = faker.person.firstName(sex); const lastName = faker.person.lastName(); const email = faker.internet.email(firstName, lastName); @@ -179,7 +179,7 @@ Faker has your back, with another helper method: import { faker } from '@faker-js/faker'; function createRandomUser(): User { - const sex = this.faker.person.sexType(); + const sex = faker.person.sexType(); const firstName = faker.person.firstName(sex); const lastName = faker.person.lastName(); const email = faker.helpers.unique(faker.internet.email, [ From 9abfcfb90cc73bfe961d446f5fb950976d5c2ccd Mon Sep 17 00:00:00 2001 From: Shinigami Date: Sun, 30 Oct 2022 09:03:26 +0100 Subject: [PATCH 09/14] refactor(mersenne): rewrite internal mersenne (#1447) --- src/faker.ts | 11 +-- src/internal/mersenne/mersenne.ts | 96 ++++++++---------------- src/modules/datatype/index.ts | 11 +-- test/__snapshots__/mersenne.spec.ts.snap | 48 +++++------- test/mersenne.spec.ts | 75 ++++-------------- 5 files changed, 75 insertions(+), 166 deletions(-) diff --git a/src/faker.ts b/src/faker.ts index f8a46511882..fd7ed5223a2 100644 --- a/src/faker.ts +++ b/src/faker.ts @@ -1,7 +1,8 @@ import type { LocaleDefinition } from './definitions'; import { FakerError } from './errors/faker-error'; import { deprecated } from './internal/deprecated'; -import { MersenneModule } from './internal/mersenne/mersenne'; +import type { Mersenne } from './internal/mersenne/mersenne'; +import mersenne from './internal/mersenne/mersenne'; import type { KnownLocale } from './locales'; import { AnimalModule } from './modules/animal'; import { ColorModule } from './modules/color'; @@ -79,7 +80,7 @@ export class Faker { readonly definitions: LocaleDefinition = this.initDefinitions(); /** @internal */ - private readonly _mersenne: MersenneModule = new MersenneModule(); + private readonly _mersenne: Mersenne = mersenne(); readonly random: RandomModule = new RandomModule(this); @@ -286,11 +287,7 @@ export class Faker { seed( seed: number | number[] = Math.ceil(Math.random() * Number.MAX_SAFE_INTEGER) ): number | number[] { - if (Array.isArray(seed) && seed.length) { - this._mersenne.seed_array(seed); - } else if (!Array.isArray(seed) && !isNaN(seed)) { - this._mersenne.seed(seed); - } + this._mersenne.seed(seed); return seed; } diff --git a/src/internal/mersenne/mersenne.ts b/src/internal/mersenne/mersenne.ts index 16019e2925a..e7c0355ce4f 100644 --- a/src/internal/mersenne/mersenne.ts +++ b/src/internal/mersenne/mersenne.ts @@ -1,81 +1,49 @@ -import { FakerError } from '../../errors/faker-error'; -import Gen from './twister'; +import Twister from './twister'; /** - * Module to generate seed based random numbers. + * Generate seed based random numbers. * * @internal */ -export class MersenneModule { - private gen = new Gen(); - - constructor() { - this.gen.initGenrand(Math.ceil(Math.random() * Number.MAX_SAFE_INTEGER)); - - // Bind `this` so namespaced is working correctly - for (const name of Object.getOwnPropertyNames(MersenneModule.prototype)) { - if (name === 'constructor' || typeof this[name] !== 'function') { - continue; - } - this[name] = this[name].bind(this); - } - } - +export interface Mersenne { /** - * Generates a random number between `[min, max)`. - * - * @param max The maximum number. Defaults to `32768`. - * @param min The minimum number. Defaults to `0`. + * Generates a random number between `[min, max)`. The result is already floored. * - * @example - * faker.mersenne.rand() // 15515 - * faker.mersenne.rand(1000, 500) // 578 - * - * @since 5.5.0 + * @param options The options to generate a random number. + * @param options.min The minimum number. + * @param options.max The maximum number. */ - rand(max = 32768, min = 0): number { - if (min > max) { - const temp = min; - min = max; - max = temp; - } - - return Math.floor(this.gen.genrandReal2() * (max - min) + min); - } + next(options: { max: number; min: number }): number; /** * Sets the seed to use. * - * @param S The seed to use. - * @throws If the seed is not a `number`. - * - * @since 5.5.0 + * @param seed The seed to use. */ - seed(S: number): void { - if (typeof S !== 'number') { - throw new FakerError( - `seed(S) must take numeric argument; is ${typeof S}` - ); - } + seed(seed: number | number[]): void; +} + +/** + * Generate seed based random numbers. + * + * @internal + */ +export default function mersenne(): Mersenne { + const twister = new Twister(); - this.gen.initGenrand(S); - } + twister.initGenrand(Math.ceil(Math.random() * Number.MAX_SAFE_INTEGER)); - /** - * Sets the seed to use. - * - * @param A The seed to use. - * @throws If the seed is not a `number[]`. - * - * @since 5.5.0 - */ - seed_array(A: number[]): void { - if (typeof A !== 'object') { - throw new FakerError( - `seed_array(A) must take array of numbers; is ${typeof A}` - ); - } + return { + next({ min, max }): number { + return Math.floor(twister.genrandReal2() * (max - min) + min); + }, - this.gen.initByArray(A, A.length); - } + seed(seed: number | number[]): void { + if (typeof seed === 'number') { + twister.initGenrand(seed); + } else if (Array.isArray(seed)) { + twister.initByArray(seed, seed.length); + } + }, + }; } diff --git a/src/modules/datatype/index.ts b/src/modules/datatype/index.ts index 41c5c3e4eb2..d4fcbbd6387 100644 --- a/src/modules/datatype/index.ts +++ b/src/modules/datatype/index.ts @@ -1,7 +1,7 @@ import type { Faker } from '../..'; import { FakerError } from '../../errors/faker-error'; import { deprecated } from '../../internal/deprecated'; -import type { MersenneModule } from '../../internal/mersenne/mersenne'; +import type { Mersenne } from '../../internal/mersenne/mersenne'; /** * Module to generate various primitive values and data types. @@ -56,13 +56,14 @@ export class DatatypeModule { throw new FakerError(`Max ${max} should be greater than min ${min}.`); } - const mersenne: MersenneModule = + const mersenne: Mersenne = // @ts-expect-error: access private member field this.faker._mersenne; - const randomNumber = Math.floor( - mersenne.rand(max / precision + 1, min / precision) - ); + const randomNumber = mersenne.next({ + min: min / precision, + max: max / precision + 1, + }); // Workaround problem in float point arithmetics for e.g. 6681493 / 0.01 return randomNumber / (1 / precision); diff --git a/test/__snapshots__/mersenne.spec.ts.snap b/test/__snapshots__/mersenne.spec.ts.snap index 1c221b19624..21d3e4cc84d 100644 --- a/test/__snapshots__/mersenne.spec.ts.snap +++ b/test/__snapshots__/mersenne.spec.ts.snap @@ -1,49 +1,37 @@ // Vitest Snapshot v1 -exports[`mersenne twister > seed: [42,1,2] > rand() 1`] = `28056`; +exports[`mersenne twister > seed: [42,1,2] > should return deterministic values for next({ min: -50, max: 60 }) 1`] = `44`; -exports[`mersenne twister > seed: [42,1,2] > should return deterministic values for rand(100, 0) 1`] = `85`; +exports[`mersenne twister > seed: [42,1,2] > should return deterministic values for next({ min: -60, max: 0 }) 1`] = `-9`; -exports[`mersenne twister > seed: [42,1,2] > should return deterministic values for rand(100, undefined) 1`] = `85`; +exports[`mersenne twister > seed: [42,1,2] > should return deterministic values for next({ min: 0, max: 100 }) 1`] = `85`; -exports[`mersenne twister > seed: [42,1,2] > should return deterministic values for rand(undefined, 0) 1`] = `28056`; +exports[`mersenne twister > seed: [1211,1,2] > should return deterministic values for next({ min: -50, max: 60 }) 1`] = `48`; -exports[`mersenne twister > seed: [1211,1,2] > rand() 1`] = `29217`; +exports[`mersenne twister > seed: [1211,1,2] > should return deterministic values for next({ min: -60, max: 0 }) 1`] = `-7`; -exports[`mersenne twister > seed: [1211,1,2] > should return deterministic values for rand(100, 0) 1`] = `89`; +exports[`mersenne twister > seed: [1211,1,2] > should return deterministic values for next({ min: 0, max: 100 }) 1`] = `89`; -exports[`mersenne twister > seed: [1211,1,2] > should return deterministic values for rand(100, undefined) 1`] = `89`; +exports[`mersenne twister > seed: [1337,1,2] > should return deterministic values for next({ min: -50, max: 60 }) 1`] = `-31`; -exports[`mersenne twister > seed: [1211,1,2] > should return deterministic values for rand(undefined, 0) 1`] = `29217`; +exports[`mersenne twister > seed: [1337,1,2] > should return deterministic values for next({ min: -60, max: 0 }) 1`] = `-50`; -exports[`mersenne twister > seed: [1337,1,2] > rand() 1`] = `5895`; +exports[`mersenne twister > seed: [1337,1,2] > should return deterministic values for next({ min: 0, max: 100 }) 1`] = `17`; -exports[`mersenne twister > seed: [1337,1,2] > should return deterministic values for rand(100, 0) 1`] = `17`; +exports[`mersenne twister > seed: 42 > should return deterministic values for next({ min: -50, max: 60 }) 1`] = `-9`; -exports[`mersenne twister > seed: [1337,1,2] > should return deterministic values for rand(100, undefined) 1`] = `17`; +exports[`mersenne twister > seed: 42 > should return deterministic values for next({ min: -60, max: 0 }) 1`] = `-38`; -exports[`mersenne twister > seed: [1337,1,2] > should return deterministic values for rand(undefined, 0) 1`] = `5895`; +exports[`mersenne twister > seed: 42 > should return deterministic values for next({ min: 0, max: 100 }) 1`] = `37`; -exports[`mersenne twister > seed: 42 > rand() 1`] = `12272`; +exports[`mersenne twister > seed: 1211 > should return deterministic values for next({ min: -50, max: 60 }) 1`] = `52`; -exports[`mersenne twister > seed: 42 > should return deterministic values for rand(100, 0) 1`] = `37`; +exports[`mersenne twister > seed: 1211 > should return deterministic values for next({ min: -60, max: 0 }) 1`] = `-5`; -exports[`mersenne twister > seed: 42 > should return deterministic values for rand(100, undefined) 1`] = `37`; +exports[`mersenne twister > seed: 1211 > should return deterministic values for next({ min: 0, max: 100 }) 1`] = `92`; -exports[`mersenne twister > seed: 42 > should return deterministic values for rand(undefined, 0) 1`] = `12272`; +exports[`mersenne twister > seed: 1337 > should return deterministic values for next({ min: -50, max: 60 }) 1`] = `-22`; -exports[`mersenne twister > seed: 1211 > rand() 1`] = `30425`; +exports[`mersenne twister > seed: 1337 > should return deterministic values for next({ min: -60, max: 0 }) 1`] = `-45`; -exports[`mersenne twister > seed: 1211 > should return deterministic values for rand(100, 0) 1`] = `92`; - -exports[`mersenne twister > seed: 1211 > should return deterministic values for rand(100, undefined) 1`] = `92`; - -exports[`mersenne twister > seed: 1211 > should return deterministic values for rand(undefined, 0) 1`] = `30425`; - -exports[`mersenne twister > seed: 1337 > rand() 1`] = `8586`; - -exports[`mersenne twister > seed: 1337 > should return deterministic values for rand(100, 0) 1`] = `26`; - -exports[`mersenne twister > seed: 1337 > should return deterministic values for rand(100, undefined) 1`] = `26`; - -exports[`mersenne twister > seed: 1337 > should return deterministic values for rand(undefined, 0) 1`] = `8586`; +exports[`mersenne twister > seed: 1337 > should return deterministic values for next({ min: 0, max: 100 }) 1`] = `26`; diff --git a/test/mersenne.spec.ts b/test/mersenne.spec.ts index 6b0a3125a0a..f6585783063 100644 --- a/test/mersenne.spec.ts +++ b/test/mersenne.spec.ts @@ -1,53 +1,39 @@ import { beforeAll, beforeEach, describe, expect, it } from 'vitest'; -import { FakerError } from '../src/errors/faker-error'; -import { MersenneModule } from '../src/internal/mersenne/mersenne'; +import type { Mersenne } from '../src/internal/mersenne/mersenne'; +import mersenneFn from '../src/internal/mersenne/mersenne'; import { seededRuns } from './support/seededRuns'; const minMaxTestCases = [ - { max: 100, min: 0 }, - { max: undefined, min: 0 }, - { max: 100, min: undefined }, + { min: 0, max: 100 }, + { min: -60, max: 0 }, + { min: -50, max: 60 }, ]; -const functionNames = ['rand']; - const NON_SEEDED_BASED_RUN = 25; describe('mersenne twister', () => { - let mersenne: MersenneModule; + let mersenne: Mersenne; beforeEach(() => { - mersenne = new MersenneModule(); + mersenne = mersenneFn(); }); for (const seed of [...seededRuns, [42, 1, 2], [1337, 1, 2], [1211, 1, 2]]) { describe(`seed: ${JSON.stringify(seed)}`, () => { beforeEach(() => { - if (Array.isArray(seed)) { - mersenne.seed_array(seed); - } else { - mersenne.seed(seed); - } + mersenne.seed(seed); }); - for (const functionName of functionNames) { - it(`${functionName}()`, () => { - const actual = mersenne[functionName](); - - expect(actual).toMatchSnapshot(); - }); - } - for (const { min, max } of minMaxTestCases) { - it(`should return deterministic values for rand(${max}, ${min})`, () => { - const actual = mersenne.rand(max, min); + it(`should return deterministic values for next({ min: ${min}, max: ${max} })`, () => { + const actual = mersenne.next({ min, max }); expect(actual).toMatchSnapshot(); }); } - it.todo(`should return 0 for rand(1)`, () => { - const actual = mersenne.rand(1); + it.todo(`should return 0 for next({ min: ${0}, max: ${1} })`, () => { + const actual = mersenne.next({ min: 0, max: 1 }); expect(actual).toEqual(0); }); @@ -66,22 +52,13 @@ describe('mersenne twister', () => { for (const seed of seeds) { describe(`random seeded tests ${JSON.stringify(seed)}`, () => { beforeAll(() => { - if (Array.isArray(seed)) { - mersenne.seed_array(seed); - } else { - mersenne.seed(seed); - } + mersenne.seed(seed); }); for (let i = 1; i <= NON_SEEDED_BASED_RUN; i++) { - describe('rand', () => { - it('should return a random number without given min / max arguments', () => { - const randomNumber = mersenne.rand(); - expect(randomNumber).toBeTypeOf('number'); - }); - + describe('next', () => { it('should return random number from interval [min, max)', () => { - const actual = mersenne.rand(0, 2); + const actual = mersenne.next({ min: 0, max: 2 }); expect(actual).toBeGreaterThanOrEqual(0); expect(actual).toBeLessThan(2); @@ -90,26 +67,4 @@ describe('mersenne twister', () => { } }); } - - it('should throw an error when attempting to seed() a non-integer', () => { - expect(() => - mersenne.seed( - // @ts-expect-error: non-integer error - 'abc' - ) - ).toThrowError( - new FakerError('seed(S) must take numeric argument; is string') - ); - }); - - it('should throw an error when attempting to seed() a non-integer', () => { - expect(() => - mersenne.seed_array( - // @ts-expect-error: non-integer error - 'abc' - ) - ).toThrowError( - new FakerError('seed_array(A) must take array of numbers; is string') - ); - }); }); From 226d4215bd672a6e3f5c19975d0c303343ee4466 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Sun, 30 Oct 2022 18:27:41 +0100 Subject: [PATCH 10/14] refactor!: upgrade node minimum target (#1494) --- package.json | 4 ++-- scripts/bundle.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ef18e967ebb..6851129ae98 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ }, "packageManager": "pnpm@7.14.0", "engines": { - "node": ">=14.0.0", - "npm": ">=6.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0", + "npm": ">=6.14.13" } } diff --git a/scripts/bundle.ts b/scripts/bundle.ts index 3b72941a828..a94d31830b9 100644 --- a/scripts/bundle.ts +++ b/scripts/bundle.ts @@ -7,7 +7,7 @@ console.log('Building dist for node (cjs)...'); // Generate entry-points for cjs compatibility const localeDir = 'locale'; -const target = ['ES2019', 'node14.6']; +const target = ['ES2019', 'node14.17']; if (existsSync(localeDir)) { rmSync(localeDir, { recursive: true, force: true }); From c498a90b43b7e26b9e569049939aa14de3971870 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Oct 2022 10:10:52 +0100 Subject: [PATCH 11/14] chore(deps): update devdependencies (#1501) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 8 ++++---- pnpm-lock.yaml | 40 ++++++++++++++++++++-------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 6851129ae98..02cf340c8b9 100644 --- a/package.json +++ b/package.json @@ -97,12 +97,12 @@ "@algolia/client-search": "~4.14.2", "@types/glob": "~8.0.0", "@types/markdown-it": "~12.2.3", - "@types/node": "~18.11.7", + "@types/node": "~18.11.8", "@types/prettier": "~2.7.1", "@types/react": "~18.0.24", "@types/sanitize-html": "~2.6.2", "@types/semver": "~7.3.13", - "@types/validator": "~13.7.9", + "@types/validator": "~13.7.10", "@typescript-eslint/eslint-plugin": "~5.40.1", "@typescript-eslint/parser": "~5.40.1", "@vitest/coverage-c8": "~0.24.3", @@ -114,9 +114,9 @@ "esbuild": "~0.15.12", "eslint": "~8.26.0", "eslint-config-prettier": "~8.5.0", - "eslint-define-config": "~1.8.0", + "eslint-define-config": "~1.11.0", "eslint-gitignore": "~0.1.0", - "eslint-plugin-jsdoc": "~39.3.25", + "eslint-plugin-jsdoc": "~39.4.0", "eslint-plugin-prettier": "~4.2.1", "glob": "~8.0.3", "lint-staged": "~13.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b18d1583fcd..7774a3acd37 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,12 +5,12 @@ specifiers: '@algolia/client-search': ~4.14.2 '@types/glob': ~8.0.0 '@types/markdown-it': ~12.2.3 - '@types/node': ~18.11.7 + '@types/node': ~18.11.8 '@types/prettier': ~2.7.1 '@types/react': ~18.0.24 '@types/sanitize-html': ~2.6.2 '@types/semver': ~7.3.13 - '@types/validator': ~13.7.9 + '@types/validator': ~13.7.10 '@typescript-eslint/eslint-plugin': ~5.40.1 '@typescript-eslint/parser': ~5.40.1 '@vitest/coverage-c8': ~0.24.3 @@ -22,9 +22,9 @@ specifiers: esbuild: ~0.15.12 eslint: ~8.26.0 eslint-config-prettier: ~8.5.0 - eslint-define-config: ~1.8.0 + eslint-define-config: ~1.11.0 eslint-gitignore: ~0.1.0 - eslint-plugin-jsdoc: ~39.3.25 + eslint-plugin-jsdoc: ~39.4.0 eslint-plugin-prettier: ~4.2.1 glob: ~8.0.3 lint-staged: ~13.0.3 @@ -55,12 +55,12 @@ devDependencies: '@algolia/client-search': 4.14.2 '@types/glob': 8.0.0 '@types/markdown-it': 12.2.3 - '@types/node': 18.11.7 + '@types/node': 18.11.8 '@types/prettier': 2.7.1 '@types/react': 18.0.24 '@types/sanitize-html': 2.6.2 '@types/semver': 7.3.13 - '@types/validator': 13.7.9 + '@types/validator': 13.7.10 '@typescript-eslint/eslint-plugin': 5.40.1_c4zyna56jjjrggqkyejnaxjxfu '@typescript-eslint/parser': 5.40.1_wyqvi574yv7oiwfeinomdzmc3m '@vitest/coverage-c8': 0.24.3_@vitest+ui@0.24.3 @@ -72,9 +72,9 @@ devDependencies: esbuild: 0.15.12 eslint: 8.26.0 eslint-config-prettier: 8.5.0_eslint@8.26.0 - eslint-define-config: 1.8.0 + eslint-define-config: 1.11.0 eslint-gitignore: 0.1.0_eslint@8.26.0 - eslint-plugin-jsdoc: 39.3.25_eslint@8.26.0 + eslint-plugin-jsdoc: 39.4.0_eslint@8.26.0 eslint-plugin-prettier: 4.2.1_aniwkeyvlpmwkidetuytnokvcm glob: 8.0.3 lint-staged: 13.0.3 @@ -596,7 +596,7 @@ packages: resolution: {integrity: sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.11.7 + '@types/node': 18.11.8 dev: true /@types/istanbul-lib-coverage/2.0.4: @@ -634,8 +634,8 @@ packages: resolution: {integrity: sha512-Y6S38pFr04yb13qqHf8uk1nHE3lXgQ30WZbv1mLliV9pt0NjvqdWttLcrOYLnXbOafknVYRHZGoMSpR9UwfYow==} dev: true - /@types/node/18.11.7: - resolution: {integrity: sha512-LhFTglglr63mNXUSRYD8A+ZAIu5sFqNJ4Y2fPuY7UlrySJH87rRRlhtVmMHplmfk5WkoJGmDjE9oiTfyX94CpQ==} + /@types/node/18.11.8: + resolution: {integrity: sha512-uGwPWlE0Hj972KkHtCDVwZ8O39GmyjfMane1Z3GUBGGnkZ2USDq7SxLpVIiIHpweY9DS0QTDH0Nw7RNBsAAZ5A==} dev: true /@types/normalize-package-data/2.4.1: @@ -680,8 +680,8 @@ packages: resolution: {integrity: sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==} dev: true - /@types/validator/13.7.9: - resolution: {integrity: sha512-y5KJ1PjGXPpU4CZ7lThDu31s+FqvzhqwMOR6Go/x6xaQMFjgzwfzfOvCwABsylr/5n8sB1qFQm1Vi7TaCB8P+A==} + /@types/validator/13.7.10: + resolution: {integrity: sha512-t1yxFAR2n0+VO6hd/FJ9F2uezAZVWHLmpmlJzm1eX03+H7+HsuTAp7L8QJs+2pQCfWkP1+EXsGK9Z9v7o/qPVQ==} dev: true /@types/web-bluetooth/0.0.16: @@ -692,7 +692,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 18.11.7 + '@types/node': 18.11.8 dev: true optional: true @@ -2185,9 +2185,9 @@ packages: eslint: 8.26.0 dev: true - /eslint-define-config/1.8.0: - resolution: {integrity: sha512-YibjbNkHKMo3QAnV3bgc+BdvmYCcCpuoRdAIc+6W/P91G02ZOrCVaPrco9Uf4md25NanjkV2bnfwce8XfPRS7A==} - engines: {node: '>= 14.6.0', npm: '>= 6.0.0', pnpm: '>= 7.0.0'} + /eslint-define-config/1.11.0: + resolution: {integrity: sha512-J5xNmL5EyXJzrRCGuyr8eKia2boFnJl3Lzurrv1tpM3oxtNONlp9/HW+zRFZ6+W3U7BQDCtnLunGmyCCtFHioQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13', pnpm: '>= 7.0.0'} dev: true /eslint-gitignore/0.1.0_eslint@8.26.0: @@ -2204,8 +2204,8 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc/39.3.25_eslint@8.26.0: - resolution: {integrity: sha512-7JiFOOaipz7Z7lNQ9sMJ6cdvclmVUwNYtFWGS3a0k0uEFcdZPPD64WOfENuyNHpl86C0AKIEPgOpZby5kd+pew==} + /eslint-plugin-jsdoc/39.4.0_eslint@8.26.0: + resolution: {integrity: sha512-2FXAmh8lpO22aqZgu6NLB6berVnYgwbZx95BmjIIQjbRNwLIAwY0dtvSJDUZVW5nflv58c1gSWQjIJ8yLZ/+fw==} engines: {node: ^14 || ^16 || ^17 || ^18 || ^19} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -4886,7 +4886,7 @@ packages: dependencies: '@types/chai': 4.3.3 '@types/chai-subset': 1.3.3 - '@types/node': 18.11.7 + '@types/node': 18.11.8 '@vitest/ui': 0.24.3 chai: 4.3.6 debug: 4.3.4 From f5921289fea0cc6f6c7353a7df9fd40a681cacbc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Oct 2022 11:45:49 +0100 Subject: [PATCH 12/14] chore(deps): update pnpm to v7.14.1 (#1502) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 02cf340c8b9..cf05448e72f 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "vitest": "~0.24.3", "vue": "~3.2.41" }, - "packageManager": "pnpm@7.14.0", + "packageManager": "pnpm@7.14.1", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0", "npm": ">=6.14.13" From 284fdcfa2c6fe11b1aa7cd1f0da8ac00c85ce7ba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Oct 2022 12:40:24 +0100 Subject: [PATCH 13/14] chore(deps): update typescript-eslint to ~5.41.0 (#1503) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +-- pnpm-lock.yaml | 74 +++++++++++++++++++++++++------------------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index cf05448e72f..eba95f2f042 100644 --- a/package.json +++ b/package.json @@ -103,8 +103,8 @@ "@types/sanitize-html": "~2.6.2", "@types/semver": "~7.3.13", "@types/validator": "~13.7.10", - "@typescript-eslint/eslint-plugin": "~5.40.1", - "@typescript-eslint/parser": "~5.40.1", + "@typescript-eslint/eslint-plugin": "~5.41.0", + "@typescript-eslint/parser": "~5.41.0", "@vitest/coverage-c8": "~0.24.3", "@vitest/ui": "~0.24.3", "@vueuse/core": "~9.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7774a3acd37..46cf4d870dd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,8 +11,8 @@ specifiers: '@types/sanitize-html': ~2.6.2 '@types/semver': ~7.3.13 '@types/validator': ~13.7.10 - '@typescript-eslint/eslint-plugin': ~5.40.1 - '@typescript-eslint/parser': ~5.40.1 + '@typescript-eslint/eslint-plugin': ~5.41.0 + '@typescript-eslint/parser': ~5.41.0 '@vitest/coverage-c8': ~0.24.3 '@vitest/ui': ~0.24.3 '@vueuse/core': ~9.4.0 @@ -61,8 +61,8 @@ devDependencies: '@types/sanitize-html': 2.6.2 '@types/semver': 7.3.13 '@types/validator': 13.7.10 - '@typescript-eslint/eslint-plugin': 5.40.1_c4zyna56jjjrggqkyejnaxjxfu - '@typescript-eslint/parser': 5.40.1_wyqvi574yv7oiwfeinomdzmc3m + '@typescript-eslint/eslint-plugin': 5.41.0_huremdigmcnkianavgfk3x6iou + '@typescript-eslint/parser': 5.41.0_wyqvi574yv7oiwfeinomdzmc3m '@vitest/coverage-c8': 0.24.3_@vitest+ui@0.24.3 '@vitest/ui': 0.24.3 '@vueuse/core': 9.4.0_vue@3.2.41 @@ -696,8 +696,8 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin/5.40.1_c4zyna56jjjrggqkyejnaxjxfu: - resolution: {integrity: sha512-FsWboKkWdytGiXT5O1/R9j37YgcjO8MKHSUmWnIEjVaz0krHkplPnYi7mwdb+5+cs0toFNQb0HIrN7zONdIEWg==} + /@typescript-eslint/eslint-plugin/5.41.0_huremdigmcnkianavgfk3x6iou: + resolution: {integrity: sha512-DXUS22Y57/LAFSg3x7Vi6RNAuLpTXwxB9S2nIA7msBb/Zt8p7XqMwdpdc1IU7CkOQUPgAqR5fWvxuKCbneKGmA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -707,10 +707,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.40.1_wyqvi574yv7oiwfeinomdzmc3m - '@typescript-eslint/scope-manager': 5.40.1 - '@typescript-eslint/type-utils': 5.40.1_wyqvi574yv7oiwfeinomdzmc3m - '@typescript-eslint/utils': 5.40.1_wyqvi574yv7oiwfeinomdzmc3m + '@typescript-eslint/parser': 5.41.0_wyqvi574yv7oiwfeinomdzmc3m + '@typescript-eslint/scope-manager': 5.41.0 + '@typescript-eslint/type-utils': 5.41.0_wyqvi574yv7oiwfeinomdzmc3m + '@typescript-eslint/utils': 5.41.0_wyqvi574yv7oiwfeinomdzmc3m debug: 4.3.4 eslint: 8.26.0 ignore: 5.2.0 @@ -722,8 +722,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.40.1_wyqvi574yv7oiwfeinomdzmc3m: - resolution: {integrity: sha512-IK6x55va5w4YvXd4b3VrXQPldV9vQTxi5ov+g4pMANsXPTXOcfjx08CRR1Dfrcc51syPtXHF5bgLlMHYFrvQtg==} + /@typescript-eslint/parser/5.41.0_wyqvi574yv7oiwfeinomdzmc3m: + resolution: {integrity: sha512-HQVfix4+RL5YRWZboMD1pUfFN8MpRH4laziWkkAzyO1fvNOY/uinZcvo3QiFJVS/siNHupV8E5+xSwQZrl6PZA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -732,9 +732,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.40.1 - '@typescript-eslint/types': 5.40.1 - '@typescript-eslint/typescript-estree': 5.40.1_typescript@4.8.4 + '@typescript-eslint/scope-manager': 5.41.0 + '@typescript-eslint/types': 5.41.0 + '@typescript-eslint/typescript-estree': 5.41.0_typescript@4.8.4 debug: 4.3.4 eslint: 8.26.0 typescript: 4.8.4 @@ -742,16 +742,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager/5.40.1: - resolution: {integrity: sha512-jkn4xsJiUQucI16OLCXrLRXDZ3afKhOIqXs4R3O+M00hdQLKR58WuyXPZZjhKLFCEP2g+TXdBRtLQ33UfAdRUg==} + /@typescript-eslint/scope-manager/5.41.0: + resolution: {integrity: sha512-xOxPJCnuktUkY2xoEZBKXO5DBCugFzjrVndKdUnyQr3+9aDWZReKq9MhaoVnbL+maVwWJu/N0SEtrtEUNb62QQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.40.1 - '@typescript-eslint/visitor-keys': 5.40.1 + '@typescript-eslint/types': 5.41.0 + '@typescript-eslint/visitor-keys': 5.41.0 dev: true - /@typescript-eslint/type-utils/5.40.1_wyqvi574yv7oiwfeinomdzmc3m: - resolution: {integrity: sha512-DLAs+AHQOe6n5LRraXiv27IYPhleF0ldEmx6yBqBgBLaNRKTkffhV1RPsjoJBhVup2zHxfaRtan8/YRBgYhU9Q==} + /@typescript-eslint/type-utils/5.41.0_wyqvi574yv7oiwfeinomdzmc3m: + resolution: {integrity: sha512-L30HNvIG6A1Q0R58e4hu4h+fZqaO909UcnnPbwKiN6Rc3BUEx6ez2wgN7aC0cBfcAjZfwkzE+E2PQQ9nEuoqfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -760,8 +760,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.40.1_typescript@4.8.4 - '@typescript-eslint/utils': 5.40.1_wyqvi574yv7oiwfeinomdzmc3m + '@typescript-eslint/typescript-estree': 5.41.0_typescript@4.8.4 + '@typescript-eslint/utils': 5.41.0_wyqvi574yv7oiwfeinomdzmc3m debug: 4.3.4 eslint: 8.26.0 tsutils: 3.21.0_typescript@4.8.4 @@ -770,13 +770,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types/5.40.1: - resolution: {integrity: sha512-Icg9kiuVJSwdzSQvtdGspOlWNjVDnF3qVIKXdJ103o36yRprdl3Ge5cABQx+csx960nuMF21v8qvO31v9t3OHw==} + /@typescript-eslint/types/5.41.0: + resolution: {integrity: sha512-5BejraMXMC+2UjefDvrH0Fo/eLwZRV6859SXRg+FgbhA0R0l6lDqDGAQYhKbXhPN2ofk2kY5sgGyLNL907UXpA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.40.1_typescript@4.8.4: - resolution: {integrity: sha512-5QTP/nW5+60jBcEPfXy/EZL01qrl9GZtbgDZtDPlfW5zj/zjNrdI2B5zMUHmOsfvOr2cWqwVdWjobCiHcedmQA==} + /@typescript-eslint/typescript-estree/5.41.0_typescript@4.8.4: + resolution: {integrity: sha512-SlzFYRwFSvswzDSQ/zPkIWcHv8O5y42YUskko9c4ki+fV6HATsTODUPbRbcGDFYP86gaJL5xohUEytvyNNcXWg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -784,8 +784,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.40.1 - '@typescript-eslint/visitor-keys': 5.40.1 + '@typescript-eslint/types': 5.41.0 + '@typescript-eslint/visitor-keys': 5.41.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -796,17 +796,17 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.40.1_wyqvi574yv7oiwfeinomdzmc3m: - resolution: {integrity: sha512-a2TAVScoX9fjryNrW6BZRnreDUszxqm9eQ9Esv8n5nXApMW0zeANUYlwh/DED04SC/ifuBvXgZpIK5xeJHQ3aw==} + /@typescript-eslint/utils/5.41.0_wyqvi574yv7oiwfeinomdzmc3m: + resolution: {integrity: sha512-QlvfwaN9jaMga9EBazQ+5DDx/4sAdqDkcs05AsQHMaopluVCUyu1bTRUVKzXbgjDlrRAQrYVoi/sXJ9fmG+KLQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.40.1 - '@typescript-eslint/types': 5.40.1 - '@typescript-eslint/typescript-estree': 5.40.1_typescript@4.8.4 + '@typescript-eslint/scope-manager': 5.41.0 + '@typescript-eslint/types': 5.41.0 + '@typescript-eslint/typescript-estree': 5.41.0_typescript@4.8.4 eslint: 8.26.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.26.0 @@ -816,11 +816,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys/5.40.1: - resolution: {integrity: sha512-A2DGmeZ+FMja0geX5rww+DpvILpwo1OsiQs0M+joPWJYsiEFBLsH0y1oFymPNul6Z5okSmHpP4ivkc2N0Cgfkw==} + /@typescript-eslint/visitor-keys/5.41.0: + resolution: {integrity: sha512-vilqeHj267v8uzzakbm13HkPMl7cbYpKVjgFWZPIOHIJHZtinvypUhJ5xBXfWYg4eFKqztbMMpOgFpT9Gfx4fw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.40.1 + '@typescript-eslint/types': 5.41.0 eslint-visitor-keys: 3.3.0 dev: true From 4204a6ae925a4e0c761ece10ad21222dac7a9e7e Mon Sep 17 00:00:00 2001 From: Matt Mayer Date: Mon, 31 Oct 2022 19:09:10 +0700 Subject: [PATCH 14/14] docs: fix findname in usage docs (#1504) --- docs/guide/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/usage.md b/docs/guide/usage.md index fca9315d3dc..57ee4565d7a 100644 --- a/docs/guide/usage.md +++ b/docs/guide/usage.md @@ -43,7 +43,7 @@ Using the browser is great for experimenting 👍. However, due to all of the st ```js import { faker } from 'https://cdn.skypack.dev/@faker-js/faker'; -const randomName = faker.person.findName(); // Willie Bahringer +const randomName = faker.person.fullName(); // Willie Bahringer const randomEmail = faker.internet.email(); // Tomasa_Ferry14@hotmail.com ```