URIjs misnamed #1706

Closed
fidian opened this Issue Aug 13, 2013 · 4 comments

Comments

Projects
None yet
2 participants

fidian commented Aug 13, 2013

This is regarding the resolution to issue 1535. I understand the reasoning, but I think that one should be able to add the package as it was named by the author. I personally like "URI.js" more, but after I have been investigating this, it seems that the real name is "URIjs".

The commit that added URIjs to cdnjs uses the name "URI.js" - commit
The package.json file at that time from URIjs says the name is "URIjs" - file at that time
The package.json file still says URIjs.- master
This is even published to npm's packages as URIjs - npm

What should be done? Do you support symbolic links and should the package get renamed (symbolic links allowing old URLs to keep working)? Should the package change its name to fit cdnjs? Do we prefer more manual interaction when adding things to cdnjs? I wanted to update to version 1.10, but I don't want to need to modify the name in package.json in order to pass the tests, especially if it's not the author's desired name.

Do you have advice as how to handle this?

Contributor

petecooper commented Feb 1, 2014

Hi @fidian - this is interesting. I'm not familiar with the library, so please correct me if I'm wrong. The github.io page (http://medialize.github.io/URI.js/), presumably created/maintained by the author, refers to it as URI.js multiple times, the GitHub repo (https://github.com/medialize/URI.js) also calls it URI.js, too. My (limited) understanding of npm namespace is that it's single-level and names can include dots; there's perhaps some slight level of confusion in the URI(.)js camp as to the naming, or perhaps the best npm had already been taken, I don't know.

I can tell you that there isn't currently a symlink function available on cdnJS and the guidelines state that an existing library's convention should be followed, where possible. Renaming or deleting affects an unknown number of people, which is bad. I don't see any reason why the npm auto-update function can't be used in URI(.)js, even if the npm name differs. It might not be 100% elegant, but it's a manageable solution, at least for now.

fidian commented Feb 1, 2014

I'm unfamiliar with the npm auto-update function. Would that use "URIjs" from package.json? Would that use "URI.js" to preserve the name going forward? I don't want to break links, but I do think that this sort of situation should have a solution, thus somewhat starting a policy for project names.

I don't want to break things for many people. I do want to go with the guidelines. Do we use what the package.json says and what npm uses? Or, do we instead follow the name on the website? What about similar packages - the name on the website could easily be "node-something.js" and in NPM it is just "something.js" without the prefix. What name is the one that should be followed?

Likewise, I have some projects that are "fid-umd" in NPM but FidUmd on the website. I would expect to find "fid-umd" as that's how I publish it and that's in the name of the repository and because I dislike having to worry about capitalization on a filesystem. However, I don't like typing fid-umd when talking about it on my website and use in JS would be "new FidUmd()" without the hyphen. How do you think my library would best be published?

Contributor

petecooper commented Feb 15, 2014

Hi @fidian - sorry for the delay in responding. My interpretation of this issue is that there is already a library present on cdnJS called URI.js, and the link to GitHub refers to a URI.js, which is by the author. That tallies up name-wise. How it lives in NPM (and other places) is outside the remit of cdnJS, and perhaps an issue for the developer to be aware of. The glue between cdnJS and NPM is fairly arbitrary and, by nature, may involve filename format changes as new releases come out.

I am new to NPM, too, so please don't take this as gospel truth, but there is a section of the package.json that refers to NPM specifics. There can, and sometimes is, a mismatch between the cdnJS ID for a library and the NPM version of a library. I don't make policy around here, but the source and author naming format matching up seems to be a good start; how the auto-update interfaces with a third party repo like NPM or otherwise is something that needs to be worked out on a case by case basis to ensure the transport glue works.

As an author of projects, you could (?should) define your naming scheme that works best for your project - that's something you have control over. There are a variety of different library naming conventions on cdnJS, but the guidelines tend toward lowercase. In the case of fid-umd, I would expect to see it appear as fid-umd to match up with your identifier, and have FidUmd in the description field because that's what you've used. Compare with jquery (identifier) and jQuery as the product name.

@petecooper petecooper pushed a commit that referenced this issue Apr 10, 2014

Pete Cooper Add keywords for URI.js
/cc #1706 and @fidian
46855aa

petecooper closed this Apr 10, 2014

fidian commented Apr 10, 2014

Sorry for my extremely late reply. Your discussion works well for me. Thanks for providing it!

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