Refactor package/dependency code to use consistent terminology
Created by: olafurpg
Towards #37990 (closed).
This PR is a pure refactoring. There are no functional differences.
- a "package" refers to an npm/maven/go package/artifact/module
- a "dependency" refers to the dependency relationship between two packages
- distinguish whether a package has a version or not. Previously, we silently used the empty string for versions when it was missing. The distinction is important because we only need a package without versions to create a Sourcegraph repo. The version is needed only when cloning/fetching that repository.
Test plan
See the tests pass.