Remove since from options and languages#13699
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.
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.
Deprecated array, introduced function for non-primitive values, it will be safer (to avoid mutate).
There was a problem hiding this comment.
Shouldn't these things be JSON-serializable?
There was a problem hiding this comment.
Make sense, so I'll just put [{value: []}] back.
There was a problem hiding this comment.
Wait, we get the support info from getSupportInfo function, so it will return [], then it's serializable.
There was a problem hiding this comment.
Let's add a new defaultValue field?
There was a problem hiding this comment.
How will it be different from default?
There was a problem hiding this comment.
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.
So I can use defaultValue: [] instead of default: [{value: []}].
There was a problem hiding this comment.
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 |
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✨