Skip to content

Commit

Permalink
task: upgraded semver dependency (and biome) (#7272)
Browse files Browse the repository at this point in the history
Sorry for the extra noise here, but this seems to be the biome upgrade
altering formatting slightly.
  • Loading branch information
chriswk authored Jun 4, 2024
1 parent 9cb015a commit 0db5bc1
Show file tree
Hide file tree
Showing 27 changed files with 887 additions and 912 deletions.
8 changes: 5 additions & 3 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnsafeOptionalChaining": "off",
"useExhaustiveDependencies": "off",
"noUnusedImports": "warn"
"noUnusedImports": "warn",
"useJsxKeyInIterable": "off"
},
"complexity": {
"noBannedTypes": "off",
Expand All @@ -31,7 +32,8 @@
"noPrototypeBuiltins": "off",
"noConfusingVoidType": "off",
"noArrayIndexKey": "off",
"noThenProperty": "off"
"noThenProperty": "off",
"noExportsInTest": "off"
},
"performance": {
"noAccumulatingSpread": "off",
Expand Down
6 changes: 3 additions & 3 deletions docker/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3131,7 +3131,7 @@ saxes@^6.0.0:
dependencies:
xmlchars "^2.2.0"

semver@^5.3.0, semver@^7.3.5, semver@^7.5.3, semver@^7.5.4:
semver@^5.3.0, semver@^7.3.5, semver@^7.5.3, semver@^7.5.4, semver@^7.6.2:
version "7.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d"
integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==
Expand Down Expand Up @@ -3695,7 +3695,7 @@ [email protected]:
semver "^7.5.3"

"unleash-server@file:../build":
version "5.12.5"
version "5.12.7"
dependencies:
"@slack/web-api" "^6.10.0"
"@wesleytodd/openapi" "^0.3.0"
Expand Down Expand Up @@ -3750,7 +3750,7 @@ [email protected]:
prom-client "^14.0.0"
response-time "^2.3.2"
sanitize-filename "^1.6.3"
semver "^7.5.4"
semver "^7.6.2"
serve-favicon "^2.5.0"
slug "^9.0.0"
stoppable "^1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"gen:api:clean": "yarn gen:api && rm -rf src/openapi/apis && sed -i.bak '1q' src/openapi/index.ts && rm src/openapi/index.ts.bak"
},
"devDependencies": {
"@biomejs/biome": "1.6.4",
"@biomejs/biome": "1.8.0",
"@codemirror/lang-json": "6.0.1",
"@emotion/react": "11.11.4",
"@emotion/styled": "11.11.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,31 @@ interface IServiceAccountsActionsCellProps {
onDelete: (event: React.SyntheticEvent) => void;
}

