Title fix: add missing rxjs peer dependency #1790
Open
Emtiaz01 wants to merge 1 commit intomattlewis92:mainfrom
Open
Title fix: add missing rxjs peer dependency #1790Emtiaz01 wants to merge 1 commit intomattlewis92:mainfrom
Emtiaz01 wants to merge 1 commit intomattlewis92:mainfrom
Conversation
Author
|
Hi! It looks like the workflows and tests are waiting for maintainer approval. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: add missing rxjs peer dependency #1789
Summary
This PR adds rxjs to the library’s peerDependencies to properly declare it as a required runtime dependency.
The library imports and uses RxJS internally, but it was not listed in dependencies or peerDependencies, which can lead to build errors in consumer applications.
What was changed
Added "rxjs": "^7.6.0" to peerDependencies in package.json.
This version aligns with the RxJS version already used in the library’s development environment (devDependencies).
Why this change is needed
Angular libraries are expected to define RxJS as a peer dependency because:
The library uses RxJS at runtime.
TypeScript needs to resolve RxJS types during compilation.
Consumer applications must supply a compatible RxJS version.
Missing peer/dependencies violate npm package rules and may cause:
build-time errors
type resolution failures
dependency mismatch issues
How this fixes the original issue
Declaring RxJS as a peer dependency ensures:
consumers are required to install RxJS
Angular and RxJS versions stay consistent across the application
bundlers do not incorrectly include additional copies of RxJS
compilation and runtime errors related to missing RxJS are resolved
Testing
Successfully built the library after the change
Verified that TypeScript no longer reports missing RxJS when consuming the library
Confirmed that no behavior is changed — this update only corrects dependency metadata