Skip to content

Commit

Permalink
Upgrade to Next.js 14 and latest i18next (#6234)
Browse files Browse the repository at this point in the history
* upgrade app-content-pages to latest Next version

* upgrade app-project to latest Next version

* upgrade app-root to latest Next version

* alias hexoid in next.config

* bump translations packages in react libraries
  • Loading branch information
goplayoutside3 authored Aug 28, 2024
1 parent 4d17172 commit bfa560a
Show file tree
Hide file tree
Showing 12 changed files with 131 additions and 123 deletions.
8 changes: 4 additions & 4 deletions packages/app-content-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
"express": "^4.17.1",
"grommet": "~2.35.0",
"grommet-icons": "~4.12.0",
"i18next": "~23.11.1",
"i18next": "~23.14.0",
"lodash": "~4.17.11",
"morgan": "^1.10.0",
"next": "~13.5.5",
"next-i18next": "~15.2.0",
"next": "~14.2.6",
"next-i18next": "~15.3.1",
"panoptes-client": "~5.6.0",
"path-match": "~1.2.4",
"react": "~18.2.0",
"react-dom": "~18.2.0",
"react-i18next": "~14.1.0",
"react-i18next": "~15.0.1",
"snazzy": "^9.0.0",
"styled-components": "~5.3.3",
"superagent": "~8.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"fields": {
"title": "headshot",
"file": {
"url": "https://placekitten.com/300/300",
"url": "https://static.zooniverse.org/www.zooniverse.org/assets/simple-avatar.png",
"details": {
"size": 21159,
"image": {
Expand Down Expand Up @@ -174,7 +174,7 @@
"fields": {
"title": "headshot",
"file": {
"url": "https://placekitten.com/300/300",
"url": "https://static.zooniverse.org/www.zooniverse.org/assets/simple-avatar.png",
"details": {
"size": 36144,
"image": {
Expand Down Expand Up @@ -284,7 +284,7 @@
"fields": {
"title": "headshot",
"file": {
"url": "https://placekitten.com/300/300",
"url": "https://static.zooniverse.org/www.zooniverse.org/assets/simple-avatar.png",
"details": {
"size": 11888,
"image": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"bio": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"jobTitle": "Project Assistant",
"name": "Mock Person One",
"avatarSrc": "https://placekitten.com/300/300?w=160&h=160"
"avatarSrc": "https://static.zooniverse.org/www.zooniverse.org/assets/simple-avatar.png?w=160&h=160"
}
]
},
Expand All @@ -19,7 +19,7 @@
"bio": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"jobTitle": "Web Developer",
"name": "Mock Person Three",
"avatarSrc": "https://placekitten.com/300/300?w=160&h=160",
"avatarSrc": "https://static.zooniverse.org/www.zooniverse.org/assets/simple-avatar.png?w=160&h=160",
"twitterID": "twitterid"
}
]
Expand All @@ -32,7 +32,7 @@
"bio": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"jobTitle": "Community Manager",
"name": "Mock Person Two",
"avatarSrc": "https://placekitten.com/300/300?w=160&h=160"
"avatarSrc": "https://static.zooniverse.org/www.zooniverse.org/assets/simple-avatar.png?w=160&h=160"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ describe('Component > Publications Page', function () {
)
})

it('should have sidebar nav label', function () {
const sideBar = screen.getByText('Publications.sidebarLabel')
expect(sideBar).to.be.ok()
})

it('should render all publications in data', function () {
const publications = screen.getAllByTestId('publication-test-element')
expect(publications.length).to.equal(20) // number of publications in mock.json
Expand Down
5 changes: 0 additions & 5 deletions packages/app-content-pages/src/screens/Teams/Teams.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ describe('Component > Teams Page', function () {
)
})

it('should have a nav with label', function () {
const sideBar = screen.getByText('Teams.sidebarLabel')
expect(sideBar).to.be.ok()
})

it('should render all people in data', function () {
const people = screen.getAllByTestId('person-test-element')
const numMockPeople = mockData.reduce((count, team) => {
Expand Down
8 changes: 4 additions & 4 deletions packages/app-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"graphql-request": "~6.1.0",
"grommet": "~2.35.0",
"grommet-icons": "~4.12.0",
"i18next": "~23.11.1",
"i18next": "~23.14.0",
"lodash": "~4.17.11",
"million": "~3.1.11",
"mobx": "~6.12.0",
Expand All @@ -47,14 +47,14 @@
"mobx-state-tree": "~5.4.0",
"morgan": "^1.10.0",
"newrelic": "~11.14.0",
"next": "~13.5.6",
"next-i18next": "~15.2.0",
"next": "~14.2.6",
"next-i18next": "~15.3.1",
"panoptes-client": "~5.6.0",
"path-match": "~1.2.4",
"polished": "~4.3.1",
"react": "~18.2.0",
"react-dom": "~18.2.0",
"react-i18next": "~14.1.0",
"react-i18next": "~15.0.1",
"react-resize-detector": "~9.1.0",
"styled-components": "~5.3.3",
"swr": "~2.2.0",
Expand Down
8 changes: 6 additions & 2 deletions packages/app-root/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import withBundleAnalyzer from '@next/bundle-analyzer'

const bundleAnalyzer = withBundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
enabled: process.env.ANALYZE === 'true'
})

const nextConfig = {
Expand All @@ -11,11 +11,15 @@ const nextConfig = {
'@zooniverse/user',
'grommet',
'grommet-icons'
],
]
},
webpack: (config, options) => {
config.resolve = {
...config.resolve,
alias: {
...config.resolve.alias,
hexoid: 'hexoid/dist/index.js'
},
fallback: {
...config.resolve.fallback,
fs: false
Expand Down
4 changes: 2 additions & 2 deletions packages/app-root/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zooniverse/fe-root",
"description": "",
"description": "Zooniverse front end app handling projects, classification, and content pages.",
"license": "Apache-2.0",
"author": "Zooniverse <[email protected]> (https://www.zooniverse.org/)",
"version": "0.1.0",
Expand All @@ -26,7 +26,7 @@
"grommet-icons": "~4.12.0",
"lodash": "~4.17.21",
"newrelic": "~11.14.0",
"next": "~13.5.5",
"next": "~14.2.6",
"panoptes-client": "~5.6.0",
"react": "~18.2.0",
"react-dom": "~18.2.0",
Expand Down
1 change: 0 additions & 1 deletion packages/app-root/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const APP_ENV = process.env.APP_ENV || 'development'

const hostnames = {
development: 'local.zooniverse.org',
branch: 'fe-project-branch.preview.zooniverse.org',
staging: 'frontend.preview.zooniverse.org',
production : 'www.zooniverse.org'
}
Expand Down
4 changes: 2 additions & 2 deletions packages/lib-content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"@zooniverse/async-states": "~0.0.1",
"@zooniverse/react-components": "~1.13.0",
"dayjs": "~1.11.11",
"i18next": "~23.11.1",
"i18next": "~23.14.0",
"panoptes-client": "~5.6.0",
"prop-types": "~15.8.1",
"react-i18next": "~14.1.0"
"react-i18next": "~15.0.1"
},
"peerDependencies": {
"@zooniverse/grommet-theme": "3.x.x",
Expand Down
4 changes: 2 additions & 2 deletions packages/lib-react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
"@zooniverse/panoptes-js": "~0.5.0",
"cuid": "~3.0.0",
"formik": "~2.4.0",
"i18next": "~23.11.1",
"i18next": "~23.14.0",
"markdownz": "~9.1.3",
"mime": "~3.0.0",
"panoptes-client": "~5.6.0",
"polished": "~4.3.1",
"prop-types": "~15.8.1",
"react-i18next": "~14.1.0",
"react-i18next": "~15.0.1",
"react-resize-detector": "~9.1.0",
"react-rnd": "10.4.10",
"swr": "~2.2.4"
Expand Down
Loading

0 comments on commit bfa560a

Please sign in to comment.