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

feat: Update NextJS to 14 #3

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dependencies": {
"@alp/api-client": "*",
"@alp/core": "*",
"@as-integrations/next": "^2.0.2",
"@auth/typeorm-adapter": "^1.0.2",
"@as-integrations/next": "^3.0.0",
"@auth/typeorm-adapter": "^1.6.0",
"@emotion/css": "^11.11.2",
"@emotion/server": "^11.11.0",
"@formatjs/intl-localematcher": "^0.4.2",
Expand Down
14 changes: 8 additions & 6 deletions apps/app/src/app/[lang]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ColorScheme } from '@mantine/core';
import { Metadata } from 'next';
import { Metadata, Viewport } from 'next';
import { getServerSession } from 'next-auth';
import { cookies, headers } from 'next/headers';

Expand All @@ -12,12 +12,14 @@ import { AppProviders } from '@app/providers/appProviders';
export const metadata: Metadata = {
title: 'Home',
description: 'Welcome to Next.js',
viewport: {
width: 'device-width',
initialScale: 1,
maximumScale: 1,
},
};

export const viewport: Viewport = {
width: 'device-width',
initialScale: 1,
maximumScale: 1,
};

export async function generateStaticParams() {
return i18n.locales.map((locale) => ({ lang: locale }));
}
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/tests/providers/appRouterContextProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AppRouterContext, AppRouterInstance } from 'next/dist/shared/lib/app-router-context';
import { AppRouterContext, AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime';

export type AppRouterContextProviderMockProps = {
router: Partial<AppRouterInstance>;
Expand Down
27 changes: 16 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
"@nx/react": "^16.9.1",
"@nx/storybook": "^16.9.1",
"@nx/web": "^16.9.1",
"storybook": "^7.4.5",
"@storybook/addon-essentials": "^7.4.5",
"@storybook/core-server": "^7.4.5",
"storybook-dark-mode": "^3.0.1",
"@storybook/nextjs": "^7.4.5",
"@storybook/react": "^7.4.5",
"@swc-node/register": "^1.6.8",
Expand All @@ -38,9 +36,9 @@
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/jest": "^29.5.5",
"@types/node": "^20.6.3",
"@types/ramda": "^0.29.4",
"@types/react": "^18.2.23",
"@types/react-dom": "^18.2.8",
"@types/ramda": "^0.29.4",
"@types/testing-library__jest-dom": "^5.14.5",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
Expand All @@ -61,29 +59,36 @@
"lint-staged": "^13.2.2",
"nx": "^16.9.1",
"prettier": "^2.8.8",
"storybook": "^7.4.5",
"storybook-dark-mode": "^3.0.1",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
"typescript": "5.0.4"
},
"dependencies": {
"@apollo/client": "^3.8.4",
"@apollo/experimental-nextjs-app-support": "^0.4.1",
"@apollo/server": "^4.7.5",
"@apollo/experimental-nextjs-app-support": "^0.8.0",
"@apollo/server": "^4.10.0",
"@emotion/react": "^11.11.1",
"@mantine/core": "^6.0.11",
"@mantine/form": "^6.0.17",
"@mantine/hooks": "^6.0.11",
"@mantine/modals": "^6.0.17",
"@tabler/icons-react": "^2.30.0",
"graphql": "^16.6.0",
"next": "13.4.18",
"next-auth": "^4.22.3",
"react-intl": "^6.4.7",
"typeorm": "^0.3.17",
"graphql": "^16.8.1",
"next": "14.1.2",
"next-auth": "^4.24.6",
"ramda": "^0.29.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"ramda": "^0.29.0",
"react-intl": "^6.6.2",
"typeorm": "^0.3.20",
"zod": "^3.21.4"
},
"pnpm": {
"overrides": {
"superjson": "1.13.1"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AppRouterContext, AppRouterInstance } from 'next/dist/shared/lib/app-router-context';
import { AppRouterContext, AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime';

export type AppRouterContextProviderMockProps = {
router: Partial<AppRouterInstance>;
Expand Down
18 changes: 9 additions & 9 deletions packages/emails/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
"author": "",
"license": "ISC",
"dependencies": {
"@react-email/button": "^0.0.10",
"@react-email/components": "^0.0.7",
"@react-email/container": "^0.0.8",
"@react-email/head": "^0.0.5",
"@react-email/heading": "^0.0.8",
"@react-email/html": "^0.0.4",
"@react-email/preview": "^0.0.6",
"@react-email/render": "^0.0.7",
"@react-email/button": "^0.0.14",
"@react-email/components": "^0.0.15",
"@react-email/container": "^0.0.11",
"@react-email/head": "^0.0.7",
"@react-email/heading": "^0.0.11",
"@react-email/html": "^0.0.7",
"@react-email/preview": "^0.0.8",
"@react-email/render": "^0.0.12",
"nodemailer": "^6.9.5",
"react-email": "^1.9.5"
"react-email": "^2.1.0"
},
"devDependencies": {
"@types/nodemailer": "^6.4.11"
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-api/src/entity/auth/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AccountEntity } from './account';
import { SessionEntity } from './session';

@Entity({ name: 'users' })
@ObjectType()
@ObjectType('UserEntity')
export class UserEntity {
@PrimaryGeneratedColumn('uuid')
@Field(() => ID)
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-api/src/entity/crudItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
import { ObjectType, Field, ID } from 'type-graphql';

@Entity()
@ObjectType()
@ObjectType('CRUDItem')
export class CRUDItem {
@PrimaryGeneratedColumn('uuid')
@Field(() => ID)
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-api/src/resolvers/types/returnTypes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ObjectType, Field } from 'type-graphql';

@ObjectType()
@ObjectType('DeleteResult')
export class DeleteResult {
@Field(() => Number)
affected?: number | null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
import { SetupExecutorSchema } from './schema';
import executor from './executor';
import type { ExecutorContext } from '@nx/devkit';

const options: SetupExecutorSchema = {};
const options: SetupExecutorSchema = {
cwd: '',
};

const context: ExecutorContext = {
root: process.cwd(),
cwd: '',
isVerbose: false,
};

describe('Setup Executor', () => {
it('can run', async () => {
const output = await executor(options);
const output = await executor(options, context);
expect(output.success).toBe(true);
});
});
});
Loading
Loading