Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): Update @aws-sdk client libraries #16887

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/auth-admin-web/components/Admin/nav/AdminTabNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface Props {
}

const AdminTabNav: React.FC<React.PropsWithChildren<Props>> = ({
handleTabChange: handleTabChange,
handleTabChange,
activeTab: activetab,
children,
}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface Props {
}

const ClientTabNav: React.FC<React.PropsWithChildren<Props>> = ({
handleTabChange: handleTabChange,
handleTabChange,
activeTab: activetab,
children,
Comment on lines +12 to 14
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Follow TypeScript naming conventions.

The prop rename from activeTab to activetab breaks the camelCase naming convention commonly used in TypeScript/React. This inconsistency could lead to confusion and maintenance issues.

Apply this diff to maintain consistent naming:

 const ClientTabNav: React.FC<React.PropsWithChildren<Props>> = ({
   handleTabChange,
-  activeTab: activetab,
+  activeTab,
   children,
 }) => {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
handleTabChange,
activeTab: activetab,
children,
handleTabChange,
activeTab,
children,

}) => {
Expand Down
3 changes: 2 additions & 1 deletion apps/contentful-apps/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { FC, useEffect, useState } from 'react'
import { SDKProvider } from '@contentful/react-apps-toolkit'
import { GlobalStyles } from '@contentful/f36-components'
import { SDKProvider } from '@contentful/react-apps-toolkit'

import LocalhostWarning from './LocalhostWarning'

export const Layout: FC<React.PropsWithChildren<unknown>> = ({ children }) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/contentful-apps/components/LocalhostWarning.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Paragraph, TextLink, Note, Flex } from '@contentful/f36-components'
import { Flex,Note, Paragraph, TextLink } from '@contentful/f36-components'

const LocalhostWarning = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Widget operations
import { DEFAULT_LOCALE } from '../../../constants'
import markdownEditor from './widgets/markdownEditor'
import multipleLine from './widgets/multipleLine'
import richTextEditor from './widgets/richTextEditor'
import singleLine from './widgets/singleLine'
import multipleLine from './widgets/multipleLine'
import markdownEditor from './widgets/markdownEditor'
import { DEFAULT_LOCALE } from '../../../constants'

interface WidgetActions {
extractText: (value: string) => string[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { useSDK } from '@contentful/react-apps-toolkit'
import { Checkbox } from '@contentful/f36-components'
import { useSDK } from '@contentful/react-apps-toolkit'

const localeMap = {
en: 'English',
Expand Down
4 changes: 2 additions & 2 deletions apps/contentful-apps/pages/fields/admin-only-json-field.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { useSDK } from '@contentful/react-apps-toolkit'
import { JsonEditor } from '@contentful/field-editor-json'
import { Paragraph } from '@contentful/f36-components'
import { JsonEditor } from '@contentful/field-editor-json'
import { useSDK } from '@contentful/react-apps-toolkit'

const AdminOnlyJsonField = () => {
const sdk = useSDK<FieldExtensionSDK>()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react'
import { Box, Checkbox, Paragraph } from '@contentful/f36-components'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { Box, Checkbox, Paragraph } from '@contentful/f36-components'
import { useSDK } from '@contentful/react-apps-toolkit'

const AdminOnlyShortTextCheckBoxListField = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react'
import { Paragraph, Select } from '@contentful/f36-components'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { Paragraph, Select } from '@contentful/f36-components'
import { useSDK } from '@contentful/react-apps-toolkit'

const AdminOnlyShortTextDropdown = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { useSDK } from '@contentful/react-apps-toolkit'
import { SingleLineEditor } from '@contentful/field-editor-single-line'
import { Box, Paragraph } from '@contentful/f36-components'
import { SingleLineEditor } from '@contentful/field-editor-single-line'
import { useSDK } from '@contentful/react-apps-toolkit'

const AdminOnlyShortTextField = () => {
const sdk = useSDK<FieldExtensionSDK>()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Paragraph } from '@contentful/f36-components'
import { useEffect } from 'react'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { useSDK } from '@contentful/react-apps-toolkit'
import { Paragraph } from '@contentful/f36-components'
import { SingleEntryReferenceEditor } from '@contentful/field-editor-reference'
import { useEffect } from 'react'
import { useSDK } from '@contentful/react-apps-toolkit'

const AdminOnlySingleReferenceField = () => {
const sdk = useSDK<FieldExtensionSDK>()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { useEffect, useState } from 'react'
import { EntryProps } from 'contentful-management'
import { DialogExtensionSDK, locations } from '@contentful/app-sdk'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import {
Box,
Button,
Expand All @@ -8,16 +11,13 @@ import {
Spinner,
TextInput,
} from '@contentful/f36-components'
import { DialogExtensionSDK, locations } from '@contentful/app-sdk'
import { useCMA, useSDK } from '@contentful/react-apps-toolkit'
import { EntryProps } from 'contentful-management'
import { SearchIcon, CloseIcon } from '@contentful/f36-icons'
import { Pagination } from '@contentful/f36-components'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { CloseIcon,SearchIcon } from '@contentful/f36-icons'
import {
CombinedLinkActions,
MultipleEntryReferenceEditor,
} from '@contentful/field-editor-reference'
import { useCMA, useSDK } from '@contentful/react-apps-toolkit'

const DEBOUNCE_TIME = 500

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { useEffect } from 'react'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { useCMA, useSDK } from '@contentful/react-apps-toolkit'
import {
CombinedLinkActions,
MultipleEntryReferenceEditor,
} from '@contentful/field-editor-reference'
import { useCMA, useSDK } from '@contentful/react-apps-toolkit'

import { DEFAULT_LOCALE } from '../../constants'

const ArticleSubArticlesField = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { useEffect, useState } from 'react'
import { Note, Paragraph } from '@contentful/f36-components'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { Note, Paragraph } from '@contentful/f36-components'
import { useCMA, useSDK } from '@contentful/react-apps-toolkit'

import {
CONTENTFUL_ENVIRONMENT,
CONTENTFUL_SPACE,
Expand Down
2 changes: 1 addition & 1 deletion apps/contentful-apps/pages/fields/embed-link-field.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react'
import isUrl from 'is-url'
import { TextInput, Box, Text } from '@contentful/f36-components'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { Box, Text,TextInput } from '@contentful/f36-components'
import { useSDK } from '@contentful/react-apps-toolkit'

const ALLOWED_EMBED_URLS = ['https://e.infogram.com', 'https://app.powerbi.com']
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useEffect, useState } from 'react'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import {
TextInput,
Box,
Checkbox,
FormLabel,
FormControl,
Flex,
FormControl,
FormLabel,
TextInput,
} from '@contentful/f36-components'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { useSDK } from '@contentful/react-apps-toolkit'

interface ValueType {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useEffect, useState } from 'react'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import {
TextInput,
Box,
FormControl,
Radio,
Stack,
Box,
TextInput,
} from '@contentful/f36-components'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { useSDK } from '@contentful/react-apps-toolkit'

const INPUT_BOX_WIDTH = '200px'
Expand Down
2 changes: 1 addition & 1 deletion apps/contentful-apps/pages/fields/publish-date-field.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { useSDK } from '@contentful/react-apps-toolkit'
import { Box } from '@contentful/f36-components'
import { useSDK } from '@contentful/react-apps-toolkit'

const PublishDateField = () => {
const sdk = useSDK<FieldExtensionSDK>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useEffect, useState } from 'react'
import { useDebounce } from 'react-use'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import {
Paragraph,
FormControl,
Paragraph,
Radio,
Stack,
TextInput,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react'
import { TextInput, FormControl } from '@contentful/f36-components'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { FormControl,TextInput } from '@contentful/f36-components'
import { useSDK } from '@contentful/react-apps-toolkit'

interface TimeDuration {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useEffect, useState } from 'react'
import { Button, Box, TextInput, Text } from '@contentful/f36-components'
import { PlusIcon, DeleteIcon } from '@contentful/f36-icons'
import { useDebounce } from 'react-use'
import { FieldExtensionSDK } from '@contentful/app-sdk'
import { Box, Button, Text,TextInput } from '@contentful/f36-components'
import { DeleteIcon,PlusIcon } from '@contentful/f36-icons'
import { useSDK } from '@contentful/react-apps-toolkit'
import { useDebounce } from 'react-use'

const DEBOUNCE_TIME = 300

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Op } from 'sequelize'
import { StaffRole } from '@island.is/financial-aid/shared/lib'

interface Then {
result: Number
result: number
error: Error
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ export const ActionCard: FC<React.PropsWithChildren<ActionCardProps>> = ({
const isTablet = width < theme.breakpoints.lg

const toolTipText = (
<>
<Text variant="small">
<Text variant="small">
{t.tooltip.text} <a href={t.tooltip.link}>{t.tooltip.link}</a>
</Text>
</>
)

const modelYear = formatYear(firstRegDate, dateFormat.is)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class SamgongustofaService {
// Parse xml to Json all Soap and added all vehicles and their information to vehicleInformationList
const vehicleInformationList: VehicleInformation[] = await parser
.parseStringPromise(allCarsResponse.data.replace(/(\t\n|\t|\n)/gm, ''))
.then(function (allCarsResult) {
.then((allCarsResult) => {
// check if SOAP returns 200 status code but with Fault message
if (
Object.prototype.hasOwnProperty.call(
Expand All @@ -99,7 +99,7 @@ export class SamgongustofaService {
'ns1:allVehiclesForPersidnoResponse'
][0]['allVehiclesForPersidnoReturn'][0]['_'],
)
.then(function (allCars) {
.then((allCars) => {
if (allCars['persidnolookup']['vehicleList'][0] == '') {
return []
}
Expand Down Expand Up @@ -144,7 +144,7 @@ export class SamgongustofaService {
)
return vehicleArr
})
.catch(function (err) {
.catch((err) => {
logger.error(
`Failed while parsing xml to json on getUserVehiclesInformation request with error: ${err}`,
)
Expand All @@ -153,7 +153,7 @@ export class SamgongustofaService {
)
})
})
.catch(function (err) {
.catch((err) => {
logger.error(
`Failed while parsing xml to json on allVehiclesForPersidno request with error: ${err}`,
)
Expand Down Expand Up @@ -203,7 +203,7 @@ export class SamgongustofaService {
.parseStringPromise(
basicInforesponse.data.replace(/(\t\n|\t|\n)/gm, ''),
)
.then(function (basicResult) {
.then((basicResult) => {
// check if SOAP returns 200 status code but with Fault message
if (
Object.prototype.hasOwnProperty.call(
Expand All @@ -224,7 +224,7 @@ export class SamgongustofaService {
'ns1:basicVehicleInformationResponse'
][0]['basicVehicleInformationReturn'][0]['_'],
)
.then(function (basicInfo) {
.then((basicInfo) => {
// If there is any information in updatelocks, stolens, ownerregistrationerrors then we may not deregister it
if (
typeof basicInfo.vehicle.ownerregistrationerrors[0]
Expand Down Expand Up @@ -266,7 +266,7 @@ export class SamgongustofaService {
}
return newVehicleArr[i]
})
.catch(function (err) {
.catch((err) => {
logger.error(
`Failed while parsing xml to json on basicVehicleInformation with error: ${err}`,
)
Expand All @@ -275,7 +275,7 @@ export class SamgongustofaService {
)
})
})
.catch(function (err) {
.catch((err) => {
logger.error(
`Failed while parsing xml to json on basicVehicleInformation with error: ${err}`,
)
Expand Down
16 changes: 9 additions & 7 deletions apps/tools/contentful-role-permissions/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
import {
contentfulManagementAccessToken,
spaceId,
environmentId,
} from '../constants'
import {
CollectionProp,
ContentTypeProps,
Expand All @@ -12,11 +7,18 @@ import {
RoleProps,
TagProps,
} from 'contentful-management'
import slugify from '@sindresorhus/slugify'
import type { ActionType } from 'contentful-management/dist/typings/entities/role'
import type { CheckboxState } from '../types'
import slugify from '@sindresorhus/slugify'

import { sortAlpha } from '@island.is/shared/utils'

import {
contentfulManagementAccessToken,
environmentId,
spaceId,
} from '../constants'
import type { CheckboxState } from '../types'

let client: PlainClientAPI | null = null

export const getContentfulManagementApiClient = (): PlainClientAPI => {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/screens/PetitionView/PetitionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Text,
} from '@island.is/island-ui/core'
import { Box, Button, Pagination, Table as T } from '@island.is/island-ui/core'
import { Markdown } from '@island.is/shared/components'
import { InstitutionPanel } from '@island.is/web/components'
import {
GetNamespaceQuery,
Expand All @@ -27,7 +28,6 @@ import { Screen } from '../../types'
import PetitionSkeleton from './PetitionSkeleton'
import { useGetPetitionList, useGetPetitionListEndorsements } from './queries'
import { formatDate, getBaseUrl, pageSize } from './utils'
import { Markdown } from '@island.is/shared/components'

interface PetitionViewProps {
namespace?: Record<string, string>
Expand Down
2 changes: 1 addition & 1 deletion infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"typescript": "4.6.4"
},
"dependencies": {
"@aws-sdk/client-ssm": "3.145.0",
"@aws-sdk/client-ssm": "3.687.0",
"@types/lodash": "4.14.160",
"aws-sdk": "^2.1003.0",
"glob": "10.3.3",
Expand Down
Loading
Loading