atlassian-labs / compiled

A familiar and performant compile time CSS-in-JS library for React.
https://compiledcssinjs.com
Apache License 2.0
1.98k stars 68 forks source link

Cannot import @compiled/utils from within @compiled/jest source code #1668

Open dddlr opened 3 months ago

dddlr commented 3 months ago

Follow-up to https://github.com/atlassian-labs/compiled/pull/1667/

We cannot import any functions defined within @compiled/utils (packages/utils/) from within @compiled/jest (packages/jest/), as the TypeScript setup (with rootDir etc) would break when running yarn build. As a result, we have an extra file packages/jest/src/utils.ts that essentially just duplicates the functions defined in packages/utils/.

This is less than ideal from a maintenance perspective - would be good to be able to de-duplicate this and use @compiled/utils directly.