bower / registry

The Bower registry
https://registry.bower.io/packages
MIT License
292 stars 66 forks source link

Only one entry per normalized url #38

Closed sindresorhus closed 8 years ago

sindresorhus commented 10 years ago

There's a lot of duplication in the registry which causes confusion and bloat.

We should only allow unique normalized urls in the registry.

Example: http://sindresorhus.com/bower-components/

Both twitter and bootstrap is registered to the same url. Seen a lot of this with other names too.

patrickkettner commented 10 years ago

@sindresorhus - I believe this is about as fixed as it can be now that the url rewriting is in place, no?

sheerun commented 10 years ago

I listed 1250 packages to normalize: https://gist.github.com/sheerun/cfa608d52bc539422f71

Some are weird like:

  {
    "name": "polymerlabs-yt-video",
    "url": "git://github.com:PolymerLabs/yt-video.git",
    "new": "git://github.com/:PolymerLabs/yt-video.git"
  }

But I guess they modify already broken packages anyway.

Let me know if you see something weird.

sheerun commented 10 years ago

Those are all unusual renames: https://gist.github.com/sheerun/538229188e255b09b2e7

rayshan commented 10 years ago

This may be something missed by https://github.com/bower/registry/pull/82.

@patrickkettner, I see that there are tests for

it('should support ssh urls', function () {
  return assert.equal(normalizeURL('git@github.com:bower/Bower.git'), normalizedURL);
});

it('should support ssh urls with a preceeding slash', function () {
  return assert.equal(normalizeURL('git@github.com:/bower/Bower.git'), normalizedURL);
});

But what happens if the input is git://github.com:PolymerLabs/yt-video.git?

patrickkettner commented 10 years ago

Those aren't valid git repo URLs. They wouldn't pass the new verification, and bower install fails for them currently

patrickkettner commented 10 years ago

To clarify, they are mixing the git protocol with ssh style repo listings

sheerun commented 8 years ago

It's already implemented (normalizing as well)