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

pantsbuild / pants / 25443604553

06 May 2026 03:05PM UTC coverage: 92.879% (-0.04%) from 92.915%
25443604553

push

github

web-flow
[pants_ng] Scaffolding for a pants_ng mode. (#23319)

In this mode the command line is parsed as an
NG invocation, and dispatched appropriately.

Of course at the moment there are no
implementations to dispatch to. That will follow.

This does expose a new option, `pants_ng` to users. 
There is a big warning not to set it, but we're not trying
to hide that we're working on a new thing, so I am
comfortable with this.

25 of 76 new or added lines in 9 files covered. (32.89%)

1294 existing lines in 76 files now uncovered.

92234 of 99306 relevant lines covered (92.88%)

4.05 hits per line

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

100.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

UNCOV
4
from __future__ import annotations
1✔
5

UNCOV
6
import logging
1✔
7

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

UNCOV
12
logger = logging.getLogger(__name__)
1✔
13

14

UNCOV
15
class TypeScriptSubsystem(NodeJSToolBase):
1✔
UNCOV
16
    options_scope = "typescript"
1✔
UNCOV
17
    name = "TypeScript"
1✔
UNCOV
18
    help = """TypeScript type checker (tsc)."""
1✔
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.
UNCOV
23
    default_version = "typescript@FROM_PACKAGE_JSON"
1✔
24

UNCOV
25
    skip = SkipOption("check")
1✔
26

UNCOV
27
    extra_build_args = StrListOption(
1✔
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

UNCOV
36
    def __init__(self, *args, **kwargs):
1✔
UNCOV
37
        super().__init__(*args, **kwargs)
1✔
38

UNCOV
39
        if self.version != "typescript@FROM_PACKAGE_JSON":
1✔
UNCOV
40
            logger.warning(
1✔
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

UNCOV
48
        self._binary_name_override = "tsc"
1✔
49

UNCOV
50
    @property
1✔
UNCOV
51
    def binary_name(self) -> str:
1✔
52
        """The binary name to run for this tool."""
UNCOV
53
        return self._binary_name_override or super().binary_name
1✔
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