Skip to content

Commit c52d684

Browse files
committed
get rid of isTruthy calls thanks to TS 5.5
1 parent 92494d9 commit c52d684

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

app/forms/instance-create.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import * as Accordion from '@radix-ui/react-accordion'
99
import { useEffect, useMemo, useState } from 'react'
1010
import { useController, useWatch, type Control } from 'react-hook-form'
1111
import { useNavigate, type LoaderFunctionArgs } from 'react-router-dom'
12-
import * as R from 'remeda'
1312
import type { SetRequired } from 'type-fest'
1413

1514
import {
@@ -645,7 +644,7 @@ const AdvancedAccordion = ({
645644
)
646645
const attachedFloatingIpsData = attachedFloatingIps
647646
.map((ip) => attachableFloatingIps.find((fip) => fip.name === ip.floatingIp))
648-
.filter(R.isTruthy)
647+
.filter((ip) => !!ip)
649648

650649
const closeFloatingIpModal = () => {
651650
setFloatingIpModalOpen(false)

app/pages/project/access/ProjectAccessPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function ProjectAccessPage() {
102102
const projectAccessRow = userAssignments.find((a) => a.roleSource === 'project')
103103

104104
const roleBadges = R.sortBy(
105-
[siloAccessRow, projectAccessRow].filter(R.isTruthy),
105+
[siloAccessRow, projectAccessRow].filter((r) => !!r),
106106
(r) => roleOrder[r.roleName] // sorts strongest role first
107107
)
108108

mock-api/msw/util.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { differenceInSeconds, subHours } from 'date-fns'
99
// Works without the .js for dev server and prod build in MSW mode, but
1010
// playwright wants the .js. No idea why, let's just add the .js.
1111
import { IPv4, IPv6 } from 'ip-num/IPNumber.js'
12-
import * as R from 'remeda'
1312

1413
import {
1514
FLEET_ID,
@@ -343,7 +342,7 @@ export function userHasRole(
343342
const userGroupIds = db.groupMemberships
344343
.filter((gm) => gm.userId === user.id)
345344
.map((gm) => db.userGroups.find((g) => g.id === gm.groupId))
346-
.filter(R.isTruthy)
345+
.filter((g) => !!g)
347346
.map((g) => g.id)
348347

349348
/** All actors with *at least* the specified role on the resource */

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"tailwindcss": "^3.4.3",
127127
"tsx": "^4.9.3",
128128
"type-fest": "^4.18.2",
129-
"typescript": "~5.5.0",
129+
"typescript": "~5.5.2",
130130
"vite": "^5.2.11",
131131
"vite-plugin-html": "^3.2.2",
132132
"vite-tsconfig-paths": "^4.3.2",

0 commit comments

Comments
 (0)