stalniy / casl

CASL is an isomorphic authorization JavaScript library which restricts what resources a given user is allowed to access
https://casl.js.org/
MIT License
5.74k stars 257 forks source link

@casl/ability/extra/package.json contains a typo preventing Jest from resolving the package correctly #891

Closed neketka closed 3 months ago

neketka commented 3 months ago

Describe the bug When importing from @casl/ability/extra, Jest will complain about the module not being found.

To Reproduce Steps to reproduce the behavior:

  1. Import from @casl/ability/extra
  2. Run a Jest test

Expected behavior The imports should be correctly resolved while running under Jest. This can be fixed if any instances of "extra.js" in the package.json are replaced with "extra/index.js".

CASL Version

@casl/ability - v6.7.0 @casl/prisma - v1.4.1

Environment: Node 18

stalniy commented 3 months ago

Thank you for the issue! Will fix today/tomorrow