Skip to content

feat: honor pretscheck as primary pre-script alias for tsc#241

Merged
rqbazan merged 3 commits into
mainfrom
feat/tsc-pretscheck-prescript
Jun 15, 2026
Merged

feat: honor pretscheck as primary pre-script alias for tsc#241
rqbazan merged 3 commits into
mainfrom
feat/tsc-pretscheck-prescript

Conversation

@rqbazan

@rqbazan rqbazan commented Jun 15, 2026

Copy link
Copy Markdown
Member

What

Adds pretscheck to the front of the rr tsc pre-script precedence chain:

pretscheck ?? pretsc ?? pretypecheck

Why

#240 standardized the typecheck task as tscheck. The npm pre<script> convention implies the matching pre-hook should be pretscheck — so a package's pretscheck now runs (captured, inside the task) before the type check. The legacy pretsc / pretypecheck aliases remain as fallbacks, so nothing breaks for existing setups.

Tests

The pre-script feature previously had no coverage. This PR adds two integration tests in test/integration/tsc.test.ts:

  • pretscheck runs before tsc and fails the task when it fails.
  • pretscheck takes precedence over the legacy pretsc / pretypecheck aliases (the legacy scripts never fire).

pnpm rr check and the full @rrlab/cli test suite are green; a patch changeset is included.

🤖 Generated with Claude Code

Now that the typecheck task is canonically named tscheck (#240), a
package's pretscheck script runs before the type check, taking
precedence over the legacy pretsc/pretypecheck aliases (still honored
as fallbacks). Adds integration coverage for the pre-script feature,
which previously had none.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5a5faa9

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

This PR includes changesets to release 1 package
Name Type
@rrlab/cli 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

Integration tests spawn the real rr bin and run actual toolchains
(tsc, biome, oxlint), which exceeds vitest's 5s default on contended
CI runners and fails the job by timeout. Set testTimeout/hookTimeout
to 30s for the integration project so the budget covers all of them
in one place, and drop the one-off inline 15s override in only.test.ts
(the oxc tsgolint dispatch) so it inherits that single budget too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rqbazan
rqbazan force-pushed the feat/tsc-pretscheck-prescript branch from ee375fa to 1b355e6 Compare June 15, 2026 23:38
@vland-bot

vland-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Preview release

Latest commit: 5a5faa9

Some packages have been released:

Package Version Install
@rrlab/cli 1.2.1-git-5a5faa9.0 @rrlab/cli@1.2.1-git-5a5faa9.0

Note

Use the PR number as tag to install any package. For instance:

pnpm add @rrlab/cli@pr-241

@rqbazan
rqbazan merged commit 50bff97 into main Jun 15, 2026
3 checks passed
@rqbazan
rqbazan deleted the feat/tsc-pretscheck-prescript branch June 15, 2026 23:42
@vland-bot vland-bot Bot mentioned this pull request Jun 15, 2026
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