matthewp / robot

🤖 A functional, immutable Finite State Machine library
https://thisrobot.life
BSD 2-Clause "Simplified" License
1.92k stars 88 forks source link

Update package.json #216

Closed lveillard closed 6 days ago

lveillard commented 4 months ago

Fixes the issue:

There are types at '/home/xxx/node_modules/robot3/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'robot3' library may need to update its package.json or typings.
changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: 09d41e0e03a592f98d5dcb61d82b36dba1308dbe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------ | ----- | | robot3 | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

lveillard commented 4 months ago

Btw only updating the types in the exports should do it as well. I think types is ignored when exports is defined

matthewp commented 4 months ago

Thank yoU!

matthewp commented 4 months ago

Can you add a changeset? This will trigger a patch release.

lveillard commented 4 months ago

Not familiar with changesets, does this work? Thanks!

lveillard commented 4 months ago

Btw, it still causes some issues. I think it could be a good idea to have a .,mjs version as well? What do you think

thomasaull commented 2 weeks ago

@matthewp Could this be merged, VS Code is complaining about missing types for me and this would solve it

OleksandrKucherenko commented 1 week ago
Could not find a declaration file for module 'robot3'. '~/workspace/gitlabs/v2.unicat.se/node_modules/robot3/machine.js' implicitly has an 'any' type.
  There are types at '~/workspace/gitlabs/v2.unicat.se/node_modules/robot3/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'robot3' library may need to update its package.json or typings.

typescript v5.6.3, vsCode latest