Skip to content

Commit

Permalink
Merge pull request marp-team#399 from marp-team/upgrade-dependencies
Browse files Browse the repository at this point in the history
Upgrade dependent packages to the latest version
  • Loading branch information
yhatt authored Dec 30, 2022
2 parents be35d0d + ffc7a2d commit 537a21e
Showing 12 changed files with 1,439 additions and 1,760 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.16.0
18.12.1
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -34,18 +34,18 @@
},
"devDependencies": {
"@tsconfig/recommended": "^1.0.1",
"@types/node": "~16.11.46",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"eslint": "^8.21.0",
"@types/node": "~18.11.18",
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.47.1",
"eslint": "^8.30.0",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^3.4.0",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.25.4",
"lage": "^1.7.3",
"prettier": "^2.7.1",
"typescript": "^4.7.4"
"lage": "^1.9.6",
"prettier": "^2.8.1",
"typescript": "^4.9.4"
},
"resolutions": {
"parse-path": "^5.0.0"
"json5": "^2.2.2"
}
}
6 changes: 3 additions & 3 deletions website/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ export type ItemSlug = 'docs' | 'blog'
export const Header = ({ activeItem }: { activeItem?: ItemSlug }) => (
<>
<header className="header">
<Link href="/">
<Link href="/" legacyBehavior>
<a
className="custom-anchor header-item"
role="link"
@@ -25,7 +25,7 @@ export const Header = ({ activeItem }: { activeItem?: ItemSlug }) => (
<ul className="flex h-16 items-stretch md:h-20">
{process.env.NEXT_PUBLIC_DOCS && (
<li className="relative flex items-center justify-center">
<Link href="/docs">
<Link href="/docs" legacyBehavior>
<a
className={classNames('custom-anchor header-item nav-item', {
active: activeItem === 'docs',
@@ -40,7 +40,7 @@ export const Header = ({ activeItem }: { activeItem?: ItemSlug }) => (
</li>
)}
<li className="relative flex items-center justify-center">
<Link href="/blog">
<Link href="/blog" legacyBehavior>
<a
className={classNames('custom-anchor header-item nav-item', {
active: activeItem === 'blog',
6 changes: 1 addition & 5 deletions website/components/blog/BlogHeader.tsx
Original file line number Diff line number Diff line change
@@ -18,11 +18,7 @@ export const BlogHeader = ({
}: BlogHeaderProps) => (
<div className="text-center text-gray-600">
<Link href={`/blog/${slug}`}>
<a>
<h1 className="text-gradient text-3xl font-bold md:text-4xl">
{title}
</h1>
</a>
<h1 className="text-gradient text-3xl font-bold md:text-4xl">{title}</h1>
</Link>
{date && (
<p className="mt-4">
10 changes: 1 addition & 9 deletions website/components/docs/Breadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -11,15 +11,7 @@ export type BreadcrumbProps = {
export const Breadcrumb = ({ breadcrumbs }: BreadcrumbProps) => (
<ol>
{breadcrumbs.map(({ key, title, link }) => (
<li key={key}>
{link ? (
<Link href={link}>
<a>{title}</a>
</Link>
) : (
title
)}
</li>
<li key={key}>{link ? <Link href={link}>{title}</Link> : title}</li>
))}
<style jsx>{`
ol {
2 changes: 1 addition & 1 deletion website/components/docs/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ export const Navigation = ({
const href = `/docs/${slug}/${pSlug}`

return (
<Link href={href} key={pSlug}>
<Link href={href} key={pSlug} legacyBehavior>
<a
className={classNames(
'page-link custom-anchor',
6 changes: 1 addition & 5 deletions website/components/markdown/Anchor.tsx
Original file line number Diff line number Diff line change
@@ -7,9 +7,5 @@ export const Anchor: React.FC<{ href?: string }> = ({ href, ...rest }) => {
return <a href={href} {...rest} target="_blank" rel="noreferrer noopener" />
}

return (
<Link href={href}>
<a {...rest} />
</Link>
)
return <Link href={href} {...rest} />
}
66 changes: 32 additions & 34 deletions website/next.config.js
Original file line number Diff line number Diff line change
@@ -2,13 +2,6 @@ const path = require('path')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: !!process.env.ANALYZE,
})
const withTM = require('next-transpile-modules')([
'hast-util-sanitize',
'hast-util-whitespace',
'unist-util-is',
'unist-util-remove-position',
'unist-util-visit',
])
const { devDependencies } = require('./package.json')

// Build test function to ignore devDependencies in client build
@@ -25,33 +18,38 @@ const testToignoreDevDependenciesInClient = (id) =>
const env = { BUILD_YEAR: new Date().getFullYear().toString() }
if (process.env.URL) env.NEXT_PUBLIC_HOST = process.env.URL // for Netlify's deploy preview

module.exports = withBundleAnalyzer(
withTM({
env,
webpack: (config, { isServer }) => {
config.module.rules.push({ test: /\.md$/, type: 'asset/source' })
config.module.rules.push({
test: /\.ya?ml$/,
type: 'json',
use: {
loader: 'yaml-loader',
options: { asJSON: true },
},
})
module.exports = withBundleAnalyzer({
env,
transpilePackages: [
'hast-util-sanitize',
'hast-util-whitespace',
'unist-util-is',
'unist-util-remove-position',
'unist-util-visit',
],
webpack: (config, { isServer }) => {
config.module.rules.push({ test: /\.md$/, type: 'asset/source' })
config.module.rules.push({
test: /\.ya?ml$/,
type: 'json',
use: {
loader: 'yaml-loader',
options: { asJSON: true },
},
})
config.module.rules.push({
test: /\.svg$/,
use: '@svgr/webpack',
})

if (!isServer) {
config.module.rules.push({
test: /\.svg$/,
use: '@svgr/webpack',
test: testToignoreDevDependenciesInClient,
issuer: [__dirname],
use: 'null-loader',
})
}

if (!isServer) {
config.module.rules.push({
test: testToignoreDevDependenciesInClient,
issuer: [__dirname],
use: 'null-loader',
})
}

return config
},
})
)
return config
},
})
39 changes: 19 additions & 20 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -10,52 +10,51 @@
"start": "next start"
},
"dependencies": {
"@primer/octicons-react": "^17.4.0",
"@primer/octicons-react": "^17.10.0",
"body-scroll-lock": "^4.0.0-beta.0",
"classnames": "^2.3.1",
"focus-trap-react": "^9.0.2",
"classnames": "^2.3.2",
"focus-trap-react": "^10.0.2",
"focus-visible": "^5.2.0",
"hast-util-sanitize": "^4.0.0",
"next": "^12.2.4",
"next": "^13.1.1",
"nprogress": "^0.2.0",
"prism-react-renderer": "^1.3.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"remark-react": "^9.0.1",
"swiper": "^8.3.2",
"swiper": "^8.4.5",
"use-media": "^1.4.0",
"wicg-inert": "^3.1.2"
},
"devDependencies": {
"@marp-team/marp-core": "^3.3.3",
"@next/bundle-analyzer": "^12.2.4",
"@svgr/webpack": "^6.3.1",
"@marp-team/marp-core": "^3.4.1",
"@next/bundle-analyzer": "^13.1.1",
"@svgr/webpack": "^6.5.1",
"@types/classnames": "^2.3.1",
"@types/react": "^18.0.17",
"@types/react": "^18.0.26",
"@types/resize-observer-browser": "^0.1.7",
"@types/webpack-env": "^1.17.0",
"autoprefixer": "^10.4.8",
"@types/webpack-env": "^1.18.0",
"autoprefixer": "^10.4.13",
"dot-prop": "^7.2.0",
"eslint-config-next": "^12.2.4",
"eslint-config-next": "^13.1.1",
"gray-matter": "^4.0.3",
"hast-util-whitespace": "^2.0.0",
"next-transpile-modules": "^9.0.0",
"node-fetch": "^3.2.10",
"node-fetch": "^3.3.0",
"null-loader": "^4.0.1",
"postcss": "^8.4.16",
"postcss": "^8.4.20",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import-url": "^7.0.0",
"postcss-preset-env": "^7.7.2",
"postcss-import-url": "^7.2.0",
"postcss-preset-env": "^7.8.3",
"postcss-url": "^10.1.3",
"prettier-plugin-tailwindcss": "^0.1.13",
"prettier-plugin-tailwindcss": "^0.2.1",
"remark-gfm": "^3.0.0",
"remark-parse": "^10.0.0",
"remark-slug": "^7.0.0",
"styled-jsx-plugin-postcss": "^4.0.1",
"tailwindcss": "^3.1.8",
"tailwindcss": "^3.2.4",
"unified": "^10.1.2",
"unist-util-remove-position": "^4.0.1",
"unist-util-visit": "^4.1.0",
"unist-util-visit": "^4.1.1",
"yaml-loader": "^0.8.0"
}
}
6 changes: 2 additions & 4 deletions website/pages/blog.tsx
Original file line number Diff line number Diff line change
@@ -85,9 +85,7 @@ export const getStaticProps = async () => {
const Blog = ({ articles }: InferGetStaticPropsType<typeof getStaticProps>) => (
<Layout activeItem="blog" title={['Blog']}>
<Title>
<Link href="/blog">
<a>Blog</a>
</Link>
<Link href="/blog">Blog</Link>
</Title>
<Head>
<link
@@ -115,7 +113,7 @@ const Blog = ({ articles }: InferGetStaticPropsType<typeof getStaticProps>) => (

return (
<div key={article.slug} className="article-container">
<Link href={`/blog/${article.slug}`}>
<Link href={`/blog/${article.slug}`} legacyBehavior>
<a className="article-container-link">
<h1 className="sr-only">{article.data.title}</h1>
</a>
4 changes: 1 addition & 3 deletions website/pages/blog/[slug].tsx
Original file line number Diff line number Diff line change
@@ -41,9 +41,7 @@ const Blog = ({
title={[data.title || slug, 'Blog']}
>
<Title>
<Link href="/blog">
<a>Blog</a>
</Link>
<Link href="/blog">Blog</Link>
</Title>
<div className="container mx-auto px-6 py-12">
<BlogHeader
Loading

0 comments on commit 537a21e

Please sign in to comment.