Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    pgutil: PackageLockOnly for npm projects

    Scheduled Pinned Locked Moved Support
    7 Posts 3 Posters 24 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      caterina
      last edited by

      Hi,

      I see that the Dependency Scanner for npm projects is able to handle "packageLockOnly" (like it was the case in pgscan). But I can't seem to find an option to set this flag from the outside.

      Maybe this option has been overlooked? Or I am missing it?
      I appreciate the help.

      Thanks,
      Caterina

      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @caterina
        last edited by

        Hi @caterina

        It's very possible this was overlooked; we seem to have accepted a lot of pull requests without documenting them or knowing how they work 😅

        We want to make sure the tool is well documented... can you share what all this does, and how we can document it? It might be easy to add back in ... we just want to make sure all these switches are documented and still make sense.

        Thanks,
        Alana

        1 Reply Last reply Reply Quote 0
        • C Offline
          caterina
          last edited by

          Hi @atripp,

          the default behavior of the NpmDependencyScanner is to read the input file as well as all package-lock.json files found in the node_modules directory.

          Rich and I had a longer discussion about this behavior last year (https://forums.inedo.com/topic/3934/pgscan-different-results-for-npm-dependencies/13).
          Result of this discussion was to add "--package-lock-only" to be able to ignore the package-lock.json files in node_modules.

          The code for this is already part of pgutil ('packageLockOnly'-property in NpmDependencyScanner). The only thing missing here is the possibility to set this property from the outside.

          Thanks,
          Caterina

          atrippA 1 Reply Last reply Reply Quote 0
          • atrippA Offline
            atripp inedo-engineer @caterina
            last edited by

            @caterina thanks, we'll discuss this internally and get back to you soon!

            1 Reply Last reply Reply Quote 0
            • rhessingerR Offline
              rhessinger inedo-engineer
              last edited by

              Hi @caterina,

              We are working to add this back, but the hold up has been trying to properly document this. Here is our thoughts, but wanted to get your feedback.

              We are looking to change the parameter name to --do-not-scan-node_modules with a command line description of:

              Do not scan the node_modules directory when scanning for package-lock.json files

              What are your thoughts on this?

              Thanks,
              Rich

              Products Engineer, Inedo

              1 Reply Last reply Reply Quote 0
              • C Offline
                caterina
                last edited by

                Hi @rhessinger,

                sorry for the late response, this somehow slipped my mind.

                Your suggestion looks good to me. The description is easy to understand and also the parameter name is very descriptive.

                Thanks,
                Caterina

                1 Reply Last reply Reply Quote 0
                • rhessingerR Offline
                  rhessinger inedo-engineer
                  last edited by

                  Hi @caterina,

                  No problem, thanks for getting back to us. We have an upcoming release of pgutil that will include this flag. We also have improved this command a bit by allowing you to use the working directory which will search for the right files instead of --input having to specify the path to the file (although you still can). It will now also automatically audit the scan directly after, you can use --noaudit to skip the audit. We should have those updates pushed this week.

                  Thanks,
                  Rich

                  Products Engineer, Inedo

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 1 / 1
                  • First post
                    Last post
                  Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation