-
-
Notifications
You must be signed in to change notification settings - Fork 236
chore: Prepare to use TypeScript natively #2910
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
da498c2 to
b90e8fa
Compare
1d8386e to
40f67ab
Compare
|
@andreiborza this is now ready to review. Had some issues with the |
szokeasaurusrex
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.
Added some comments, mostly containing some noob JS questions.
My one concern is: several of the changes here look like they might break the public JS API; am I understanding that correctly?
If you run |
andreiborza
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.
Very nice!
9815a2d to
46189d1
Compare
| "postinstall": "node ./scripts/install.js", | ||
| "postinstall": "npm run install-cli", | ||
| "build": "tsc", | ||
| "postbuild": "npm run install-cli", |
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.
Bug: NPM Postbuild Re-downloads Binary After Compile
The postbuild hook running npm run install-cli causes the CLI binary download script to execute after every TypeScript compilation. This creates unnecessary overhead during development since rebuilding TypeScript source doesn't require re-downloading or re-verifying the binary, and could fail in offline environments or slow down builds significantly with network latency.
46189d1 to
587c934
Compare
szokeasaurusrex
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.
I'll wait for @andreiborza to approve this, then I can provide a stamp (I think my approval is needed for some of the changes based on the code owner config)
|
@szokeasaurusrex approved :) |
szokeasaurusrex
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.
noice
587c934 to
be48e79
Compare
Description
This PR is a starting point of upgrading to TypeScript and preparing for future upgrades around testing and maintenance.
I've seen that couple of types between the
*.jsfiles and theindex.d.tswere not 100% in sync, which is one of the reasons the move to TypeScript natively could help here.What's new / changed
jstolibin order to keepjsas the same output folder which is delivered to NPMjs/index.d.tsstays as type export for NPM and the types are re-exported via the jsdoc@typedeftypes.tsis actually the same as the previousindex.d.tsexcluding theSentryCliclassindex.d.ts