Updated deps

This commit is contained in:
DrMint 2023-08-17 14:46:35 +02:00
parent da916f898a
commit 34c4570688
12 changed files with 1275 additions and 1837 deletions

View File

@ -161,7 +161,6 @@ module.exports = {
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
"@typescript-eslint/no-parameter-properties": "error",
"@typescript-eslint/no-require-imports": "error",
// "@typescript-eslint/no-type-alias": "warn",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
@ -182,7 +181,6 @@ module.exports = {
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/sort-type-union-intersection-members": "warn",
// "@typescript-eslint/strict-boolean-expressions": [
// "error",
// { allowAny: true },
@ -192,7 +190,6 @@ module.exports = {
"@typescript-eslint/unified-signatures": "error",
/* EXTENSION OF ESLINT */
"@typescript-eslint/no-duplicate-imports": "error",
"@typescript-eslint/default-param-last": "warn",
"@typescript-eslint/dot-notation": "warn",
"@typescript-eslint/init-declarations": "warn",

2979
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -21,40 +21,40 @@
"upgrade": "ncu"
},
"dependencies": {
"@fontsource/noto-serif-jp": "^5.0.2",
"@fontsource/opendyslexic": "^5.0.2",
"@fontsource/share-tech-mono": "^5.0.2",
"@fontsource/vollkorn": "^5.0.2",
"@fontsource/zen-maru-gothic": "^5.0.2",
"@formatjs/icu-messageformat-parser": "^2.4.0",
"@fontsource/noto-serif-jp": "^5.0.7",
"@fontsource/opendyslexic": "^5.0.7",
"@fontsource/share-tech-mono": "^5.0.8",
"@fontsource/vollkorn": "^5.0.9",
"@fontsource/zen-maru-gothic": "^5.0.7",
"@formatjs/icu-messageformat-parser": "^2.6.0",
"@tippyjs/react": "^4.2.6",
"autoprefixer": "^10.4.14",
"autoprefixer": "^10.4.15",
"cuid": "^2.1.8",
"html-to-text": "^9.0.5",
"intl-messageformat": "^10.3.5",
"isomorphic-dompurify": "^1.6.0",
"jotai": "^2.1.1",
"markdown-to-jsx": "^7.2.1",
"marked": "^4.3.0",
"material-symbols": "^0.5.5",
"meilisearch": "^0.33.0",
"next": "^13.4.4",
"nodemailer": "^6.9.3",
"patch-package": "^7.0.0",
"rc-slider": "^10.2.0",
"intl-messageformat": "^10.5.0",
"isomorphic-dompurify": "^1.8.0",
"jotai": "^2.3.1",
"markdown-to-jsx": "^7.3.2",
"marked": "^7.0.3",
"material-symbols": "^0.10.4",
"meilisearch": "^0.34.1",
"next": "^13.4.17",
"nodemailer": "^6.9.4",
"patch-package": "^8.0.0",
"rc-slider": "^10.2.1",
"react": "^18.2.0",
"react-collapsible": "^2.10.0",
"react-dom": "18.2.0",
"react-hotkeys-hook": "^3.4.7",
"react-swipeable": "^7.0.1",
"react-zoom-pan-pinch": "^3.0.8",
"react-zoom-pan-pinch": "^3.1.0",
"string-natural-compare": "^3.0.1",
"throttle-debounce": "^5.0.0",
"tippy.js": "^6.3.7",
"turndown": "^7.1.2",
"ua-parser-js": "^1.0.35",
"usehooks-ts": "^2.9.1",
"zod": "^3.21.4"
"zod": "^3.22.1"
},
"devDependencies": {
"@digitak/esrun": "3.2.24",
@ -63,29 +63,29 @@
"@graphql-codegen/typescript-graphql-request": "^4.5.9",
"@graphql-codegen/typescript-operations": "^3.0.4",
"@types/html-to-text": "^9.0.1",
"@types/marked": "^4.3.0",
"@types/node": "20.2.5",
"@types/nodemailer": "^6.4.8",
"@types/react": "^18.2.9",
"@types/react-dom": "^18.2.4",
"@types/marked": "^5.0.1",
"@types/node": "20.5.0",
"@types/nodemailer": "^6.4.9",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@types/string-natural-compare": "^3.0.2",
"@types/throttle-debounce": "^5.0.0",
"@types/turndown": "^5.0.1",
"@types/ua-parser-js": "^0.7.36",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"chalk": "^5.2.0",
"dotenv": "^16.1.4",
"eslint": "^8.42.0",
"eslint-config-next": "13.4.4",
"eslint-plugin-import": "^2.27.5",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"chalk": "^5.3.0",
"dotenv": "^16.3.1",
"eslint": "^8.47.0",
"eslint-config-next": "13.4.17",
"eslint-plugin-import": "^2.28.0",
"graphql": "^16.6.0",
"graphql-request": "5.1.0",
"next-sitemap": "^4.1.3",
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.3.0",
"tailwindcss": "^3.3.2",
"ts-unused-exports": "^9.0.4",
"typescript": "^5.1.3"
"next-sitemap": "^4.2.2",
"prettier": "^3.0.2",
"prettier-plugin-tailwindcss": "^0.5.3",
"tailwindcss": "^3.3.3",
"ts-unused-exports": "^10.0.0",
"typescript": "^5.1.6"
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -19,10 +19,11 @@ interface Props {
export const ChroniclesLists = ({ chapters, currentChronicleSlug }: Props): JSX.Element => {
const [openedIndex, setOpenedIndex] = useState(
currentChronicleSlug
? chapters.findIndex((chapter) =>
chapter.attributes?.chronicles?.data.some(
(chronicle) => chronicle.attributes?.slug === currentChronicleSlug
)
? chapters.findIndex(
(chapter) =>
chapter.attributes?.chronicles?.data.some(
(chronicle) => chronicle.attributes?.slug === currentChronicleSlug
)
)
: -1
);

View File

@ -14,6 +14,7 @@ import { TranslatedProps } from "types/TranslatedProps";
import { atoms } from "contexts/atoms";
import { useAtomGetter } from "helpers/atoms";
import { useFormat } from "hooks/useFormat";
import { isDefined } from "helpers/asserts";
/*
*
@ -84,7 +85,7 @@ export const PreviewCard = ({
const metadataJSX = (
<>
{metadata && (metadata.releaseDate || metadata.price) && (
{metadata && (isDefined(metadata.releaseDate) || isDefined(metadata.price)) && (
<div className="flex w-full flex-row flex-wrap gap-x-3">
{metadata.releaseDate && (
<p className="text-sm">

View File

@ -1,6 +1,6 @@
import { convert } from "html-to-text";
import { sanitize } from "isomorphic-dompurify";
import { marked } from "marked";
import { Renderer, marked } from "marked";
import { isDefinedAndNotEmpty } from "./asserts";
export const prettySlug = (slug?: string, parentSlug?: string): string => {
@ -101,7 +101,7 @@ export const prettyMarkdown = (markdown: string): string => {
const newline = () => "\n";
const empty = () => "";
const TxtRenderer: marked.Renderer = {
const TxtRenderer: Renderer = {
// Block elements
code: escapeBlock,
blockquote: block,

View File

@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { MeiliSearch } from "meilisearch";
import type {
SearchParams,
@ -73,7 +75,6 @@ export const filterHitsWithHighlight = <T extends MeiliDocumentsType["documents"
return result;
};
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const meiliSearch = async <I extends MeiliDocumentsType["index"]>(
indexName: I,
query: string,

View File

@ -189,7 +189,6 @@ const Contents = (props: Props): JSX.Element => {
<HorizontalLine />
{!is1ColumnLayout && <div className="mb-6">{searchInput}</div>}
<WithLabel label={format("order_by")}>
<Select

View File

@ -807,9 +807,7 @@ const ContentItem = ({
<div className="grid grid-cols-[auto_auto_1fr_auto] items-center gap-3">
<h3>{title}</h3>
<div className="flex flex-wrap place-content-center gap-1">
{content?.categories?.map((category, index) => (
<Chip key={index} text={category} />
))}
{content?.categories?.map((category, index) => <Chip key={index} text={category} />)}
</div>
<p className="h-4 w-full border-b-2 border-dotted border-mid" />
{content?.type && <Chip className="justify-self-end" text={content.type} />}

View File

@ -56,7 +56,7 @@ const WikiPage = ({ page, ...otherProps }: Props): JSX.Element => {
const toc = getTocFromMarkdawn(selectedTranslation?.body?.body, selectedTranslation?.title);
const subPanel =
toc || !is1ColumnLayout ? (
isDefined(toc) || !is1ColumnLayout ? (
<SubPanel>
<ElementsSeparator>
{[
@ -204,18 +204,18 @@ const WikiPage = ({ page, ...otherProps }: Props): JSX.Element => {
page.definitions && page.definitions.length > 0
? `${filterHasAttributes(page.definitions, ["translations"]).map(
(definition, index) =>
`${prettyTerminalUnderlinedTitle(format("definition_x", { x: index + 1 }))}${
staticSmartLanguage({
items: filterHasAttributes(definition.translations, [
"language.data.attributes.code",
]),
languageExtractor: (item) => item.language.data.attributes.code,
preferredLanguages: getDefaultPreferredLanguages(
router.locale ?? "en",
router.locales ?? ["en"]
),
})?.definition
}`
`${prettyTerminalUnderlinedTitle(
format("definition_x", { x: index + 1 })
)}${staticSmartLanguage({
items: filterHasAttributes(definition.translations, [
"language.data.attributes.code",
]),
languageExtractor: (item) => item.language.data.attributes.code,
preferredLanguages: getDefaultPreferredLanguages(
router.locale ?? "en",
router.locales ?? ["en"]
),
})?.definition}`
)}`
: ""
}${