-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Build] Update tsconfig to explicitly set target
and module
options
#7845
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7845 +/- ##
==========================================
- Coverage 59.13% 58.80% -0.34%
==========================================
Files 675 675
Lines 27284 27284
Branches 2671 2671
==========================================
- Hits 16135 16044 -91
- Misses 11102 11192 +90
- Partials 47 48 +1
see 10 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
target
and module
options
target
and module
optionstarget
and module
options
- the `exclude` option only excludes files in the context of the `include` paths, if there are any. We can remove some of these because they don't match anything in the include paths.
Addresses: VIPEROMCT-547
Describe your changes:
This solves 2 separate issues specifically when building
openmct
as a submodule from the root dir (usingnpm install --prefix openmct
):tsc
by default targets ES5, which doesn't support the#private
syntax.module
setting by default is CommonJS if we're using ES5 which, since it's not specified, the target option defaults to.Then something about the consuming project not having its own
tsconfig.json
causes even more build inconsistency and weirdness, becausetsc
has to infer which options to use based on the calling environment.So if the consuming project (as a submodule, because this works with regular npm package resolution since its already built) has no
tsconfig.json
specified, and is usingopenmct
as a submodule, AND is buildingopenmct
usingnpm install --prefix
, the build will fail without these changes.TL;DR:
Even if we're not generating JavaScript, we should still set these options to enforce consistency in type resolution across the different ways to consume and build Open MCT.
All Submissions:
Author Checklist
type:
label? Note: this is not necessarily the same as the original issue.Reviewer Checklist