Remove duplicate code and reduce GET calls#29
Open
trivikr wants to merge 12 commits intonodejs:mainfrom
Open
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Member
Author
|
The PR is ready for review. I used |
This comment was marked as outdated.
This comment was marked as outdated.
Member
Author
|
The PR is ready for review. I used |
Member
Author
|
I'm not sure why |
44892c2 to
d3a9423
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A subset of #28
Notes
Splits the code into three folders:
dist: Existing folder for GitHub Actioncache: Cached files for schedule and vulnerability listGETcalls will not be made. We can set up a GitHub action to update the cache in future.src: Source codeindex.js: Existing root file.ascii.js: existing file for colors removed.is-node-vulnerable.js: Existing file with some duplicate code removed.is-node-eol.js: Renamedeol-versions.js, but it uses the cache if JSON is not provided.store.js: Data store to be shared between different files.Testing
Before
Uses cached version for end-of-life
v16.20.2Downloads from upstream for vulnerable
v20.0.0Downloads from upstream for vulnerable
v20.18.0After
Uses cached version for end-of-life
v16.20.2Uses cached version for vulnerable
v20.0.0Uses cached version for non-vulnerable
v20.18.0