-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add option --lockfile to include package-lock.json content changes #3
Comments
PR is submitted |
Hi, do you have a use case where this is needed? |
@thdk 4 thumbs up in cloned repo for this feature. I think checking package.json and package-lock.json is the correct thing to check to be honest and not just package-lock file as mentioned in feature request. |
(I have reviewed your PR) Just curious about how people are using this library. Note that there should never be any good reason for deleting your All other version upgrades can be managed with running In the first scenario, it might be possible that you end up with two different version (patches) of a dependencies being used by developers of your application. It shouldn't be a big problem and worst case scenario you need to remove A We are no longer using package-changed in our team since we have implented workspaces. We migrated to yarn workspaces but npm v7+ also has workspaces support. package-changed has no support for workspaces and there is honestlty no big need for using package-changed with workspaces since running a second install takes just a few seconds now. So feel free to share your use more in detail, there might be other options than using this library. |
Well my main point for this change is this:
Maybe you are right, but it could still happen that a developer does that. And if it does should plugin not respect that because its a bad practice doing so? does not make sense to me.
Ok this is actually an argument to check package-lock.json. If you run
Why should plugin not handle this? Isn't this the reason of the plugin? |
Now this is what we are trying to achieve:
"start:localhost": "npm run package-changed:npm-install && npm run start",
"package-changed:npm-install": "npx --yes package-changed run \"echo \\\"\\\\033[0;32mDEPENDENCY CHANGES DETECTED running 'npm install' since package.json dependencies or package-lock.json has changed\\\\033[0m\\\" && npm install\" --lockfile",
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
red='\033[0;31m'
no_color='\033[0m'
npx --yes package-changed run "echo \"${red}WARNING run 'npm install' since package.json dependencies or package-lock.json has changed${no_color}\"" --lockfile --skip-write-hash
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yellow="\033[0;32m"
no_color='\033[0m'
npx --yes package-changed run "echo \"${yellow}DEPENDENCY CHANGES DETECTED running 'npm install' since package.json dependencies or package-lock.json has changed${no_color}\" && npm install" --lockfile |
This has been released in 1.8.0 |
Thanks for the improvements of install-changed package!
Would be nice to have a way to include package-lock.json file and package.json deps changes.
The text was updated successfully, but these errors were encountered: