Skip to content
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

Uppercase letters in the value of "name" parameter (validation) #10

Open
Kristinita opened this issue Feb 27, 2018 · 2 comments
Open

Uppercase letters in the value of "name" parameter (validation) #10

Kristinita opened this issue Feb 27, 2018 · 2 comments

Comments

@Kristinita
Copy link

1. Summary

If I generate my package.json use generate-package:

    value "name" parameter may contain uppercase letters.

See official npm docs:

New packages must not have uppercase letters in the name.

2. Environment

  • Windows 10 Enterprise LTSB 64-bit EN,
  • Node.js 9.6.0,
  • generate 0.14.0.

3. Steps to reproduce

I install generate and generate-package → I create blank folder D:\SashaDemoRepositories\SashaNpmInitVsGeneratePackage → I run gen package command:

D:\SashaDemoRepositories\SashaNpmInitVsGeneratePackage>gen package
[09:59:35] starting generate
[09:59:44] √ running tasks: [ 'package' ]
[09:59:47] starting package
? Project description? Demo generate-package
? Author's name? Sasha Chernykh
? Author's URL? https://vk.com/hair_in_the_wind
[10:00:13] finished package √ 26s

I get package.json:

{
  "name": "SashaNpmInitVsGeneratePackage",
  "description": "Demo generate-package",
  "version": "0.1.0",
  "homepage": "https://github.com/Kristinita/SashaNpmInitVsGeneratePackage",
  "author": "Sasha Chernykh (https://vk.com/hair_in_the_wind)",
  "repository": "Kristinita/SashaNpmInitVsGeneratePackage",
  "bugs": {
    "url": "https://github.com/Kristinita/SashaNpmInitVsGeneratePackage/issues"
  },
  "license": "MIT",
  "engines": {
    "node": ">=4"
  },
  "scripts": {
    "test": "mocha"
  },
  "keywords": [
    "SashaNpmInitVsGeneratePackage"
  ]
}

4. Expected behavior

Lowercase:

"name": "sashanpminitvsgeneratepackage"

5. Actual behavior

Uppercase letters:

"name": "SashaNpmInitVsGeneratePackage"

Thanks.

@rbecheras
Copy link
Member

Hi Kristinita,

Thanks for posting this issue.

Indeed, a NO_UPPERCASE formating rule for the package name would be a good idea, relating to the relying npm docs.

But in a such case I think the expected behavior should better be sasha-npm-init-vs-generate-package.

Don't you think ?
What about you @jonschlinkert, @doowb ?

@rbecheras rbecheras changed the title bug(validation): Uppercase letters in value of "name" parameter Uppercase letters in the value of "name" parameter (validation) Feb 27, 2018
@rbecheras
Copy link
Member

I just edited the title of this issue to remove the "bug" mention because it should not be concidered as a bug but an enhancement. The actual expected behavior do not care about uppercase. But @Kristinita you're right it probably should be.

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

No branches or pull requests

2 participants