-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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: update miscellaneous parts of the source to reasonably modern language alternatives, remove polyfills, improve some JSDoc comments, remove traces of IE #2114
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b621e0e:
|
</style> | ||
`).trim() | ||
); | ||
}, |
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.
…language alternatives, remove polyfills, improve some JSDoc comments, remove traces of IE BREAKING: In a minority of cases syntax updates may break apps running in very old browsers (such as Internet Explorer), or apps that build Docsify in a custom way with old build tools. To upgrade, build Docsify for older browsers in a custom way, or update existing build tools to handle newer syntax. DEPRECATED: `$docsify.themeColor` is deprecated and will be eventually removed, use a `--theme-color` CSS variable in your style sheet.
4f2eaad
to
b621e0e
Compare
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.
Those changes recently seems a little big radical, I would prefer that we may need more members review.
cc @sy-records @jhildenbiddle
If someone disapproves and prefers to remove changes like All the current features are well supported in browsers today, all tests pass, and the deployment looks good!
|
@@ -62,4 +62,3 @@ If yes, please describe the impact and migration path for existing applications: | |||
- [ ] Firefox | |||
- [ ] Safari | |||
- [ ] Edge | |||
- [ ] IE |
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.
No more! 🥳
Continues from
Part of
Summary
Updated a bunch of pieces of code to using modern patterns. Avoided refactoring, mostly changes happened inline, or were small refactorings only.
Some things that we updated:
var
->let
/const
function () {}
->() => {}
merge()
->Object.assign()
a.concat(b)
->[...a, ...b]
Object.assign({}, a, b)
->{...a, ...b}
(function() {...})()
->{...}
[].slice.call(a)
->Array.from(a)
hasOwn(a, b)
->Object.keys(a).includes(b)
for (let i = 0; i<len; i++) const item = arr[i]
->for (const item of arr)
{foo: function() {}}
->{foo() {}}
"..." + a + "..."
->`...${a}...`
Deleted
BREAKING: In a minority of cases syntax updates may break apps running in very old browsers (such as Internet Explorer), or apps that build Docsify in a custom way with old build tools. To upgrade, build Docsify for older browsers in a custom way, or update existing build tools to handle newer syntax.
DEPRECATED:
$docsify.themeColor
is deprecated and will be eventually removed, use a--theme-color
CSS variable in your style sheet.What kind of change does this PR introduce?
Code style update
Refactor
Docs
For any code change,
Does this PR introduce a breaking change? (check one)
Related issue, if any:
Simplification and modernization issue: #2104
Tested in the following browsers:
IE