Skip to content

Commit

Permalink
upgrade next.js for celo.org and reserve.org (#4677)
Browse files Browse the repository at this point in the history
### Description

upgrade next.js (and by extention serialize-javascript) to latest version 

### Other changes

some ts warnings/ errors

### Tested

on both web and reserver

* ran `yarn dev`, `yarn build` (ts compile), `next build`, opened locally and deployed to staging

### Related issues

fixes #4675

### Backwards compatibility

_Brief explanation of why these changes are/are not backwards compatible._
  • Loading branch information
aaronmgdr authored Aug 14, 2020
1 parent 511a3d2 commit 0f30653
Show file tree
Hide file tree
Showing 37 changed files with 411 additions and 1,617 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
"npmi": "^4.0.0",
"websocket-extensions": "^0.1.4",
"elliptic": "^6.5.3",
"dot-prop": "^5.2.0",
"serialize-javascript": "^3.1.0"
"dot-prop": "^5.2.0"
}
}
8 changes: 8 additions & 0 deletions packages/reserve-site/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
/// <reference types="next" />
/// <reference types="next/types/global" />

import { CSSProp } from '@emotion/core'

declare module 'react' {
interface Attributes {
css?: CSSProp
}
}
6 changes: 3 additions & 3 deletions packages/reserve-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"airtable": "^0.8.1",
"front-matter": "^4.0.2",
"markdown-to-jsx": "^6.11.4",
"next": "9.4.4",
"next": "^9.5.2",
"raw-loader": "^4.0.1",
"react": "^16.11.0",
"react-dom": "^16.11.0"
"react": "16.11.0",
"react-dom": "16.11.0"
},
"devDependencies": {
"@babel/cli": "^7.10.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/reserve-site/src/pages/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ export async function getStaticProps() {
props: {
year: new Date().getFullYear(),
},
unstable_revalidate: 86400, // day
revalidate: 86400, // day
}
}
4 changes: 2 additions & 2 deletions packages/reserve-site/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ export async function getStaticProps() {
// we will attempt to re-generate the page:
// - when a request comes in
// - at most once every X seconds
unstable_revalidate: 60,
revalidate: 60,
}
} catch {
return {
unstable_revalidate: 1,
revalidate: 1,
}
}
}
1 change: 1 addition & 0 deletions packages/reserve-site/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"baseUrl": ".",
"target": "es5",
"types": ["@emotion/core"],
"lib": [
"dom",
"dom.iterable",
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"mobile-detect": "^1.4.4",
"net": "^1.0.2",
"network-speed": "^2.0.4",
"next": "9.3.5",
"next": "^9.5.2",
"next-i18next": "^4.2.1",
"next-images": "^1.2.0",
"next-plugin-transpile-modules": "^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5332,7 +5332,6 @@ exports[`Error renders 1`] = `
dir="auto"
href="/"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1873,9 +1873,8 @@ Change the story.
className="css-reset-4rbku5 css-cursor-18t94o4 css-text-901oao css-textHasAncestor-16my406"
data-focusable={true}
dir="auto"
href="http://sacred-economics.com/film/"
href="http://sacred-economics.com/film"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -1907,9 +1906,8 @@ Change the story.
className="css-reset-4rbku5 css-cursor-18t94o4 css-text-901oao"
data-focusable={true}
dir="auto"
href="http://sacred-economics.com/film/"
href="http://sacred-economics.com/film"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -2071,7 +2069,6 @@ Change the story.
dir="auto"
href="https://medium.com/celoOrg/celos-theory-of-change-b916de44945d"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -4190,7 +4187,6 @@ Change the story.
dir="auto"
href="mailto:[email protected]"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3697,7 +3697,6 @@ exports[`Alliance renders 1`] = `
dir="auto"
href="https://medium.com/celoorg/how-to-design-for-all-stories-from-tanzania-refugees-8b34594d64ae"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -4142,7 +4141,6 @@ exports[`Alliance renders 1`] = `
dir="auto"
href="https://medium.com/celoorg/a-cryptocurrency-for-every-juan-144144e62d5"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -6653,7 +6651,6 @@ exports[`Alliance renders 1`] = `
dir="auto"
href="https://medium.com/celoOrg"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ exports[`Audits renders 1`] = `
dir="auto"
href="https://blog.openzeppelin.com/celo-contracts-audit"
onClick={[Function]}
onMouseEnter={[Function]}
rel=" noopener noreferrer"
role="link"
style={
Expand Down Expand Up @@ -393,7 +392,6 @@ exports[`Audits renders 1`] = `
dir="auto"
href="https://www.certora.com/pubs/CeloMay2020.pdf"
onClick={[Function]}
onMouseEnter={[Function]}
rel=" noopener noreferrer"
role="link"
style={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,6 @@ We believe that many of these features have great potential for positive impact,
dir="auto"
href="/code-of-conduct"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -2071,7 +2070,6 @@ We believe that many of these features have great potential for positive impact,
dir="auto"
href="mailto:[email protected]"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -2257,7 +2255,6 @@ We believe that many of these features have great potential for positive impact,
dir="auto"
href="/past-events"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -2696,7 +2693,6 @@ We believe that many of these features have great potential for positive impact,
dir="auto"
href="https://medium.com/celoOrg"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -2904,7 +2900,6 @@ We believe that many of these features have great potential for positive impact,
dir="auto"
href="https://medium.com/celoOrg/call-for-proposals-the-celo-fellowship-3c43b06b10f9"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -3333,7 +3328,6 @@ We believe that many of these features have great potential for positive impact,
dir="auto"
href="/validators"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -5974,7 +5968,6 @@ We believe that many of these features have great potential for positive impact,
dir="auto"
href="https://en.wikipedia.org/wiki/EigenTrust"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -6015,7 +6008,6 @@ We believe that many of these features have great potential for positive impact,
dir="auto"
href="https://en.wikipedia.org/wiki/Sepandar_Kamvar"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down
5 changes: 1 addition & 4 deletions packages/web/src/_page-tests/__snapshots__/faq.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,8 @@ exports[`FAQ renders 1`] = `
className="css-reset-4rbku5 css-cursor-18t94o4 css-text-901oao css-textHasAncestor-16my406"
data-focusable={true}
dir="auto"
href="https://celo.org"
href="https://celo.org/"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -1432,7 +1431,6 @@ exports[`FAQ renders 1`] = `
dir="auto"
href="https://celo.org/privacy"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -1747,7 +1745,6 @@ exports[`FAQ renders 1`] = `
dir="auto"
href="mailto:[email protected]"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,6 @@ exports[`HomePage renders 1`] = `
dir="auto"
href="https://medium.com/celoorg/an-introductory-guide-to-celo-b185c62d3067"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -1149,7 +1148,6 @@ exports[`HomePage renders 1`] = `
dir="auto"
href="/papers"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -1828,7 +1826,6 @@ exports[`HomePage renders 1`] = `
dir="auto"
href="/papers"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -2077,7 +2074,6 @@ exports[`HomePage renders 1`] = `
dir="auto"
href="https://celoreserve.org"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -2173,7 +2169,6 @@ exports[`HomePage renders 1`] = `
dir="auto"
href="https://medium.com/celoorg/celo-gold-holders-make-your-voice-heard-through-on-chain-governance-96cb5a1e8b90"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -2600,7 +2595,6 @@ exports[`HomePage renders 1`] = `
dir="auto"
href="https://www.coindesk.com/libra-minus-facebook-why-celo-is-2020s-buzzy-token-project"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -3351,7 +3345,6 @@ exports[`HomePage renders 1`] = `
dir="auto"
href="https://docs.celo.org/v/master/developer-guide/overview/introduction"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -3447,7 +3440,6 @@ exports[`HomePage renders 1`] = `
dir="auto"
href="https://www.crowdcast.io/e/celo-tech-talks-part-2"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -7048,7 +7040,6 @@ exports[`HomePage renders 1`] = `
dir="auto"
href="/about#backers"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down
4 changes: 0 additions & 4 deletions packages/web/src/_page-tests/__snapshots__/jobs.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6409,7 +6409,6 @@ exports[`JoinJobsPage with jobs renders 1`] = `
dir="auto"
href="example.com"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -6755,7 +6754,6 @@ exports[`JoinJobsPage with jobs renders 1`] = `
dir="auto"
href="example.com"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down Expand Up @@ -7263,7 +7261,6 @@ exports[`JoinJobsPage with jobs renders 1`] = `
dir="auto"
href="https://storage.googleapis.com/celo_whitepapers/celo-perks-benefits.pdf"
onClick={[Function]}
onMouseEnter={[Function]}
rel=" noopener noreferrer"
role="link"
style={
Expand Down Expand Up @@ -13879,7 +13876,6 @@ exports[`JoinJobsPage without jobs renders 1`] = `
dir="auto"
href="https://storage.googleapis.com/celo_whitepapers/celo-perks-benefits.pdf"
onClick={[Function]}
onMouseEnter={[Function]}
rel=" noopener noreferrer"
role="link"
style={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ exports[`Papers renders 1`] = `
dir="auto"
href="/papers/whitepaper"
onClick={[Function]}
onMouseEnter={[Function]}
rel=" noopener noreferrer"
role="link"
style={
Expand Down Expand Up @@ -352,7 +351,6 @@ exports[`Papers renders 1`] = `
dir="auto"
href="/papers/celo-wp-simplified-chinese.pdf"
onClick={[Function]}
onMouseEnter={[Function]}
rel=" noopener noreferrer"
role="link"
style={
Expand Down Expand Up @@ -561,7 +559,6 @@ exports[`Papers renders 1`] = `
dir="auto"
href="/papers/stability"
onClick={[Function]}
onMouseEnter={[Function]}
rel=" noopener noreferrer"
role="link"
style={
Expand Down Expand Up @@ -769,7 +766,6 @@ exports[`Papers renders 1`] = `
dir="auto"
href="/papers/cbdc-velocity"
onClick={[Function]}
onMouseEnter={[Function]}
rel=" noopener noreferrer"
role="link"
style={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ exports[`PastEventsPage renders 1`] = `
dir="auto"
href="mailto:[email protected]"
onClick={[Function]}
onMouseEnter={[Function]}
role="link"
style={
Object {
Expand Down
Loading

0 comments on commit 0f30653

Please sign in to comment.