fix(ci): fix release/prune which runs before make install #3412
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up of #3410
Turns out
npm query
requires yournode_modules
to be present, I've no idea why 🤷 , and we have a target that we sometimes run that needs to run before amake install
(make release/prune
) 🤦 .I saw that you can add a
npm --package-lock-file-only query
to get it to use the lock file instead of needing access tonode_modules
. This works when running from workspace root withoutnode_modules
, but when you run a Makefile from a sub project withoutnode_modules
adding this arg/flag still fails 🤷I've fallen back to just jq-ing the package-lock.json myself at least for the moment so we can unblock the release workflow. If I find a slightly nicer way to do this in the future I'll replace, but I really want to stick to the runtime resolution of things rather than hardcoding paths in several files.
How to test:
make clean
to remove all yournode_modules
foldersmake -C
to runmake release/prune
from withinpackages/kuma-gui
packages/config
has changes to package.json and package-lock.json also has changes.I 'think' this will finally unblock the release workflow 🤞
edit: I just checked a this new approach actually works better elsewhere also 🎉