-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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 filters for Nodejs 10 #1772
Conversation
ghost
commented
Aug 18, 2018
•
edited by ghost
Loading
edited by ghost
- Ref: release-post.js script should ignore 32-bit binaries for intel and sunos #1769
- Optimize the logic process for module.exports of download.js.
scripts/helpers/downloads.js
Outdated
if (semver.satisfies(version, '< 1.0.0')) { | ||
downloads = legacyDownloads | ||
} else if (semver.satisfies(version, '< 8.0.0')) { | ||
downloads = postMergeDownloads | ||
} else if (semver.satisfies(version, '> 10.0.0')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be >= 10.0.0
or is it unrelated cause this will never run again for 10.0.0 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So are you sure that from the ref #1769, it should be >= 10.0.0? I'm not sure. I see it says Node 10+
……?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in #1769 it seems that 10.0.0 itself is not included. But the x86 binaries are not shipped for 10.0.0 too. https://nodejs.org/dist/v10.0.0/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
scripts/helpers/downloads.js
Outdated
if (value.title === 'Linux 32-bit Binary' || | ||
value.title === 'SunOS 32-bit Binary') { | ||
// Indicate that comingSoon shouldn't be shown | ||
value.notShowComingSoon = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: wouldn't it be easier to use showComingSoon
instead of it's negation? Then below we can do
if (binary.showComingSoon) {
return `${binary.title}: *Coming soon*`
}
return binary.title
It's the same but I personally find it easier to grok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason is that we DON'T wanna show commingSoon, and only those versions >= 10.0.0 will meet the requirement. So most of downloadable items won't have this symbol (They are shown in default, ONLY with this symbol won't be shown).
If I change to yours, I'll have to add the property to the original postMergeDownloads
JSON objects and set the default value to true
. In fact there's no need doing that. Hope you understand :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you can use something like hideComingSoon
as property name then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Thanks!
And we're still considering whether there's anything better or easier way……Maybe my 1st way is the best, or am I thinking of it a bit too complicated? :D
Will this still show both lines? They should not be there at all in the end. |
@targos:What do you mean? Can you elebrate it more clear? |
It seems to me that |
@targos:If I didn't take you wrong, I think what you mean is just directly adding the filter condition to the postMergeDownloads. My 1st version is just what you think now :) (If you are interested in this, please see:https://github.com/Maledong/nodejs.org/commit/52ddf53c2755fa1ad9463fa3cd70bec5552d0602). However there's a question:In the And on the other hand, I'm NOT sure whether versions >10.0.0 also pass
IMO:If we can find the link through Correct me if I take you wrong :) |
@targos:Maybe you are right, and I'm a little bit too complicated... |
1) Ref: #1769 2) Optimize the logic process for module.exports of download.js.i
@targos:Fixed that in a better way by filtering out unmeeted things. |
Thanks. LGTM. |