Closed schmunk42 closed 4 years ago
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?
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
.
Ok, now I see. Good idea. Need time to investigate it more.
It's only necessary to return only bower packages on bower url. Or more?
@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.
@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?
@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.
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).
Stale issue message
Can we reopen this? Seems to be necessary for some improvements in foxy.
Can we reopen this? Seems to be necessary for some improvements in foxy.
@razvanphp How is asset-packagist related to foxy?
I don't know, saw those discussions and you mentioning it in the OP 🙂
Could you provide separate URLs for bower and npm assets?
The background is that, while
composer
andbower
work in a similar way concerning flat-installation of dependencies,npm
works completely different. See detailsThis might (will) lead to other solutions regarding management of
npm
packages, ie. https://github.com/foxypkg/foxy/issues/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.