diff --git a/.prettierrc.js b/.prettierrc.js index 063dc85ae58..01a3645a417 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -4,7 +4,7 @@ * @type {import('prettier').Config} */ export default { - plugins: ['prettier-plugin-organize-imports'], + plugins: ['prettier-plugin-organize-imports', 'prettier-plugin-packagejson'], singleQuote: true, trailingComma: 'es5', overrides: [ @@ -24,5 +24,11 @@ export default { organizeImportsSkipDestructiveCodeActions: true, }, }, + { + files: 'package.json', + options: { + packageSortOrder: ['name', 'version', 'description', 'scripts'], + }, + }, ], }; diff --git a/netlify.toml b/netlify.toml index eb19c43da9a..c3c4205887f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -5,27 +5,11 @@ [build] publish = "docs/.vitepress/dist" command = "pnpm docs:build:ci" - ignore = ''' - if [ "$CONTEXT" != "deploy-preview" ]; then - # Always build when not a PR preview - exit 1; - else - # Otherwise check if something doc related changed. - git diff --quiet origin/next...$COMMIT_REF -- . ":!src/locale/" ":!src/locales/" ":!test/" ":!package.json" ":!pnpm-lock.yaml" ":!.github/" - fi - ''' - -# Alias for the main page -[[redirects]] - from = "https://v9.fakerjs.dev" - to = "https://fakerjs.dev" - status = 302 - force = true # Alias for the next page [[redirects]] - from = "https://v10.fakerjs.dev" - to = "https://next.fakerjs.dev" + from = "https://v10.fakerjs.dev/*" + to = "https://next.fakerjs.dev/:splat" status = 302 force = true diff --git a/package.json b/package.json index b121afa084a..cc3011e66b8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,36 @@ "name": "@faker-js/faker", "version": "9.0.0", "description": "Generate massive amounts of fake contextual data", - "sideEffects": false, + "scripts": { + "clean": "rimraf coverage .eslintcache dist docs/.vitepress/cache docs/.vitepress/dist node_modules", + "build:clean": "rimraf dist", + "build:code": "tsup-node", + "build:types": "tsc --project tsconfig.build.json", + "build": "run-s build:clean build:code build:types", + "generate": "run-s generate:locales generate:api-docs", + "generate:api-docs": "tsx ./scripts/apidocs.ts", + "generate:locales": "tsx ./scripts/generate-locales.ts", + "docs:build": "run-s generate:api-docs docs:build:run", + "docs:build:run": "vitepress build docs", + "docs:build:ci": "run-s build docs:build", + "docs:dev": "run-s generate:api-docs docs:dev:run", + "docs:dev:run": "vitepress dev docs", + "docs:serve": "vitepress serve docs --port 5173", + "docs:diff": "tsx ./scripts/diff.ts", + "format": "prettier --cache --write .", + "lint": "eslint --cache --cache-strategy content .", + "ts-check": "tsc", + "test": "vitest", + "test:update-snapshots": "vitest run -u", + "coverage": "vitest run --coverage", + "cypress": "cypress", + "docs:test:e2e:ci": "run-s docs:build:ci docs:test:e2e:run", + "docs:test:e2e:run": "run-p --race docs:serve \"cypress run\"", + "docs:test:e2e:open": "run-p --race docs:serve \"cypress open\"", + "release": "commit-and-tag-version", + "prepublishOnly": "pnpm run clean && pnpm install && pnpm run build", + "preflight": "pnpm install && run-s generate format lint build test:update-snapshots ts-check" + }, "keywords": [ "faker", "faker.js", @@ -17,9 +46,13 @@ "fake contextual data generator", "fake contextual data" ], + "homepage": "https://fakerjs.dev", + "bugs": { + "url": "https://github.com/faker-js/faker/issues" + }, "repository": { "type": "git", - "url": "https://github.com/faker-js/faker.git" + "url": "git+https://github.com/faker-js/faker.git" }, "funding": [ { @@ -27,19 +60,9 @@ "url": "https://opencollective.com/fakerjs" } ], - "bugs": "https://github.com/faker-js/faker/issues", "license": "MIT", + "sideEffects": false, "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "index.d.ts", - "typesVersions": { - ">=5.0": { - "*": [ - "dist/types/*" - ] - } - }, "exports": { ".": { "types": "./dist/types/index.d.ts", @@ -55,40 +78,20 @@ }, "./package.json": "./package.json" }, + "main": "dist/index.cjs", + "module": "dist/index.js", + "types": "index.d.ts", + "typesVersions": { + ">=5.0": { + "*": [ + "dist/types/*" + ] + } + }, "files": [ "CHANGELOG.md", "dist" ], - "scripts": { - "clean": "rimraf coverage .eslintcache dist docs/.vitepress/cache docs/.vitepress/dist node_modules", - "build:clean": "rimraf dist", - "build:code": "tsup-node", - "build:types": "tsc --project tsconfig.build.json", - "build": "run-s build:clean build:code build:types", - "generate": "run-s generate:locales generate:api-docs", - "generate:api-docs": "tsx ./scripts/apidocs.ts", - "generate:locales": "tsx ./scripts/generate-locales.ts", - "docs:build": "run-s generate:api-docs docs:build:run", - "docs:build:run": "vitepress build docs", - "docs:build:ci": "run-s build docs:build", - "docs:dev": "run-s generate:api-docs docs:dev:run", - "docs:dev:run": "vitepress dev docs", - "docs:serve": "vitepress serve docs --port 5173", - "docs:diff": "tsx ./scripts/diff.ts", - "format": "prettier --cache --write .", - "lint": "eslint --cache --cache-strategy content .", - "ts-check": "tsc", - "test": "vitest", - "test:update-snapshots": "vitest run -u", - "coverage": "vitest run --coverage", - "cypress": "cypress", - "docs:test:e2e:ci": "run-s docs:build:ci docs:test:e2e:run", - "docs:test:e2e:run": "run-p --race docs:serve \"cypress run\"", - "docs:test:e2e:open": "run-p --race docs:serve \"cypress open\"", - "release": "commit-and-tag-version", - "prepublishOnly": "pnpm run clean && pnpm install && pnpm run build", - "preflight": "pnpm install && run-s generate format lint build test:update-snapshots ts-check" - }, "devDependencies": { "@actions/github": "6.0.0", "@algolia/client-search": "5.2.3", @@ -119,6 +122,7 @@ "npm-run-all2": "6.2.2", "prettier": "3.3.3", "prettier-plugin-organize-imports": "4.0.0", + "prettier-plugin-packagejson": "2.5.2", "rimraf": "5.0.10", "sanitize-html": "2.13.0", "semver": "7.6.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5edccdbae18..780a1aa987c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,6 +95,9 @@ importers: prettier-plugin-organize-imports: specifier: 4.0.0 version: 4.0.0(prettier@3.3.3)(typescript@5.5.4)(vue-tsc@2.1.2(typescript@5.5.4)) + prettier-plugin-packagejson: + specifier: 2.5.2 + version: 2.5.2(prettier@3.3.3) rimraf: specifier: 5.0.10 version: 5.0.10 @@ -109,7 +112,7 @@ importers: version: 23.0.0 tsup: specifier: 8.2.4 - version: 8.2.4(postcss@8.4.41)(tsx@4.19.0)(typescript@5.5.4)(yaml@2.5.0) + version: 8.2.4(postcss@8.4.45)(tsx@4.19.0)(typescript@5.5.4)(yaml@2.5.1) tsx: specifier: 4.19.0 version: 4.19.0 @@ -127,7 +130,7 @@ importers: version: 5.4.2(@types/node@20.16.2) vitepress: specifier: 1.3.4 - version: 1.3.4(@algolia/client-search@5.2.3)(@types/node@20.16.2)(postcss@8.4.41)(search-insights@2.17.0)(typescript@5.5.4) + version: 1.3.4(@algolia/client-search@5.2.3)(@types/node@20.16.2)(postcss@8.4.45)(search-insights@2.17.1)(typescript@5.5.4) vitest: specifier: 2.0.5 version: 2.0.5(@types/node@20.16.2)(@vitest/ui@2.0.5)(jsdom@24.1.3) @@ -263,8 +266,8 @@ packages: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} - '@cypress/request@3.0.1': - resolution: {integrity: sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==} + '@cypress/request@3.0.4': + resolution: {integrity: sha512-eqNHMsxEXuit0sRvvWoGG3/4+Q5qwqjKARWXKM/KoSsKvTNBwWt8pwspg5+TniP3POAZcPPx0O8CiEIQ4e6NWg==} engines: {node: '>= 6'} '@cypress/xvfb@1.2.4': @@ -817,11 +820,14 @@ packages: cpu: [x64] os: [win32] - '@shikijs/core@1.15.0': - resolution: {integrity: sha512-wUcOmlcEN/ub8i4pcjnAABExIUo7xwhZTBa43CwHu5KO9e/zLJlXYYNjeE+5K7W8VHiVtvRC2wcuaXyd0yG8rg==} + '@shikijs/core@1.16.2': + resolution: {integrity: sha512-XSVH5OZCvE4WLMgdoBqfPMYmGHGmCC3OgZhw0S7KcSi2XKZ+5oHGe71GFnTljgdOxvxx5WrRks6QoTLKrl1eAA==} - '@shikijs/transformers@1.15.0': - resolution: {integrity: sha512-hJeTJGHZ6lCQKufYctiT+8HYrUnyfI67SXzMIB1rib7EUDZpwqfFLMqUfv8RST7qY359/ZWszrD6IzmTD8XV6w==} + '@shikijs/transformers@1.16.2': + resolution: {integrity: sha512-AR6ANiKwi1dJr5g/W0L+Su4PoHurkHLgtNmesbOFOPGKNQC2BeGU/Z2Ghkl+cUF5PfE+UeLkxUwzpE6H37hTSg==} + + '@shikijs/vscode-textmate@9.2.0': + resolution: {integrity: sha512-5FinaOp6Vdh/dl4/yaOTh0ZeKch+rYS8DUb38V3GMKYVkdqzxw53lViRKUYkVILRiVQT7dcPC7VvAKOR73zVtQ==} '@stylistic/eslint-plugin@2.7.2': resolution: {integrity: sha512-3DVLU5HEuk2pQoBmXJlzvrxbKNpu2mJ0SRqz5O/CJjyNCr12ZiPcYMEtuArTyPOk5i7bsAU44nywh1rGfe3gKQ==} @@ -915,6 +921,10 @@ packages: resolution: {integrity: sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.4.0': + resolution: {integrity: sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.3.0': resolution: {integrity: sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -932,6 +942,10 @@ packages: resolution: {integrity: sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.4.0': + resolution: {integrity: sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@7.18.0': resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -950,6 +964,15 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.4.0': + resolution: {integrity: sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@7.18.0': resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} engines: {node: ^18.18.0 || >=20.0.0} @@ -962,6 +985,12 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.4.0': + resolution: {integrity: sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@7.18.0': resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -970,6 +999,10 @@ packages: resolution: {integrity: sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.4.0': + resolution: {integrity: sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@vitejs/plugin-vue@5.1.3': resolution: {integrity: sha512-3xbWsKEKXYlmX82aOHufFQVnkbMC/v8fLpWwh6hWOUrK5fbbtBh9Q/WWse27BFgSy2/e2c0fz5Scgya9h2GLhw==} engines: {node: ^18.0.0 || >=20.0.0} @@ -1005,21 +1038,27 @@ packages: '@vitest/utils@2.0.5': resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} - '@volar/language-core@2.4.1': - resolution: {integrity: sha512-9AKhC7Qn2mQYxj7Dz3bVxeOk7gGJladhWixUYKef/o0o7Bm4an+A3XvmcTHVqZ8stE6lBVH++g050tBtJ4TZPQ==} + '@volar/language-core@2.4.2': + resolution: {integrity: sha512-sONt5RLvLL1SlBdhyUSthZzuKePbJ7DwFFB9zT0eyWpDl+v7GXGh/RkPxxWaR22bIhYtTzp4Ka1MWatl/53Riw==} - '@volar/source-map@2.4.1': - resolution: {integrity: sha512-Xq6ep3OZg9xUqN90jEgB9ztX5SsTz1yiV8wiQbcYNjWkek+Ie3dc8l7AVt3EhDm9mSIR58oWczHkzM2H6HIsmQ==} + '@volar/source-map@2.4.2': + resolution: {integrity: sha512-qiGfGgeZ5DEarPX3S+HcFktFCjfDrFPCXKeXNbrlB7v8cvtPRm8YVwoXOdGG1NhaL5rMlv5BZPVQyu4EdWWIvA==} - '@volar/typescript@2.4.1': - resolution: {integrity: sha512-UoRzC0PXcwajFQTu8XxKSYNsWNBtVja6Y9gC8eLv7kYm+UEKJCcZ8g7dialsOYA0HKs3Vpg57MeCsawFLC6m9Q==} + '@volar/typescript@2.4.2': + resolution: {integrity: sha512-m2uZduhaHO1SZuagi30OsjI/X1gwkaEAC+9wT/nCNAtJ5FqXEkKvUncHmffG7ESDZPlFFUBK4vJ0D9Hfr+f2EA==} '@vue/compiler-core@3.4.38': resolution: {integrity: sha512-8IQOTCWnLFqfHzOGm9+P8OPSEDukgg3Huc92qSG49if/xI2SAwLHQO2qaPQbjCWPBcQoO1WYfXfTACUrWV3c5A==} + '@vue/compiler-core@3.5.3': + resolution: {integrity: sha512-adAfy9boPkP233NTyvLbGEqVuIfK/R0ZsBsIOW4BZNfb4BRpRW41Do1u+ozJpsb+mdoy80O20IzAsHaihRb5qA==} + '@vue/compiler-dom@3.4.38': resolution: {integrity: sha512-Osc/c7ABsHXTsETLgykcOwIxFktHfGSUDkb05V61rocEfsFDcjDLH/IHJSNJP+/Sv9KeN2Lx1V6McZzlSb9EhQ==} + '@vue/compiler-dom@3.5.3': + resolution: {integrity: sha512-wnzFArg9zpvk/811CDOZOadJRugf1Bgl/TQ3RfV4nKfSPok4hi0w10ziYUQR6LnnBAUlEXYLUfZ71Oj9ds/+QA==} + '@vue/compiler-sfc@3.4.38': resolution: {integrity: sha512-s5QfZ+9PzPh3T5H4hsQDJtI8x7zdJaew/dCGgqZ2630XdzaZ3AD8xGZfBqpT8oaD/p2eedd+pL8tD5vvt5ZYJQ==} @@ -1029,14 +1068,14 @@ packages: '@vue/compiler-vue2@2.7.16': resolution: {integrity: sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==} - '@vue/devtools-api@7.3.9': - resolution: {integrity: sha512-D+GTYtFg68bqSu66EugQUydsOqaDlPLNmYw5oYk8k81uBu9/bVTUrqlAJrAA9Am7MXhKz2gWdDkopY6sOBf/Bg==} + '@vue/devtools-api@7.4.4': + resolution: {integrity: sha512-Iqqy9yBFWBbPb/jHlJzU/OrU+iHSJ/e9p/v5pZhm/L5pUCX26z32bvvjPa28vMXxRehbAZTgX8zovOeqBTnhdg==} - '@vue/devtools-kit@7.3.9': - resolution: {integrity: sha512-Gr17nA+DaQzqyhNx1DUJr1CJRzTRfbIuuC80ZgU8MD/qNO302tv9la+ROi+Uaw+ULVwU9T71GnwLy4n8m9Lspg==} + '@vue/devtools-kit@7.4.4': + resolution: {integrity: sha512-awK/4NfsUG0nQ7qnTM37m7ZkEUMREyPh8taFCX+uQYps/MTFEum0AD05VeGDRMXwWvMmGIcWX9xp8ZiBddY0jw==} - '@vue/devtools-shared@7.3.9': - resolution: {integrity: sha512-CdfMRZKXyI8vw+hqOcQIiLihB6Hbbi7WNZGp7LsuH1Qe4aYAFmTaKjSciRZ301oTnwmU/knC/s5OGuV6UNiNoA==} + '@vue/devtools-shared@7.4.4': + resolution: {integrity: sha512-yeJULXFHOKIm8yL2JFO050a9ztTVqOCKTqN9JHFxGTJN0b+gjtfn6zC+FfyHUgjwCwf6E3hfKrlohtthcqoYqw==} '@vue/language-core@2.1.2': resolution: {integrity: sha512-tt2J7C+l0J/T5PaLhJ0jvCCi0JNwu3e8azWTYxW3jmAW5B/dac0g5UxmI7l59CQgCGFotqUqI3tXjfZgoWNtog==} @@ -1063,6 +1102,9 @@ packages: '@vue/shared@3.4.38': resolution: {integrity: sha512-q0xCiLkuWWQLzVrecPb0RMsNWyxICOjPrcrwxTUEHb1fsnvni4dcuyG7RT/Ie7VPTvnjzIaWzRMUBsrqNj/hhw==} + '@vue/shared@3.5.3': + resolution: {integrity: sha512-Jp2v8nylKBT+PlOUjun2Wp/f++TfJVFjshLzNtJDdmFJabJa7noGMncqXRM1vXGX+Yo2V7WykQFNxusSim8SCA==} + '@vueuse/core@10.11.1': resolution: {integrity: sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==} @@ -1323,8 +1365,8 @@ packages: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} - caniuse-lite@1.0.30001655: - resolution: {integrity: sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg==} + caniuse-lite@1.0.30001658: + resolution: {integrity: sha512-N2YVqWbJELVdrnsW5p+apoQyYt51aBMSsBZki1XZEfeBCexcM/sf4xiAHcXQBkuOwJBXtWF7aW1sYX6tKebPHw==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -1536,8 +1578,8 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} - cssstyle@4.0.1: - resolution: {integrity: sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==} + cssstyle@4.1.0: + resolution: {integrity: sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==} engines: {node: '>=18'} csstype@3.1.3: @@ -1577,8 +1619,8 @@ packages: supports-color: optional: true - debug@4.3.6: - resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -1623,10 +1665,18 @@ packages: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} + detect-indent@7.0.1: + resolution: {integrity: sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==} + engines: {node: '>=12.20'} + detect-newline@3.1.0: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} + detect-newline@4.0.1: + resolution: {integrity: sha512-qE3Veg1YXzGHQhlA6jzebZN2qVf6NX+A7m7qlhCGG30dJixrAQhYOsJjsnBjJkCSmuOPpCk30145fr8FV0bzog==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1658,8 +1708,8 @@ packages: ecc-jsbn@0.1.2: resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} - electron-to-chromium@1.5.13: - resolution: {integrity: sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==} + electron-to-chromium@1.5.18: + resolution: {integrity: sha512-1OfuVACu+zKlmjsNdcJuVQuVE61sZOLbNM4JAQ1Rvh6EOj0/EUKhMJjRH73InPlXSh8HIJk1cVZ8pyOV/FMdUQ==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -1912,8 +1962,8 @@ packages: forever-agent@0.6.1: resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} - form-data@2.3.3: - resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==} + form-data@2.5.1: + resolution: {integrity: sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==} engines: {node: '>= 0.12'} form-data@4.0.0: @@ -1948,6 +1998,10 @@ packages: engines: {node: '>=6.9.0'} hasBin: true + get-stdin@9.0.0: + resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==} + engines: {node: '>=12'} + get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -1969,6 +2023,9 @@ packages: getpass@0.1.7: resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} + git-hooks-list@3.1.0: + resolution: {integrity: sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==} + git-raw-commits@3.0.0: resolution: {integrity: sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw==} engines: {node: '>=14'} @@ -2014,6 +2071,10 @@ packages: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} + globby@13.2.2: + resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} @@ -2083,8 +2144,8 @@ packages: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} - http-signature@1.3.6: - resolution: {integrity: sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==} + http-signature@1.4.0: + resolution: {integrity: sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==} engines: {node: '>=0.10'} https-proxy-agent@7.0.5: @@ -2187,6 +2248,10 @@ packages: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} engines: {node: '>=0.10.0'} + is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + is-plain-object@5.0.0: resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} engines: {node: '>=0.10.0'} @@ -2502,9 +2567,6 @@ packages: resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} engines: {node: '>=10'} - ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -2700,8 +2762,8 @@ packages: performance-now@2.1.0: resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} - picocolors@1.0.1: - resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picocolors@1.1.0: + resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -2750,8 +2812,8 @@ packages: yaml: optional: true - postcss@8.4.41: - resolution: {integrity: sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==} + postcss@8.4.45: + resolution: {integrity: sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==} engines: {node: ^10 || ^12 || >=14} preact@10.23.2: @@ -2778,6 +2840,14 @@ packages: vue-tsc: optional: true + prettier-plugin-packagejson@2.5.2: + resolution: {integrity: sha512-w+TmoLv2pIa+siplW1cCj2ujEXQQS6z7wmWLOiLQK/2QVl7Wy6xh/ZUpqQw8tbKMXDodmSW4GONxlA33xpdNOg==} + peerDependencies: + prettier: '>= 1.16.0' + peerDependenciesMeta: + prettier: + optional: true + prettier@3.3.3: resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} engines: {node: '>=14'} @@ -2807,8 +2877,8 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - qs@6.10.4: - resolution: {integrity: sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==} + qs@6.13.0: + resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} querystringify@2.2.0: @@ -2909,9 +2979,6 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - rrweb-cssom@0.6.0: - resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} - rrweb-cssom@0.7.1: resolution: {integrity: sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==} @@ -2937,8 +3004,8 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - search-insights@2.17.0: - resolution: {integrity: sha512-AskayU3QNsXQzSL6v4LTYST7NNfs2HWyHHB+sdORP9chsytAhro5XRfToAMI/LAVYgNbzowVZTMfBRodgbUHKg==} + search-insights@2.17.1: + resolution: {integrity: sha512-HHFjYH/0AqXacETlIbe9EYc3UNlQYGNNTY0fZ/sWl6SweX+GDxq9NB5+RVoPLgEFuOtCz7M9dhYxqDnhbbF0eQ==} semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} @@ -2964,8 +3031,8 @@ packages: shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} - shiki@1.15.0: - resolution: {integrity: sha512-XDRuSC/BSqD9bLXXIDs81oZvLO1n6lGvau10IJozNn/QJloF5A3GHfpvLegr0AzCh3hpVPpP7EPbfdJ9/wW0zQ==} + shiki@1.16.2: + resolution: {integrity: sha512-gSym0hZf5a1U0iDPsdoOAZbvoi+e0c6c3NKAi03FoSLTm7oG20tum29+gk0wzzivOasn3loxfGUPT+jZXIUbWg==} side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} @@ -2989,6 +3056,10 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} + slash@4.0.0: + resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} + engines: {node: '>=12'} + slashes@3.0.12: resolution: {integrity: sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==} @@ -3000,6 +3071,13 @@ packages: resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} engines: {node: '>=10'} + sort-object-keys@1.1.3: + resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} + + sort-package-json@2.10.1: + resolution: {integrity: sha512-d76wfhgUuGypKqY72Unm5LFnMpACbdxXsLPcL27pOsSrmVqH3PztFp1uq+Z22suk15h7vXmTesuh2aEjdCqb5w==} + hasBin: true + source-map-js@1.2.0: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} @@ -3534,8 +3612,8 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml@2.5.0: - resolution: {integrity: sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==} + yaml@2.5.1: + resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} engines: {node: '>= 14'} hasBin: true @@ -3576,19 +3654,19 @@ snapshots: tunnel: 0.0.6 undici: 5.28.4 - '@algolia/autocomplete-core@1.9.3(@algolia/client-search@5.2.3)(algoliasearch@4.24.0)(search-insights@2.17.0)': + '@algolia/autocomplete-core@1.9.3(@algolia/client-search@5.2.3)(algoliasearch@4.24.0)(search-insights@2.17.1)': dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@5.2.3)(algoliasearch@4.24.0)(search-insights@2.17.0) + '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@5.2.3)(algoliasearch@4.24.0)(search-insights@2.17.1) '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@5.2.3)(algoliasearch@4.24.0) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights - '@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@5.2.3)(algoliasearch@4.24.0)(search-insights@2.17.0)': + '@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@5.2.3)(algoliasearch@4.24.0)(search-insights@2.17.1)': dependencies: '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@5.2.3)(algoliasearch@4.24.0) - search-insights: 2.17.0 + search-insights: 2.17.1 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch @@ -3704,7 +3782,7 @@ snapshots: '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 - picocolors: 1.0.1 + picocolors: 1.1.0 '@babel/helper-string-parser@7.24.8': {} @@ -3715,7 +3793,7 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.1 + picocolors: 1.1.0 '@babel/parser@7.25.6': dependencies: @@ -3732,7 +3810,7 @@ snapshots: '@colors/colors@1.5.0': optional: true - '@cypress/request@3.0.1': + '@cypress/request@3.0.4': dependencies: aws-sign2: 0.7.0 aws4: 1.13.2 @@ -3740,14 +3818,14 @@ snapshots: combined-stream: 1.0.8 extend: 3.0.2 forever-agent: 0.6.1 - form-data: 2.3.3 - http-signature: 1.3.6 + form-data: 2.5.1 + http-signature: 1.4.0 is-typedarray: 1.0.0 isstream: 0.1.2 json-stringify-safe: 5.0.1 mime-types: 2.1.35 performance-now: 2.1.0 - qs: 6.10.4 + qs: 6.13.0 safe-buffer: 5.2.1 tough-cookie: 4.1.4 tunnel-agent: 0.6.0 @@ -3762,9 +3840,9 @@ snapshots: '@docsearch/css@3.6.1': {} - '@docsearch/js@3.6.1(@algolia/client-search@5.2.3)(search-insights@2.17.0)': + '@docsearch/js@3.6.1(@algolia/client-search@5.2.3)(search-insights@2.17.1)': dependencies: - '@docsearch/react': 3.6.1(@algolia/client-search@5.2.3)(search-insights@2.17.0) + '@docsearch/react': 3.6.1(@algolia/client-search@5.2.3)(search-insights@2.17.1) preact: 10.23.2 transitivePeerDependencies: - '@algolia/client-search' @@ -3773,14 +3851,14 @@ snapshots: - react-dom - search-insights - '@docsearch/react@3.6.1(@algolia/client-search@5.2.3)(search-insights@2.17.0)': + '@docsearch/react@3.6.1(@algolia/client-search@5.2.3)(search-insights@2.17.1)': dependencies: - '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@5.2.3)(algoliasearch@4.24.0)(search-insights@2.17.0) + '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@5.2.3)(algoliasearch@4.24.0)(search-insights@2.17.1) '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@5.2.3)(algoliasearch@4.24.0) '@docsearch/css': 3.6.1 algoliasearch: 4.24.0 optionalDependencies: - search-insights: 2.17.0 + search-insights: 2.17.1 transitivePeerDependencies: - '@algolia/client-search' @@ -3953,7 +4031,7 @@ snapshots: '@eslint/config-array@0.18.0': dependencies: '@eslint/object-schema': 2.1.4 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -3961,7 +4039,7 @@ snapshots: '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) espree: 10.1.0 globals: 14.0.0 ignore: 5.3.2 @@ -4137,18 +4215,21 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.21.2': optional: true - '@shikijs/core@1.15.0': + '@shikijs/core@1.16.2': dependencies: + '@shikijs/vscode-textmate': 9.2.0 '@types/hast': 3.0.4 - '@shikijs/transformers@1.15.0': + '@shikijs/transformers@1.16.2': dependencies: - shiki: 1.15.0 + shiki: 1.16.2 + + '@shikijs/vscode-textmate@9.2.0': {} '@stylistic/eslint-plugin@2.7.2(eslint@9.9.1)(typescript@5.5.4)': dependencies: '@types/eslint': 9.6.1 - '@typescript-eslint/utils': 8.3.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) eslint: 9.9.1 eslint-visitor-keys: 4.0.0 espree: 10.1.0 @@ -4240,7 +4321,7 @@ snapshots: '@typescript-eslint/types': 8.3.0 '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.3.0 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) eslint: 9.9.1 optionalDependencies: typescript: 5.5.4 @@ -4257,11 +4338,16 @@ snapshots: '@typescript-eslint/types': 8.3.0 '@typescript-eslint/visitor-keys': 8.3.0 + '@typescript-eslint/scope-manager@8.4.0': + dependencies: + '@typescript-eslint/types': 8.4.0 + '@typescript-eslint/visitor-keys': 8.4.0 + '@typescript-eslint/type-utils@8.3.0(eslint@9.9.1)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) '@typescript-eslint/utils': 8.3.0(eslint@9.9.1)(typescript@5.5.4) - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: typescript: 5.5.4 @@ -4273,11 +4359,13 @@ snapshots: '@typescript-eslint/types@8.3.0': {} + '@typescript-eslint/types@8.4.0': {} + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.5.4)': dependencies: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.5 @@ -4292,7 +4380,22 @@ snapshots: dependencies: '@typescript-eslint/types': 8.3.0 '@typescript-eslint/visitor-keys': 8.3.0 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.5.4) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@8.4.0(typescript@5.5.4)': + dependencies: + '@typescript-eslint/types': 8.4.0 + '@typescript-eslint/visitor-keys': 8.4.0 + debug: 4.3.7(supports-color@8.1.1) fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 @@ -4325,6 +4428,17 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.4.0(eslint@9.9.1)(typescript@5.5.4)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1) + '@typescript-eslint/scope-manager': 8.4.0 + '@typescript-eslint/types': 8.4.0 + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) + eslint: 9.9.1 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@7.18.0': dependencies: '@typescript-eslint/types': 7.18.0 @@ -4335,6 +4449,11 @@ snapshots: '@typescript-eslint/types': 8.3.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.4.0': + dependencies: + '@typescript-eslint/types': 8.4.0 + eslint-visitor-keys: 3.4.3 + '@vitejs/plugin-vue@5.1.3(vite@5.4.2(@types/node@20.16.2))(vue@3.4.38(typescript@5.5.4))': dependencies: vite: 5.4.2(@types/node@20.16.2) @@ -4344,7 +4463,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.6 @@ -4402,15 +4521,15 @@ snapshots: loupe: 3.1.1 tinyrainbow: 1.2.0 - '@volar/language-core@2.4.1': + '@volar/language-core@2.4.2': dependencies: - '@volar/source-map': 2.4.1 + '@volar/source-map': 2.4.2 - '@volar/source-map@2.4.1': {} + '@volar/source-map@2.4.2': {} - '@volar/typescript@2.4.1': + '@volar/typescript@2.4.2': dependencies: - '@volar/language-core': 2.4.1 + '@volar/language-core': 2.4.2 path-browserify: 1.0.1 vscode-uri: 3.0.8 @@ -4422,11 +4541,24 @@ snapshots: estree-walker: 2.0.2 source-map-js: 1.2.0 + '@vue/compiler-core@3.5.3': + dependencies: + '@babel/parser': 7.25.6 + '@vue/shared': 3.5.3 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.0 + '@vue/compiler-dom@3.4.38': dependencies: '@vue/compiler-core': 3.4.38 '@vue/shared': 3.4.38 + '@vue/compiler-dom@3.5.3': + dependencies: + '@vue/compiler-core': 3.5.3 + '@vue/shared': 3.5.3 + '@vue/compiler-sfc@3.4.38': dependencies: '@babel/parser': 7.25.6 @@ -4436,7 +4568,7 @@ snapshots: '@vue/shared': 3.4.38 estree-walker: 2.0.2 magic-string: 0.30.11 - postcss: 8.4.41 + postcss: 8.4.45 source-map-js: 1.2.0 '@vue/compiler-ssr@3.4.38': @@ -4449,13 +4581,13 @@ snapshots: de-indent: 1.0.2 he: 1.2.0 - '@vue/devtools-api@7.3.9': + '@vue/devtools-api@7.4.4': dependencies: - '@vue/devtools-kit': 7.3.9 + '@vue/devtools-kit': 7.4.4 - '@vue/devtools-kit@7.3.9': + '@vue/devtools-kit@7.4.4': dependencies: - '@vue/devtools-shared': 7.3.9 + '@vue/devtools-shared': 7.4.4 birpc: 0.2.17 hookable: 5.5.3 mitt: 3.0.1 @@ -4463,16 +4595,16 @@ snapshots: speakingurl: 14.0.1 superjson: 2.2.1 - '@vue/devtools-shared@7.3.9': + '@vue/devtools-shared@7.4.4': dependencies: rfdc: 1.4.1 '@vue/language-core@2.1.2(typescript@5.5.4)': dependencies: - '@volar/language-core': 2.4.1 - '@vue/compiler-dom': 3.4.38 + '@volar/language-core': 2.4.2 + '@vue/compiler-dom': 3.5.3 '@vue/compiler-vue2': 2.7.16 - '@vue/shared': 3.4.38 + '@vue/shared': 3.5.3 computeds: 0.0.1 minimatch: 9.0.5 muggle-string: 0.4.1 @@ -4504,6 +4636,8 @@ snapshots: '@vue/shared@3.4.38': {} + '@vue/shared@3.5.3': {} + '@vueuse/core@10.11.1(vue@3.4.38(typescript@5.5.4))': dependencies: '@types/web-bluetooth': 0.0.20 @@ -4568,7 +4702,7 @@ snapshots: agent-base@7.1.1: dependencies: - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -4694,8 +4828,8 @@ snapshots: browserslist@4.23.3: dependencies: - caniuse-lite: 1.0.30001655 - electron-to-chromium: 1.5.13 + caniuse-lite: 1.0.30001658 + electron-to-chromium: 1.5.18 node-releases: 2.0.18 update-browserslist-db: 1.1.0(browserslist@4.23.3) @@ -4737,7 +4871,7 @@ snapshots: camelcase@5.3.1: {} - caniuse-lite@1.0.30001655: {} + caniuse-lite@1.0.30001658: {} caseless@0.12.0: {} @@ -4855,7 +4989,7 @@ snapshots: jsdom: 24.1.3 semver: 7.6.3 w3c-xmlserializer: 5.0.0 - yaml: 2.5.0 + yaml: 2.5.1 yargs: 17.7.2 transitivePeerDependencies: - bufferutil @@ -4989,15 +5123,15 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - cssstyle@4.0.1: + cssstyle@4.1.0: dependencies: - rrweb-cssom: 0.6.0 + rrweb-cssom: 0.7.1 csstype@3.1.3: {} cypress@13.14.1: dependencies: - '@cypress/request': 3.0.1 + '@cypress/request': 3.0.4 '@cypress/xvfb': 1.2.4(supports-color@8.1.1) '@types/sinonjs__fake-timers': 8.1.1 '@types/sizzle': 2.3.8 @@ -5013,7 +5147,7 @@ snapshots: commander: 6.2.1 common-tags: 1.8.2 dayjs: 1.11.13 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) enquirer: 2.4.1 eventemitter2: 6.4.7 execa: 4.1.0 @@ -5063,9 +5197,9 @@ snapshots: optionalDependencies: supports-color: 8.1.1 - debug@4.3.6(supports-color@8.1.1): + debug@4.3.7(supports-color@8.1.1): dependencies: - ms: 2.1.2 + ms: 2.1.3 optionalDependencies: supports-color: 8.1.1 @@ -5096,8 +5230,12 @@ snapshots: detect-indent@6.1.0: {} + detect-indent@7.0.1: {} + detect-newline@3.1.0: {} + detect-newline@4.0.1: {} + dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -5136,7 +5274,7 @@ snapshots: jsbn: 0.1.1 safer-buffer: 2.1.2 - electron-to-chromium@1.5.13: {} + electron-to-chromium@1.5.18: {} emoji-regex@8.0.0: {} @@ -5235,7 +5373,7 @@ snapshots: '@es-joy/jsdoccomment': 0.48.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint: 9.9.1 espree: 10.1.0 @@ -5309,7 +5447,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint-scope: 8.0.2 eslint-visitor-keys: 4.0.0 @@ -5405,7 +5543,7 @@ snapshots: extract-zip@2.0.1(supports-color@8.1.1): dependencies: - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -5489,7 +5627,7 @@ snapshots: forever-agent@0.6.1: {} - form-data@2.3.3: + form-data@2.5.1: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 @@ -5532,6 +5670,8 @@ snapshots: through2: 2.0.5 yargs: 16.2.0 + get-stdin@9.0.0: {} + get-stream@5.2.0: dependencies: pump: 3.0.0 @@ -5552,6 +5692,8 @@ snapshots: dependencies: assert-plus: 1.0.0 + git-hooks-list@3.1.0: {} + git-raw-commits@3.0.0: dependencies: dargs: 7.0.0 @@ -5606,6 +5748,14 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 + globby@13.2.2: + dependencies: + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 4.0.0 + gopd@1.0.1: dependencies: get-intrinsic: 1.2.4 @@ -5667,11 +5817,11 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color - http-signature@1.3.6: + http-signature@1.4.0: dependencies: assert-plus: 1.0.0 jsprim: 2.0.2 @@ -5680,7 +5830,7 @@ snapshots: https-proxy-agent@7.0.5: dependencies: agent-base: 7.1.1 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -5752,6 +5902,8 @@ snapshots: is-plain-obj@1.1.0: {} + is-plain-obj@4.1.0: {} + is-plain-object@5.0.0: {} is-potential-custom-element-name@1.0.1: {} @@ -5787,7 +5939,7 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.25 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -5817,7 +5969,7 @@ snapshots: jsdom@24.1.3: dependencies: - cssstyle: 4.0.1 + cssstyle: 4.1.0 data-urls: 5.0.0 decimal.js: 10.4.3 form-data: 4.0.0 @@ -6052,8 +6204,6 @@ snapshots: mrmime@2.0.0: {} - ms@2.1.2: {} - ms@2.1.3: {} muggle-string@0.4.1: {} @@ -6235,7 +6385,7 @@ snapshots: performance-now@2.1.0: {} - picocolors@1.0.1: {} + picocolors@1.1.0: {} picomatch@2.3.1: {} @@ -6251,18 +6401,18 @@ snapshots: pluralize@8.0.0: {} - postcss-load-config@6.0.1(postcss@8.4.41)(tsx@4.19.0)(yaml@2.5.0): + postcss-load-config@6.0.1(postcss@8.4.45)(tsx@4.19.0)(yaml@2.5.1): dependencies: lilconfig: 3.1.2 optionalDependencies: - postcss: 8.4.41 + postcss: 8.4.45 tsx: 4.19.0 - yaml: 2.5.0 + yaml: 2.5.1 - postcss@8.4.41: + postcss@8.4.45: dependencies: nanoid: 3.3.7 - picocolors: 1.0.1 + picocolors: 1.1.0 source-map-js: 1.2.0 preact@10.23.2: {} @@ -6280,6 +6430,13 @@ snapshots: optionalDependencies: vue-tsc: 2.1.2(typescript@5.5.4) + prettier-plugin-packagejson@2.5.2(prettier@3.3.3): + dependencies: + sort-package-json: 2.10.1 + synckit: 0.9.1 + optionalDependencies: + prettier: 3.3.3 + prettier@3.3.3: {} pretty-bytes@5.6.0: {} @@ -6299,7 +6456,7 @@ snapshots: punycode@2.3.1: {} - qs@6.10.4: + qs@6.13.0: dependencies: side-channel: 1.0.6 @@ -6424,8 +6581,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.21.2 fsevents: 2.3.3 - rrweb-cssom@0.6.0: {} - rrweb-cssom@0.7.1: {} run-parallel@1.2.0: @@ -6449,13 +6604,13 @@ snapshots: htmlparser2: 8.0.2 is-plain-object: 5.0.0 parse-srcset: 1.0.2 - postcss: 8.4.41 + postcss: 8.4.45 saxes@6.0.0: dependencies: xmlchars: 2.2.0 - search-insights@2.17.0: {} + search-insights@2.17.1: {} semver@5.7.2: {} @@ -6478,9 +6633,10 @@ snapshots: shell-quote@1.8.1: {} - shiki@1.15.0: + shiki@1.16.2: dependencies: - '@shikijs/core': 1.15.0 + '@shikijs/core': 1.16.2 + '@shikijs/vscode-textmate': 9.2.0 '@types/hast': 3.0.4 side-channel@1.0.6: @@ -6504,6 +6660,8 @@ snapshots: slash@3.0.0: {} + slash@4.0.0: {} + slashes@3.0.12: {} slice-ansi@3.0.0: @@ -6518,6 +6676,19 @@ snapshots: astral-regex: 2.0.0 is-fullwidth-code-point: 3.0.0 + sort-object-keys@1.1.3: {} + + sort-package-json@2.10.1: + dependencies: + detect-indent: 7.0.1 + detect-newline: 4.0.1 + get-stdin: 9.0.0 + git-hooks-list: 3.1.0 + globby: 13.2.2 + is-plain-obj: 4.1.0 + semver: 7.6.3 + sort-object-keys: 1.1.3 + source-map-js@1.2.0: {} source-map@0.6.1: {} @@ -6725,26 +6896,26 @@ snapshots: tslib@2.7.0: {} - tsup@8.2.4(postcss@8.4.41)(tsx@4.19.0)(typescript@5.5.4)(yaml@2.5.0): + tsup@8.2.4(postcss@8.4.45)(tsx@4.19.0)(typescript@5.5.4)(yaml@2.5.1): dependencies: bundle-require: 5.0.0(esbuild@0.23.1) cac: 6.7.14 chokidar: 3.6.0 consola: 3.2.3 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) esbuild: 0.23.1 execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - picocolors: 1.0.1 - postcss-load-config: 6.0.1(postcss@8.4.41)(tsx@4.19.0)(yaml@2.5.0) + picocolors: 1.1.0 + postcss-load-config: 6.0.1(postcss@8.4.45)(tsx@4.19.0)(yaml@2.5.1) resolve-from: 5.0.0 rollup: 4.21.2 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tree-kill: 1.2.2 optionalDependencies: - postcss: 8.4.41 + postcss: 8.4.45 typescript: 5.5.4 transitivePeerDependencies: - jiti @@ -6815,7 +6986,7 @@ snapshots: dependencies: browserslist: 4.23.3 escalade: 3.2.0 - picocolors: 1.0.1 + picocolors: 1.1.0 uri-js@4.4.1: dependencies: @@ -6846,7 +7017,7 @@ snapshots: vite-node@2.0.5(@types/node@20.16.2): dependencies: cac: 6.7.14 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) pathe: 1.1.2 tinyrainbow: 1.2.0 vite: 5.4.2(@types/node@20.16.2) @@ -6864,32 +7035,32 @@ snapshots: vite@5.4.2(@types/node@20.16.2): dependencies: esbuild: 0.21.5 - postcss: 8.4.41 + postcss: 8.4.45 rollup: 4.21.2 optionalDependencies: '@types/node': 20.16.2 fsevents: 2.3.3 - vitepress@1.3.4(@algolia/client-search@5.2.3)(@types/node@20.16.2)(postcss@8.4.41)(search-insights@2.17.0)(typescript@5.5.4): + vitepress@1.3.4(@algolia/client-search@5.2.3)(@types/node@20.16.2)(postcss@8.4.45)(search-insights@2.17.1)(typescript@5.5.4): dependencies: '@docsearch/css': 3.6.1 - '@docsearch/js': 3.6.1(@algolia/client-search@5.2.3)(search-insights@2.17.0) - '@shikijs/core': 1.15.0 - '@shikijs/transformers': 1.15.0 + '@docsearch/js': 3.6.1(@algolia/client-search@5.2.3)(search-insights@2.17.1) + '@shikijs/core': 1.16.2 + '@shikijs/transformers': 1.16.2 '@types/markdown-it': 14.1.2 '@vitejs/plugin-vue': 5.1.3(vite@5.4.2(@types/node@20.16.2))(vue@3.4.38(typescript@5.5.4)) - '@vue/devtools-api': 7.3.9 - '@vue/shared': 3.4.38 + '@vue/devtools-api': 7.4.4 + '@vue/shared': 3.5.3 '@vueuse/core': 11.0.3(vue@3.4.38(typescript@5.5.4)) '@vueuse/integrations': 11.0.3(focus-trap@7.5.4)(vue@3.4.38(typescript@5.5.4)) focus-trap: 7.5.4 mark.js: 8.11.1 minisearch: 7.1.0 - shiki: 1.15.0 + shiki: 1.16.2 vite: 5.4.2(@types/node@20.16.2) vue: 3.4.38(typescript@5.5.4) optionalDependencies: - postcss: 8.4.41 + postcss: 8.4.45 transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -6928,7 +7099,7 @@ snapshots: '@vitest/spy': 2.0.5 '@vitest/utils': 2.0.5 chai: 5.1.1 - debug: 4.3.6(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) execa: 8.0.1 magic-string: 0.30.11 pathe: 1.1.2 @@ -6961,7 +7132,7 @@ snapshots: vue-tsc@2.1.2(typescript@5.5.4): dependencies: - '@volar/typescript': 2.4.1 + '@volar/typescript': 2.4.2 '@vue/language-core': 2.1.2(typescript@5.5.4) semver: 7.6.3 typescript: 5.5.4 @@ -7046,7 +7217,7 @@ snapshots: yallist@4.0.0: {} - yaml@2.5.0: {} + yaml@2.5.1: {} yargs-parser@20.2.9: {} diff --git a/scripts/apidocs/processing/error.ts b/scripts/apidocs/processing/error.ts index f171d6b4663..e4117301842 100644 --- a/scripts/apidocs/processing/error.ts +++ b/scripts/apidocs/processing/error.ts @@ -1,4 +1,5 @@ import { FakerError } from '../../../src/errors/faker-error'; +import { CI_PREFLIGHT } from '../../env'; import type { SourceableNode } from './source'; import { getSourcePath } from './source'; @@ -6,14 +7,22 @@ export class FakerApiDocsProcessingError extends FakerError { constructor(options: { type: string; name: string; - source: string | SourceableNode; + source: SourceableNode; cause: unknown; }) { const { type, name, source, cause } = options; - const sourceText = - typeof source === 'string' ? source : getSourcePathText(source); + + const mainText = `Failed to process ${type} '${name}'`; const causeText = cause instanceof Error ? cause.message : ''; - super(`Failed to process ${type} ${name} at ${sourceText} : ${causeText}`, { + const { filePath, line, column } = getSourcePath(source); + const sourceText = `${filePath}:${line}:${column}`; + + if (CI_PREFLIGHT) { + const sourceArgs = `file=${filePath},line=${line},col=${column}`; + console.log(`::error ${sourceArgs}::${mainText}: ${causeText}`); + } + + super(`${mainText} at ${sourceText} : ${causeText}`, { cause, }); } @@ -22,7 +31,7 @@ export class FakerApiDocsProcessingError extends FakerError { export function newProcessingError(options: { type: string; name: string; - source: string | SourceableNode; + source: SourceableNode; cause: unknown; }): FakerApiDocsProcessingError { const { cause } = options; @@ -33,8 +42,3 @@ export function newProcessingError(options: { return new FakerApiDocsProcessingError(options); } - -function getSourcePathText(source: SourceableNode): string { - const { filePath, line, column } = getSourcePath(source); - return `${filePath}:${line}:${column}`; -} diff --git a/scripts/apidocs/processing/jsdocs.ts b/scripts/apidocs/processing/jsdocs.ts index 4135e5e621f..0999abca845 100644 --- a/scripts/apidocs/processing/jsdocs.ts +++ b/scripts/apidocs/processing/jsdocs.ts @@ -10,7 +10,11 @@ import { export type JSDocableLikeNode = Pick; export function getJsDocs(node: JSDocableLikeNode): JSDoc { - return exactlyOne(node.getJsDocs(), 'jsdocs'); + return exactlyOne( + node.getJsDocs(), + 'jsdocs', + 'Please ensure that each method signature has JSDocs, and that all properties of option/object parameters are documented with both @param tags and inline JSDocs.' + ); } export function getDeprecated(jsdocs: JSDoc): string | undefined { diff --git a/scripts/apidocs/processing/parameter.ts b/scripts/apidocs/processing/parameter.ts index 7a6b67da896..05f2f1f3fdb 100644 --- a/scripts/apidocs/processing/parameter.ts +++ b/scripts/apidocs/processing/parameter.ts @@ -1,5 +1,6 @@ import type { PropertySignature, + Symbol, Type, TypeParameterDeclaration, } from 'ts-morph'; @@ -174,30 +175,43 @@ function processComplexParameter( return type .getApparentProperties() .flatMap((parameter) => { - const declaration = exactlyOne( - parameter.getDeclarations(), - 'property declaration' - ) as PropertySignature; - const propertyType = declaration.getType(); - const jsdocs = getJsDocs(declaration); - const deprecated = getDeprecated(jsdocs); - - return [ - { - name: `${name}.${parameter.getName()}${getNameSuffix(propertyType)}`, - type: getTypeText(propertyType, { - abbreviate: false, - stripUndefined: true, - }), - default: getDefault(jsdocs), - description: - getDescription(jsdocs) + - (deprecated ? `\n\n**DEPRECATED:** ${deprecated}` : ''), - }, - ]; + try { + return processComplexParameterProperty(name, parameter); + } catch (error) { + throw newProcessingError({ + type: 'property', + name: `${name}.${parameter.getName()}`, + source: parameter.getDeclarations()[0], + cause: error, + }); + } }) .sort((a, b) => a.name.localeCompare(b.name)); } return []; } + +function processComplexParameterProperty(name: string, parameter: Symbol) { + const declaration = exactlyOne( + parameter.getDeclarations(), + 'property declaration' + ) as PropertySignature; + const propertyType = declaration.getType(); + const jsdocs = getJsDocs(declaration); + const deprecated = getDeprecated(jsdocs); + + return [ + { + name: `${name}.${parameter.getName()}${getNameSuffix(propertyType)}`, + type: getTypeText(propertyType, { + abbreviate: false, + stripUndefined: true, + }), + default: getDefault(jsdocs), + description: + getDescription(jsdocs) + + (deprecated ? `\n\n**DEPRECATED:** ${deprecated}` : ''), + }, + ]; +} diff --git a/scripts/apidocs/utils/value-checks.ts b/scripts/apidocs/utils/value-checks.ts index f8578ccc311..2a4ee1a98d1 100644 --- a/scripts/apidocs/utils/value-checks.ts +++ b/scripts/apidocs/utils/value-checks.ts @@ -1,7 +1,11 @@ -export function exactlyOne(input: ReadonlyArray, property: string): T { +export function exactlyOne( + input: ReadonlyArray, + property: string, + extraDescription: string = '' +): T { if (input.length !== 1) { throw new Error( - `Expected exactly one element for ${property}, got ${input.length}` + `Expected exactly one ${property} element, got ${input.length}. ${extraDescription}` ); } @@ -10,11 +14,12 @@ export function exactlyOne(input: ReadonlyArray, property: string): T { export function optionalOne( input: ReadonlyArray, - property: string + property: string, + extraDescription: string = '' ): T | undefined { if (input.length > 1) { throw new Error( - `Expected one optional element for ${property}, got ${input.length}` + `Expected one optional ${property} element, got ${input.length}. ${extraDescription}` ); } @@ -23,10 +28,13 @@ export function optionalOne( export function required( input: T | undefined, - property: string + property: string, + extraDescription: string = '' ): NonNullable { if (input == null) { - throw new Error(`Expected a value for ${property}, got undefined`); + throw new Error( + `Expected a value for ${property}, got undefined. ${extraDescription}` + ); } return input; @@ -34,17 +42,23 @@ export function required( export function allRequired( input: ReadonlyArray, - property: string + property: string, + extraDescription: string = '' ): Array> { - return input.map((v, i) => required(v, `${property}[${i}]`)); + return input.map((v, i) => + required(v, `${property}[${i}]`, extraDescription) + ); } export function atLeastOne( input: ReadonlyArray, - property: string + property: string, + extraDescription: string = '' ): ReadonlyArray { if (input.length === 0) { - throw new Error(`Expected at least one element for ${property}`); + throw new Error( + `Expected at least one ${property} element. ${extraDescription}` + ); } return input; @@ -52,18 +66,28 @@ export function atLeastOne( export function atLeastOneAndAllRequired( input: ReadonlyArray, - property: string + property: string, + extraDescription: string = '' ): ReadonlyArray> { - return atLeastOne(allRequired(input, property), property); + return atLeastOne( + allRequired(input, property, extraDescription), + property, + extraDescription + ); } -export function valueForKey(input: Record, key: string): T { - return required(input[key], key); +export function valueForKey( + input: Record, + key: string, + extraDescription: string = '' +): T { + return required(input[key], key, extraDescription); } export function valuesForKeys( input: Record, - keys: string[] + keys: string[], + extraDescription: string = '' ): T[] { - return keys.map((key) => valueForKey(input, key)); + return keys.map((key) => valueForKey(input, key, extraDescription)); } diff --git a/scripts/env.ts b/scripts/env.ts new file mode 100644 index 00000000000..f73aa5d949c --- /dev/null +++ b/scripts/env.ts @@ -0,0 +1,3 @@ +import { env } from 'node:process'; + +export const CI_PREFLIGHT = env.CI_PREFLIGHT === 'true'; diff --git a/test/all-functional.spec.ts b/test/all-functional.spec.ts index cd78678e14b..33d89312d5e 100644 --- a/test/all-functional.spec.ts +++ b/test/all-functional.spec.ts @@ -81,7 +81,7 @@ const modules = getMethodNamesByModules(fakerEN); describe('BROKEN_LOCALE_METHODS test', () => { it('should not contain obsolete configuration (modules)', () => { const existingModules = Object.keys(modules); - const configuredModules = Object.keys(BROKEN_LOCALE_METHODS ?? {}); + const configuredModules = Object.keys(BROKEN_LOCALE_METHODS); const obsoleteModules = configuredModules.filter( (module) => !existingModules.includes(module) ); diff --git a/test/support/seeded-runs.ts b/test/support/seeded-runs.ts index 19ef410f02d..a05f185430d 100644 --- a/test/support/seeded-runs.ts +++ b/test/support/seeded-runs.ts @@ -142,8 +142,12 @@ class TestGenerator< repetitions: number = 1 ): void { this.setup(); + const callable = this.module[method]; + if (callable == null) { + throw new Error(`Method ${method} not found in ${this.moduleName}`); + } + for (let i = 0; i < repetitions; i++) { - const callable = this.module[method]; const value = callable(...args); expect(value).toMatchSnapshot(); } diff --git a/vitest.config.ts b/vitest.config.ts index 1c73cfbb318..ad95ef967cf 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,4 +1,5 @@ import { defineConfig } from 'vitest/config'; +import { CI_PREFLIGHT } from './scripts/env'; const VITEST_SEQUENCE_SEED = Date.now(); @@ -14,9 +15,7 @@ export default defineConfig({ reporter: ['clover', 'cobertura', 'lcov', 'text'], include: ['src'], }, - reporters: process.env.CI_PREFLIGHT - ? ['basic', 'github-actions'] - : ['basic'], + reporters: CI_PREFLIGHT ? ['basic', 'github-actions'] : ['basic'], sequence: { seed: VITEST_SEQUENCE_SEED, shuffle: true,