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

chore: migrate to nx #1992

Merged
merged 2 commits into from
Apr 14, 2023
Merged

Conversation

dmitry-stepanenko
Copy link
Contributor

Migrating the workspace to nx:

  • each of the packages can now be run independently using `nx run packagename:{test|build|lint}
  • packages will continue to use angular builder of version 12 instead of nx executor. This provides an ability to use latest nx with fixed version of angular
  • computation caching is enabled (TODO: nx-cloud key should be authorized)
  • dependsOn is configured, so that projects are built in the right order (e.g. store will be built before plugins, integration app will require all packages to be build beforehand)
  • CI has been updated

@bundlemon
Copy link

bundlemon bot commented Apr 4, 2023

BundleMon

Files updated (1)
Status Path Size Limits
fesm2015/ngxs-store.js
93.71KB (-383B -0.4%) 125KB / +0.5%
Unchanged files (2)
Status Path Size Limits
fesm2015/ngxs-store-operators.js
6.23KB 15KB / +0.5%
fesm2015/ngxs-store-internals.js
4.22KB 20KB / +0.5%

Total files change -383B -0.36%

Groups updated (3)
Status Path Size Limits
@ngxs/store(umd)[gzip]
./bundles/*.umd.js
36.48KB (-92B -0.25%) +1%
@ngxs/store(fesm2015)[gzip]
./fesm2015/*.js
24.93KB (-114B -0.44%) +1%
@ngxs/store(esm2015)[gzip]
./esm2015/**/*.js
180.52KB (-468B -0.25%) +1%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@bundlemon
Copy link

bundlemon bot commented Apr 4, 2023

BundleMon (NGXS Plugins)

Unchanged files (14)
Status Path Size Limits
Plugins(umd)[gzip]
storage-plugin/bundles/ngxs-storage-plugin.um
d.js
7.96KB +1%
Plugins(umd)[gzip]
router-plugin/bundles/ngxs-router-plugin.umd.
js
7.41KB +1%
Plugins(umd)[gzip]
websocket-plugin/bundles/ngxs-websocket-plugi
n.umd.js
6.92KB +1%
Plugins(umd)[gzip]
hmr-plugin/bundles/ngxs-hmr-plugin.umd.js
6.89KB +1%
Plugins(fesm2015)[gzip]
storage-plugin/fesm2015/ngxs-storage-plugin.j
s
3.64KB +1%
Plugins(umd)[gzip]
form-plugin/bundles/ngxs-form-plugin.umd.js
3.44KB +1%
Plugins(fesm2015)[gzip]
router-plugin/fesm2015/ngxs-router-plugin.js
3.09KB +1%
Plugins(umd)[gzip]
devtools-plugin/bundles/ngxs-devtools-plugin.
umd.js
2.75KB +1%
Plugins(fesm2015)[gzip]
form-plugin/fesm2015/ngxs-form-plugin.js
2.67KB +1%
Plugins(fesm2015)[gzip]
hmr-plugin/fesm2015/ngxs-hmr-plugin.js
2.65KB +1%
Plugins(fesm2015)[gzip]
websocket-plugin/fesm2015/ngxs-websocket-plug
in.js
2.59KB +1%
Plugins(umd)[gzip]
logger-plugin/bundles/ngxs-logger-plugin.umd.
js
2.53KB +1%
Plugins(fesm2015)[gzip]
devtools-plugin/fesm2015/ngxs-devtools-plugin
.js
2.17KB +1%
Plugins(fesm2015)[gzip]
logger-plugin/fesm2015/ngxs-logger-plugin.js
2.01KB +1%

No change in files bundle size

Unchanged groups (3)
Status Path Size Limits
All Plugins(esm2015)[gzip]
./-plugin/esm2015/**/.js
108.71KB +1%
All Plugins(umd)[gzip]
./-plugin/bundles/.umd.js
37.91KB +1%
All Plugins(fesm2015)[gzip]
./-plugin/fesm2015/.js
18.82KB +1%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@bundlemon
Copy link

bundlemon bot commented Apr 4, 2023

BundleMon (Integration Projects)

Unchanged files (3)
Status Path Size Limits
Main bundles(Gzip)
hello-world-ng13-ivy/dist-integration/main.(h
ash).js
69.75KB +1%
Main bundles(Gzip)
hello-world-ng12-ivy/dist-integration/main.(h
ash).js
67.91KB +1%
Main bundles(Gzip)
hello-world-ng14-ivy/dist-integration/main.(h
ash).js
64.82KB +1%

Total files change -1B 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@dmitry-stepanenko dmitry-stepanenko force-pushed the ds/migrate-to-nx branch 5 times, most recently from a870d35 to 7784432 Compare April 5, 2023 16:24
@codeclimate
Copy link

codeclimate bot commented Apr 5, 2023

Code Climate has analyzed commit 0bb802a and detected 8 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 8

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

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

View more on Code Climate.

@markwhitfeld
Copy link
Member

Oooooh. Fantastic!!!!!!
Looking forward to this PR being ready!

@markwhitfeld
Copy link
Member

@dmitry-stepanenko with this PR being in draft, what is outstanding before it is ready for review?

@dmitry-stepanenko
Copy link
Contributor Author

dmitry-stepanenko commented Apr 6, 2023

@markwhitfeld I guess it can be reviewed at this point. One thing I could not verify is unit test reports: after migration to nx each package has own report, all of those reports are now being merged before uploading, I was able to verify codeclimate binary creates merged report file, but it's also needed to ensure it is correct in their system after uploading.

Also please claim the ownership of the generated Nx Cloud key from nx.json.

package.json Show resolved Hide resolved
build/angular-12/index.ts Show resolved Hide resolved
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.

Fantastic work! Thank you so much!!!!

@markwhitfeld
Copy link
Member

markwhitfeld commented Apr 14, 2023

Ok, I have claimed the NX token.
I am just trying to validate that the coverage has gone through to CodeClimate at the moment.
It is not obvious from their UI.
UPDATE: Ok, the coverage is uploading correctly!

@markwhitfeld markwhitfeld merged commit fc39b56 into ngxs:master Apr 14, 2023
@dmitry-stepanenko
Copy link
Contributor Author

Ok, I have claimed the NX token. I am just trying to validate that the coverage has gone through to CodeClimate at the moment. It is not obvious from their UI. UPDATE: Ok, the coverage is uploading correctly!

Awesome! Thanks for merging 🙂

@markwhitfeld markwhitfeld added this to the v3.8.1 milestone May 17, 2023
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.

None yet

2 participants