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

node plugin: record the yarn.lock file #1524

Merged
merged 1 commit into from
Sep 12, 2017

Conversation

come-maiz
Copy link
Contributor

@come-maiz come-maiz commented Sep 1, 2017

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on bug reports?
  • If this is a new feature. Have you discussed the design on the forum?
  • Have you successfully run ./runtests.sh static?
  • Have you successfully run ./runtests.sh unit?

This is part of #1453.
Requires #1523

@come-maiz come-maiz changed the title Yarn lock record node plugin: record the yarn.lock file Sep 4, 2017
self.assertThat(
plugin.get_manifest(), Equals(
collections.OrderedDict(
{'yarn-lock-contents': 'test yarn lock contents',
Copy link
Contributor

Choose a reason for hiding this comment

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

The fact that the test can get away with arbitrary data makes me think the plugin should at least do basic validation - but then it took all of 5 minutes in DuckDuckGo to find that it's not YAML but some 500 lines of custom parsing...

So, I think some validation would be nice, whether that's a regex or nodejs command, before saving the lock contents in the manifest. And using a real-looking example in the test. But I'll leave this as a would-be-nice suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the plugin can build the package with the contents of the yarn.lock, we should record whatever was used despite of the specific value. If the value is not valid, the plugin should fail before recording anything.

@sergiusens sergiusens added this to the 2.35 milestone Sep 11, 2017
@sergiusens sergiusens force-pushed the yarn-lock-record branch 3 times, most recently from 6aab2e1 to f81fc52 Compare September 12, 2017 14:29
Copy link
Collaborator

@sergiusens sergiusens left a comment

Choose a reason for hiding this comment

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

tested, works as expected

@sergiusens sergiusens merged commit 4055b4f into canonical:master Sep 12, 2017
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