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

Remove yarn support #12134

Merged
merged 22 commits into from
Aug 3, 2020
Merged

Remove yarn support #12134

merged 22 commits into from
Aug 3, 2020

Conversation

avdev4j
Copy link
Contributor

@avdev4j avdev4j commented Jul 21, 2020


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@avdev4j avdev4j mentioned this pull request Jul 21, 2020
1 task
@avdev4j avdev4j force-pushed the remove-yarn-support branch 2 times, most recently from 8cf0976 to 083ceff Compare July 21, 2020 21:37
@avdev4j avdev4j marked this pull request as ready for review July 22, 2020 21:26
@avdev4j avdev4j force-pushed the remove-yarn-support branch from 083ceff to ef0d610 Compare July 23, 2020 09:08
@MathieuAA
Copy link
Member

@avdev4j what about this one? ef0d610#diff-fddb513f7a2937b33eb1c1f6a71e64a7R2173 (dest.useNpm = configOptions.useNpm;)
I'm not sure how it's used

@avdev4j avdev4j force-pushed the remove-yarn-support branch from ef0d610 to 9975c55 Compare July 23, 2020 09:21
@avdev4j
Copy link
Contributor Author

avdev4j commented Jul 23, 2020

oups, my bad :D

@yacosta738
Copy link
Contributor

@avdev4j why did you remove the yarn option?

@avdev4j
Copy link
Contributor Author

avdev4j commented Jul 23, 2020

hi @yuniel-acosta
Removing Yarn is include in the v7 Roadmap. #10958
I've also open a ticket here :#12135 and explain why we think that is not necessary to maintain Yarn beside Npm:

We notice that Yarn is not use as NPM could be. We added Yarn because it offered more advanced features than NPM in time. Nowadays, NPM has catch up and it's easier for the team to maintain only one package manager.

regards,

@vishal423
Copy link
Contributor

@avdev4j, do we have stats on generation with yarn vs npm ?

Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

I agree with yarn removal, but we should make sure to not conflict with yarn IMO.
Using yarn should be as easy as possible like:

jhipster --client-package-manager yarn
cp my-custom-yarn-package.json package.json
yarn install

I think we should try to:

  • move every npm script to package.json
  • replace npm calls with packages like npm show with latest-version
  • remove npm from every label.
  • make sure --skip-install does not call npm.
  • keep clientPackageManager for 2 reasons
    ${clientPackageManager} run ... and
    if(clientPackageManager !== undefined && clientPackageManager !== 'npm') { this.warning('Package manager ${clientPackageManager} is not supported.'); skipInstall = true; }

And may we could try to migrate from yarn-lock to package-lock with @npm/arborist.

generators/upgrade/index.js Outdated Show resolved Hide resolved
@@ -204,21 +201,21 @@ module.exports = class extends BaseGenerator {

_retrieveLatestVersion(npmPackage) {
this.log(`Looking for latest ${npmPackage} version...`);
const commandPrefix = this.clientPackageManager === 'yarn' ? 'yarn info' : 'npm show';
const commandPrefix = 'npm show';
const pkgInfo = shelljs.exec(`${commandPrefix} ${npmPackage} version`, { silent: this.silent });
Copy link
Member

Choose a reason for hiding this comment

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

Use lastest-version package to fetch last version instead of npm show.
Related: #11925 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure to understand what you want here

@avdev4j
Copy link
Contributor Author

avdev4j commented Jul 23, 2020

Maybe @jdubois can help us to answer that, or anyone else? @jhipster/developers

@mshima
Copy link
Member

mshima commented Jul 23, 2020

Removing Yarn is include in the v7 Roadmap. #10958

By the way that v7 Roadmap is more a wish list to me, every contributor added his opinion to it.
I would prefer to keep Logs, Metrics, Configuration, properties and Health admin pages as optional and deprecated for jhipster 7 maybe at a separated generator.

@avdev4j
Copy link
Contributor Author

avdev4j commented Jul 23, 2020

By the way that v7 Roadmap is more a wish list to me, every contributor added his opinion to it.

This why I added an issue for that and where we should discuss about it ;).

Basically every v7 item roadmap should has an issue linked with, and to provide a place to discuss. (maybe I forgot few :D)

@avdev4j avdev4j force-pushed the remove-yarn-support branch 2 times, most recently from 4b66e31 to 730d44d Compare July 27, 2020 09:20
@deepu105
Copy link
Member

Imo its fine to remove yarn and if someone wants to use yarn they can always do so. The script parts with nom will still work

@avdev4j avdev4j force-pushed the remove-yarn-support branch from 6d7a52f to 75b6d8c Compare July 30, 2020 13:39
@avdev4j avdev4j force-pushed the remove-yarn-support branch from 75b6d8c to c7a8c6f Compare July 31, 2020 15:28
@MathieuAA MathieuAA merged commit 88a0a09 into jhipster:master Aug 3, 2020
@MathieuAA
Copy link
Member

Thanks @avdev4j!!

@avdev4j avdev4j deleted the remove-yarn-support branch August 4, 2020 09:27
@pascalgrimaud pascalgrimaud added this to the 7.0.0 milestone Oct 18, 2020
@pascalgrimaud pascalgrimaud mentioned this pull request Dec 12, 2020
5 tasks
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.

7 participants