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

Bower is deprecated since 2017, we should use npm instead #20135

Closed
wants to merge 2 commits into from

Conversation

razvanphp
Copy link
Contributor

Copy link

what-the-diff bot commented Mar 21, 2024

PR Summary

  • Shifted Dependency Source from Bower to NPM
    The source for the project dependencies was shifted from Bower to NPM. This change signifies a movement to a more reliable and frequently updated package manager, enhancing the overall stability and performance of the project.

  • Updated Directory Paths to Reflect the New Dependency Source
    The pathways in several files had to be updated from referencing Bower directories to now pointing towards the corresponding NPM directories. This helps ensure smooth functionality as all calls to dependencies will now reach the correct files in the NPM directories.

  • Modified the Testing Scripts
    The jQuery paths in the testing scripts were also updated to point to the NPM directory. These modifications ensure that the testing suite correctly interacts with the updated dependencies during testing, resulting in more accurate and reliable test results.

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.62%. Comparing base (9578380) to head (df5ea97).

Additional details and impacted files
@@            Coverage Diff            @@
##                2.2   #20135   +/-   ##
=========================================
  Coverage     65.62%   65.62%           
  Complexity    11213    11213           
=========================================
  Files           424      424           
  Lines         36681    36681           
=========================================
  Hits          24073    24073           
  Misses        12608    12608           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@razvanphp
Copy link
Contributor Author

razvanphp commented Mar 21, 2024

Related discussion in #14297 and yiisoft/yii2-bootstrap#221

I would argue that the cons presented by @schmunk42 there are not valid for core deps like Jquery.

@razvanphp
Copy link
Contributor Author

... or should we better switch to https://github.com/fxpio/foxy already? @francoispluchino what do you think?

@rob006
Copy link
Contributor

rob006 commented Mar 21, 2024

Yii2 is not using bower or even bower registry directly (packages are fetched from https://asset-packagist.org/ and installed by composer), so bower deprecation has not affect here. yiisoft/yii2-bootstrap#221 (comment) mentioned some clear disadvantages of using npm registry, what are the practical benefits of such change?

@schmunk42
Copy link
Contributor

... or should we better switch to https://github.com/fxpio/foxy already? @francoispluchino what do you think?

Foxy would be cool, but it requires npm or yarn to work.

@terabytesoftw
Copy link
Member

... or should we better switch to https://github.com/fxpio/foxy already? @francoispluchino what do you think?

Foxy would be cool, but it requires npm or yarn to work.

btw, i forked it and made some improvements, since fpachucino is busy https://github.com/php-forge/foxy

@samdark
Copy link
Member

samdark commented Mar 22, 2024

@terabytesoftw asset-packagist works on it so if improvements are critical, it's worth contacting @hiqsol and @SilverFire so they update it there.

@mtangoo
Copy link
Contributor

mtangoo commented Mar 25, 2024

@razvanphp is there anything that did not work for you?
Yii2 is not using Bower, which make the whole PR invalid.
Do you disagree with that assessment?

@razvanphp
Copy link
Contributor Author

razvanphp commented Mar 25, 2024

I totally understand, it's more of psychological change, so Yii2 is not using obsolete repositories in it's core code and also to discourage further use of bower. More than that, it can be that bower really stops being maintained and then even asset-packagist can't pull the metadata for the packages, right?

@mtangoo
Copy link
Contributor

mtangoo commented Mar 25, 2024

More than that, it can be that bower really stops being maintained and then even asset-packagist can't pull the metadata for the packages, right?

I think @hiqsol and @SilverFire can comment on this one and the way forward if the shutdown of bower will indeed disrupt the service.

@mtangoo
Copy link
Contributor

mtangoo commented Mar 25, 2024

Looking at the site it clears things up:

This repository allows installation of Bower and NPM packages as native Composer packages.

At the moment we've added most popular Bower and NPM packages 4000+ each.

In case Composer fails to install some asset package, use the search line at the top of the page to check specific package health.

For NPM scoped packages use scope--package instead of @scope/package, e.g. npm-asset/pusher--chatkit.

It seems, at least to me, that it works for both Bower and NPM. Which means as long as NPM is up, we have nothing to worry if Bower goes away!

@mtangoo
Copy link
Contributor

mtangoo commented Mar 25, 2024

Moreover, if there is further doubt, it is better to log it on the repository at https://github.com/hiqdev/asset-packagist

If you have no further objection, I will close this PR

@mtangoo mtangoo closed this Mar 25, 2024
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.

6 participants