Skip to content

Commit 35f8d04

Browse files
benfaceDimitri POSTOLOV
andauthored
Update dependencies + fix typecheck (#437)
* Update dependencies + fix typecheck * Debug CI issue * Debug CI issue * Debug CI issue * Debug CI issue * Add `prebuild` * Update .github/workflows/next-js-bundle-analysis.yml Co-authored-by: Dimitri POSTOLOV <en3m@ya.ru> * Move `NODE_OPTIONS` to `package.json` --------- Co-authored-by: Dimitri POSTOLOV <en3m@ya.ru>
1 parent eba1296 commit 35f8d04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2798
-1520
lines changed

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"packageManager": "pnpm@8.6.2",
55
"scripts": {
6-
"build": "turbo run build",
6+
"build": "NODE_OPTIONS='--max_old_space_size=4096' turbo run build",
77
"check": "pnpm typecheck && pnpm lint && pnpm prettier:check",
88
"check:fix": "pnpm typecheck && pnpm lint:fix",
99
"dev": "turbo run dev --parallel",
@@ -16,26 +16,26 @@
1616
"pre-commit": "lint-staged --concurrent false",
1717
"pre-push": "pnpm build",
1818
"prepare": "husky install && chmod +x .husky/*",
19-
"prettier": "prettier . --loglevel warn --write",
20-
"prettier:check": "prettier . --loglevel warn --check",
19+
"prettier": "prettier . --log-level warn --write",
20+
"prettier:check": "prettier . --log-level warn --check",
2121
"start": "pnpm --filter @graphprotocol/docs start",
2222
"typecheck": "turbo run typecheck"
2323
},
2424
"devDependencies": {
2525
"@edgeandnode/eslint-config": "^1.3.5",
26-
"eslint": "^8.42.0",
26+
"eslint": "^8.44.0",
2727
"eslint-plugin-mdx": "^2.1.0",
2828
"husky": "^8.0.3",
29-
"lint-staged": "^13.2.2",
30-
"prettier": "^2.8.8",
31-
"prettier-plugin-pkg": "^0.17.1",
29+
"lint-staged": "^13.2.3",
30+
"prettier": "^3.0.0",
31+
"prettier-plugin-pkg": "^0.18.0",
3232
"remark-frontmatter": "^4.0.1",
3333
"remark-lint-first-heading-level": "^3.1.2",
3434
"remark-lint-heading-increment": "^3.1.2",
3535
"remark-lint-no-heading-punctuation": "^3.1.2",
3636
"remark-lint-restrict-elements": "workspace:*",
37-
"turbo": "^1.10.3",
38-
"typescript": "~5.0.4"
37+
"turbo": "^1.10.7",
38+
"typescript": "^5.1.6"
3939
},
4040
"lint-staged": {
4141
"**/*.{js,jsx,ts,tsx,mjs,cjs}": "eslint --fix",

packages/nextra-theme/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"dist"
2121
],
2222
"scripts": {
23-
"//FIXME typecheck": "tsc --noEmit",
2423
"build": "tsup",
25-
"dev": "tsup --watch"
24+
"dev": "tsup --watch",
25+
"typecheck": "tsc --noEmit"
2626
},
2727
"peerDependencies": {
28-
"@edgeandnode/gds": "^1.3.2",
28+
"@edgeandnode/gds": "^2.6.12",
2929
"@emotion/react": "^11.10.6",
3030
"next": "^13.4.5",
3131
"next-seo": "^5.15.0",
@@ -35,26 +35,26 @@
3535
},
3636
"dependencies": {
3737
"@docsearch/react": "^3.5.1",
38-
"@radix-ui/react-collapsible": "1.0.3",
38+
"@radix-ui/react-collapsible": "^1.0.3",
3939
"@radix-ui/react-visually-hidden": "^1.0.3",
4040
"lodash": "^4.17.21",
4141
"prism-react-renderer": "^1.3.5",
42-
"react-intersection-observer": "^9.4.4",
42+
"react-intersection-observer": "^9.5.2",
4343
"react-use": "^17.4.0"
4444
},
4545
"devDependencies": {
46-
"@edgeandnode/gds": "^2.6.4",
46+
"@edgeandnode/gds": "^2.6.12",
4747
"@emotion/react": "^11.11.1",
4848
"@types/lodash": "^4.14.195",
49-
"@types/react": "18.2.12",
50-
"@types/react-dom": "^18.2.5",
51-
"next": "^13.4.6",
52-
"next-seo": "^6.0.0",
49+
"@types/react": "^18.2.14",
50+
"@types/react-dom": "^18.2.6",
51+
"next": "^13.4.9",
52+
"next-seo": "^6.1.0",
5353
"nextra": "2.7.1",
54-
"react": "18.2.0",
54+
"react": "^18.2.0",
5555
"react-dom": "^18.2.0",
5656
"theme-ui": "^0.16.0",
57-
"tsup": "6.7.0"
57+
"tsup": "^6.7.0"
5858
},
5959
"sideEffects": false
6060
}

packages/nextra-theme/src/components/DocSearch.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function DocSearch(props: DocSearchProps) {
3737
setIsOpen(true)
3838
setInitialQuery(event.key)
3939
},
40-
[setIsOpen, setInitialQuery]
40+
[setIsOpen, setInitialQuery],
4141
)
4242

