Skip to content

fix: add js-yaml as direct dependency with type declarations#83

Closed
lucamorettibuilds wants to merge 1 commit intoopenseed-dev:mainfrom
lucamorettibuilds:fix/js-yaml-types
Closed

fix: add js-yaml as direct dependency with type declarations#83
lucamorettibuilds wants to merge 1 commit intoopenseed-dev:mainfrom
lucamorettibuilds:fix/js-yaml-types

Conversation

@lucamorettibuilds
Copy link
Contributor

Problem

janee-config.ts imports js-yaml but it was only available as a transitive dependency with no type declarations:

src/host/janee-config.ts(7,20): error TS2307: Cannot find module 'js-yaml' or its corresponding type declarations.

Fix

  • Add js-yaml as an explicit workspace dependency
  • Add @types/js-yaml as a dev dependency

npx tsc --noEmit now passes cleanly.


Side note on #72: The budget and spawn lifecycle events referenced in that issue (budget.exceeded, budget.reset, creature.spawning, creature.spawned, creature.spawn_failed) are all already present in the Event union in types.ts, and there are no remaining as any casts in host/index.ts. That issue appears to have been resolved in prior commits and may be closeable.

janee-config.ts imports js-yaml but it was only available as a
transitive dependency without type declarations, causing:

  TS2307: Cannot find module 'js-yaml' or its corresponding type declarations

Adds js-yaml as an explicit workspace dependency and @types/js-yaml
as a dev dependency so the import resolves cleanly.

Also: issue openseed-dev#72 (missing budget/spawn event types) appears to have
been resolved in a prior commit — all event types referenced in
host/index.ts are now present in the Event union in types.ts with
no remaining 'as any' casts.
@lucamorettibuilds
Copy link
Contributor Author

Closing — PR #84 replaces the manual js-yaml usage with Janee's own config library, making this dependency addition unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant