hiqdev / asset-packagist

Asset Packagist
https://asset-packagist.org
BSD 3-Clause "New" or "Revised" License
247 stars 24 forks source link

Can't see information for npm-asset/@fortawesome/fontawesome-free #97

Closed rodrigoaguilera closed 4 years ago

rodrigoaguilera commented 5 years ago

I can do a search the package https://asset-packagist.orocrm.com/package/search?query=fontawesome-free&platform=bower%2Cnpm

And I am able to see the latest version but when I look at the detailed information https://asset-packagist.orocrm.com/package/detail?fullname=npm-asset/%40fortawesome/fontawesome-free

there is no versions, the link to npm is shortened and I can't use composer

composer require npm-asset/@fortawesome/fontawesome-free

I guess it has something to do with the @ and / characters. Do they map to any other character?

SilverFire commented 5 years ago

Hello!

Yes, indeed. Package is available via alias npm-asset/fortawesome--fontawesome-free, so you can use it. We will fix search form so it redirects to an aliased name.

rodrigoaguilera commented 5 years ago

Thank you for the answer @SilverFire :)

Is there another issue to fix the search or should this one be repurposed for tracking this bug?

SilverFire commented 5 years ago

Yes, let's keep it open until fix is applied.

rodrigoaguilera commented 5 years ago

Just as a note I receive the following warning on composer 1.8.4

Deprecation warning: require.npm-asset/fortawesome--fontawesome-free is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*". Make sure you fix this as Composer 2.0 will error

So I guess this repo needs a different separator pattern than the double slash, Maybe something like

npm-asset/fortawesome-xn-fontawesome-free

With -xn- being just two charachters that rarely go together. It is used for internationalized domain names https://en.wikipedia.org/wiki/Internationalized_domain_name

rodrigoaguilera commented 5 years ago

To clarify further:

this concept from npm is called 'scopes' https://docs.npmjs.com/about-scopes

I just revisited this because there is is a discussion on the composer asset plugin https://github.com/fxpio/composer-asset-plugin/pull/330

And I thought that a possible solution for this is to forget about bower and map the npm scopes to some prefixed vendor name for asset packagist with a default vendor for packages without scope as usual.

github-actions[bot] commented 4 years ago

Stale issue message

rodrigoaguilera commented 4 years ago

I am still interested on this

nalipaz commented 4 years ago

Just as a note I receive the following warning on composer 1.8.4

Deprecation warning: require.npm-asset/fortawesome--fontawesome-free is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*". Make sure you fix this as Composer 2.0 will error

So I guess this repo needs a different separator pattern than the double slash, Maybe something like

npm-asset/fortawesome-xn-fontawesome-free

With -xn- being just two charachters that rarely go together. It is used for internationalized domain names https://en.wikipedia.org/wiki/Internationalized_domain_name

Should we open new issue for this particular issue @rodrigoaguilera? Seems like this is an ongoing issue for anyone using this.

rodrigoaguilera commented 4 years ago

@nalipaz This was solved in composer. v2 will accept double dashes so that is not deprecated anymore. I guess you won't get the deprecation warning on the latest stable of composer v1