export const ServiceAccountsActionsCell: VFC<IServiceAccountsActionsCellProps> =
({ onEdit, onDelete }) => {
return (
<StyledBox>
<PermissionIconButton
data-loading
onClick={onEdit}
permission={ADMIN}
tooltipProps={{
title: 'Edit service account',
}}
>
<Edit />
</PermissionIconButton>
<PermissionIconButton
data-loading
onClick={onDelete}
permission={ADMIN}
tooltipProps={{
title: 'Remove service account',
}}
>
<Delete />
</PermissionIconButton>
</StyledBox>
);
};
export const ServiceAccountsActionsCell: VFC<
IServiceAccountsActionsCellProps
> = ({ onEdit, onDelete }) => {
return (
<StyledBox>
<PermissionIconButton
data-loading
onClick={onEdit}
permission={ADMIN}
tooltipProps={{
title: 'Edit service account',
}}
>
<Edit />
</PermissionIconButton>
<PermissionIconButton
data-loading
onClick={onDelete}
permission={ADMIN}
tooltipProps={{
title: 'Remove service account',
}}
>
<Delete />
</PermissionIconButton>
</StyledBox>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -73,37 +73,38 @@ const resolveIconColors = (state: ChangeRequestState, theme: Theme) => {
};
};

export const ChangeRequestReviewStatus: FC<ISuggestChangeReviewsStatusProps> =
({ changeRequest, onEditClick }) => {
const theme = useTheme();
return (
<StyledOuterContainer>
<StyledButtonContainer
{...resolveIconColors(changeRequest.state, theme)}
>
<ChangesAppliedIcon
style={{
transform: `scale(1.5)`,
}}
/>
</StyledButtonContainer>
<StyledReviewStatusContainer
sx={{
backgroundColor:
changeRequest.state === 'In review'
? theme.palette.warning.light
: 'initial',
export const ChangeRequestReviewStatus: FC<
ISuggestChangeReviewsStatusProps
> = ({ changeRequest, onEditClick }) => {
const theme = useTheme();
return (
<StyledOuterContainer>
<StyledButtonContainer
{...resolveIconColors(changeRequest.state, theme)}
>
<ChangesAppliedIcon
style={{
transform: `scale(1.5)`,
}}
border={resolveBorder(changeRequest.state, theme)}
>
<ResolveComponent
changeRequest={changeRequest}
onEditClick={onEditClick}
/>
</StyledReviewStatusContainer>
</StyledOuterContainer>
);
};
/>
</StyledButtonContainer>
<StyledReviewStatusContainer
sx={{
backgroundColor:
changeRequest.state === 'In review'
? theme.palette.warning.light
: 'initial',
}}
border={resolveBorder(changeRequest.state, theme)}
>
<ResolveComponent
changeRequest={changeRequest}
onEditClick={onEditClick}
/>
</StyledReviewStatusContainer>
</StyledOuterContainer>
);
};

interface IResolveComponentProps {
changeRequest: ChangeRequestType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,84 +25,82 @@ const StyledContainer = styled(Box)(({ theme }) => ({
gap: theme.spacing(2),
}));

export const ScheduleChangeRequestDialog: FC<ScheduleChangeRequestDialogProps> =
({
open,
onConfirm,
onClose,
title,
primaryButtonText,
projectId,
environment,
disabled,
scheduledAt,
}) => {
const [selectedDate, setSelectedDate] = useState(
scheduledAt ? new Date(scheduledAt) : new Date(),
);
const [error, setError] = useState<string | undefined>(undefined);
export const ScheduleChangeRequestDialog: FC<
ScheduleChangeRequestDialogProps
> = ({
open,
onConfirm,
onClose,
title,
primaryButtonText,
projectId,
environment,
disabled,
scheduledAt,
}) => {
const [selectedDate, setSelectedDate] = useState(
scheduledAt ? new Date(scheduledAt) : new Date(),
);
const [error, setError] = useState<string | undefined>(undefined);

const timezone = getBrowserTimezone();
const timezone = getBrowserTimezone();

return (
<Dialogue
title={title}
primaryButtonText={primaryButtonText}
disabledPrimaryButton={disabled}
secondaryButtonText='Cancel'
open={open}
onClose={() => onClose()}
onClick={() => onConfirm(selectedDate)}
permissionButton={
<PermissionButton
variant='contained'
onClick={() => onConfirm(selectedDate)}
projectId={projectId}
permission={APPLY_CHANGE_REQUEST}
environmentId={environment}
disabled={disabled}
>
{primaryButtonText}
</PermissionButton>
}
fullWidth
>
<Alert
severity={'info'}
sx={{ mb: (theme) => theme.spacing(2) }}
>
The time shown below is based on your browser's time zone.
</Alert>
<Typography
variant={'body1'}
sx={{ mb: (theme) => theme.spacing(4) }}
return (
<Dialogue
title={title}
primaryButtonText={primaryButtonText}
disabledPrimaryButton={disabled}
secondaryButtonText='Cancel'
open={open}
onClose={() => onClose()}
onClick={() => onConfirm(selectedDate)}
permissionButton={
<PermissionButton
variant='contained'
onClick={() => onConfirm(selectedDate)}
projectId={projectId}
permission={APPLY_CHANGE_REQUEST}
environmentId={environment}
disabled={disabled}
>
Select the date and time when these changes should be
applied. If you change your mind later, you can reschedule
the changes or apply them immediately.
{primaryButtonText}
</PermissionButton>
}
fullWidth
>
<Alert severity={'info'} sx={{ mb: (theme) => theme.spacing(2) }}>
The time shown below is based on your browser's time zone.
</Alert>
<Typography
variant={'body1'}
sx={{ mb: (theme) => theme.spacing(4) }}
>
Select the date and time when these changes should be applied.
If you change your mind later, you can reschedule the changes or
apply them immediately.
</Typography>
<StyledContainer>
<DateTimePicker
label='Date'
value={selectedDate}
onChange={(date) => {
setError(undefined);
if (date < new Date()) {
setError(
`The time you provided (${date.toLocaleString()}) is not valid because it's in the past. Please select a time in the future.`,
);
}
setSelectedDate(date);
}}
min={new Date()}
error={Boolean(error)}
errorText={error}
required
/>
<Typography variant={'body2'}>
Your browser's time zone is {timezone}
</Typography>
<StyledContainer>
<DateTimePicker
label='Date'
value={selectedDate}
onChange={(date) => {
setError(undefined);
if (date < new Date()) {
setError(
`The time you provided (${date.toLocaleString()}) is not valid because it's in the past. Please select a time in the future.`,
);
}
setSelectedDate(date);
}}
min={new Date()}
error={Boolean(error)}
errorText={error}
required
/>
<Typography variant={'body2'}>
Your browser's time zone is {timezone}
</Typography>
</StyledContainer>
</Dialogue>
);
};
</StyledContainer>
</Dialogue>
);
};
Loading

0 comments on commit 0db5bc1

Please sign in to comment.