-
Notifications
You must be signed in to change notification settings - Fork 39
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
fix: build builder and schematics for o3r lib #2727
Conversation
View your CI Pipeline Execution ↗ for commit cabfaae.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files☔ View full report in Codecov by Sentry. |
a526289
to
218ffa6
Compare
packages/@o3r/core/schematics/ng-add-create/templates/schematics/ng-add/index.ts.template
Outdated
Show resolved
Hide resolved
const tsConfig = ts.parseConfigFileTextToJson('/tsconfig.json', tree.readText('/tsconfig.json')).config; | ||
if (tsConfig.compilerOptions?.noPropertyAccessFromIndexSignature) { | ||
delete tsConfig.compilerOptions.noPropertyAccessFromIndexSignature; | ||
const tsConfigPath = '/tsconfig.json'; |
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.
should not be instead something like:
const tsConfigPath = '/tsconfig.json'; | |
const tsConfigPath =['/tsconfig.lib.json', '/tsconfig.app.json', '/tsconfig.json'].filter((file) => tree.exists(file)); |
and run on all the file found?
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 is only about the root tsconfig
file so there won't be app/lib ones
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.
waiting for #2648 to be merged and to adapt this PR
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.
as discussed offline, we would want to target the root tsconfig.json
6e65a76
to
68c5780
Compare
if (tree.exists(tsConfigPath)) { | ||
const tsConfig = ts.parseConfigFileTextToJson(tsConfigPath, tree.readText(tsConfigPath)).config as TsConfigJson; | ||
if (tsConfig.compilerOptions) { | ||
if (tsConfig.compilerOptions.noPropertyAccessFromIndexSignature) { |
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.
Why do we need to update their tsconfig?
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.
Because this is where the compilerOptions
that are incompatible with our project are generated.
To avoid any confusion it is best to update them at the root rather than to add them in the tsconfig.build.json
which is expanding the root one.
In this particular case, we are removing noPropertyAccessFromIndexSignature
because of some lint issues.
68c5780
to
5bb56db
Compare
5bb56db
to
cabfaae
Compare
Proposed change
Related issues