Skip to content

tsconfck is being discontinued, the new recommended way is to use get-tsconfig. #16385

Closed

Description

@okikio

Astro Info

Astro                    v6.1.7
Node                     v25.9.0
System                   macOS (arm64)
Package Manager          pnpm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I noticed this warning when I installed Astro via pnpm install or pnpm update, I then investigated it and found that it was due to tsconfck being deprecated soon.

.
└─┬ astro 6.1.7
  └─┬ tsconfck 3.1.6
    └── ✕ unmet peer typescript@^5.0.0: found 6.0.3
.                                        |   +7 -173 +-----------------
Progress: resolved 1431, reused 159, downloaded 2, added 7, done
Done in 12.6s using pnpm v10.33.0

The original author is discontinuing the project https://github.com/dominikg/tsconfck/issues/240

The author recommended switching to https://github.com/privatenumber/get-tsconfig, get-tsconfig might have some differences in behavior so it is worth investigating further, as far as I can tell the differences between both pacakges is minimal.

There is also a chance we can utilize rolldown built-in utilities for this vitejs/vite#21577

Doing my own research I think get-tsconfig is the best balance here, while avoiding potential future edge cases and/or behaviour drift. If we're fine with behaviour drift then the rolldown utility would be the most convinent solution here.

You can check out my research here: https://chatgpt.com/share/69e2fed1-7c98-83ea-92c0-0a7870287001

What's the expected result?

tbh using an alternative that doesn't output warnings.

Link to Minimal Reproducible Example

https://stackblitz.com/~/github.com/okikio/astro-tsconfck-outdated-repro

Participation

  • I am willing to submit a pull request for this issue.

Activity

  1. astrobot-houston commented on Apr 18, 2026

    @astrobot-houston
    Contributor
    • Reproduced: Skipped — this is a dependency deprecation notice, not a runtime bug. The tsconfck package's author is discontinuing the project (tsconfck#240), and the package has an unmet peer dependency on typescript@^5.0.0 which causes warnings with TypeScript 6.x.
    • Exploration: Partial — View branch
    • Priority: P2: Nice to Have. The tsconfck package still works correctly today — the only user-visible symptom is a peer dependency warning during pnpm install when using TypeScript 6.x. There is no broken functionality. This affects users who have upgraded to TypeScript 6.x and notice the warning, but it does not impact builds, dev server, or any runtime behavior.

    Astro uses tsconfck directly in packages/astro/src/core/config/tsconfig.ts (and scripts/smoke/check.js) to locate, parse, and resolve tsconfig.json/jsconfig.json files. The API surface used is: find(), parse(), toJson(), TSConfckParseError, and the types TSConfckParseOptions/TSConfckParseResult. The package is listed as a direct dependency in packages/astro/package.json and scripts/package.json. Since the author has announced discontinuation, Astro will eventually need to migrate to an alternative like get-tsconfig or leverage Vite/Rolldown built-in utilities (vitejs/vite#21577).

    I wasn't able to find a fix, but I identified some areas that may be relevant. The migration would involve replacing imports in packages/astro/src/core/config/tsconfig.ts (the primary consumer), scripts/smoke/check.js, and packages/astro/test/units/config/config-tsconfig.test.ts. The get-tsconfig package provides getTsconfig() (equivalent to find + parse) and parseTsconfig(), but does not have a direct equivalent of toJson() (which strips comments/trailing commas from raw tsconfig content). A migration would also need to replicate the TSConfckParseError error handling pattern. It may be worth coordinating with Vite's migration effort in vitejs/vite#21577 to avoid duplicating work or introducing inconsistencies.

    Full Triage Report

    Issue Summary

    The tsconfck package (used by Astro to find and parse tsconfig/jsconfig files) is being discontinued by its author. The immediate symptom is an unmet peer dependency warning when installing Astro with TypeScript 6.x, since tsconfck@3.1.6 requires typescript@^5.0.0.

    Dependency Analysis

    • Direct dependency in packages/astro/package.json (line 166): "tsconfck": "^3.1.6"
    • Direct dependency in scripts/package.json (line 15): "tsconfck": "^3.1.6"
    • Not a transitive dependency from Vite or other packages

    Usage Locations

    1. packages/astro/src/core/config/tsconfig.ts — Primary consumer

      • find() (line 74): Locates tsconfig.json/jsconfig.json from a directory
      • parse() (line 117): Parses and resolves the extends chain
      • toJson() (lines 92, 106): Strips comments/trailing commas from raw config content
      • TSConfckParseError (line 125): Error handling for invalid configs
      • Types: TSConfckParseOptions, TSConfckParseResult
    2. scripts/smoke/check.js (line 7, 76): Uses toJson() for smoke tests

    3. packages/astro/test/units/config/config-tsconfig.test.ts (line 6, 52): Uses toJson() in unit tests

    Migration Options

    1. get-tsconfig — Recommended by tsconfck author. Provides getTsconfig() and parseTsconfig(). Would need a custom solution for toJson() functionality.
    2. Rolldown built-in utilities — Vite is exploring this in vitejs/vite#21577. Would align with Vite's direction but may introduce behavior drift.
    3. Custom implementation — The API surface used is relatively small; a custom wrapper could be feasible but adds maintenance burden.

    Branch Investigation

    The flue/fix-16385 branch contains only lockfile changes from investigation (TypeScript 5.9.3 → 6.0.2 version resolution updates). No code changes were made.

    This report was made by an LLM. The analysis may be wrong, and the potential fix might not work, but is intended as a starting point for exploring the issue.

  2. added
    - P2: nice to have
    pkg: astro
    and removed
    triage: needs triage
    on Apr 18, 2026
  3. added a commit that references this issue on Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P2: nice to havepkg: astro

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions