Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4333

Add a CI guard against accidentally modifying package.json dependency list

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 2
    • Not Needed

      Use Case

      As a... node driver engineer
      I want... to be alerted if we add or remove dependencies to the package.json
      So that... I don't accidentally introduce dependencies from my local env

      User Impact

      Avoids users installing a bigger package size for the driver for no reason.

      Dependencies

      • None

      Unknowns

      • None

      Acceptance Criteria

      • Implement a check for package.json dependencies against a hard-coded list that will run on each PR

      Implementation Requirements

      • Add a unit test with a hard-coded list of prod dependencies that is checked for equality with the corresponding property in the package.json
      • Optionally, add a list of dev dependencies, too (do we want to guard these?)
      • Optionally, add this test as a standalone github task on PRs for greater visibility

      Testing Requirements

      • This is a test

      Documentation Requirements

      • N/A

      Follow Up Requirements

      • File a follow up if you can think of improvements to this process (e.g., how to implement this check via something like dependabot)

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            daria.pardue@mongodb.com Daria Pardue
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: