You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmdcolin
changed the title
Typescript errors in embedded components due to published npm packages .d.ts files referring to src dir
Published npm packages .d.ts files referring to src dir
Nov 26, 2024
see https://www.npmjs.com/package/@jbrowse/react-linear-genome-view/v/2.17.0?activeTab=code
downloading the zip is better cause viewing the code on page is slow but @jbrowse/react-linear-genome-view/dist/createViewState.d.ts
this causes confusion in the typescript compilation of embedded components
i don't know exactly why it's behaving this way
strategies to fix
possibly multiple could be investigated
strategy 1: publish src dir
one strategy to fix this is to include src dir in our published releases
pros: could fix this, can enable source maps
cons: sometimes leads people to import from the src dir which is not intended usage
stategy 2: investigate why it's doing this
e.g. git bisect to see how long this has been happening?
pros: systematically uncover issue
cons: hard to do
strategy 3: investigate alternative monorepo setups
our codebase alternately refers to src at dev time and dist at prod time. my hypothesis is that there is a confusion in this case
possible systems include nx and turborepo. i'm not super into nx. don't know much about turborepo. maybe there is a better usage of lerna also
pros: more 'industry standard' maybe, reduced weirdness from our src/dist swapping
cons: more complexity of build tooling
The text was updated successfully, but these errors were encountered: