Giter Club home page Giter Club logo

Comments (4)

ForestEckhardt avatar ForestEckhardt commented on August 9, 2024

There does not appear to be any straight forward tooling from NPM to facilitate the retrieval of module information. However, because the modules themselves contain package.json files we could walk the node_modules directory and parse all of the information such as name, version, license, repository, etc. out of the package.json itself as these are standard fields. Another benefit of this approach is that is will for for any node package manager (i.e. npm, yarn) as it relies on the contents of the node_modules folder as opposed to the functionality built into the package manager.

from npm-install.

ryanmoran avatar ryanmoran commented on August 9, 2024

Have you looked into https://github.com/CycloneDX/cyclonedx-node-module?

from npm-install.

sophiewigmore avatar sophiewigmore commented on August 9, 2024

Just checked it out! This tool is awesome, it gets almost everything we want:
name, version, description, hash, source URI, license ID, package URL for each node module. I'm thinking we can try to run this tool along side the npm install or yarn install buildpack. We may need to do some additional work to generate CPEs and deprecation dates.

The tool outputs in CycloneDX which will be ideal if/when we officially support CycloneDX. For the time being, with the current TOML format we support we can likely pull the information off of the JSON, and pass it into the same BOM Generator we currently use in node-engine and yarn

from npm-install.

sophiewigmore avatar sophiewigmore commented on August 9, 2024

Closing in favour of the suite of issues to implement this.

from npm-install.

Related Issues (20)

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.