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 Yargs v17 #3624

Closed
wants to merge 6 commits into from
Closed

Upgrade Yargs v17 #3624

wants to merge 6 commits into from

Conversation

jtoar
Copy link
Contributor

@jtoar jtoar commented Oct 22, 2021

@jtoar
Copy link
Contributor Author

jtoar commented Oct 22, 2021

Looks like the first thing we run into in e2e is this issue here that got fixed: yargs/yargs#1977.

@jtoar
Copy link
Contributor Author

jtoar commented Oct 23, 2021

Just updating the status of this; everything's passing but one test: serve.test.js. Yargs doesn't like something about the way we're composing the command and/or invoking parse:

const parser = yargs.command('serve [side]', false, builder)
parser.parse('serve api --port 5555 --apiRootPath funkyFunctions')

The command itself still works on the CLI, in a redwood project (I tested with rwfw). So just a matter of figuring out what the syntactic quirk is, though I've been at it for a bit now and haven't made much progress. It might just be worth reworking some part of the test instead.

@thedavidprice thedavidprice added this to Backlog PRs (merge when ready) in Current-Release-Sprint via automation Nov 2, 2021
@thedavidprice thedavidprice added this to the next-release-priority milestone Nov 2, 2021
@redwoodjs-bot redwoodjs-bot bot moved this from Backlog PRs (merge when ready) to In progress (priority) in Current-Release-Sprint Nov 2, 2021
@thedavidprice thedavidprice moved this from In progress (priority) to v0.39 in Current-Release-Sprint Nov 2, 2021
@thedavidprice thedavidprice moved this from v0.39 to In progress (priority) in Current-Release-Sprint Nov 2, 2021
@thedavidprice
Copy link
Contributor

New constraint (you added) is making me so happy right now 😂

Screen Shot 2021-11-03 at 9 53 04 PM

@pullflow-com
Copy link

pullflow-com bot commented Nov 4, 2021

From Pullflow:

@jtoar jtoar marked this pull request as ready for review November 4, 2021 08:00
@jtoar
Copy link
Contributor Author

jtoar commented Nov 4, 2021

@thedavidprice I gave another go at trying to get the serve tests to parse correctly and I came up empty so I've removed them in this PR. They're good tests, but they don't test that things actually get served—just that if you call yarn rw serve, the bothServerHandler is called, etc. That we've set yargs up properly basically. We don't have that kind of coverage for the rest of the CLI and things still reliably work.

I'm happy to focus on adding back those kinds of tests during the v1 rc. I feel ok removing them now because testing the fact that yarn rw serve calls bothServerHandler is easy to QA manually. Also, we never make changes to the CLI directory structure, so I'm happy to QA it once as a part of this PR and feel good that it works. Let me know what you think!

@jtoar
Copy link
Contributor Author

jtoar commented Nov 4, 2021

It's worth noting that the last change to this file was to fix something on Windows:

That makes me less certain that things will work. I can manually QA using my Windows machine to be sure.

@thedavidprice thedavidprice moved this from In progress (priority) to v0.39 (locked) in Current-Release-Sprint Nov 4, 2021
@thedavidprice
Copy link
Contributor

cc @dac09

@jtoar jtoar moved this from v0.39 (locked) to Backlog PRs (merge when ready) in Current-Release-Sprint Nov 10, 2021
@jtoar jtoar moved this from Backlog PRs (merge when ready) to Icebox (post v1-RC priorities) in Current-Release-Sprint Nov 10, 2021
@jtoar jtoar removed this from Icebox (post v1-RC priorities) in Current-Release-Sprint Dec 9, 2021
@thedavidprice thedavidprice changed the title [WIP] Upgrade Yargs Upgrade Yargs v17 Jan 13, 2022
@thedavidprice thedavidprice marked this pull request as draft January 13, 2022 00:09
@thedavidprice
Copy link
Contributor

@jtoar I believe this one is prioritized correctly, but it's still bugging me that we haven't upgraded due to a test that 1) we're not sure even applies to our CLI and 2) begs the question as to whether or not we correctly understand Yargs parsing.

If needed, we can see if Ben Coe has some insite on why the test is failing for v17 but passing v16 — when you're ready, let's take that step.

@thedavidprice thedavidprice added release:chore This PR is a chore (means nothing for users) and removed v1/for-consideration labels Jan 13, 2022
@jtoar jtoar removed this from the next-release-priority milestone Feb 15, 2022
@jtoar
Copy link
Contributor Author

jtoar commented May 5, 2022

Finally managed it in #5416.

@jtoar jtoar closed this May 5, 2022
@jtoar jtoar deleted the ds-upgrade-yargs branch October 5, 2022 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted release:chore This PR is a chore (means nothing for users)
Projects
Status: Archived
Status: Done
Development

Successfully merging this pull request may close these issues.

upgrade Yargs from v16.2.0 to v17
3 participants