All Versions
29
Latest Version
Avg Release Cycle
22 days
Latest Release
1079 days ago

Changelog History
Page 2

  • v3.0.0-6 Changes

    July 07, 2020

    Highlights

    • ๐Ÿ“œ Make sure that stack lines that can't be parsed don't break Ink's error handler (#326) a02a59c
    • Fall back to 80 columns if the width of the terminal cannot be determined (#327) 4b45184
    • โž• Add migration guide (#323) f8f9ecf

    v3.0.0-5...v3.0.0-6

  • v3.0.0-5 Changes

    July 05, 2020

    Highlights

    • ๐Ÿ†• New logo 60e8d15
    • ๐Ÿ›  Fix error boundary failing when error doesn't have a stack 5b6fa97
    • Remeasure text dimensions when text node is changed 5f080fa
    • Ignore Ctrl+C in useInput hook 50ecd64

    v3.0.0-4...v3.0.0-5

  • v3.0.0-4 Changes

    June 23, 2020

    Highlights

    • โฌ†๏ธ Upgrade to Chalk 4 (#316) 9df100a
    • Ignore <Text> and <Transform> components with falsy children (#315) 8e68295

    v3.0.0-3...v3.0.0-4

  • v3.0.0-3 Changes

    June 23, 2020

    Highlights

    v3.0.0-2...v3.0.0-3

  • v3.0.0-2 Changes

    June 23, 2020

    Highlights

    • ๐Ÿ›  Fix error handler with non-existent file path in the stack (#313) 4cf1c28
    • ๐Ÿ– Handle Tab, Shift+Tab and Backspace keys in useInput hook (#312) a715395

    v3.0.0-1...v3.0.0-2

  • v3.0.0-1 Changes

    June 21, 2020

    Highlights

    • ๐Ÿ›  Fix types for cleanup() method (internal method) c358a06

    v3.0.0-0...v3.0.0-1

  • v3.0.0-0 Changes

    June 20, 2020

    ๐Ÿš€ Ink 3 pre-release is finally here. I'm going to save detailed release description for 3.0.0, but in this one I'm going to link to all important changes that were made and highlight the breaking ones.

    Install

    $ npm install ink@next react
    

    ๐Ÿ’ฅ Breaking changes

    Text must be wrapped in <Text> component (#299)

    There are much more details on this change in the linked PR above, but the TLDR is that all text must be wrapped in <Text> component now. Otherwise Ink will throw an error like this:

    Text string "Hello World" must be rendered inside component

    ๐Ÿ— If you've used to building apps with React Native, Ink now has the same requirement in regards to text so it should feel familiar to you.

    // Before\<Box\>Hello World\</Box\>// After\<Text\>Hello World\</Text\>
    

    Note: It's allowed to have nested <Text> components.

    ๐Ÿ”€ Merged <Color> component functionality into <Text> (#301)

    In Ink 3 there's no more <Color> component. Instead, you can use color and backgroundColor props directly in <Text>. The way you specify colors has also changed a bit. Before there was a separate prop for each color, now there are just two props, which accept CSS-like values.

    // Before\<Color red\> \<Text\>Hello World\</Text\> \</Color\> \<Color hex="#ffffff"\> \<Text\>Hello World\</Text\> \</Color\> \<Color white bgGreen\> \<Text\>Hello World\</Text\> \</Color\>// After\<Text color="red"\>Hello World\</Text\> \<Text color="#ffffff"\>Hello World\</Text\> \<Text color="white" backgroundColor="green"\>Hello World\</Text\>
    

    โœ‚ Removed <div> and <span> (#306)

    ๐Ÿšš It was "illegal" to use these tags directly before, but now they're removed completely. If you are using them, switch from <div> to <Box> and from <span> to <Text>.

    โœ‚ Removed unstable__transformChildren from <Box> and <Text> (ab36e7f)

    Previously this function was used to transform the string representation of component's children. You can still do the same stuff, but you should use <Transform> component instead.

    // Before\<Box unstable\_\_transformChildren={children =\> children.toUpperCase()}\> Hello World \</Box\>// After\<Transform transform={children =\> children.toUpperCase()}\> \<Text\>Hello World\</Text\> \</Transform\>
    

    โœ‚ Removed AppContext, StdinContext and StdoutContext in favor of useApp, useStdin and useStdout hooks 055a196

    Hooks are the future.

    // Beforeimport {AppContext, StdinContext, StdoutContext} from 'ink';const Example = () =\> ( \<AppContext.Consumer\> {appProps =\> ( \<StdinContext.Consumer\> {stdinProps =\> ( \<StdoutContext.Consumer\> {stdoutProps =\> ( โ€ฆ )} \</StdoutContext.Consumer\> )} \</StdinContext.Consumer\> )} \</AppContext.Consumer\> );// Afterimport {useApp, useStdin, useStdout} from 'ink';const Example = () =\> { const appProps = useApp(); const stdinProps = useStdin(); const stdoutProps = useStdout(); return โ€ฆ; };
    

    ๐Ÿ†• New <Static> component (#281)

    ๐ŸŽ Functionality has remained the same, but API has changed and performance has significantly improved. New API looks very similar to the one commonly used in virtual list libraries, like react-tiny-virtual-list.

    // Before\<Static\> {items.map(item =\> ( \<Text key={item.id}\> {item.title} \</Text\> ))}\</Static\>// After\<Static items={items}\> {item =\> ( \<Text key={item.id}\> {item.title} \</Text\> )}\</Static\>
    

    Highlights

    v2.7.1...v3.0.0-0

  • v2.7.1 Changes

    February 16, 2020

    Highlights

    • ๐Ÿ›  Fix error when squashing empty text nodes (#260) 23563ed

    v2.7.0...v2.7.1

  • v2.7.0 Changes

    February 03, 2020

    Highlights

    • ๐Ÿšš Move @types/react to be an optional peer dependency (#257) 084cded

    v2.6.0...v2.7.0

  • v2.6.0 Changes

    November 28, 2019

    Highlights

    • โฌ†๏ธ Upgrade dependencies (#247) 2917bf9
    • โœ‚ Remove @types/react from dependencies (#236) 58314df

    v2.5.0...v2.6.0