Non-deterministic typescript definitions
See original GitHub issueSometimes when tsup
recompiles it generates a valid, but different version of the .d.ts
file.
You can see an example diff here: https://gist.github.com/vpontis/bc4ae5c8f8ef6ba87026952dd21e5c6c
These two .d.ts
files are semantically equivalent but git
thinks they are different because the content in the file is getting reorganized.
Is this a known issue somewhere in the tsup
pipeline? Is there any way I can avoid this?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Parcel 2: TypeScript definition generation is non-deterministic ...
In a monorepo, if some of the packages depended on by another package haven't built their types yet, you get relative paths instead...
Read more >What's nondeterministic about TypeScript / JavaScript?
A javascript object is a dictionary, it is not surprising that it had an undefined order. If you need order use an array,...
Read more >Deterministic and Nondeterministic Functions - SQL Server
This article identifies the determinism of built-in system functions and the effect on the deterministic property of user-defined functions ...
Read more >Glossary - TypeScript TV
Each instruction step is well-defined. Deterministic: Given a particular input, the algorithm will always produce the same output.
Read more >Determinism in Workflows | Legacy documentation for ...
... Workflow code must be completely deterministic, meaning it does the exact ... The Temporal TypeScript SDK runs each Workflow in a separate...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think it makes much sense to do that. Most people don’t commit the dist files. If you’re publishing a package, then you can just gitignore
dist
and run the build before you publish.I can take a deeper look if you provide a minimal repro 🙏🏼