-
Notifications
You must be signed in to change notification settings - Fork 133
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
Roots should throw an error if package.json version differs from local version #656
Comments
I'm not sure I understand. Do you mean comparing the version you are using globally to produce the actual site, and if you have installed roots locally also by chance, comparing it against that? The issue I see here is that you don't actually need to install it locally... we only do this because of netlify's pipeline. I suppose we could add a check at some point, like perhaps before deploy, if it is present as a local install though. |
You got it on the spot, but the use cases could go beyond using netlify for deployment. It's more of a helper so that your global version & project version are the same so if it is specified within the |
I'm ok with having it, but not at the expensive of speed at any time, or with any possibility that it could be annoying. Integration would need to be designed carefully. |
it would just be a simple check at the beginning of the root watching or compiling a project, shouldn't slow roots down at all as it's not compiling anything, just checking the version - probably can just read the projects |
Update lollipop 5.1.1 resurrection 5.5.1 after root not complete root permission how to plz help me |
@Arshad3 I think you might be in the wrong place... |
@Jenius in light of the recent image issue, this seems required. Gulp does this, lines of interest are: As the CLI builds on liftoff, to build the "modulePackage" part of the environment, all that does is recursively look up from where it is for package.json, and require it: https://github.com/js-cli/js-liftoff/blob/0226211f1f260b87f9c829971b3f30322435c9c7/index.js#L89 I imagine the place to hook for this is here: https://github.com/jenius/roots/blob/83dce34b86e3b061b7a43c8813a48eb98670538c/lib/cli/index.coffee#L46 but I have no idea if roots.base is accessible at this point, but I imagine a solution can be found. Alternatively, we could try switching to Liftoff to handle our CLI stuff. |
I am interested in the concept, but don't have the time to tackle this kind of issue at the moment. I'm really sorry! |
For instance if I'm running
v3.1.0
but thepackage.json
for a site usesv3.0.x
there could be a breaking change. Roots should check the projects package.json to verify that we are using the same version or same minor version (so long as roots follows semver, which I'm unsure if it does or doesn't)The text was updated successfully, but these errors were encountered: