OpenFn / OpenFn/kit

Work out how to get typesync to run automatically

Open
#333 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue tech debt
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

I've just added typesync, which is a super cool package that ensures you have matching @types packages for all your packages.

The only problem is that in pnpm, we have to run it manually.

One day, I'd like to be able to automatically run typesync after pnpm add, pnpm remove and pnpm update (but not pnpm install).

Typesync provides docs to autorun in npm, but this simply doesn't work in pnpm

Options and ideas:

  • pnpm does provide some postinstall hooks through a .pnnpmfile.cjs, but a) it'll run on install as well as add, and b) they don't let do you very much. We can't run pnpm commands from these hooks, we can only hack the lockfile
  • pnpm has an option to enable npm-style pre/post script hooks. If we enable this, we could probably add postadd, postremove and postupdate scripts. But I think you can only do this on pnpm run, and it has to be passed into the CLI.
  • We could use a git hook and run typesync before committing or pushing ,failing if types are not synced. But this is dogmatic and annoying.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing typesync setup and pnpm's documentation for postinstall hooks, npm-style pre/post scripts, and the .pnnpmfile.cjs option. Compare those entry points against the required pnpm add, remove, and update commands while excluding install. Done means an agreed automatic approach is documented and works without requiring manual typesync runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.