Add option for type checking #4

Merged
sch merged 1 commit from typecheck-build into main 2025-11-08 08:46:04 +01:00
sch commented 2025-11-08 05:56:47 +01:00 (Migrated from github.com)

The watch script reports diagnostic errors, but the build script can silently pass.

This adds an option, typeCheck, to the BuildOptions for parity. It's opt-in, to allow it to be backwards compatible.

The watch script reports diagnostic errors, but the build script can silently pass. This adds an option, `typeCheck`, to the `BuildOptions` for parity. It's opt-in, to allow it to be backwards compatible.
sch commented 2025-11-08 05:59:48 +01:00 (Migrated from github.com)

We use this project (alongside @prosemirror/buildhelper) to build a module containing our document's schema. We were surprised to see a type error sneak through the other day.

If this is unwanted, let me know and we'll pursue something like tsdown instead.

We use this project (alongside [@prosemirror/buildhelper](https://github.com/ProseMirror/buildhelper)) to build a module containing our document's schema. We were surprised to see a type error sneak through the other day. If this is unwanted, let me know and we'll pursue something like [tsdown](https://github.com/rolldown/tsdown) instead.
marijnh commented 2025-11-08 08:49:01 +01:00 (Migrated from github.com)

Thanks, this looks useful. Do you want me to cut a release or do you have other patches to submit?

Thanks, this looks useful. Do you want me to cut a release or do you have other patches to submit?
sch commented 2025-11-08 14:48:03 +01:00 (Migrated from github.com)

Nah, that was it for this repo. Do you think it's something that could be opt-in for pm-buildhelper, or do you typically rely on editor/ide types in your workflow?

Nah, that was it for this repo. Do you think it's something that could be opt-in for [pm-buildhelper](https://github.com/ProseMirror/buildhelper/blob/6513f1c1624c36797458813802ef83ce4f6979cc/bin/pm-buildhelper.js), or do you typically rely on editor/ide types in your workflow?
marijnh commented 2025-11-08 14:52:48 +01:00 (Migrated from github.com)

I've tagged a 1.2.0.

Indeed, I rely on watch output and IDE errors in my workflow, and want the rebuild triggered by npm prepare when I publish to be as fast as possible.

I've tagged a 1.2.0. Indeed, I rely on watch output and IDE errors in my workflow, and want the rebuild triggered by `npm prepare` when I publish to be as fast as possible.
sch commented 2025-11-08 16:21:09 +01:00 (Migrated from github.com)

Makes sense. Would you accept an opt-in patch for @prosemirror/buildhelper? If not, we can continue using our fork.

Makes sense. Would you accept [an opt-in patch for @prosemirror/buildhelper](https://github.com/ProseMirror/buildhelper/compare/main...sch:buildhelper:main)? If not, we can continue using our fork.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marijn/buildtool!4
No description provided.