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

feat(store): add support for standalone APIs in schematics #2060

Merged

Conversation

dmitry-stepanenko
Copy link
Contributor

@dmitry-stepanenko dmitry-stepanenko commented Sep 23, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Adding support for standalone APIs in schematics

With this PR ng-add will be able to add NGXS plugins both to root module as modules and to app.config as provider functions.

image
image

Please note that there's a new folder packages/store/schematics/src/utils/ng-utils. It contains files that were copied from the @schematics/[email protected] package. It contains very convenient utils that allow adding declarations both in standalone and regular Angular apps. There's no point to reinvent the bicycle and try to implement that functionality ourselves as we will be able to use them directly from @schematics/angular as we'll start to support the v17 as the minimum required version.

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@nx-cloud
Copy link

nx-cloud bot commented Sep 23, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 8762ca9. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 4 targets

Sent with 💌 from NxCloud.

@bundlemon
Copy link

bundlemon bot commented Sep 23, 2023

BundleMon (Integration Projects)

Unchanged files (1)
Status Path Size Limits
Main bundles(Gzip)
hello-world-ng15/dist-integration/main.(hash)
.js
63.35KB +1%

No change in files bundle size

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@dmitry-stepanenko dmitry-stepanenko marked this pull request as ready for review October 6, 2023 11:08
@dmitry-stepanenko dmitry-stepanenko marked this pull request as draft October 6, 2023 11:46
@dmitry-stepanenko dmitry-stepanenko marked this pull request as ready for review October 6, 2023 12:08
Copy link
Member

@markwhitfeld markwhitfeld left a comment

Choose a reason for hiding this comment

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

@dmitry-stepanenko There has been a large drop on test coverage in this PR. I think that this is a result of the code that was copied across.
Please could you either add some tests (maybe if there are some tests to copy too), or find a way to exclude these folders from the test coverage metrics.

@dmitry-stepanenko dmitry-stepanenko force-pushed the ds/schematics-standalone-support branch 2 times, most recently from f37d561 to 3612a50 Compare October 30, 2023 15:35
@dmitry-stepanenko
Copy link
Contributor Author

@markwhitfeld I've excluded the utils folder in .codeclimate.yml and it now shows a single .ts file within ratings section as expected. However, it still tries to calculate the coverage with those excluded files. Any ideas? Maybe I can try to push the change to the config in a separate PR and then recreate this one?

Copy link

codeclimate bot commented Nov 12, 2023

Code Climate has analyzed commit 8762ca9 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 72.9% (50% is the threshold).

This pull request will bring the total coverage in the repository to 94.9% (-0.5% change).

View more on Code Climate.

@markwhitfeld markwhitfeld merged commit 22a8ab1 into ngxs:master Nov 13, 2023
12 checks passed
@markwhitfeld markwhitfeld added this to the v.18.0.0 milestone Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants