-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
author fields not being parsed correctly #5
Comments
Just for giggles, here's the full version of my normalized package.json file: {
"name": "pkg2",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": {
"name": "Peter deHaan <peter@deseloper.com> (http://nodeexamples.com/)",
"url": ""
},
"repository": {
"type": "",
"url": ""
},
"bugs": {
"url": ""
},
"licenses": [
{
"type": "WTFPL"
}
],
"keywords": []
} And the pre-normalized version was: {
"name": "pkg2",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Peter deHaan <peter@deseloper.com> (http://nodeexamples.com/)",
"license": "WTFPL"
} |
Here, look what I did with Verb: https://github.com/assemble/verb/blob/master/lib/utils/authors.js I'll move that into a separate repo and use that to parse the author field. It didn't occur to me to do that for some reason. We can also look for an |
is this technically a bug, or a request to parse the string? |
I think it's a bug as it is currently. |
The normalized author field is now the string version so it's not expanded into an object. |
Steps to reproduce:
$ touch index.js
(optional)$ npm init
(finish wizard, this step probably is a bit inconsistent based on your current npm config setup.)$ normalize
Actual results:
Expected results:
The text was updated successfully, but these errors were encountered: