Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core(computed): fix new computed artifact interface #6151

Merged
merged 1 commit into from
Oct 2, 2018

Conversation

brendankenny
Copy link
Member

#5907 didn't quite work because computed artifacts need to call each other, so need access to the context to pass it on to the next computed artifact :)

Since that's now explicit, flipped the order of the parameters so it's compute_(inputArtifacts, context), which matches the interface for audit.audit() (not sure why I did it the other way before). About 3/4 of this PR is flipping the order for manifest-values from #5907.

Also updated screenshots.js to this new format.

Copy link
Member

@exterkamp exterkamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -71,7 +71,7 @@ describe('ManifestValues computed artifact', () => {
const Manifest = noUrlManifestParser(JSON.stringify({
start_url: '/',
}));
const results = await ManifestValues.request(getMockContext(), Manifest);
const results = await ManifestValues.request(Manifest, getMockContext());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the naming change from manifestArtifact to Manifest halfway through? Are they different later than in the beginning?

Copy link
Member Author

@brendankenny brendankenny Oct 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are they different later than in the beginning?

no, just different original authors/written at different times in the code base, I assume

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay this is exactly what I want! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants