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

chore(deps): lock file maintenance #8799

Merged
merged 6 commits into from
Oct 16, 2023
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
6 changes: 3 additions & 3 deletions design-system/packages/button/src/hooks/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export const buttonToneValues = [
] as const;
export const buttonWeightValues = ['bold', 'light', 'none', 'link'] as const;

export type SizeKey = typeof buttonSizeValues[number];
export type ToneKey = typeof buttonToneValues[number];
export type WeightKey = typeof buttonWeightValues[number];
export type SizeKey = (typeof buttonSizeValues)[number];
export type ToneKey = (typeof buttonToneValues)[number];
export type WeightKey = (typeof buttonWeightValues)[number];

export type ButtonPropDefaults = {
size: SizeKey;
Expand Down
2 changes: 1 addition & 1 deletion design-system/packages/core/src/components/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useTheme } from '../theme';
import { Box, BoxProps } from './Box';

export const HeadingTypes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;
type HeadingType = typeof HeadingTypes[number];
type HeadingType = (typeof HeadingTypes)[number];

type HeadingProps = {
/** The type of heading. */
Expand Down
4 changes: 2 additions & 2 deletions design-system/packages/loading/src/Loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const loadingToneValues = [
'help',
] as const;

export type SizeKey = typeof loadingSizeValues[number];
export type ToneKey = typeof loadingToneValues[number];
export type SizeKey = (typeof loadingSizeValues)[number];
export type ToneKey = (typeof loadingToneValues)[number];

// NOTE: a more accurate implementation might use `aria-busy="true|false"` on
// the wrapping element, but it's difficult to abstract
Expand Down
2 changes: 1 addition & 1 deletion design-system/packages/notice/src/hooks/notice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const noticeToneValues = [
'help',
] as const;

export type ToneKey = typeof noticeToneValues[number];
export type ToneKey = (typeof noticeToneValues)[number];

type NoticeTokensProps = {
tone: ToneKey;
Expand Down
4 changes: 2 additions & 2 deletions design-system/packages/options/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const CheckMark = ({
);
};

export const OptionPrimitive: typeof reactSelectComponents['Option'] = ({
export const OptionPrimitive: (typeof reactSelectComponents)['Option'] = ({
children,
isDisabled,
isFocused,
Expand Down Expand Up @@ -120,7 +120,7 @@ export const OptionPrimitive: typeof reactSelectComponents['Option'] = ({
);
};

const Control: typeof reactSelectComponents['Control'] = ({ selectProps, ...props }) => {
const Control: (typeof reactSelectComponents)['Control'] = ({ selectProps, ...props }) => {
return <reactSelectComponents.Control selectProps={selectProps} {...props} />;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const widthMap = {
full: '100%',
};

export type SizeKey = typeof segmentedControlSizeValues[number];
export type SizeKey = (typeof segmentedControlSizeValues)[number];
export type WidthKey = 'small' | 'medium' | 'large' | 'full';

export type ControlTokensProps = {
Expand Down
4 changes: 2 additions & 2 deletions docs/components/docs/DocumentEditorDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const documentFeaturesProp = fields.object({

type DocumentFeaturesFormValue = Parameters<
InferRenderersForComponentBlocks<
Record<'documentFeatures', ComponentBlock<typeof documentFeaturesProp['fields']>>
Record<'documentFeatures', ComponentBlock<(typeof documentFeaturesProp)['fields']>>
>['documentFeatures']
>[0];

Expand Down Expand Up @@ -171,7 +171,7 @@ function objToShorthand<
Obj extends Record<string, undefined | true | readonly any[] | Record<string, any>>
>(obj: Obj): Obj | true | undefined {
const values = Object.values(obj);
let state: typeof values[number] = values[0]!;
let state: (typeof values)[number] = values[0]!;
for (const val of values) {
if (val !== state || (val !== undefined && val !== true)) {
return obj;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const defaultElementRenderers: CustomRendererProps['renderers'] = {
// so they will be wrapped with a <div /> by default
// we can override that to whatever wrapper we want
// for eg. using React.Fragment wraps the component with nothing
block: React.Fragment,
block: React.Fragment as any, // FIXME
// customise blockquote elements with your own styles
blockquote({ children }) {
return <blockquote className={styles.blockquote}>{children}</blockquote>;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"repository": "https://github.com/keystonejs/keystone",
"homepage": "https://github.com/keystonejs/keystone",
"packageManager": "[email protected].0",
"packageManager": "[email protected].2",
"scripts": {
"coverage": "jest --coverage",
"format:file": "prettier --write",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/gql/getMagicAuthLinkSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function getMagicAuthLinkSchema<I extends string>({
// TODO: type required by pnpm :(
}): graphql.Extension {
const RedeemItemMagicAuthTokenFailure = graphql.object<{
code: typeof errorCodes[number];
code: (typeof errorCodes)[number];
message: string;
}>()({
name: gqlNames.RedeemItemMagicAuthTokenFailure,
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/gql/getPasswordResetSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function getPasswordResetSchema<I extends string, S extends string>({
// TODO: return type required by pnpm :(
}): graphql.Extension {
const getResult = (name: string) =>
graphql.object<{ code: typeof errorCodes[number]; message: string }>()({
graphql.object<{ code: (typeof errorCodes)[number]; message: string }>()({
name,
fields: {
code: graphql.field({ type: graphql.nonNull(PasswordResetRedemptionErrorCode) }),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/fields/types/relationship/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const relationship =

const hideCreate = config.ui?.hideCreate ?? false;
const refLabelField: typeof foreignFieldKey = foreignListMeta.labelField;
const refSearchFields: typeof foreignFieldKey[] = foreignListMeta.fields
const refSearchFields: (typeof foreignFieldKey)[] = foreignListMeta.fields
.filter(x => x.search)
.map(x => x.key);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function useItemState({
setItems: useCallback(
(items: Items) => {
setItemsState(state => {
let itemsForState: typeof state['items'] = {};
let itemsForState: (typeof state)['items'] = {};
Object.keys(items).forEach(id => {
if (items[id] === state.items[id]?.current) {
itemsForState[id] = state.items[id];
Expand Down
12 changes: 11 additions & 1 deletion packages/core/src/scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,15 @@ export async function build(
await generateAdminUI(config, graphQLSchema, adminMeta, paths.admin, false);

console.log('✨ Building Admin UI');
await nextBuild(paths.admin);
await nextBuild(
paths.admin,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
'default'
);
}
3 changes: 2 additions & 1 deletion packages/core/src/scripts/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export async function prisma(cwd: string, args: string[], frozen: boolean) {
},
},
err => {
if (err) return reject(new ExitError(err?.code ?? -1));
if (typeof err?.code === 'number') return reject(new ExitError(err.code));
if (err) return reject(err.code);
resolve();
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function createGetPreviewProps<Schema extends ComponentSchema, ChildField
[Kind in ComponentSchema['kind']]: (
schema: Extract<ComponentSchema, { kind: Kind }>,
value: ValueForComponentSchema<Extract<ComponentSchema, { kind: Kind }>>,
memoized: ReturnType<typeof memoizedInfoForSchema[Kind]>,
memoized: ReturnType<(typeof memoizedInfoForSchema)[Kind]>,
path: readonly string[],
getInnerProp: <Field extends ComponentSchema>(
schema: Field,
Expand Down Expand Up @@ -363,7 +363,7 @@ export function createGetPreviewProps<Schema extends ComponentSchema, ChildField
props: GenericPreviewProps<Schema, ChildFieldElement>;
value: unknown;
schema: Schema;
cached: ReturnType<typeof memoizedInfoForSchema[Schema['kind']]>;
cached: ReturnType<(typeof memoizedInfoForSchema)[Schema['kind']]>;
inner: Map<string, MemoState<ComponentSchema>>;
};

Expand Down
Loading
Loading