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

Upgrade for Ink 3 #25

Closed
wants to merge 4 commits into from
Closed

Conversation

kellymears
Copy link
Contributor

This updates the component to work with Ink 3.

I couldn't get the tests to pass and I'm really not very familiar with typescript.. but the component is working in my project as expected.

package.json Outdated
@@ -7,7 +7,7 @@
"author": {
"name": "Vadim Demedes",
"email": "vdemedes@gmail.com",
"url": "github.com/vadimdemedes"
"url": "https://github.com/vadimdemedes"
Copy link
Owner

Choose a reason for hiding this comment

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

Could you undo this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 35ef418.

</StdinContext.Consumer>
);
}
const SelectInputWithStdin = props => {
Copy link
Owner

Choose a reason for hiding this comment

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

You can remove this component and use useStdin hook from inside <SelectInput> itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in bc8a16a. I've never used a hook in a class before 😲. Can you get away with this because it's a PureComponent?

@vadimdemedes
Copy link
Owner

Thanks for doing this! Tests are failing, because you're using latest AVA, but config is for the old version. Could you update AVA's config to support Babel? Instructions are here -> https://github.com/avajs/babel.

@vadimdemedes
Copy link
Owner

Hey @kellymears, do you think you'll be able to finish this PR? Totally cool if not.

@kellymears
Copy link
Contributor Author

I have some time tomorrow and I’d love to finish it. Sorry for the delay and thanks x infinity for the rad framework!

@kellymears
Copy link
Contributor Author

There are actually two issues here, from what I can tell:

1. xo fails to run

Error: Error while loading rule '@typescript-eslint/await-thenable': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.
Occurred while linting /Users/kellymears/code/projects/cli/bud/ink-select-input/index.d.ts 
...

This was brought up in April xojs/xo#450.

However, it was already fixed by this PR: xojs/xo#452.

So, I'm not sure what I'm doing wrong.

2. ava now runs successfully but tests themselves are failing

I tried to fix the first error (related to the Indicator test), but I wasn't getting anywhere and it's really just because I'm not super familiar with Ava.

Sorry that this isn't in the bag. I didn't realize that upgrading the ava/xo deps was going to turn into such a thing or I would have tread a little more carefully.

@vadimdemedes
Copy link
Owner

No worries, thanks for investing the time into it! I submitted #27, which is based on this PR and fixes the tests and a bunch of other things ;)

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.

None yet

2 participants