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(di): new instance resolver #1909

Merged
merged 3 commits into from
Feb 23, 2024
Merged

fix(di): new instance resolver #1909

merged 3 commits into from
Feb 23, 2024

Conversation

bigopon
Copy link
Member

@bigopon bigopon commented Feb 23, 2024

📖 Description

Currently the new client resolvers newInstanceOf/newInstanceForScope are automatically causing a resolver registered whenever they are used on a container with an unregister key. This will cause surprise when child container (from child ce for example) tries to inject the same key, as the actual resolver of the newInstanceForScope will be the 2nd resolver registered. Also resolve an issue with newInstanceOf + IHttpClient.

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.38%. Comparing base (3c74be9) to head (409ce93).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1909      +/-   ##
==========================================
+ Coverage   88.37%   88.38%   +0.01%     
==========================================
  Files         260      260              
  Lines       22856    22853       -3     
  Branches     5299     5296       -3     
==========================================
  Hits        20198    20198              
+ Misses       2658     2655       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bigopon bigopon merged commit efe208c into master Feb 23, 2024
28 checks passed
@bigopon bigopon deleted the fix/fetch-client-resolver branch February 23, 2024 11:53
AureliaEffect pushed a commit that referenced this pull request Mar 2, 2024
2.0.0-beta.12 (2024-03-02)

**BREAKING CHANGE:**

* **enhance:** call app tasks with `.enhance` API, return app root instead of controller (#1916) ([4d522b2](4d522b2))
* **au-compose:** always create host for non custom element composition (#1906) ([8a28e0a](8a28e0a))

**Features:**

* **au-compose:** ability to compose string as element name (#1913) ([06aa113](06aa113))

**Bug Fixes:**

* **router:** prevent multiple navigation at the same time (#1895) ([deed11e](deed11e))
* **router:** properly handle false in conditional router hooks (#1900) ([a671463](a671463))
* **di:** dont jit register resources ([8ffde34](8ffde34))
* **di:** new instance resolver (#1909) ([efe208c](efe208c))
* **runtime:** tweak typings of injectable token ([89f76eb](89f76eb))

**Refactorings:**

* **runtime:** delay overriding array prototypes (#1914) ([d8be144](d8be144))
* **router:** use resolve ([89f76eb](89f76eb))
* **runtime:** better type inferrence for injectable token ([89f76eb](89f76eb))
* **di:** simplify container has, cleanup router ([89f76eb](89f76eb))

**Docs:**

* **docs:** add JS examples using resolve for IHttpClient (#1907) ([d57c1f1](d57c1f1))
* **doc:** remove define hook from documentation (#1903) ([f684141](f684141))
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.

None yet

1 participant