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(store): allow plain functions in withNgxsPlugin #2255

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

arturovt
Copy link
Member

@arturovt arturovt commented Nov 13, 2024

We allow passing a plain function into withNgxsPlugin, as the plugin can be a simple
function (not a class).

Copy link

nx-cloud bot commented Nov 13, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit e1be45b. 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.

@arturovt arturovt force-pushed the fix/allow-plugin-fn branch from e4fadcb to d3a03ae Compare November 13, 2024 16:25
Copy link

pkg-pr-new bot commented Nov 13, 2024

Open in Stackblitz

@ngxs/devtools-plugin

yarn add https://pkg.pr.new/@ngxs/[email protected]

@ngxs/hmr-plugin

yarn add https://pkg.pr.new/@ngxs/[email protected]

@ngxs/form-plugin

yarn add https://pkg.pr.new/@ngxs/[email protected]

@ngxs/router-plugin

yarn add https://pkg.pr.new/@ngxs/[email protected]

@ngxs/storage-plugin

yarn add https://pkg.pr.new/@ngxs/[email protected]

@ngxs/store

yarn add https://pkg.pr.new/@ngxs/[email protected]

@ngxs/websocket-plugin

yarn add https://pkg.pr.new/@ngxs/[email protected]

commit: e1be45b

Copy link

bundlemon bot commented Nov 13, 2024

BundleMon

Files updated (2)
Status Path Size Limits
fesm2022/ngxs-store-plugins.mjs
2.38KB (+382B +18.61%) 3KB / +0.5%
fesm2022/ngxs-store.mjs
101.14KB (+228B +0.22%) 103KB / +0.5%
Unchanged files (4)
Status Path Size Limits
fesm2022/ngxs-store-internals.mjs
11.29KB 13KB / +0.5%
fesm2022/ngxs-store-internals-testing.mjs
6.83KB 7KB / +0.5%
fesm2022/ngxs-store-operators.mjs
6.22KB 7KB / +0.5%
fesm2022/ngxs-store-experimental.mjs
1.4KB 2KB / +0.5%

Total files change +610B +0.46%

Groups updated (2)
Status Path Size Limits
@ngxs/store(esm2022)[gzip]
./esm2022/**/*.mjs
224.36KB (+824B +0.36%) +1%
@ngxs/store(fesm2022)[gzip]
./fesm2022/*.mjs
31KB (+220B +0.7%) +1%

Final result: ❌

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link

bundlemon bot commented Nov 13, 2024

BundleMon (NGXS Plugins)

Files updated (4)
Status Path Size Limits
Plugins(fesm2022)[gzip]
storage-plugin/fesm2022/ngxs-storage-plugin.m
js
4.04KB (-18B -0.43%) +0.5%
Plugins(fesm2022)[gzip]
logger-plugin/fesm2022/ngxs-logger-plugin.mjs
2.01KB (-23B -1.1%) +0.5%
Plugins(fesm2022)[gzip]
devtools-plugin/fesm2022/ngxs-devtools-plugin
.mjs
2.14KB (-28B -1.26%) +0.5%
Plugins(fesm2022)[gzip]
form-plugin/fesm2022/ngxs-form-plugin.mjs
2.45KB (-75B -2.9%) +0.5%
Unchanged files (5)
Status Path Size Limits
Plugins(fesm2022)[gzip]
router-plugin/fesm2022/ngxs-router-plugin.mjs
3.01KB +0.5%
Plugins(fesm2022)[gzip]
hmr-plugin/fesm2022/ngxs-hmr-plugin.mjs
2.61KB +0.5%
Plugins(fesm2022)[gzip]
websocket-plugin/fesm2022/ngxs-websocket-plug
in.mjs
2.57KB +0.5%
Plugins(fesm2022)[gzip]
storage-plugin/fesm2022/ngxs-storage-plugin-i
nternals.mjs
861B +0.5%
Plugins(fesm2022)[gzip]
router-plugin/fesm2022/ngxs-router-plugin-int
ernals.mjs
396B +0.5%

Total files change -144B -0.7%

Groups updated (1)
Status Path Size Limits
All Plugins(fesm2022)[gzip]
./-plugin/fesm2022/.mjs
20.06KB (-144B -0.7%) +0.5%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link

bundlemon bot commented Nov 13, 2024

BundleMon (Integration Projects)

Files updated (3)
Status Path Size Limits
Main bundles(Gzip)
hello-world-ng16/dist-integration/main.(hash)
.js
67.28KB (+69B +0.1%) +1%
Main bundles(Gzip)
hello-world-ng18/dist-integration/browser/mai
n-(hash).js
70.08KB (+63B +0.09%) +1%
Main bundles(Gzip)
hello-world-ng17/dist-integration/main.(hash)
.js
68.2KB (+49B +0.07%) +1%

Total files change +181B +0.09%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@arturovt arturovt force-pushed the fix/allow-plugin-fn branch from d3a03ae to eca4f37 Compare November 16, 2024 14:26
@arturovt arturovt marked this pull request as ready for review November 16, 2024 14:38
@arturovt arturovt force-pushed the fix/allow-plugin-fn branch from eca4f37 to cd54dc4 Compare November 17, 2024 13:39
We allow passing a plain function into `withNgxsPlugin`, as the plugin can be a simple
function (not a class).
@arturovt arturovt force-pushed the fix/allow-plugin-fn branch from cd54dc4 to e1be45b Compare November 18, 2024 19:44
Copy link

codeclimate bot commented Nov 18, 2024

Code Climate has analyzed commit e1be45b and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 4

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

This pull request will bring the total coverage in the repository to 95.3% (0.0% change).

View more on Code Climate.

@arturovt arturovt merged commit 6ec891b into master Nov 18, 2024
17 of 18 checks passed
@arturovt arturovt deleted the fix/allow-plugin-fn branch November 18, 2024 19:52
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.

1 participant