-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: backport fork changes to upstream #7
Conversation
Nice one thanks @jlp-craigmorten for the re-contribution back! The changes all look great, however, when running this locally as a test, I noticed that the package-lockfile.json is stripping the Do you have any ideas on this? |
Hey hey @asos-danielc!
It appears this might already be a behaviour in Snyker, see the Unfortunately this repo doesn't have the commit history (not sure if the internal repo does, or if it is now lost forever on an old and deleted asos-craigmorten repo...), so hard to recall exactly what this is for beyond the comment in the code. Vaguely recall the intent being that all sha1 hashes should be forced to update to sha256 hashes, but from your screenshot it looks like it's just binning it off completely... I believe the intended behaviour was:
It seems that step (3) isn't happening for you... but that is very potentially a separate issue unless it relates to this change in how we now require the latest npm version etc. (and it worked on older npm versions). Issues such as npm/cli#4263 indicate there might be an edge-case that I missed when this shaPatch logic was put in originally where integrity hashes aren't added back if you install from cache... perhaps worth trying a |
Interesting... so with your projects and testing, are you seeing the integrity property there still. I have followed your steps and getting the same result (integrity removed) |
@jlp-craigmorten, looking to progress this and will add a follow up PR to add a flag to disable the integrity removal. However its worth noting that this yarn and npm installs result in a warning or error (yarn and npm respectively) due to a dependency mismatch... which has been resolved with eslint-plugin-import https://github.com/import-js/eslint-plugin-import/releases/tag/v2.31.0 Have an issue with the snyk key needing updating which I am looking at too. |
Issue
Fixes #5
Relates to #6
Details
This cherry picks amended commits from the https://github.com/jlp-craigmorten/snyker fork of this repo to contribute changes back, namely:
(as included in the changelog)
This change squashes some patches I have on my fork into a single change against a new v5 version (hence why this change has
5.0.0
whereas my fork is currently at5.0.3
). Open to suggestion on whether you want to keep the version bump out of this change so you can implement yourselves, or change it as you better suited if disagree with the major.Given the change in Node and NPM version it feels sensible to insist on this being a breaking change.
Also feel free to ignore or edit this change and/or recreate with the pieces you like.