• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 20632486505

01 Jan 2026 04:21AM UTC coverage: 43.231% (-37.1%) from 80.281%
20632486505

Pull #22962

github

web-flow
Merge 08d5c63b0 into f52ab6675
Pull Request #22962: Bump the gha-deps group across 1 directory with 6 updates

26122 of 60424 relevant lines covered (43.23%)

0.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/python/pants/backend/typescript/subsystem.py
1
# Copyright 2025 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

4
from __future__ import annotations
×
5

6
import logging
×
7

8
from pants.backend.javascript.subsystems.nodejs_tool import NodeJSToolBase
×
9
from pants.option.option_types import SkipOption, StrListOption
×
10
from pants.util.strutil import softwrap
×
11

12
logger = logging.getLogger(__name__)
×
13

14

15
class TypeScriptSubsystem(NodeJSToolBase):
×
16
    options_scope = "typescript"
×
17
    name = "TypeScript"
×
18
    help = """TypeScript type checker (tsc)."""
×
19

20
    # TypeScript always uses resolve-based execution because it needs access to project
21
    # dependencies for type checking. The resolve is determined dynamically in check.py.
22
    # This default version is never used - TypeScript must come from project package.json.
23
    default_version = "typescript@FROM_PACKAGE_JSON"
×
24

25
    skip = SkipOption("check")
×
26

27
    extra_build_args = StrListOption(
×
28
        default=[],
29
        help=(
30
            "Extra arguments to pass to tsc when running in --build mode. "
31
            "These args are added to the base command 'tsc --build'. "
32
            "Commonly used: --verbose, --force, --dry."
33
        ),
34
    )
35

36
    def __init__(self, *args, **kwargs):
×
37
        super().__init__(*args, **kwargs)
×
38

39
        if self.version != "typescript@FROM_PACKAGE_JSON":
×
40
            logger.warning(
×
41
                softwrap(f"""
42
                    You set --typescript-version={self.version}. This setting is ignored because
43
                    TypeScript always uses the version from your project's package.json dependencies
44
                    or devDependencies. Please ensure TypeScript is listed in your package.json.
45
                """)
46
            )
47

48
        self._binary_name_override = "tsc"
×
49

50
    @property
×
51
    def binary_name(self) -> str:
×
52
        """The binary name to run for this tool."""
53
        return self._binary_name_override or super().binary_name
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc