Skip to content

Refactors inquirer to new package structure. Closes #5510#5511

Closed
martinlingstuyl wants to merge 4 commits intopnp:mainfrom
martinlingstuyl:refactor-inquirer
Closed

Refactors inquirer to new package structure. Closes #5510#5511
martinlingstuyl wants to merge 4 commits intopnp:mainfrom
martinlingstuyl:refactor-inquirer

Conversation

@martinlingstuyl
Copy link
Copy Markdown
Contributor

@martinlingstuyl martinlingstuyl commented Sep 21, 2023

Closes #5510

Feel free to add feedback on specifics regarding function implementations. this should be as good and clear as possible.

Refactors inquirer to new package structure.

  1. Implements prompt util
  2. Updates all references to inquirer prompts
  3. 🪲 Also fixes some issues with tests here and there. (for example chili)

npm install causes some changes to the shrinkwrap file around the eslint package that I'm not sure of. so I committed those separately.

@martinlingstuyl
Copy link
Copy Markdown
Contributor Author

Hi peeps @pnp/cli-for-microsoft-365-maintainers, this is a huge PR. I'd like for us to get this in sooner rather than later, due to potential merge conflicts.

If you review this I'd suggest you start with the central files. (Command.ts, Cli.ts, prompt.ts, etc) the rest is mostly implementation of confirms across the codebase.

@Adam-it Adam-it self-assigned this Oct 22, 2023
@Adam-it
Copy link
Copy Markdown
Member

Adam-it commented Oct 22, 2023

Hi @martinlingstuyl,
Sorry for the hold up.
I assigned myself to it and will start the review today

@martinlingstuyl
Copy link
Copy Markdown
Contributor Author

awesome @Adam-it, take care of checking chili and m365 setup with extra effort. A lot has been rewritten there...

@Adam-it
Copy link
Copy Markdown
Member

Adam-it commented Oct 22, 2023

I did check the setup command
image

and the chili
image

and some other scenarios like prompting for required options, to select options set etc.
image

Till now everything looks/works fine 👏🤩
I will continue tomorrow to go over the code and more testing. If all goes fine (no major comments) We should be ready in 2-3 days with this.
Thanks for the patience 👍

@martinlingstuyl
Copy link
Copy Markdown
Contributor Author

Take your time! If you have comments, I probably won't be able to fix them this week anyway. 😄

Copy link
Copy Markdown
Member

@Adam-it Adam-it left a comment

Choose a reason for hiding this comment

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

@martinlingstuyl awesome work 👏
✅I went over the changes - I only have some small cosmetic comments I will resolve when merging
✅I tested setup command
✅I tested chili
✅I tested prompting for an option
✅I tested for selecting single option set
✅I tested prompting for confirmation
✅I tested selecting single value from multiple
... do you think there's anything else worth checking 🤔?

Comment thread src/m365/aad/commands/app/app-role-remove.ts Outdated
Comment thread src/m365/aad/commands/m365group/m365group-recyclebinitem-clear.ts Outdated
Comment thread src/m365/booking/commands/business/business-get.spec.ts Outdated
Comment thread src/m365/spo/commands/file/file-checkout-undo.ts Outdated
Comment thread src/m365/spo/commands/user/user-remove.ts Outdated
Comment thread src/m365/spo/commands/web/web-remove.ts Outdated
Comment thread src/m365/spo/commands/web/web-roleinheritance-break.ts Outdated
Comment thread src/m365/spo/commands/web/web-roleinheritance-reset.ts Outdated
@martinlingstuyl
Copy link
Copy Markdown
Contributor Author

No significant comments... fantastic 😅

If you don't have anymore comments on the way it's setup, that's great! In that case we can ship it 🚀

@martinlingstuyl
Copy link
Copy Markdown
Contributor Author

Ow by the way. Did you get any changes in the shrinkwrap file when running npm install?

@Adam-it
Copy link
Copy Markdown
Member

Adam-it commented Oct 24, 2023

Ow by the way. Did you get any changes in the shrinkwrap file when running npm install?

actually, I did when I was rechecking tests without this additional code.
Shouldn't this change be part of the PR then?

@martinlingstuyl
Copy link
Copy Markdown
Contributor Author

Well, the changes were about our custom Eslint rules, which I did not change, so I was confused about them, particularly because it's a different type of npm-package: a local package, so I did not push them. What's your idea on that?

@Adam-it
Copy link
Copy Markdown
Member

Adam-it commented Oct 25, 2023

Well, the changes were about our custom Eslint rules, which I did not change, so I was confused about them, particularly because it's a different type of npm-package: a local package, so I did not push them. What's your idea on that?

O didn't actually check what changed in the shrink. But if it's not connected to your change I guess it should not occured if we merge with latest main 🤔.

Copy link
Copy Markdown
Member

@Adam-it Adam-it left a comment

Choose a reason for hiding this comment

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

Rechecked ✅
looks like a loooot of awesome work 👏

@Adam-it
Copy link
Copy Markdown
Member

Adam-it commented Nov 7, 2023

@martinlingstuyl which node and npm version are you using when building this?
I checked and in our pipelines we use
image

This is also the same I use locally.
image

and only building CLI from this branch I get the following changes in shrinkwrap
image
and
image

TBH I have no idea why 😅
@pnp/cli-for-microsoft-365-maintainers could someone also recheck if has the same behavior with this branch? simply pull locally and run npm install

@martinlingstuyl
Copy link
Copy Markdown
Contributor Author

I'm working from the docker container and have versions:
image

So slight differences.
It seems like your npm install does an undo of the changes that are made by my npm install.

@martinlingstuyl
Copy link
Copy Markdown
Contributor Author

Hi @Adam-it, I've rebased and committed the shrinkwrap changes...

@Adam-it
Copy link
Copy Markdown
Member

Adam-it commented Nov 8, 2023

merged manually.
thank you for your awesome work 👏

@Adam-it Adam-it closed this Nov 8, 2023
@martinlingstuyl martinlingstuyl deleted the refactor-inquirer branch November 9, 2023 05:30
@martinlingstuyl
Copy link
Copy Markdown
Contributor Author

And thank you for the quick merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor Inquirer to new package structure

2 participants