Monorepo and Splitting Out To Different Packages
Open
Nobody has claimed this yet.
8.x
AGENDA ITEM
- Dominant language
- TypeScript
- Stars
- 31.7k
- Forks
- 3k
- PR merge metrics
- No merged PRs in 30d
Description
Goals
- We've wanted to move to a monorepo for quite some time. This is so we can move the docs app out of the project for core components, and possible move things into our monorepo to ensure compatability — for example chrome tools or the eslint plugin.
- We've discussed many times splitting
Observableoff to be a standalone package. - We may want to consider splitting
rxjs/testing,rxjs/ajax, etc, off into their own packages as well. - We want to do this in the slowest, most easy to migrate to way possible.
Monorepo and multiple packages
- I think we should try to button up new feature work and the like for version 7 (which we are very close to doing, if we're not done already) and move to work on version 8 in earnest.
- In version 8, we'll keep the same exports (with regards to
rxjs,rxjs/operators,rxjs/ajax, et al) but split all of those off into their own packages under@rxjs/observable,@rxjs/operators,@rxjs/ajax, etc. We'll want to bikeshed ideas like@rxjs/subjectsor@rxjs/multicastingetc. There's a lot of ground to cover there, and I don't want to get bogged down on that in this discussion. - In version 8 we're going to reexport from the new packages. For example,
rxjswillexport { Observable } from '@rxjs/observable';etc.
Standalone Observable
- Moving away from
lift: If we want a standaloneObservable, we should move away from lift, because it requires too much knowledge of the inner working of RxJS in order to create custom operators that leverage it properly. - We can start supporting Observable that doesn't have
liftas a non-breaking change anytime. This is completely contained within ouroperateutility function now. We may even start supporting this in v7, as it should be completely innocuous. It's just a different call pattern. I actually have some work done around this, and everything looks solid. - I think we're going to need to leave
pipeon our standalone observable package, as it's central to our particular design for how to use RxJS. Even thoughpipemight not be immediately useful to users ofObservablethat don't care about operators. (libraries that exportObservable, etc).
Long Term:
- We wouldn't want to force people to move over to
@rxjs/observableet al until version 9. That should be a long ways off. - Operator creation needs to be consumerized. We have our out internal way of creating operators, and we need to come up with a way of making that consumable and understandable to the masses. It has some advantages, like properly unsubscribing from firehose inner observables. (Currently it's impossible to do this properly with plan observer implementations) (A token/signal approach would help this)
- Considerations around using abort signals, etc.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or concrete entry points. Start by mapping the current package and export layout against the proposed v8 re-exports for Observable, operators, ajax, and testing; done means an agreed migration design rather than a single code edit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100