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

Verify NPM package versions #57

Open
dgp1130 opened this issue Feb 14, 2023 · 0 comments
Open

Verify NPM package versions #57

dgp1130 opened this issue Feb 14, 2023 · 0 comments
Labels
feature New feature or request
Milestone

Comments

@dgp1130
Copy link
Owner

dgp1130 commented Feb 14, 2023

We should generate a test which asserts that the rules_prerender and @rules_prerender/* NPM packages are the same version as the @rules_prerender workspace to avoid version skew.

This is tricky to do in practice, since currently there is nothing in the repository source which actually specifies the version number. I've tried to keep it that way because manual version bumps just introduce a lot of toil. I'm not entirely sure how to do this without manually managing versions, but one idea I have is:

  • Copy @aspect_rules_js release process to manually tar and release their own source code as an asset to the GitHub release.
  • At release time, inject the released version into the repository at a specific path.
  • When the user installs the workspace, generate a test which compares the version in the workspace against the NPM package versions and fail if they disagree.

This means that the released workspace doesn't 1:1 match the actual workspace source, but that might be a small enough difference to not matter? If you're depending on it through other means (such as a local checkout of the source installed via local_repository()), then I think it's fair to skip/not support this verification.

@dgp1130 dgp1130 added the feature New feature or request label Feb 14, 2023
@dgp1130 dgp1130 added this to the 1.0.0 milestone Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant