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

Provide separate URLs for bower and npm assets #67

Closed
schmunk42 opened this issue Sep 20, 2017 · 12 comments
Closed

Provide separate URLs for bower and npm assets #67

schmunk42 opened this issue Sep 20, 2017 · 12 comments

Comments

@schmunk42
Copy link

Could you provide separate URLs for bower and npm assets?

The background is that, while composer and bower work in a similar way concerning flat-installation of dependencies, npm works completely different. See details

This might (will) lead to other solutions regarding management of npm packages, ie. fxpio/foxy#8 - while using asset-packagist for bower still is a very practical solution.

By having separate URLs developers could choose freely which service they use for which packages.

@hiqsol
Copy link
Member

hiqsol commented Sep 20, 2017

You propose to make something like bower-packagist.org and npm-packagist.org ?
Did I get you correctly?
It is possible of course.
But I didn't get any profit for anybody.
Could you please clarify?

@schmunk42
Copy link
Author

Don't need to be separate domains, URLs would be fine:

https://asset-packagist.org/bower
https://asset-packagist.org/npm

As outlined in the linked foxy issue, there's a way to convert requirements like npm-asset into native package.json entries, while still keeping the existing syntax (and ability to use ap) in composer.json. This won't be supported for bower.

I'd like to have the option to use asset-packagist for bower, but not for npm.

@hiqsol
Copy link
Member

hiqsol commented Sep 20, 2017

Ok, now I see. Good idea.
Need time to investigate it more.

@hiqsol
Copy link
Member

hiqsol commented Sep 20, 2017

It's only necessary to return only bower packages on bower url.
Or more?

@francoispluchino
Copy link

@schmunk42 Good idea! In this case, I can add automatically the asset-packagist repository in Composer with the Composer Asset Plugin Legacy. If @hiqsol accepts.

@francoispluchino
Copy link

@hiqsol In connection with my comment on the problem to create a bridge between CAP/Asset-Packagist and Foxy.

Is it possible for asset-packagist to return a mock for NPM packages, as well as a ZIP archive containing only a package.json file with the minimum information?

@hiqsol
Copy link
Member

hiqsol commented Sep 20, 2017

@francoispluchino Yes, it is possible.
But I'm a bit busy right now and can't spend enough time to read all the given links thoroughly, so I feel that I lose enough understanding what do you want to achieve.

How this mock should look?
If you are ready to make a PR I'll be glad to help.

@francoispluchino
Copy link

francoispluchino commented Sep 20, 2017

A package.json file containing only the name in the ZIP archive. I think it may be generic (like composer-asset-package-mock). This is only for Composer to not throw an exception for NPM packages.

Regarding the resolution of package dependencies, I don't know how your server work, but to make it simple, a Composer package mock must be created for each asset package version required during the resolution (retrieved from the true package.json file, but with empty lists for dependencies and devDependencies sections of the converted package.json file to composer.json file).

Regarding the ZIP archive downloading, return a ZIP archive for any versions of any packages (without checking).

@github-actions
Copy link

Stale issue message

@razvanphp
Copy link

Can we reopen this? Seems to be necessary for some improvements in foxy.

@schmunk42
Copy link
Author

Can we reopen this? Seems to be necessary for some improvements in foxy.

@razvanphp How is asset-packagist related to foxy?

@razvanphp
Copy link

I don't know, saw those discussions and you mentioning it in the OP 🙂

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

No branches or pull requests

4 participants