-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Remove since from options and languages
#13699
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
Conversation
|
I can imagine how |
|
It can be useful, but if we do #9879 (comment), we won't need that. Even if we want run multiple version in on page, we can still hardcode there. |
|
I forgot that every version can tell us itself what it supports. So let's proceed. |
|
Added old values to playground, so old link won't be broken 1ba50c7 |
| if (Array.isArray(option.default)) { | ||
| option.default = | ||
| option.default.length === 1 | ||
| ? option.default[0].value | ||
| : option.default | ||
| .filter(filterSince) | ||
| .sort((info1, info2) => | ||
| semverCompare(info2.since, info1.since) | ||
| )[0].value; | ||
| } |
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.
Maybe I should keep this array thing, otherwise it will be a breaking change, plugin may use array as default value.
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.
Deprecated array, introduced function for non-primitive values, it will be safer (to avoid mutate).
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.
Shouldn't these things be JSON-serializable?
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.
Make sense, so I'll just put [{value: []}] back.
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.
Wait, we get the support info from getSupportInfo function, so it will return [], then it's serializable.
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.
Let's add a new defaultValue field?
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.
How will it be different from default?
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.
When they are array, defaultValue use the value directly, default use default[0].value, so we don't need ask plugin to update.
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 I can use defaultValue: [] instead of default: [{value: []}].
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.
Forget it, switched back to default: [{value: []}]
|
Also this logic was used to hide unreleased things on the playground. |
I know that, but why? Only PR's playground will show unreleased, it should be shown, let people play with it. |
|
And we already use prettier/website/static/worker.js Line 82 in 14c58aa
|
Doesn't this PR remove support for |
|
|
|
I mean we already show unreleased before this PR, so
We are not using. |
|
Don't overthink this, nobody is using it, even I thought |
sosukesuzuki
left a comment
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.
Good catch
Description
Since v2.0.0, we removed
versionoption fromgetSupportInfo#7620,sincebecame useless, let's remove it.Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