Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency Next.js to v9.1.4 #315

Merged
merged 36 commits into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
bbc417d
Update Next.js to version 9.1.4
iquabius Jun 17, 2020
d55f0cb
Move next.config.js out of "src" directory
iquabius Jun 17, 2020
c3e7ddf
Move "packages/web/src/static" to "packages/web/public/static"
iquabius Jun 17, 2020
96feb96
Autofix tsconfig.json after running "next"
iquabius Jun 17, 2020
25a92a5
Remove @zeit/next-typescript/babel from .babelrc
iquabius Jun 17, 2020
ee24eeb
Remove "prefetch" prop from usage of Link
iquabius Jun 17, 2020
df9fad7
Remove Container from pages/_app.tsx
iquabius Jun 17, 2020
4c18ef2
Disable option "isolatedModules" in tsconfig.json
iquabius Jun 17, 2020
853fe0f
Fix unavailable next/router in getDataFromTree()
iquabius Jun 17, 2020
a6a6297
Revert "Update Next.js to version 9.1.4"
iquabius Jun 17, 2020
8dd2f53
Merge branch 'master' into next-v9.1.4
iquabius Jun 17, 2020
274a008
Update Next.js again after solving conflict...
iquabius Jun 17, 2020
388c0e7
Fix next/router interface with nprogress in AppFrame
iquabius Jun 17, 2020
2f782ca
Enable "isolatedModules" back in packages/web/tsconfig.json
iquabius Jun 18, 2020
4071ef1
Replace withRouter() with useRouter()
iquabius Jun 18, 2020
15a3912
Fix FakeLoadingProvider not being a module
iquabius Jun 18, 2020
c0b12c4
Replace NextFunctionComponent with NextPage type
iquabius Jun 18, 2020
3470609
Replace NextContext to NextPageContext in next.d.ts
iquabius Jun 18, 2020
1de9614
Fix mockRouter types in MockNextContext
iquabius Jun 18, 2020
33941c8
Add @olimat/api back to package.json
iquabius Jun 18, 2020
857141b
Migrate MockNextContext to new context API
iquabius Jun 18, 2020
4e0692b
Remove `as any` from MockNextContext router prop
iquabius Jun 18, 2020
cb5009f
Add comment about Filepond's CSS in Next.js 9.0
iquabius Jun 18, 2020
84d34e1
Disable 'composite' & 'declaration' in web/tsconfig.json
iquabius Jun 18, 2020
6feb4e9
Reword comment about isolatedModules in web/tsconfig.json
iquabius Jun 18, 2020
d53adde
Add `ls` to check node_modules/@olimat/api on CI
iquabius Jun 18, 2020
5e773d4
Replace tabs with spaces in .circleci/config.yml
iquabius Jun 18, 2020
3d314ce
Add more `ls` command to CI config
iquabius Jun 18, 2020
1fcd8d3
Fix path in `ls` in CI config
iquabius Jun 18, 2020
3823b83
Separate building of api and web apps
iquabius Jun 18, 2020
d4a48c1
Fix CI config to build api before web app
iquabius Jun 18, 2020
c69e5cf
Change indent_style to spaces for yaml files and package.json
iquabius Jun 18, 2020
9f6ce85
Remove "env.test.presets" from .babelrc
iquabius Jun 18, 2020
87dbe29
Replace withRouter() with useRouter() in Link
iquabius Jun 18, 2020
2a6733e
Remove `ls` and `pwd` commands from CI config
iquabius Jun 18, 2020
d6ed837
Fix next/router mock in ExamList test
iquabius Jun 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,13 @@ workflows:
# record: true # record results to Cypress Dashboard
build: |
npx lerna bootstrap --ci
npm run build
# Build separately because TS 3.9.0 is not emitting .js files
# in api/dist
cd packages/api
npm run build
cd ../web
npm run build
cd ../api
# We're deploying prisma twice,
# can we reuse the one from integration tests?
npx prisma deploy
Expand Down
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ end_of_line = lf
charset = utf-8
insert_final_newline = true
max_line_length = 80

[*.{yml,yaml}]
indent_style = space

[{package.json}]
indent_style = space
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
"test:watch": "jest --watch",
"typecheck": "npm-run-all --parallel typecheck:*",
"typecheck:api": "tsc --noEmit --composite false --project packages/api/tsconfig.json",
"typecheck:web": "tsc --noEmit --composite false --project packages/web/tsconfig.json"
"typecheck:web": "tsc --noEmit --project packages/web/tsconfig.json"
}
}
4 changes: 3 additions & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"@olimat/api": "dist"
},
"scripts": {
"prebuild": "rimraf dist && copyfiles -V -u 1 ./src/schema.graphql ./src/**/*.graphql ./dist",
"prebuild": "rimraf dist && copyfiles -V -u 1 ./src/schema.graphql ./src/**/*.graphql ./dist",
"build": "Uses an outdated version of TS, dependency of graphql-code-gen",
"build": "tsc --build --verbose .",
"build:clean": "rimraf dist",
"start": "node -r dotenv/config dist/index.js",
"dev": "nodemon -e ts,graphql -x ts-node -r dotenv/config src/index.ts",
Expand Down
15 changes: 1 addition & 14 deletions packages/web/.babelrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
{
"presets": [
"next/babel",
"@zeit/next-typescript/babel"
],
// I was getting a syntax error after moving Jest to monorepo root
// https://github.com/zeit/next.js/issues/2499
"env": {
"test": {
"presets": [
"next/babel",
"@zeit/next-typescript/babel"
]
}
}
"presets": ["next/babel"]
}
2 changes: 2 additions & 0 deletions packages/web/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
24 changes: 24 additions & 0 deletions packages/web/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const { ANALYZE } = process.env;

// Use next-compose-plugins if this gets weird
module.exports = {
webpack: (config, { isServer }) => {
if (ANALYZE) {
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');

config.plugins.push(
new BundleAnalyzerPlugin({
analyzerMode: 'server',
analyzerPort: isServer ? 8888 : 8889,
openAnalyzer: true,
}),
);
}

config.resolve.alias['@olimat/web'] = path.join(__dirname, 'src');

return config;
},
};
5 changes: 2 additions & 3 deletions packages/web/next.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { ApolloClient } from '@apollo/client';
import { NextContext as DefaultNextContext } from 'next';
import { NextPageContext as DefaultNextContext } from 'next';

// Extends default NextContext to include apolloClient
declare module 'next' {
interface NextContext extends DefaultNextContext {
interface NextPageContext extends DefaultNextContext {
apolloClient: ApolloClient<any>;
}
}
Loading