-
Notifications
You must be signed in to change notification settings - Fork 60
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
Convert project to typescript #45
Conversation
@gr2m I've mostly finished this, now would be the time you come by and fix the remainder of the wrnings with your knowledge of the codebase |
see my changes at octokit/endpoint.js#47 introducing pika for building / direct import for modern browsers from https://unpkg.com/ I’ll work on typescript definitions for all endpoints, at least for the |
pika should be in another PR. Since it's not ready yet and depends on upstream to push a patch |
As you prefer 👍 I don’t mind adding the patch as I did in |
It’s been fixed upstream, you can copy the setup of endpoint.js. I also finished the generated types via octokit/endpoint.js#53, I want to add that to |
I'm going to mark this as ready for review, so that CI can run and merge conflicts appear |
@gr2m I'm going to need your help with the right types and all. Tests are all broken because of this :/ |
I’m looking into it :) |
Some of it got resolved by moving to |
No problem, that was something else I was going to do once I had things working properly
|
@wolfy1339 I think this is good to go? I’ve added a few TODOs to the pull request description, but we can make follow up issues for these and iterate |
Looks fine and dandy |
I can think of two ways to address this
The 1st option is simpler to implement and would be the same as things are today. I would not document it and continue to consider it to be usage of internal APIs which might break at any update. The 2nd option is more elegant and would have the added benefit that we would no longer need to pin I’ll see how much of an effort the 2nd option will be, if I can’t figure it out tonight I’ll go with the 1st option and make a follow up issue |
- Don't output maps for declaration files - Change output directory structure - Change output directory to `lib` - Ignore output directory
BREAKING CHANGE: `const request = require("@octokit/request")` is now `const { request } = require("@octokit/rest")` or `import { request } from "@octokit/request"`
This has lots of duplication to @octokit/endpoint types, we can handle that later
I added a TODO for the pull request
…ugin-bundle-web`
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.
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Had this lying around, and now that
@octokit/endpoint
was converted, this is the next one down the pipeTodos
Resolve as part of this PR or make follow up issues
remove duplication with types fromDRY Typescript definitions by using the applicable ones from @octokit/endpoint #54@octokit/endpoint
add browser tests back. Instead of running all tests, make separate tests which only test the basics, as jest is not compatible with CypressAdd back browser tests #55add generated types foradd generated types forrequest(route, parameters)
request(route, parameters)
#56