Skip to content

Conversation

@SMotaal
Copy link
Contributor

@SMotaal SMotaal commented Sep 17, 2024

Partially resolves: #72

This PR brings the new build:types package script to @ocap/extension and @ocap/streams which is intended for manual use only to help visualize overall changes to types.

Use

To manually generate types, you can run:

  • yarn build:types
  • yarn workspace @ocap/extension build:types
  • yarn workspace @ocap/streams build:types

To make use of this feature, you can:

  • Manually generate the base types.d.ts files
    • Check out the base worktree locally in a separate folder (e.g., main branch)
    • Run yarn and then yarn build:types
  • Manually generate the head types.d.ts files
  • Use you preferred diff tool to compare the resulting types.d.ts files

Changes

  • Adds new build:types package script to:
    • /package.json
    • /packages/extension/package.json
    • /packages/streams/package.json
  • Adds ignore rules for package-level types.d.ts files in:
    • /.depcheckrc.yaml
    • /.gitignore
    • /tsconfig.packages.build.json
    • /packages/extension/.eslintrc.cjs
    • /packages/streams/.eslintrc.cjs

Note

This is a draft PR which I plan to promote soon, but please don't hesitate to help move it forward if it helps sooner but only if there are no concerns or blockers.

@rekmarks
Copy link
Member

rekmarks commented Sep 17, 2024

If we want this as a general thing, we should add a constraint that enforces its existence in each package (with exceptions as necessary).

@rekmarks
Copy link
Member

I think this would fit neatly on top of #77.

@rekmarks rekmarks closed this Oct 29, 2024
@rekmarks rekmarks deleted the smotaal/add-new-build-types-package-script branch October 29, 2024 23:40
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.

build: Add manual-use build:types package script (rename current to lint:types)

3 participants