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

Add new packagerOptions: noNonInteractive to disable interactive mode when using Yarn 2 or above #1246

Merged

Conversation

jagonzalr
Copy link
Contributor

@jagonzalr jagonzalr commented Sep 20, 2022

What did you implement:

Closes #642

How did you implement it:

Add a new flag noNonInteractive to packagerOptions when using yarn as the packager.

If using Yarn 2 or above the flag --non-interactive will break yarn install.

How can we verify it:

npm run test

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@j0k3r j0k3r changed the title Add new packagerOptions noNonInteractive to disable interactive mode when using Yarn 2 or above Add new packagerOptions: noNonInteractive to disable interactive mode when using Yarn 2 or above Sep 20, 2022
@j0k3r j0k3r requested a review from vicary September 20, 2022 12:40
@j0k3r j0k3r added this to the 5.10.0 milestone Sep 20, 2022
Copy link
Member

@j0k3r j0k3r left a comment

Choose a reason for hiding this comment

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

Looks ok to me.
I'm wondering if this kind of option could be "transparent" without too much overload, like we check Yarn version and if the version < 2, we apply the --non-interactive option.

@jagonzalr
Copy link
Contributor Author

Looks ok to me. I'm wondering if this kind of option could be "transparent" without too much overload, like we check Yarn version and if the version < 2, we apply the --non-interactive option.

Interesting idea, let me have a look at that

Copy link
Member

@vicary vicary left a comment

Choose a reason for hiding this comment

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

LGTM in its current state, I also quite like the transparent idea.

Sidenote:

  1. If version detection for yarn is possible, --frozen-lockfile option should be translated to --immutable.
  2. If even more arguments are found diverging between v1 and v2, we may have to split it out to a new file e.g. lib/packagers/yarn-berry.js

@jagonzalr
Copy link
Contributor Author

jagonzalr commented Sep 20, 2022

@j0k3r @vicary if this is good I would prefer if it can be merged and published.

This fixes the current issue of not being able to used Yarn 2 or 3 which forces people to go to Yarn 1.

I can work on a different PR where it can implement the more transparent solution later.

@j0k3r
Copy link
Member

j0k3r commented Sep 20, 2022

@jagonzalr Yep, we'll merge it and if you want to work on an improved version, we'll be happy to review it 👍🏼

@j0k3r j0k3r merged commit 070395d into serverless-heaven:master Sep 20, 2022
@Jameskmonger
Copy link

Is there a known timeline for this update to be published to npm? Thanks ❤️

@j0k3r
Copy link
Member

j0k3r commented Sep 21, 2022

In the coming days I guess

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.

Support yarn 2 version
4 participants