chore: Prepare to use TypeScript natively#2910
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.
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 |
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.
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.
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 :) |
587c934 to
be48e79
Compare
This script is actually not needed for our testing purpose. This was initially in #2910 added, since we call `--ignore-scripts` before, which doesn't call the `postinstall` script (so it was mainly added to keep the same functionality as before). This line actually also caused issues for our release process - that should be fixed now
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