gjsify/ts-for-gir

Proposal to Omit Version Strings in NPM Package Type Generation for Ambient Modules

Closed this issue · 2 comments

We are considering the possibility of omitting version strings for ambient modules in our NPM packages. This proposal arises from the understanding that the conflicts typically addressed by version strings can be mitigated by ensuring that conflicting NPM packages are not installed simultaneously.

It is also conceivable that ts-for-gir should only support the generation of NPM packages in the future, which would simplify many things and would not change the fact that the types can still be generated locally for your own project, only then as local NPM packages, e.g. for a monorepo.

See this discussion for more information: https://github.com/gjsify/types/issues/1#issuecomment-1813856410

Thank you for opening this issue. In the future, import maps will provide a comprehensive solution here, but in the mean time, it would be very helpful to extension and app developers to get these types without query strings.

maybe some omnibus @girs/extentions package could reexport all the modules available to extensions without query strings?

I'll see if it's enough to make a special treatment for NPM packages, if that leads to other problems we can undo it again. This simple commit contains this changes. I'm leaving the issue open as I want to wait for feedback.