Implement true integration tests - Find & Resolve bugs discovered due to it #238
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requirements
Filling out the template is required.
All new code requires tests to ensure against regressions.
Have you ran tests against this code?
This PR contains zero code changes.
Description of the Change
Originally this PR aimed to implement
nock
to achieve true 100% integration tests. By simple mocking the external endpoints we had to hit, setting up a database, and hitting our own backend to see what it would do.A valiant goal in and of itself, but in doing so, I was able to go ahead and resolve one known bug, another unknown bug, as well as improve the user experience considerably.
constructNewPackagePublishData
builder (much like the builders we already have) I was able to retire thePackageObject
builder as it was clunky, and was the cause of bugs itself. Such that it would incorrectly create versioned data during package publication. Resulting in the incorrect tag tarball being selected for the latest tag tarball. This would mean that while the version number was correct, the tarball would point to the wrong location, causing bad installations.Fixes #236
owner
key which will search thepackage.json
name
field then name of the provided URL for publication, then the parsed URL of therepository
key (supporting both string and object form) and finally grabbing theauthor
field. With this being easily expandable in the future for other values.