Conversation
|
Thanks for the pull request, @dcoa! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #868 +/- ##
=======================================
Coverage 87.13% 87.14%
=======================================
Files 48 48
Lines 1407 1408 +1
Branches 297 297
=======================================
+ Hits 1226 1227 +1
Misses 168 168
Partials 13 13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
arbrandes
left a comment
There was a problem hiding this comment.
I don't love the eslint disables, but not a big deal. We can live with them for now. Aside from the inline comment, I have no objections in principle!
tsconfig.json
Outdated
| "rootDir": ".", | ||
| "outDir": "dist" | ||
| }, | ||
| "include": ["src/**/*", "example/**/*", "__mocks__/**/*", ".*.js", "*.js", "*.jsx"], |
There was a problem hiding this comment.
Shoulldn't we add *.ts and *.tsx here?
|
Thanks for making this change, @dcoa :) Can you also convert one of the existing files (something simple) to Also, I think that these types won't get used unless we build a |
|
Thank you @bradenmacdonald @arbrandes for your review. I made the changes and use Let me know if there is something else that I need to address :) |
arbrandes
left a comment
There was a problem hiding this comment.
Just one last thing, if you don't mind!
| ./node_modules/.bin/fedx-scripts babel src --out-dir dist --source-maps --extensions '.js,.jsx,.ts,.tsx' --ignore **/*.test.jsx,**/*.test.js,**/*.test.tsx,**/*.test.ts,**/setupTest.js,**/*.d.ts --copy-files | ||
| @# --copy-files will bring in everything else that wasn't processed by babel. Remove what we don't want. | ||
| @find dist -name '*.test.js*' -delete | ||
| @find dist -name '*.test.ts*' -delete |
There was a problem hiding this comment.
I think we don't want to ship global.d.ts, either: this is just needed at build time. Mind adding a line here to remove it?
There was a problem hiding this comment.
I addressed this, please have a look.
There was a problem hiding this comment.
Wait, we don't want to remove all type files, just global.d.ts, which is only meant to be used during the build.
There was a problem hiding this comment.
I just leave it like that because it will remove any type file that babel copy for the bundle creation, but the dist folder will have the types for the library definition that is happening after with tsc command. Just want to double check the assumption.
Description:
The current PR extends the Babel configuration to support
.tsduring code transpilation.What was changed:
--extensions '.js,.jsx,.ts,.tsx'to the build command so Babel processes TS files.test.tsfiles in dist (alongside the existing.test.jscleanup)tsconfig.jsonextending@edx/typescript-configfor run test in tsWhat the PR does not do:
Merge checklist:
frontend-platform. This can be done by runningnpm startand opening http://local.openedx.io:8080.module.config.jsfile infrontend-build.fix,feat) and is appropriate for your code change. Consider whether your code is a breaking change, and modify your commit accordingly.Post merge: