Update next and other deps

This commit is contained in:
Paul W. 2022-09-27 22:04:44 -04:00
parent f326bc1894
commit 2c25fdc731
7 changed files with 8343 additions and 2754 deletions

View File

@ -81,7 +81,6 @@ export function mapChild(
if (!obj.children) { if (!obj.children) {
let cb; let cb;
if (obj.type && typeMap) { if (obj.type && typeMap) {
console.error(typeMap[obj.type])
cb = typeMap[obj.type] cb = typeMap[obj.type]
} }

1
next-env.d.ts vendored
View File

@ -1,5 +1,4 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
// NOTE: This file should not be edited // NOTE: This file should not be edited

View File

@ -4,8 +4,6 @@ module.exports = {
defaultLocale: 'en-US' defaultLocale: 'en-US'
}, },
webpack: (config, _options) => { webpack: (config, _options) => {
config.experiments = { asset: true };
const { cache } = require('./util/slug'); const { cache } = require('./util/slug');
config.plugins.push( config.plugins.push(

11061
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,24 +6,25 @@
"lint": "next lint" "lint": "next lint"
}, },
"dependencies": { "dependencies": {
"@types/react": "^17.0.37", "dotenv": "^16.0.2",
"dotenv": "^10.0.0",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"js-yaml-loader": "^1.2.2", "js-yaml-loader": "^1.2.2",
"next": "^11.1.4", "next": "^12.3.1",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"react": "^17.0.2", "react": "^18.2.0",
"react-dom": "^17.0.2", "react-dom": "^18.2.0",
"react-markdown": "^7.1.2", "react-markdown": "^8.0.3",
"react-syntax-highlighter": "^15.5.0", "react-syntax-highlighter": "^15.5.0",
"remark-gfm": "^3.0.1" "remark-gfm": "^3.0.1"
}, },
"devDependencies": { "devDependencies": {
"@svgr/webpack": "^5.5.0", "@svgr/webpack": "^6.3.1",
"@types/react-dom": "^17.0.11", "@types/node": "^18.7.23",
"@types/react-syntax-highlighter": "^13.5.2", "@types/react": "^18.0.21",
"eslint": "^7.32.0", "@types/react-dom": "^18.0.6",
"eslint-config-next": "^11.1.4", "@types/react-syntax-highlighter": "^15.5.5",
"typescript": "^4.5.5" "eslint": "^8.24.0",
"eslint-config-next": "^12.3.1",
"typescript": "^4.8.4"
} }
} }

View File

@ -19,12 +19,13 @@ function Note({ note }: any) {
<SyntaxHighlighter <SyntaxHighlighter
showLineNumbers={true} showLineNumbers={true}
language={match[1]} language={match[1]}
//@ts-ignore
style={monokaiSublime} style={monokaiSublime}
PreTag='div' PreTag='div'
codeTagProps={{ style: { display: 'block' } }} codeTagProps={{ style: { display: 'block' } }}
customStyle={{ padding: '0', borderRadius: '1rem' }} customStyle={{ padding: '0', borderRadius: '1rem' }}
{...props} {...props}
>{children}</SyntaxHighlighter> >{String(children).replace(/\n$/, '')}</SyntaxHighlighter>
) )
: <code className={className} {...props}> : <code className={className} {...props}>
{children} {children}

View File

@ -1,7 +1,11 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es6", "target": "es6",
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
@ -13,8 +17,16 @@
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"jsx": "preserve", "jsx": "preserve",
"importHelpers": true "importHelpers": true,
"incremental": true
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "util/slug.js"], "include": [
"exclude": ["node_modules"] "next-env.d.ts",
"**/*.ts",
"**/*.tsx",
"util/slug.js"
],
"exclude": [
"node_modules"
]
} }