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): select,selectOnce,selectSnapshot should only accept typed selector #2116

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

arturovt
Copy link
Member

This commit modifies the signatures of select, selectOnce, and selectSnapshot to exclusively accept typed selectors. They should not permit acceptance of anything lacking type information, such as state classes (select(MyState)), strings, or anonymous functions. Only state tokens and selectors are now allowed.

This adjustment also impacts the router plugin, as it previously used RouterState for selecting snapshots, which is no longer allowed. Consequently, we introduced ROUTER_STATE_TOKEN as the replacement for selections involving RouterState.

Copy link

nx-cloud bot commented Mar 16, 2024

☁️ Nx Cloud Report

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

…ed selector

This commit modifies the signatures of `select`, `selectOnce`, and `selectSnapshot` to
exclusively accept typed selectors. They should not permit acceptance of anything lacking
type information, such as state classes (`select(MyState)`), strings, or anonymous functions.
Only state tokens and selectors are now allowed.

This adjustment also impacts the router plugin, as it previously used `RouterState` for selecting
snapshots, which is no longer allowed. Consequently, we introduced `ROUTER_STATE_TOKEN` as the
replacement for selections involving `RouterState`.
Copy link

codeclimate bot commented Mar 16, 2024

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

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 95.4% (0.0% change).

View more on Code Climate.

Copy link

bundlemon bot commented Mar 16, 2024

BundleMon (Integration Projects)

Files updated (2)
Status Path Size Limits
Main bundles(Gzip)
hello-world-ng17/dist-integration/main.(hash)
.js
68.49KB (+15B +0.02%) +1%
Main bundles(Gzip)
hello-world-ng16/dist-integration/main.(hash)
.js
66.99KB (+11B +0.02%) +1%

Total files change +26B +0.02%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@arturovt arturovt marked this pull request as ready for review March 16, 2024 20:10
@arturovt arturovt merged commit c3e578d into master Mar 16, 2024
12 checks passed
@arturovt arturovt deleted the fix/typed-selector branch March 16, 2024 20:10
@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