Skip to content
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

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

vscaiceanu-1a
Copy link
Member

@vscaiceanu-1a vscaiceanu-1a commented Jan 23, 2025

@vscaiceanu-1a vscaiceanu-1a requested a review from a team as a code owner January 23, 2025 14:11
Copy link

nx-cloud bot commented Jan 23, 2025

View your CI Pipeline Execution ↗ for commit cabfaae.

Command Status Duration Result
nx run-many --target=test-int ✅ Succeeded 31m 20s View ↗
nx run-many --target=build --projects=eslint-pl... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-28 22:45:12 UTC

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.32%. Comparing base (beda44b) to head (cabfaae).
Report is 7 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vscaiceanu-1a vscaiceanu-1a force-pushed the fix/add-lib-scripts branch 2 times, most recently from a526289 to 218ffa6 Compare January 23, 2025 15:55
const tsConfig = ts.parseConfigFileTextToJson('/tsconfig.json', tree.readText('/tsconfig.json')).config;
if (tsConfig.compilerOptions?.noPropertyAccessFromIndexSignature) {
delete tsConfig.compilerOptions.noPropertyAccessFromIndexSignature;
const tsConfigPath = '/tsconfig.json';
Copy link
Contributor

@kpanot kpanot Jan 23, 2025

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:

Suggested change
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?

Copy link
Member Author

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

Copy link
Member Author

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

Copy link
Member Author

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

@vscaiceanu-1a vscaiceanu-1a force-pushed the fix/add-lib-scripts branch 4 times, most recently from 6e65a76 to 68c5780 Compare January 28, 2025 15:54
if (tree.exists(tsConfigPath)) {
const tsConfig = ts.parseConfigFileTextToJson(tsConfigPath, tree.readText(tsConfigPath)).config as TsConfigJson;
if (tsConfig.compilerOptions) {
if (tsConfig.compilerOptions.noPropertyAccessFromIndexSignature) {
Copy link
Contributor

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?

Copy link
Member Author

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.

@vscaiceanu-1a vscaiceanu-1a added this pull request to the merge queue Jan 29, 2025
Merged via the queue into main with commit fe2bf4c Jan 29, 2025
35 of 37 checks passed
@vscaiceanu-1a vscaiceanu-1a deleted the fix/add-lib-scripts branch January 29, 2025 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants