Comments (7)
I have opened #7419 to fix the entrypoints at least, though i still think that is the wrong way around until we move to being esm-first ("type": "module"
). so i have left it as a draft for now until i get feedback here on direction
from rxjs.
This is expected; our esm output is currently not a spec compliant esm and to support tree shaking only for bundlers. There is ongoing effort to make these output into real esm in a major / breaking changes. Before then if node.js resolves to current esm it'll fail to load (since it's not a real esm). Please search existing issues for details / history.
from rxjs.
Do the current issues take the nodenext problems into account? Any references would be helpful as I didn't find any pointing that out so far.
There are two problems here:
- the map always resolves to cjs
- nodenext resolution will fail even if you fix this
So if you can point me at the "ongoing efforts", I'll write that problem up in the same tracking issue, and will be happy to help those efforts
from rxjs.
Ongoing effort -> the plan we turn our esm into spec complaint esm eventually. If you search esm in gh issues there are discussions / histories..
So yes, map always resolves to cjs
is problem. It is coming from we are yet to support spec complaint esm. It is known.
from rxjs.
Problem one of two, yes. If you can point me at the right issue for tracking this overall, I can explain the nodenext issues there instead. Otherwise I can open a separate issue only for the nodenext problem.
Even when you fix these mappings, it will fail in typescript because of the problems I mentioned in the original post. Specifically you will need to ship two sets of types if you insist on a dual package still.
Where would you rather that discussion/issue live? It is not the same as fixing this export map
from rxjs.
If you're referring this
when using nodenext resolution in typescript, the above map will be considered an error ("masquerading" modules). this is because CJS and ESM entrypoints shouldn't have the same type definitions.
It is also known. We are aware of those recommendation from https://arethetypeswrong.github.io/ as well, and the way we accept for now is pretty much similar to https://blog.isquaredsoftware.com/2023/08/esm-modernization-lessons/#typescript-declarations.
This may need to be fixed one day, but it's not an immediate priority.
I'm going to close this issue for now; there's a couple of spec compliant esm support tracking issue. Please feel free to append into existing comment. For me both belongs to esm support umbrella issue.
from rxjs.
Yes exactly that, it does need fixing once the exports map and file extensions have also been fixed.
I was hoping you had one umbrella issue for this stuff but maybe not. I'll have another dig around unless you can point me at the issue for tracking esm support. No worries if you don't know off the top of your head.
I'll write up this stuff into the right one when I find it. I'm here offering to help whatever these ongoing efforts are.
from rxjs.
Related Issues (20)
- '.now()' is not a function error is thrown when the value of DateTimestampProvider.delegate is not valid HOT 1
- TestScheduler expectObservable not respecting subscription marbles when using toEqual
- pipe expected 0 arguments HOT 5
- Incorrect @deprecated for fromEvent overloads HOT 2
- test issue
- test issue
- rxjs.dev very often inaccessible HOT 10
- RxJs ships generators instead of native async/await HOT 1
- bindCallback: resultSelector destructuring callback argument if it's array HOT 1
- `every` operator sending multiple values when re-entrant HOT 1
- [email protected] has peer deps?! Oops
- ObservableInput<T> should support Thennable<T>, not PromiseLike<T> HOT 1
- Delay, timer and possibly other operators have a maximum milliseconds value, even when date is passsed HOT 1
- lost stacktrace after promise is resolved HOT 1
- Teardown and error/complete messages are out of order HOT 2
- Issue with catchError HOT 1
- Synchronous emit to `switchMap` during the processing of previous emit prevents the first from unsubscribing HOT 4
- False positive in deprecation with mergMap HOT 1
- it's possible to return an array in catchError() HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxjs.