Skip to content

Commit

Permalink
Fix keystone build not exiting with versions of NextJS > 13.4.12 (#…
Browse files Browse the repository at this point in the history
…8788)

Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com>
  • Loading branch information
borisno2 and dcousens committed Aug 29, 2023
1 parent e3438dc commit 7b2bb08
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/next-build-exit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@keystone-6/core': patch
---

Fixes `keystone build` hanging with next version >13.4.12
2 changes: 1 addition & 1 deletion packages/core/src/admin-ui/components/CreateButtonLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { jsx } from '@keystone-ui/core';
import type { ListMeta } from '../../types';
import { Link } from '../router';

export function CreateButtonLink (props: { list: ListMeta }) {
export function CreateButtonLink(props: { list: ListMeta }) {
return (
<Button
css={{
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/scripts/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export async function cli(cwd: string, argv: string[]) {
}

if (command === 'build') {
return build(cwd, defaultFlags(flags, { frozen: false, prisma: true, ui: true }));
return build(cwd, defaultFlags(flags, { frozen: false, prisma: true, ui: true })).then(() =>
process.exit(0)
);
}

if (command === 'start') {
Expand Down
2 changes: 0 additions & 2 deletions tests/cli-tests/artifacts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import {
recordConsole,
runCommand,
schemas,
customPrismaKeystoneConfig,
symlinkKeystoneDeps,
testdir,
customGraphqlPathKeystoneConfig,
} from './utils';

describe.each(['postinstall', ['build', '--frozen'], ['prisma', 'migrate', 'status']])(
Expand Down
10 changes: 0 additions & 10 deletions tests/cli-tests/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ export const schemas = {
'schema.prisma': fs.readFileSync(`${__dirname}/fixtures/basic-project/schema.prisma`, 'utf8'),
};

export const customPrismaKeystoneConfig = fs.readFileSync(
`${__dirname}/fixtures/custom-prisma-project/keystone.ts`,
'utf8'
);

export const customGraphqlPathKeystoneConfig = fs.readFileSync(
`${__dirname}/fixtures/custom-graphql-path/keystone.ts`,
'utf8'
);

export function recordConsole() {
let oldConsole = { ...console };
const contents: string[] = [];
Expand Down

0 comments on commit 7b2bb08

Please sign in to comment.