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

Feature/upgrade to angular 19 #2395

Conversation

laurentgrangier
Copy link
Contributor

@laurentgrangier laurentgrangier commented Nov 26, 2024

Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit 24f92a9
🔍 Latest deploy log https://app.netlify.com/sites/jsonforms-examples/deploys/674db24964b06200087f3278
😎 Deploy Preview https://deploy-preview-2395--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@lucas-koehler lucas-koehler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @laurentgrangier , thanks for this PR ❤️
Many of the changes already look quite good. There are some minor comments inline.

One bigger issue seems to be the coverage reporting for the angular-material package. Executing pnpm run test-cov in the angular-material package no longer creates an lcov.info file. This is needed for coverage reports in PRs. You can see the expected result by executing tests on the main branch. For the angular package this still works.
My assumption is that there was some config in the deleted test-runner.js that configured this. Please have a look.

packages/angular-material/angular.json Show resolved Hide resolved
Comment on lines 39 to 52
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "example:build:production"
},
"development": {
"buildTarget": "example:build:development"
}
},
"defaultConfiguration": "development"
}
}
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this section. The used build targets example:build:production and example:build:development do not exist in our package.json. Instead, the dev script builds the example app and serves it via http-server.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I just copied them from the default generate file from Angular. I removed them.

@@ -0,0 +1,87 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In our mono-repo, the file is actually located in the root node_modules folder. Thus, I suggest adapting this like the following. With this change, autocompletion worked for me in vscode when opening the full jsonforms repo.

Suggested change
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"$schema": "../../node_modules/@angular/cli/lib/config/schema.json",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

packages/angular-material/package.json Show resolved Hide resolved
@laurentgrangier
Copy link
Contributor Author

laurentgrangier commented Dec 2, 2024

Hi @laurentgrangier , thanks for this PR ❤️ Many of the changes already look quite good. There are some minor comments inline.

One bigger issue seems to be the coverage reporting for the angular-material package. Executing pnpm run test-cov in the angular-material package no longer creates an lcov.info file. This is needed for coverage reports in PRs. You can see the expected result by executing tests on the main branch. For the angular package this still works. My assumption is that there was some config in the deleted test-runner.js that configured this. Please have a look.

@lucas-koehler The karma.config.js was missing in angular.json. Adding it properly should fix the missing lcov file. Can you please check? I'm not sure where I should see them in the build.

Copy link
Contributor

@lucas-koehler lucas-koehler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @laurentgrangier ,
thanks for the updates. This LGTM now. Thanks for all your work ❤️

I tested this locally with Angular 18 and 19 in the angular seed. Both worked fine :)

Regarding the code coverage: Executing the tests locally I could see that the code coverage files are now generated at expected location packages/angular-material/coverage/lcov.info.
Apparently, there is another issue with the coverage report not being displayed in the PR as this is also the case for another, independent PR. Thus, nothing additional needs to be done here.

Note that I will close this PR and open a followup one because we generally do not accept re-generated lock file contributions from third party contributors for security reasons. I could not push a re-generated one on your branch as this is disabled in your fork's settings. Thus, I'll push this to a branch here and open a new PR from there.

@lucas-koehler
Copy link
Contributor

Superseded by #2403 . Thanks again @laurentgrangier for this great PR :)

@laurentgrangier
Copy link
Contributor Author

Thank you for the review and the new PR. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants