-
Notifications
You must be signed in to change notification settings - Fork 224
Update ink to 5.2.1 #6740
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 ink to 5.2.1 #6740
Conversation
This comment has been minimized.
This comment has been minimized.
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success3586 tests passing in 1420 suites. Report generated by 🧪jest coverage report action from 64d4c58 |
craigmichaelmartin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for taking this on!
packages/app/src/cli/services/dev/app-events/app-event-watcher-handler.ts
Outdated
Show resolved
Hide resolved
|
|
||
| function getStoreFqdnForRegEx(ctx: DevServerContext) { | ||
| return ctx.session.storeFqdn.replaceAll('.', '\\.') | ||
| return ctx.session.storeFqdn.replace(/\./g, '\\.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎩 'd and didn't run into any issues. I'm not sure if there are edge cases that would cause a problem here when the old code was essentially doing the same.
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/ui/components/Banner.d.ts@@ -1,7 +1,8 @@
-import { FunctionComponent } from 'react';
+import React, { FunctionComponent } from 'react';
export type BannerType = 'success' | 'error' | 'warning' | 'info' | 'external_error';
interface BannerProps {
type: BannerType;
+ children?: React.ReactNode;
}
declare const Banner: FunctionComponent<BannerProps>;
export { Banner };
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/LoadingBar.d.ts@@ -4,5 +4,5 @@ interface LoadingBarProps {
noColor?: boolean;
noProgressBar?: boolean;
}
-declare const LoadingBar: ({ title, noColor, noProgressBar }: React.PropsWithChildren<LoadingBarProps>) => JSX.Element;
+declare const LoadingBar: ({ title, noColor, noProgressBar }: React.PropsWithChildren<LoadingBarProps>) => React.JSX.Element;
export { LoadingBar };
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/SelectInput.d.ts@@ -1,7 +1,7 @@
import React from 'react';
import { DOMElement } from 'ink';
declare module 'react' {
- function forwardRef<T, P>(render: (props: P, ref: React.Ref<T>) => JSX.Element | null): (props: P & React.RefAttributes<T>) => JSX.Element | null;
+ function forwardRef<T, P>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
}
export interface SelectInputProps<T> {
items: Item<T>[];
@@ -29,4 +29,4 @@ export interface Item<T> {
helperText?: string;
disabled?: boolean;
}
-export declare const SelectInput: <T>(props: SelectInputProps<T> & React.RefAttributes<DOMElement>) => JSX.Element | null;
\ No newline at end of file
+export declare const SelectInput: <T>(props: SelectInputProps<T> & React.RefAttributes<DOMElement>) => React.ReactElement | null;
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/SingleTask.d.ts@@ -1,4 +1,5 @@
import { TokenizedString } from '../../../../public/node/output.js';
+import React from 'react';
interface SingleTaskProps<T> {
title: TokenizedString;
task: (updateStatus: (status: TokenizedString) => void) => Promise<T>;
@@ -6,5 +7,5 @@ interface SingleTaskProps<T> {
onAbort?: () => void;
noColor?: boolean;
}
-declare const SingleTask: <T>({ task, title, onComplete, onAbort, noColor }: SingleTaskProps<T>) => JSX.Element | null;
+declare const SingleTask: <T>({ task, title, onComplete, onAbort, noColor }: SingleTaskProps<T>) => React.JSX.Element | null;
export { SingleTask };
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/Tasks.d.ts@@ -17,5 +17,5 @@ interface TasksProps<TContext> {
noColor?: boolean;
noProgressBar?: boolean;
}
-declare function Tasks<TContext>({ tasks, silent, onComplete, abortSignal, noColor, noProgressBar, }: React.PropsWithChildren<TasksProps<TContext>>): JSX.Element | null;
+declare function Tasks<TContext>({ tasks, silent, onComplete, abortSignal, noColor, noProgressBar, }: React.PropsWithChildren<TasksProps<TContext>>): React.JSX.Element | null;
export { Tasks };
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/Table/Row.d.ts@@ -1,5 +1,6 @@
import ScalarDict from './ScalarDict.js';
import { Column } from './Column.js';
+import React from 'react';
interface RowProps<T extends ScalarDict> {
fillerChar: string;
rowKey: string;
@@ -7,5 +8,5 @@ interface RowProps<T extends ScalarDict> {
columns: Column<T>[];
ignoreColumnColor?: boolean;
}
-declare const Row: <T extends ScalarDict>({ rowKey, columns, data, fillerChar, ignoreColumnColor }: RowProps<T>) => JSX.Element;
+declare const Row: <T extends ScalarDict>({ rowKey, columns, data, fillerChar, ignoreColumnColor }: RowProps<T>) => React.JSX.Element;
export { Row };
\ No newline at end of file
packages/cli-kit/dist/private/node/ui/components/Table/Table.d.ts@@ -1,4 +1,5 @@
import ScalarDict from './ScalarDict.js';
+import React from 'react';
import { ForegroundColor } from 'chalk';
export type TableColumn<T> = {
[column in keyof T]: {
@@ -10,5 +11,5 @@ export interface TableProps<T extends ScalarDict> {
rows: T[];
columns: TableColumn<T>;
}
-declare function Table<T extends ScalarDict>({ rows, columns: columnsConfiguration }: TableProps<T>): JSX.Element;
+declare function Table<T extends ScalarDict>({ rows, columns: columnsConfiguration }: TableProps<T>): React.JSX.Element;
export { Table };
\ No newline at end of file
|
Remove optional modifier from withResolvers global declaration to match native Node 24 signature. The optional modifier causes TypeScript to error with "Overload signatures must all be optional or required" when compiling against Node 24's built-in types. This was introduced in PR #6740 which added the global declaration but incorrectly marked it as optional, conflicting with the required signature in Node 24's lib.d.ts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Ink had two major version bumps, v5 and v6. v6 requires React 19+ but we are tied to react 18+ because of Polaris.
This PR updates ink to version 5. This introduced only a minor issue with spacing for certain characters which I fixed.