-
Notifications
You must be signed in to change notification settings - Fork 21
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
Support npm scoped package names #24
Comments
Looks like just need to update lib/valid-name.js with latest name validation logic from normalize-package-data: https://github.com/npm/normalize-package-data/blob/master/lib/fixer.js#L309-L333 |
The
Neither of these work. Does anyone care to dredge through the npm-www source to figure this one out? |
Found this when I made my first scoped package https://nodei.co/npm/@ljharb/eslint-config.png?downloads=true&stars=true :-( I've asked the npm folks, and it appears that scoped packages are not on skimdb at this time. If they were, the link would have the @ not escaped and the slash escaped. ie https://registry.npmjs.org/@ljharb%2Feslint-config and thus https://skimdb.npmjs.com/registry/@ljharb%2Feslint-config |
I know this is a pain, and download ranks are borked too, but I'm flat-out pushing io.js 3 out so we can get the timing for Node 4 and that's taking top priority atm. I'll get to this though because I understand the pain! |
Totally fair :-) |
@rvagg now that iojs 3 is out, any chance of taking a look at nodei.co for scoped packages? |
This now appears to be somewhat fixed - npm doesn't actually give out download counts on scoped packages right now, afaik because they have to write the code to distinguish private from public downloads. |
the only thing that https://nodei.co/npm/@ljharb/eslint-config.png?downloads=true&stars=true really does is verify that the package name isn't bogus (I fixed package name validation in a recent round of changes), in the same that https://nodei.co/npm/this-is-not-a-valid-package-but-the-package-name-is-fine.png?downloads=true&stars=true works, it doesn't manage to get anything from skimdb about the package so can't verify what it is but fails silently anyway .. so you get a badge with the name, but that's it. |
@rvagg it looks like replicate.npmjs.com now supports public scoped packages - could you use that to have your badge support scoped packages? |
I can't find any docs on what even that is and I can't connect to it anyway so 🤷 |
oops, I'll ping here when I find them :-p |
(tldr: nodei.co doesn't support scoped package names yet)
Whe you install npm package, in package.json appear:
https://skimdb.npmjs.com/registry/@telegram-actions%2ftransmission |
Is this solved yet? |
Is there an update on this issue? Curious to know if this will be supported! |
Seems to still be an issue. |
+1 - is this being worked on? To be clear: I can get the image, but it doesn't include download stats, etc. |
Yeah, I'll probably get to this soon, I've been back at the code, fixing it up and making it work again after much breakage due to neglect. I think that this should be much more easily solvable with npm's new APIs. |
@rvagg Just curious what's new API? :) |
"new" in a relative sense, relative to the age of this project, not actually that new: https://github.com/npm/registry/tree/master/docs They've also been busy taking some things away so certain things have become difficult or impossible, like I have no way to get the number of packages depend on a package, "dependedUpon", so that's had to be dropped from the badges sadly. I'm in the process of considering whether to bite the bullet and just mirror the entire registry sans tarballs so I can do some of these things myself. But that's purely a leisure activity so I'm in no hurry. |
Thanks. It is new to me :) |
ah, cool, it does look like we have significant overlap One of my original ideas for nodei.co was to provide an the API that npm didn't have, simple queries to get simple data that was otherwise difficult to piece together from npm. Since that time they've both improved and regressed. There's probably not a place for an API replacement, but there's certainly a place for a mirror-minus-tarballs that could be used to build such a thing. It'll probably be a case of a simple follow and reconstruct a local database representing what npm has. It could even be as simple as just mirroring the .json files like registry-static does and leaving out the tarballs. But I kind of want to push it a bit further than that and make something more easily queryable. My current track has me pondering how to do this on top of IPLD which I'm working on these days. While interesting for me and helpful to extend IPLD, it probably wouldn't lead to an optimal solution in the short term! I'll keep you informed as (/if) I make progress, this one's been niggling at me for a while. |
Awesome idea. Last time I poked around npm (like 3-4 years ago) I remember they used elastic for packages stats/meta data, don't remember details though. But if it could be achieved with just a mirror – it's great. As for IPLD :) totally understand your passion in that space, been poking around DAT myself recently :) |
npm now provides support for scopes, which is a way of grouping related packages together.
Here is an example of a scoped package: @atomiq/promisify.
This is the same exact package also currently published without a scope: promisify-iojs
Expected behavior:
nodei.co should be able to create a badge for a scoped package:
https://www.npmjs.com/package/@atomiq/promisify =>
Actual behavior:
nodei.co successfully creates a badge for a standard package name, but provides the following error when attempting to create a badge for a scoped package:
The text was updated successfully, but these errors were encountered: