2
0

build: 📦️ Update packages

This commit is contained in:
Baptiste Arnaud
2022-04-02 10:38:00 +02:00
parent 525887a32c
commit 05009814d4
22 changed files with 1740 additions and 1629 deletions

View File

@ -1,5 +1,3 @@
import React from 'react'
export const NotFoundPage = () => (
<div
style={{

View File

@ -12,33 +12,33 @@
"test:open": "PWDEBUG=1 yarn playwright test"
},
"dependencies": {
"@sentry/nextjs": "^6.18.2",
"@sentry/nextjs": "^6.19.3",
"bot-engine": "*",
"cors": "^2.8.5",
"cuid": "^2.1.8",
"db": "*",
"google-spreadsheet": "^3.2.0",
"got": "^12.0.1",
"got": "^12.0.3",
"models": "*",
"next": "^12.1.0",
"nodemailer": "^6.7.2",
"next": "^12.1.4",
"nodemailer": "^6.7.3",
"qs": "^6.10.3",
"utils": "*",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"utils": "*"
"react-dom": "^17.0.2"
},
"devDependencies": {
"@playwright/test": "^1.19.2",
"@playwright/test": "^1.20.2",
"@types/cors": "^2.8.12",
"@types/google-spreadsheet": "^3.1.5",
"@types/node": "^17.0.21",
"@types/google-spreadsheet": "^3.2.0",
"@types/node": "^17.0.23",
"@types/nodemailer": "^6.4.4",
"@types/qs": "^6.9.7",
"@types/react": "^17.0.40",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@types/react": "^17.0.43",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"eslint": "<8.0.0",
"eslint-config-next": "12.1.0",
"eslint-config-next": "12.1.4",
"next-transpile-modules": "^9.0.0",
"typescript": "^4.6.2"
"typescript": "^4.6.3"
}
}

View File

@ -1,5 +0,0 @@
import React from 'react'
import { NotFoundPage } from '../layouts/NotFoundPage'
const NotFoundErrorPage = () => <NotFoundPage />
export default NotFoundErrorPage

View File

@ -1,8 +1,17 @@
import NextErrorComponent from 'next/error'
import * as Sentry from '@sentry/nextjs'
import { NextPageContext } from 'next'
const MyError = ({ statusCode, hasGetInitialPropsRun, err }) => {
const MyError = ({
statusCode,
hasGetInitialPropsRun,
err,
}: {
statusCode: number
hasGetInitialPropsRun: boolean
err: Error
}) => {
if (!hasGetInitialPropsRun && err) {
// getInitialProps is not called in case of
// https://github.com/vercel/next.js/issues/8592. As a workaround, we pass
@ -14,13 +23,15 @@ const MyError = ({ statusCode, hasGetInitialPropsRun, err }) => {
return <NextErrorComponent statusCode={statusCode} />
}
MyError.getInitialProps = async (context) => {
MyError.getInitialProps = async (context: NextPageContext) => {
const errorInitialProps = await NextErrorComponent.getInitialProps(context)
const { res, err, asPath } = context
// Workaround for https://github.com/vercel/next.js/issues/8592, mark when
// getInitialProps has run
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
errorInitialProps.hasGetInitialPropsRun = true
// Returning early because we don't want to log 404 errors to Sentry.

View File

@ -15,14 +15,9 @@
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": ".",
"composite": true
"composite": true,
"downlevelIteration": true
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
"pages/404.js",
"pages/_error.js"
],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}