From bad699a4da65704bc70c966710b265c07935565a Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Wed, 10 Jan 2024 14:45:25 +0100 Subject: [PATCH] task: Upgrade to biome 1.5, moving files list to joined config variable --- biome.json | 70 +++++++--------- frontend/package.json | 2 +- .../ApplicationList/ApplicationList.tsx | 10 ++- .../MultiActionButton/MultiActionButton.tsx | 1 - .../ChangeRequestsTabs/ChangeRequestsTabs.tsx | 7 +- .../ContextList/ContextList/ContextList.tsx | 12 ++- .../component/demo/DemoSteps/DemoSteps.tsx | 21 +++-- .../EnvironmentVariantsTable.tsx | 6 +- .../featureTypes/FeatureTypesList.tsx | 6 +- .../IntegrationHowToSection.tsx | 10 +-- .../VariantInformation/VariantInformation.tsx | 22 +++-- .../ProjectDoraMetrics/ProjectDoraMetrics.tsx | 6 +- .../SegmentDeleteUsedSegment.tsx | 1 - .../segments/SegmentProjectAlert.tsx | 1 - .../segments/SegmentTable/SegmentTable.tsx | 6 +- .../StrategiesList/StrategiesList.tsx | 4 +- .../tags/TagTypeList/TagTypeList.tsx | 6 +- frontend/src/themes/themeTypes.ts | 5 -- frontend/yarn.lock | 80 +++++++++++-------- package.json | 2 +- src/lib/error/permission-error.ts | 6 +- src/lib/routes/controller.ts | 3 +- src/lib/services/state-util.ts | 19 +++-- src/lib/util/omit-keys.ts | 5 +- yarn.lock | 80 +++++++++++-------- 25 files changed, 221 insertions(+), 170 deletions(-) diff --git a/biome.json b/biome.json index e3e73e47cc..992c1b7a1c 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.4.0/schema.json", + "$schema": "https://biomejs.dev/schemas/1.5.0/schema.json", "linter": { "enabled": true, "rules": { @@ -27,6 +27,7 @@ }, "suspicious": { "noExplicitAny": "off", + "noImplicitAnyLet": "off", "noExtraNonNullAssertion": "off", "noRedeclare": "off", "noPrototypeBuiltins": "off", @@ -37,56 +38,39 @@ "noDelete": "off" } }, - "ignore": [ - "node_modules", - "docker", - "bundle.js", - "website/blog", - "website/build", - "website/core", - "website/docs", - "website/i18n/*.js", - "website/pages", - "website/translated_docs", - "website", - "setupJest.js", - "dist", - "build", - "src/migrations/*.js", - "src/test/examples/*.json", - "website/**/*.js", - "coverage", - "CHANGELOG.md" - ] + "ignore": [] }, "organizeImports": { "enabled": false }, "formatter": { "indentStyle": "space", - "ignore": [ - "node_modules", - "docker", - "bundle.js", - "website/blog", - "website/build", - "website/core", - "website/docs", - "website/i18n/*.js", - "website/pages", - "website/translated_docs", - "website", - "setupJest.js", - "dist", - "build", - "src/migrations/*.js", - "src/migrations/*.json", - "src/test/examples/*.json", - "website/**/*.js", - "coverage" - ], "indentWidth": 4 }, + "files": { + "ignore": [ + "src/migrations/*.json", + "**/node_modules", + "**/docker", + "**/bundle.js", + "**/website/blog", + "**/website/build", + "**/website/core", + "**/website/docs", + "**/website/i18n/*.js", + "**/website/pages", + "**/website/translated_docs", + "**/website", + "**/setupJest.js", + "**/dist", + "**/build", + "**/src/migrations/*.js", + "**/src/test/examples/*.json", + "**/website/**/*.js", + "**/coverage", + "**/CHANGELOG.md" + ] + }, "javascript": { "formatter": { "semicolons": "always", diff --git a/frontend/package.json b/frontend/package.json index fe8369d02f..c32fba6b5e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -32,7 +32,7 @@ "gen:api:sandbox": "NODE_OPTIONS=\"${NODE_OPTIONS} --no-experimental-fetch\" UNLEASH_OPENAPI_URL=https://sandbox.getunleash.io/demo2/docs/openapi.json yarn run gen:api" }, "devDependencies": { - "@biomejs/biome": "1.4.1", + "@biomejs/biome": "1.5.0", "@codemirror/lang-json": "6.0.1", "@emotion/react": "11.11.3", "@emotion/styled": "11.11.0", diff --git a/frontend/src/component/application/ApplicationList/ApplicationList.tsx b/frontend/src/component/application/ApplicationList/ApplicationList.tsx index 35c0562234..c316390430 100644 --- a/frontend/src/component/application/ApplicationList/ApplicationList.tsx +++ b/frontend/src/component/application/ApplicationList/ApplicationList.tsx @@ -56,7 +56,11 @@ export const ApplicationList = () => { () => [ { id: 'Icon', - Cell: ({ row: { original: { icon } } }: any) => ( + Cell: ({ + row: { + original: { icon }, + }, + }: any) => ( @@ -72,7 +76,9 @@ export const ApplicationList = () => { accessor: 'appName', width: '50%', Cell: ({ - row: { original: { appName, description } }, + row: { + original: { appName, description }, + }, }: any) => ( diff --git a/frontend/src/component/changeRequest/ProjectChangeRequests/ChangeRequestsTabs/ChangeRequestsTabs.tsx b/frontend/src/component/changeRequest/ProjectChangeRequests/ChangeRequestsTabs/ChangeRequestsTabs.tsx index e557ee8d85..e60143c264 100644 --- a/frontend/src/component/changeRequest/ProjectChangeRequests/ChangeRequestsTabs/ChangeRequestsTabs.tsx +++ b/frontend/src/component/changeRequest/ProjectChangeRequests/ChangeRequestsTabs/ChangeRequestsTabs.tsx @@ -137,7 +137,12 @@ export const ChangeRequestsTabs = ({ .includes(feature.name.toLowerCase()), ); }, - Cell: ({ value, row: { original: { title } } }: any) => ( + Cell: ({ + value, + row: { + original: { title }, + }, + }: any) => ( { Header: 'Name', accessor: 'name', width: '70%', - Cell: ({ row: { original: { name, description } } }: any) => ( + Cell: ({ + row: { + original: { name, description }, + }, + }: any) => ( { Header: 'Actions', id: 'Actions', align: 'center', - Cell: ({ row: { original: { name } } }: any) => ( + Cell: ({ + row: { + original: { name }, + }, + }: any) => ( { diff --git a/frontend/src/component/demo/DemoSteps/DemoSteps.tsx b/frontend/src/component/demo/DemoSteps/DemoSteps.tsx index 8a5af36780..bb318e3218 100644 --- a/frontend/src/component/demo/DemoSteps/DemoSteps.tsx +++ b/frontend/src/component/demo/DemoSteps/DemoSteps.tsx @@ -211,18 +211,15 @@ export const DemoSteps = ({ const currentStep = currentTopic.steps[step]; if (!currentStep) return; - setTimeout( - () => { - if ( - currentStep.href && - !location.pathname.endsWith(currentStep.href.split('?')[0]) - ) { - navigate(currentStep.href); - } - waitForLoad(currentStep); - }, - currentStep.delay ?? 0, - ); + setTimeout(() => { + if ( + currentStep.href && + !location.pathname.endsWith(currentStep.href.split('?')[0]) + ) { + navigate(currentStep.href); + } + waitForLoad(currentStep); + }, currentStep.delay ?? 0); }, [topic, step]); useEffect(() => { diff --git a/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsCard/EnvironmentVariantsTable/EnvironmentVariantsTable.tsx b/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsCard/EnvironmentVariantsTable/EnvironmentVariantsTable.tsx index d5deb79dc8..d8118d97d4 100644 --- a/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsCard/EnvironmentVariantsTable/EnvironmentVariantsTable.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureVariants/FeatureEnvironmentVariants/EnvironmentVariantsCard/EnvironmentVariantsTable/EnvironmentVariantsTable.tsx @@ -70,7 +70,11 @@ export const EnvironmentVariantsTable = ({ { Header: 'Weight', accessor: 'weight', - Cell: ({ row: { original: { name, weight } } }: any) => { + Cell: ({ + row: { + original: { name, weight }, + }, + }: any) => { return ( {calculateVariantWeight(weight)} % diff --git a/frontend/src/component/featureTypes/FeatureTypesList.tsx b/frontend/src/component/featureTypes/FeatureTypesList.tsx index ebef75bd34..5469cfdc2a 100644 --- a/frontend/src/component/featureTypes/FeatureTypesList.tsx +++ b/frontend/src/component/featureTypes/FeatureTypesList.tsx @@ -54,7 +54,11 @@ export const FeatureTypesList = () => { Header: 'Name', accessor: 'name', width: '90%', - Cell: ({ row: { original: { name, description } } }: any) => { + Cell: ({ + row: { + original: { name, description }, + }, + }: any) => { return ( ({ - fontSize: theme.fontSizes.smallBody, - gap: theme.spacing(1.5), - }), -); +const StyledHowDoesItWorkSection = styled(StyledRaisedSection)(({ theme }) => ({ + fontSize: theme.fontSizes.smallBody, + gap: theme.spacing(1.5), +})); interface IIntegrationHowToSectionProps { provider?: Pick; diff --git a/frontend/src/component/playground/Playground/PlaygroundResultsTable/VariantCell/VariantInformation/VariantInformation.tsx b/frontend/src/component/playground/Playground/PlaygroundResultsTable/VariantCell/VariantInformation/VariantInformation.tsx index a3de08257b..1ff57225e3 100644 --- a/frontend/src/component/playground/Playground/PlaygroundResultsTable/VariantCell/VariantInformation/VariantInformation.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundResultsTable/VariantCell/VariantInformation/VariantInformation.tsx @@ -117,7 +117,11 @@ export const VariantInformation: VFC = ({ const COLUMNS = [ { id: 'Icon', - Cell: ({ row: { original: { selected } } }: any) => ( + Cell: ({ + row: { + original: { selected }, + }, + }: any) => ( <> ( - {name} - ), + Cell: ({ + row: { + original: { name }, + }, + }: any) => {name}, maxWidth: 175, width: 175, }, @@ -144,8 +150,10 @@ const COLUMNS = [ sortType: 'alphanumeric', searchable: true, maxWidth: 75, - Cell: ({ row: { original: { weight } } }: any) => ( - {weight} - ), + Cell: ({ + row: { + original: { weight }, + }, + }: any) => {weight}, }, ]; diff --git a/frontend/src/component/project/Project/ProjectDoraMetrics/ProjectDoraMetrics.tsx b/frontend/src/component/project/Project/ProjectDoraMetrics/ProjectDoraMetrics.tsx index 5cfb217d61..9219075a16 100644 --- a/frontend/src/component/project/Project/ProjectDoraMetrics/ProjectDoraMetrics.tsx +++ b/frontend/src/component/project/Project/ProjectDoraMetrics/ProjectDoraMetrics.tsx @@ -57,7 +57,11 @@ export const ProjectDoraMetrics = () => { Header: 'Name', accessor: 'name', width: '40%', - Cell: ({ row: { original: { name } } }: any) => { + Cell: ({ + row: { + original: { name }, + }, + }: any) => { return ( [ Header: 'Name', accessor: 'name', width: '60%', - Cell: ({ row: { original: { name, description, id } } }: any) => ( + Cell: ({ + row: { + original: { name, description, id }, + }, + }: any) => ( { accessor: (row: any) => formatStrategyName(row.name), width: '90%', Cell: ({ - row: { original: { name, description, deprecated } }, + row: { + original: { name, description, deprecated }, + }, }: any) => { return ( { Header: 'Name', accessor: 'name', width: '90%', - Cell: ({ row: { original: { name, description } } }: any) => { + Cell: ({ + row: { + original: { name, description }, + }, + }: any) => { return ( interface Theme extends CustomTheme {} - // biome-ignore lint/suspicious/noEmptyInterface: interface ThemeOptions extends CustomTheme {} - // biome-ignore lint/suspicious/noEmptyInterface: interface Palette extends CustomPalette {} - // biome-ignore lint/suspicious/noEmptyInterface: interface PaletteOptions extends CustomPalette {} - // biome-ignore lint/suspicious/noEmptyInterface: interface TypeBackground extends CustomTypeBackground {} /* Extend the background object from MUI */ diff --git a/frontend/yarn.lock b/frontend/yarn.lock index ff5e117c48..4e37220fef 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -517,47 +517,59 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@biomejs/biome@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.4.1.tgz#b698c67ea8cd8141c8e27f857c8e6e794320a251" - integrity sha512-JccVAwPbhi37pdxbAGmaOBjUTKEwEjWAhl7rKkVVuXHo4MLASXJ5HR8BTgrImi4/7rTBsGz1tgVD1Kwv1CHGRg== +"@biomejs/biome@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.5.0.tgz#8cc7006861618b601fe4c37429e9aee58e277328" + integrity sha512-ln+o5jbs109qpeDoA+5n+vlAPai3DhlK0tHtZXzQvu4tswFgxNiJCeIXmlW1DYHziTmtBImV3Y0uhbm2iVSE3Q== optionalDependencies: - "@biomejs/cli-darwin-arm64" "1.4.1" - "@biomejs/cli-darwin-x64" "1.4.1" - "@biomejs/cli-linux-arm64" "1.4.1" - "@biomejs/cli-linux-x64" "1.4.1" - "@biomejs/cli-win32-arm64" "1.4.1" - "@biomejs/cli-win32-x64" "1.4.1" + "@biomejs/cli-darwin-arm64" "1.5.0" + "@biomejs/cli-darwin-x64" "1.5.0" + "@biomejs/cli-linux-arm64" "1.5.0" + "@biomejs/cli-linux-arm64-musl" "1.5.0" + "@biomejs/cli-linux-x64" "1.5.0" + "@biomejs/cli-linux-x64-musl" "1.5.0" + "@biomejs/cli-win32-arm64" "1.5.0" + "@biomejs/cli-win32-x64" "1.5.0" -"@biomejs/cli-darwin-arm64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.4.1.tgz#75f9c3c9b1abed8836c8f7bc8cd23ba153fb93d1" - integrity sha512-PZWy2Idndqux38p6AXSDQM2ldRAWi32bvb7bMbTN0ALzpWYMYnxd71ornatumSSJYoNhKmxzDLq+jct7nZJ79w== +"@biomejs/cli-darwin-arm64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.5.0.tgz#794ea67d348a3f95747e41c6bbbc1145937359ce" + integrity sha512-3+D7axf04dpadGMOaqb2q+zyQnhWW0o/Imt7TJBWsoE0N3/+28Wht8g3UEHHcUL5FPuGIfsE+NcYntBaaAsEIg== -"@biomejs/cli-darwin-x64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.4.1.tgz#672fcce2d339de3bb7a7bd2997e94f03121a28a3" - integrity sha512-soj3BWhnsM1M2JlzR09cibUzG1owJqetwj/Oo7yg0foijo9lNH9XWXZfJBYDKgW/6Fomn+CC2EcUS+hisQzt9g== +"@biomejs/cli-darwin-x64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.5.0.tgz#ee8ad47984bf08bdbd09cf5cf7b1d0856af8b0f3" + integrity sha512-8k5aaLWE/B6ZAXLC+z/Vwh9ogyiSaiRIfvg+F9foxuneHl2R/D/2Iy7pvd3Yoi4Kf6/MBdowekPVezGP4/Kbcw== -"@biomejs/cli-linux-arm64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.4.1.tgz#c816206089ad29ce866c58a6e00e9d3d64a3529d" - integrity sha512-YIZqfJUg4F+fPsBTXxgD7EU2E5OAYbmYSl/snf4PevwfQCWE/omOFZv+NnIQmjYj9I7ParDgcJvanoA3/kO0JQ== +"@biomejs/cli-linux-arm64-musl@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.0.tgz#94af114a283b2e40cd56ec39bbc087dd752b9da4" + integrity sha512-+1B3J8tWLTOvP3+00Cap+XhEXMvxwCHvVfuywUsB7Sqd66NWic3wKJuGbGcS3PuCWtGuIFsiQMNAGqiOXG4uBQ== -"@biomejs/cli-linux-x64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.4.1.tgz#2639daeab1be205cfe444a8d5a3f76aa3a59b956" - integrity sha512-9YOZw3qBd/KUj63A6Hn2zZgzGb2nbESM0qNmeMXgmqinVKM//uc4OgY5TuKITuGjMSvcVxxd4dX1IzYjV9qvNQ== +"@biomejs/cli-linux-arm64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.5.0.tgz#a173b20a9c85f7b5a69824f7fd8227274fa181d0" + integrity sha512-RiecxG71E1jnqiJZ3FaikVBDRkk2ohIxBo0O4o68g87y6Hug//G0S83sj6Wqyn8DgKMCRWQg+XYMgk5CwLVowA== -"@biomejs/cli-win32-arm64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.4.1.tgz#ed5e749b2e0987cf16b545beaa01be6980ae8ce1" - integrity sha512-nWQbvkNKxYn/kCQ0yVF8kCaS3VzaGvtFSmItXiMknU4521LDjJ7tNWH12Gol+pIslrCbd4E1LhJa0a3ThRsBVg== +"@biomejs/cli-linux-x64-musl@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.0.tgz#5431e874954eedf8e95851a61c87ba755353fb74" + integrity sha512-4S2rLluc0WT+XTbLTgcm9+5EEFwJmoGiUEzR6N0P2sIjZD8c5KNf9Ou46BP1Pdg5AgqV+IIClGPK1I80ApSh1Q== -"@biomejs/cli-win32-x64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.4.1.tgz#dd8ee6e14a5d74cbeb2eb9824a43c61bb5c460e4" - integrity sha512-88fR2CQxQ4YLs2BUDuywWYQpUKgU3A3sTezANFc/4LGKQFFLV2yX+F7QAdZVkMHfA+RD9Xg178HomM/6mnTNPA== +"@biomejs/cli-linux-x64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.5.0.tgz#273dc39c8dea8ce02e0bb842355ffb9a7e94b201" + integrity sha512-TlTsG+ptSmnDTUsAAYsXyGOXMcFiF8SiwhPdj4YsNkJRgx9M2curEVcTVm66FINIPK6VJTUcEDahFlx3NPUOzA== + +"@biomejs/cli-win32-arm64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.5.0.tgz#fd4ec29be7774dc5392fb765c25a7a8e378fee9a" + integrity sha512-sWOi1SR+YqJuXElBncGRnWBR7IN7ni6GQY4Zm/vTpP6nVA0dX5C301eQUW1N/VnFQb6fyrJTcBslDUKyemsN/g== + +"@biomejs/cli-win32-x64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.5.0.tgz#aa74ea06cef041049027aaa0462bff5facc42b7f" + integrity sha512-OoqgUXyzmRwX466bklOsWS7WdcvWtBuxF94DXATNe7bUiBa2tlW8QX7VVZvPnMKH57E5J619AkB3b5fhzyUhXA== "@braintree/sanitize-url@^6.0.0": version "6.0.2" diff --git a/package.json b/package.json index 20a72d53d6..debe32d385 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,7 @@ "devDependencies": { "@apidevtools/swagger-parser": "10.1.0", "@babel/core": "7.23.7", - "@biomejs/biome": "1.4.1", + "@biomejs/biome": "1.5.0", "@swc/core": "1.3.102", "@swc/jest": "0.2.29", "@types/bcryptjs": "2.4.6", diff --git a/src/lib/error/permission-error.ts b/src/lib/error/permission-error.ts index 8b5fb0094e..5938aeaf9b 100644 --- a/src/lib/error/permission-error.ts +++ b/src/lib/error/permission-error.ts @@ -19,9 +19,9 @@ class PermissionError extends UnleashError { .map((perm) => `"${perm}"`) .join(', ')}`; - const message = - `You don't have the required permissions to perform this operation. To perform this action, you need ${permissionsMessage}` + - (environment ? ` in the "${environment}" environment.` : `.`); + const message = `You don't have the required permissions to perform this operation. To perform this action, you need ${permissionsMessage}${ + environment ? ` in the "${environment}" environment.` : `.` + }`; super(message); diff --git a/src/lib/routes/controller.ts b/src/lib/routes/controller.ts index 092ccee797..db0c8e56df 100644 --- a/src/lib/routes/controller.ts +++ b/src/lib/routes/controller.ts @@ -39,7 +39,8 @@ interface IRouteOptionsNonGet extends IRouteOptionsBase { type IRouteOptions = IRouteOptionsNonGet | IRouteOptionsGet; const checkPermission = - (permission: Permission = []) => async (req, res, next) => { + (permission: Permission = []) => + async (req, res, next) => { const permissions = ( Array.isArray(permission) ? permission : [permission] ).filter((p) => p !== NONE); diff --git a/src/lib/services/state-util.ts b/src/lib/services/state-util.ts index 38993efece..730521c2a2 100644 --- a/src/lib/services/state-util.ts +++ b/src/lib/services/state-util.ts @@ -17,16 +17,19 @@ export const parseFile: (file: string, data: string) => any = ( export const filterExisting: ( keepExisting: boolean, existingArray: any[], -) => (item: any) => boolean = (keepExisting, existingArray = []) => (item) => { - if (keepExisting) { - const found = existingArray.find((t) => t.name === item.name); - return !found; - } - return true; -}; +) => (item: any) => boolean = + (keepExisting, existingArray = []) => + (item) => { + if (keepExisting) { + const found = existingArray.find((t) => t.name === item.name); + return !found; + } + return true; + }; export const filterEqual: (existingArray: any[]) => (item: any) => boolean = - (existingArray = []) => (item) => { + (existingArray = []) => + (item) => { const toggle = existingArray.find((t) => t.name === item.name); if (toggle) { return JSON.stringify(toggle) !== JSON.stringify(item); diff --git a/src/lib/util/omit-keys.ts b/src/lib/util/omit-keys.ts index ded3ad4bc3..5268fbe7f2 100644 --- a/src/lib/util/omit-keys.ts +++ b/src/lib/util/omit-keys.ts @@ -1,5 +1,8 @@ export interface OmitKeys { - (obj: T, ...keys: K): { + ( + obj: T, + ...keys: K + ): { [K2 in Exclude]: T[K2]; }; } diff --git a/yarn.lock b/yarn.lock index a2c80b6284..7fef93bc14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -616,47 +616,59 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@biomejs/biome@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.4.1.tgz#b698c67ea8cd8141c8e27f857c8e6e794320a251" - integrity sha512-JccVAwPbhi37pdxbAGmaOBjUTKEwEjWAhl7rKkVVuXHo4MLASXJ5HR8BTgrImi4/7rTBsGz1tgVD1Kwv1CHGRg== +"@biomejs/biome@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.5.0.tgz#8cc7006861618b601fe4c37429e9aee58e277328" + integrity sha512-ln+o5jbs109qpeDoA+5n+vlAPai3DhlK0tHtZXzQvu4tswFgxNiJCeIXmlW1DYHziTmtBImV3Y0uhbm2iVSE3Q== optionalDependencies: - "@biomejs/cli-darwin-arm64" "1.4.1" - "@biomejs/cli-darwin-x64" "1.4.1" - "@biomejs/cli-linux-arm64" "1.4.1" - "@biomejs/cli-linux-x64" "1.4.1" - "@biomejs/cli-win32-arm64" "1.4.1" - "@biomejs/cli-win32-x64" "1.4.1" + "@biomejs/cli-darwin-arm64" "1.5.0" + "@biomejs/cli-darwin-x64" "1.5.0" + "@biomejs/cli-linux-arm64" "1.5.0" + "@biomejs/cli-linux-arm64-musl" "1.5.0" + "@biomejs/cli-linux-x64" "1.5.0" + "@biomejs/cli-linux-x64-musl" "1.5.0" + "@biomejs/cli-win32-arm64" "1.5.0" + "@biomejs/cli-win32-x64" "1.5.0" -"@biomejs/cli-darwin-arm64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.4.1.tgz#75f9c3c9b1abed8836c8f7bc8cd23ba153fb93d1" - integrity sha512-PZWy2Idndqux38p6AXSDQM2ldRAWi32bvb7bMbTN0ALzpWYMYnxd71ornatumSSJYoNhKmxzDLq+jct7nZJ79w== +"@biomejs/cli-darwin-arm64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.5.0.tgz#794ea67d348a3f95747e41c6bbbc1145937359ce" + integrity sha512-3+D7axf04dpadGMOaqb2q+zyQnhWW0o/Imt7TJBWsoE0N3/+28Wht8g3UEHHcUL5FPuGIfsE+NcYntBaaAsEIg== -"@biomejs/cli-darwin-x64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.4.1.tgz#672fcce2d339de3bb7a7bd2997e94f03121a28a3" - integrity sha512-soj3BWhnsM1M2JlzR09cibUzG1owJqetwj/Oo7yg0foijo9lNH9XWXZfJBYDKgW/6Fomn+CC2EcUS+hisQzt9g== +"@biomejs/cli-darwin-x64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.5.0.tgz#ee8ad47984bf08bdbd09cf5cf7b1d0856af8b0f3" + integrity sha512-8k5aaLWE/B6ZAXLC+z/Vwh9ogyiSaiRIfvg+F9foxuneHl2R/D/2Iy7pvd3Yoi4Kf6/MBdowekPVezGP4/Kbcw== -"@biomejs/cli-linux-arm64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.4.1.tgz#c816206089ad29ce866c58a6e00e9d3d64a3529d" - integrity sha512-YIZqfJUg4F+fPsBTXxgD7EU2E5OAYbmYSl/snf4PevwfQCWE/omOFZv+NnIQmjYj9I7ParDgcJvanoA3/kO0JQ== +"@biomejs/cli-linux-arm64-musl@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.0.tgz#94af114a283b2e40cd56ec39bbc087dd752b9da4" + integrity sha512-+1B3J8tWLTOvP3+00Cap+XhEXMvxwCHvVfuywUsB7Sqd66NWic3wKJuGbGcS3PuCWtGuIFsiQMNAGqiOXG4uBQ== -"@biomejs/cli-linux-x64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.4.1.tgz#2639daeab1be205cfe444a8d5a3f76aa3a59b956" - integrity sha512-9YOZw3qBd/KUj63A6Hn2zZgzGb2nbESM0qNmeMXgmqinVKM//uc4OgY5TuKITuGjMSvcVxxd4dX1IzYjV9qvNQ== +"@biomejs/cli-linux-arm64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.5.0.tgz#a173b20a9c85f7b5a69824f7fd8227274fa181d0" + integrity sha512-RiecxG71E1jnqiJZ3FaikVBDRkk2ohIxBo0O4o68g87y6Hug//G0S83sj6Wqyn8DgKMCRWQg+XYMgk5CwLVowA== -"@biomejs/cli-win32-arm64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.4.1.tgz#ed5e749b2e0987cf16b545beaa01be6980ae8ce1" - integrity sha512-nWQbvkNKxYn/kCQ0yVF8kCaS3VzaGvtFSmItXiMknU4521LDjJ7tNWH12Gol+pIslrCbd4E1LhJa0a3ThRsBVg== +"@biomejs/cli-linux-x64-musl@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.0.tgz#5431e874954eedf8e95851a61c87ba755353fb74" + integrity sha512-4S2rLluc0WT+XTbLTgcm9+5EEFwJmoGiUEzR6N0P2sIjZD8c5KNf9Ou46BP1Pdg5AgqV+IIClGPK1I80ApSh1Q== -"@biomejs/cli-win32-x64@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.4.1.tgz#dd8ee6e14a5d74cbeb2eb9824a43c61bb5c460e4" - integrity sha512-88fR2CQxQ4YLs2BUDuywWYQpUKgU3A3sTezANFc/4LGKQFFLV2yX+F7QAdZVkMHfA+RD9Xg178HomM/6mnTNPA== +"@biomejs/cli-linux-x64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.5.0.tgz#273dc39c8dea8ce02e0bb842355ffb9a7e94b201" + integrity sha512-TlTsG+ptSmnDTUsAAYsXyGOXMcFiF8SiwhPdj4YsNkJRgx9M2curEVcTVm66FINIPK6VJTUcEDahFlx3NPUOzA== + +"@biomejs/cli-win32-arm64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.5.0.tgz#fd4ec29be7774dc5392fb765c25a7a8e378fee9a" + integrity sha512-sWOi1SR+YqJuXElBncGRnWBR7IN7ni6GQY4Zm/vTpP6nVA0dX5C301eQUW1N/VnFQb6fyrJTcBslDUKyemsN/g== + +"@biomejs/cli-win32-x64@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.5.0.tgz#aa74ea06cef041049027aaa0462bff5facc42b7f" + integrity sha512-OoqgUXyzmRwX466bklOsWS7WdcvWtBuxF94DXATNe7bUiBa2tlW8QX7VVZvPnMKH57E5J619AkB3b5fhzyUhXA== "@colors/colors@1.5.0": version "1.5.0"