okta / okta-angular

Angular SDK for Okta's OIDC flow
https://github.com/okta/okta-angular
Other
45 stars 31 forks source link

Library distribution missing `exports` property in package.json, resulting in incorrect bundle selection for Node resolution (such as Vitest) #150

Open alisaduncan opened 1 week ago

alisaduncan commented 1 week ago

Describe the bug

Okta Angular doesn't resolve correctly when running instances of the library in Vitest. See https://devforum.okta.com/t/cannot-read-properties-of-undefined-reading-operators/30148

JIRA created https://oktainc.atlassian.net/browse/OKTA-826555

Reproduction Steps?

Run any unit test using Vitest as the runner. You can use the sample repo created with this setup here https://github.com/alisaduncan/okta-angular-vitest-example

SDK Versions

okta-angular 6.4.0

Additional Information

https://github.com/vitest-dev/vitest/discussions/4233#discussioncomment-7520439

alisaduncan commented 1 week ago

Adding @DuncanFaulkner for awareness