4343
useDocSearchKeyboardEvents({
@@ -93,7 +93,7 @@ export function DocSearch(props: DocSearchProps) {
9393
translations={props.translations?.modal}
9494
onClose={onClose}
9595
/>,
96-
document.body
96+
document.body,
9797
)
9898
: null}
9999

packages/nextra-theme/src/components/Heading.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const BaseHeading = ({ level, id, children, ...props }: HeadingProps) => {
2626
}
2727
},
2828
100,
29-
[id, inOrAboveView, markOutlineItem]
29+
[id, inOrAboveView, markOutlineItem],
3030
)
3131
const { t } = useI18n<any>()
3232

packages/nextra-theme/src/components/Link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const Link = ({
2222
locale: linkLocale,
2323
...props
2424
}: LinkProps) => {
25-
const { locale: currentLocale, extractLocaleFromPath } = useI18n()
25+
const { locale: currentLocale, extractLocaleFromPath } = useI18n<any>()
2626

2727
let finalHref = typeof href === 'object' ? href.href ?? undefined : href
2828

packages/nextra-theme/src/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export { Heading, Image, Link, LinkInline, Paragraph }
6565

6666
export default function NextraLayout({ children, pageOpts, pageProps }: NextraThemeLayoutProps): ReactElement {
6767
const { frontMatter, filePath, pageMap, headings, title } = pageOpts
68-
const { locale, defaultLocale } = useI18n()
68+
const { locale, defaultLocale } = useI18n<any>()
6969
const fsPath = useFSRoute()
7070

7171
const args = useMemo(() => {
@@ -93,7 +93,7 @@ export default function NextraLayout({ children, pageOpts, pageProps }: NextraTh
9393
...result,
9494
directories: removeNonExistedRoutes(result.directories),
9595
flatDirectories: result.flatDirectories.filter(
96-
(item) => item.type !== 'separator' && item.type !== 'heading' && item.route !== ''
96+
(item) => item.type !== 'separator' && item.type !== 'heading' && item.route !== '',
9797
),
9898
}
9999
}, [defaultLocale, fsPath, locale, pageMap])
@@ -112,7 +112,7 @@ export default function NextraLayout({ children, pageOpts, pageProps }: NextraTh
112112
markOutlineItemAsNotInOrAboveView(id)
113113
}
114114
},
115-
[markOutlineItemAsInOrAboveView, markOutlineItemAsNotInOrAboveView]
115+
[markOutlineItemAsInOrAboveView, markOutlineItemAsNotInOrAboveView],
116116
)
117117
// Compute `highlightedOutlineItemId` for the `DocumentContext` based on outline items that have been marked as "in or above view"
118118
const highlightedOutlineItemId = useMemo(() => {

packages/nextra-theme/src/layout/MDXLayoutNav.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const DesktopWrapper = ({ children }: PropsWithChildren<{}>) => {
5858

5959
const MobileWrapper = ({ title, children }: PropsWithChildren<{ title?: string }>) => {
6060
const [open, setOpen] = useState(false)
61-
const { t } = useI18n()
61+
const { t } = useI18n<any>()
6262

6363
return (
6464
<Collapsible.Root
@@ -131,7 +131,7 @@ const DocSearchHit = ({ hit, children }: PropsWithChildren<{ hit: { url: string
131131
export const MDXLayoutNav = ({ mobile = false }: { mobile?: boolean }) => {
132132
const router = useRouter()
133133
const { activePath, directories } = useContext(NavContext)!
134-
const { t, translations, locale } = useI18n()
134+
const { t, translations, locale } = useI18n<any>()
135135

136136
const Wrapper = mobile ? MobileWrapper : DesktopWrapper
137137

@@ -221,7 +221,7 @@ export const MDXLayoutNav = ({ mobile = false }: { mobile?: boolean }) => {
221221
{pageItem.title}
222222
</NavTree.Item>
223223
)
224-
})(pageItem)
224+
})(pageItem),
225225
)}
226226
</NavTree>
227227
</Wrapper>

packages/nextra-theme/src/layout/MDXLayoutOutline.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { DocumentContext } from '@/layout'
88
export const MDXLayoutOutline = () => {
99
const { headings, highlightedOutlineItemId } = useContext(DocumentContext)!
1010
const [enableTransition, setEnableTransition] = useState(false)
11-
const { t } = useI18n()
11+
const { t } = useI18n<any>()
1212

1313
// Fix issue where the `translateY` is animated on initial load
1414
useEffect(() => {

packages/nextra-theme/src/layout/MDXLayoutPagination.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { NavContext } from '@/layout'
77

88
export const MDXLayoutPagination = () => {
99
const { flatDirectories, activeIndex } = useContext(NavContext)
10-
const { t } = useI18n()
10+
const { t } = useI18n<any>()
1111

1212
const prev = flatDirectories[activeIndex - 1]
1313
const next = flatDirectories[activeIndex + 1]

packages/remark-lint-restrict-elements/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ export default lintRule(
1818
file.message(`Element ${JSON.stringify(selector)} is restricted`, node)
1919
})
2020
}
21-
}
21+
},
2222
)

0 commit comments

Comments
 (0)