Giter Site home page Giter Site logo

Comments (5)

pdehaan avatar pdehaan commented on May 22, 2024

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 <[email protected]> (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 <[email protected]> (http://nodeexamples.com/)",
  "license": "WTFPL"
}

from normalize-pkg.

jonschlinkert avatar jonschlinkert commented on May 22, 2024

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 AUTHORS file and conditionally use the results from that (like if the authors field is missing and/or to fill in missing data, etc)

from normalize-pkg.

jonschlinkert avatar jonschlinkert commented on May 22, 2024

is this technically a bug, or a request to parse the string?

from normalize-pkg.

pdehaan avatar pdehaan commented on May 22, 2024

I think it's a bug as it is currently.
I'm using the shorthand notation to specify a name/email/url (Peter deHaan <[email protected]> (http://nodeexamples.com/)), but we're currently just treating it as a name.

from normalize-pkg.

doowb avatar doowb commented on May 22, 2024

The normalized author field is now the string version so it's not expanded into an object.

from normalize-pkg.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.