-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
refactor: Convert to TypeScript #1816
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
4ac66f4 to
15421df
Compare
67314d7 to
24f1b92
Compare
|
Exciting stuff @fb55! Great work 🎉 |
| "esModuleInterop": true | ||
| } | ||
| /* Basic Options */ | ||
| "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, |
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.
@fb55 sorry for the CC on an old PR, but I didn't want to make a new issue just for this. Is there any reason you didn't go with ES2017 or whatever is equivalent for Node.js 10, which is the oldest supported Node.js version?
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.
Ah, NVM I see now that the package.json engines is set to >=6. On CI Node.js >= 10 is tested hence why I thought this could be improved. IMHO, these two should be in sync, especially since Node.js 6 is ancient...
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.
Jest doesn't support Node 6, which is why Node 6 isn't part of the CI anymore.
I am still a bit hesitant to bump the Node version, primarily due to the discussion in #1585. But the mismatch between CI and package.json seems like a good reason to make the cut.
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.
Ah, now I remember, thanks for the info.
So, yeah, not sure what the proper semver way would be. Perhaps release v1.0.0 final with the current engines, and then cut a new v2.0.0 with the bump in engines and tsconfig.
Initial big lift to convert the codebase, broken into three commits to make the bigger changes obvious. Everything seems to work now, including detection if users pass selectors (
$('<div>')will product aCheerio<Node>type,$('.foo')aCheerio<Element>).Currently missing:
typedocto generate our documentation. Produced docs still have to be improved:ts-node.