feat: update core deps

This commit is contained in:
Travis Fischer
2021-10-21 11:21:37 -04:00
parent 54fbdf3e4c
commit 19e8693d1b
7 changed files with 849 additions and 827 deletions

View File

@@ -12,54 +12,27 @@
"version": "detect"
}
},
"overrides": [
{
"files": ["**/*.js", "**/*.jsx"],
"parser": "babel-eslint",
"extends": [
"standard",
"standard-react",
"plugin:prettier/recommended",
"prettier/standard",
"prettier/react"
],
"env": { "node": true },
"rules": {
"space-before-function-paren": 0,
"react/prop-types": 0,
"react/jsx-handler-names": 0,
"react/jsx-fragments": 0,
"react/no-unused-prop-types": 0,
"import/export": 0,
"standard/no-callback-literal": 0
}
},
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"plugin:@typescript-eslint/recommended",
"standard",
"standard-react",
"plugin:prettier/recommended",
"prettier/standard",
"prettier/react"
],
"env": { "browser": true, "node": true },
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"no-use-before-define": 0,
"@typescript-eslint/no-use-before-define": 0,
"space-before-function-paren": 0,
"react/prop-types": 0,
"react/jsx-handler-names": 0,
"react/jsx-fragments": 0,
"react/no-unused-prop-types": 0,
"import/export": 0,
"standard/no-callback-literal": 0
}
}
]
"ignorePatterns": ["**/*.js", "**/*.jsx"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"plugin:@typescript-eslint/recommended",
"standard",
"standard-react",
"plugin:prettier/recommended"
],
"env": { "browser": true, "node": true },
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"no-use-before-define": 0,
"@typescript-eslint/no-use-before-define": 0,
"space-before-function-paren": 0,
"react/prop-types": 0,
"react/jsx-handler-names": 0,
"react/jsx-fragments": 0,
"react/no-unused-prop-types": 0,
"import/export": 0,
"standard/no-callback-literal": 0
}
}

View File

@@ -5,7 +5,7 @@
"useTabs": false,
"tabWidth": 2,
"bracketSpacing": true,
"jsxBracketSameLine": false,
"bracketSameLine": false,
"arrowParens": "always",
"trailingComma": "none"
}

View File

@@ -9,35 +9,32 @@ import { getCanonicalPageId } from './get-canonical-page-id'
// (they're nice for debugging and speed up local dev)
const uuid = !!includeNotionIdInUrls
export const mapPageUrl = (
site: Site,
recordMap: ExtendedRecordMap,
searchParams: URLSearchParams
) => (pageId = '') => {
if (uuidToId(pageId) === site.rootNotionPageId) {
return createUrl('/', searchParams)
} else {
return createUrl(
`/${getCanonicalPageId(pageId, recordMap, { uuid })}`,
searchParams
)
export const mapPageUrl =
(site: Site, recordMap: ExtendedRecordMap, searchParams: URLSearchParams) =>
(pageId = '') => {
if (uuidToId(pageId) === site.rootNotionPageId) {
return createUrl('/', searchParams)
} else {
return createUrl(
`/${getCanonicalPageId(pageId, recordMap, { uuid })}`,
searchParams
)
}
}
}
export const getCanonicalPageUrl = (
site: Site,
recordMap: ExtendedRecordMap
) => (pageId = '') => {
const pageUuid = parsePageId(pageId, { uuid: true })
export const getCanonicalPageUrl =
(site: Site, recordMap: ExtendedRecordMap) =>
(pageId = '') => {
const pageUuid = parsePageId(pageId, { uuid: true })
if (uuidToId(pageId) === site.rootNotionPageId) {
return `https://${site.domain}`
} else {
return `https://${site.domain}/${getCanonicalPageId(pageUuid, recordMap, {
uuid
})}`
if (uuidToId(pageId) === site.rootNotionPageId) {
return `https://${site.domain}`
} else {
return `https://${site.domain}/${getCanonicalPageId(pageUuid, recordMap, {
uuid
})}`
}
}
}
function createUrl(path: string, searchParams: URLSearchParams) {
return [path, searchParams.toString()].filter(Boolean).join('?')

4
next-env.d.ts vendored
View File

@@ -1,2 +1,6 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

View File

@@ -7,8 +7,5 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
module.exports = withBundleAnalyzer({
images: {
domains: ['pbs.twimg.com']
},
future: {
webpack5: true
}
})

View File

@@ -33,44 +33,43 @@
"got": "^11.8.2",
"isomorphic-unfetch": "^3.1.0",
"lqip-modern": "^1.2.0",
"next": "^10.2.0",
"next": "^11.1.2",
"node-fetch": "^2.6.1",
"notion-client": "^4.9.10",
"notion-types": "^4.8.2",
"notion-utils": "^4.8.6",
"notion-client": "^4.10.0",
"notion-types": "^4.10.0",
"notion-utils": "^4.10.0",
"p-map": "^4.0.0",
"p-memoize": "^4.0.0",
"react": "^17.0.2",
"react-body-classname": "^1.3.1",
"react-dom": "^17.0.2",
"react-icons": "^4.2.0",
"react-notion-x": "^4.9.9",
"react-notion-x": "^4.10.0",
"react-static-tweets": "^0.5.3",
"react-use": "^17.2.4",
"static-tweets": "^0.5.3",
"use-dark-mode": "^2.3.1"
},
"devDependencies": {
"@next/bundle-analyzer": "^10.2.0",
"@next/bundle-analyzer": "^11.1.2",
"@types/classnames": "^2.3.1",
"@types/node": "^15.0.1",
"@types/node-fetch": "^2.5.10",
"@types/react": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"babel-eslint": "^10.0.3",
"@types/node": "^16.11.2",
"@types/node-fetch": "^3.0.3",
"@types/react": "^17.0.31",
"@typescript-eslint/eslint-plugin": "^5.1.0",
"@typescript-eslint/parser": "^5.1.0",
"cross-env": "^7.0.2",
"eslint": "^7.25.0",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.2",
"eslint-config-standard": "^16.0.3",
"eslint-config-standard-react": "^11.0.1",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-react": "^7.26.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"typescript": "^4.2.4"
"prettier": "^2.4.1",
"typescript": "^4.4.4"
}
}

1508
yarn.lock

File diff suppressed because it is too large Load Diff