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

Flatten scripts/* and use stderr for errors, add some deprecations #8569

Merged
merged 27 commits into from
May 12, 2023

Conversation

dcousens
Copy link
Member

@dcousens dcousens commented May 11, 2023

This pull request tidy's up a number of internal modules, flattening their directory structures and removing some now deprecated work-arounds.

As part of the moving, @keystone-6/core/system exports (createSystem, createExpressServer, initConfig and createAdminUIMiddleware) have been deprecated, and should be removed in the next breaking change.

This pull request additionally changes a number of console.logs to console.error to unify errors being printed to stderr.
Lastly, this pull request fixes keystone dev exiting when db.enableLogging was an array.

@changeset-bot

This comment was marked as resolved.

@dcousens dcousens self-assigned this May 11, 2023
@@ -9,7 +10,7 @@ export function denyAll() {
return false;
}

export function unfiltered() {
export function unfiltered<ListTypeInfo extends BaseListTypeInfo>(): MaybePromise<boolean | ListTypeInfo['inputs']['where']> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type ends up inferring as => boolean, which isn't helpful when you want the type to help infer other function types.

/** We do this to stop webpack from bundling next inside of next */
const next = 'next/dist/build';
const build = require(next).default;
await build(projectAdminPath);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't reproduce any behaviors related to this

};

export async function getNextApp(dev: boolean, projectAdminPath: string): Promise<NextApp> {
/** We do this to stop webpack from bundling next inside of next */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot reproduce

@dcousens dcousens force-pushed the init-changes branch 5 times, most recently from fa7134e to b6a896c Compare May 11, 2023 06:35
@codesandbox-ci
Copy link

codesandbox-ci bot commented May 11, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@dcousens dcousens changed the title Refactor and flatten scripts/* and use stderr for errors Refactor and flatten scripts/* and use stderr for errors, add some deprecations May 11, 2023
@dcousens dcousens force-pushed the init-changes branch 5 times, most recently from e2d477f to 2327545 Compare May 11, 2023 14:09
@dcousens dcousens changed the title Refactor and flatten scripts/* and use stderr for errors, add some deprecations Flatten scripts/* and use stderr for errors, add some deprecations May 12, 2023
Copy link
Member

@borisno2 borisno2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one

@dcousens dcousens merged commit f92aa40 into main May 12, 2023
@dcousens dcousens deleted the init-changes branch May 12, 2023 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants