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

pantsbuild / pants / 19015773527

02 Nov 2025 05:33PM UTC coverage: 17.872% (-62.4%) from 80.3%
19015773527

Pull #22816

github

web-flow
Merge a12d75757 into 6c024e162
Pull Request #22816: Update Pants internal Python to 3.14

4 of 5 new or added lines in 3 files covered. (80.0%)

28452 existing lines in 683 files now uncovered.

9831 of 55007 relevant lines covered (17.87%)

0.18 hits per line

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

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

UNCOV
4
from __future__ import annotations
×
5

UNCOV
6
from pants.backend.javascript.package_json import PackageJsonEntryPoints
×
UNCOV
7
from pants.core.util_rules.unowned_dependency_behavior import UnownedDependencyUsageOption
×
UNCOV
8
from pants.option.option_types import BoolOption
×
UNCOV
9
from pants.option.subsystem import Subsystem
×
UNCOV
10
from pants.util.strutil import softwrap
×
11

12

UNCOV
13
class NodeJSInfer(Subsystem):
×
UNCOV
14
    options_scope = "nodejs-infer"
×
UNCOV
15
    help = "Options controlling which dependencies will be inferred for javascript targets."
×
16

UNCOV
17
    imports = BoolOption(
×
18
        default=True,
19
        help=softwrap(
20
            """
21
            Infer a target's imported dependencies by parsing import statements from sources.
22

23
            To ignore a false positive, you can either put `// pants: no-infer-dep` on the line of
24
            the import or put `!{bad_address}` in the `dependencies` field of your target.
25
            """
26
        ),
27
    )
28

UNCOV
29
    package_json_entry_points = BoolOption(
×
30
        default=True,
31
        help=softwrap(
32
            f"""
33
            Infer a `package_json`'s dependencies by parsing entry point statements from the package.json file.
34

35
            To ignore a false positive, you can put `!{{bad_address}}` in the `dependencies` field of the `package_json`
36
            target.
37

38
            {PackageJsonEntryPoints.__doc__}
39
            """
40
        ),
41
    )
UNCOV
42
    unowned_dependency_behavior = UnownedDependencyUsageOption(
×
43
        example_runtime_issue="`Error: ENOENT: no such file or directory`",
44
        how_to_ignore="add `// pants: no-infer-dep` to the line of the import",
45
    )
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

© 2025 Coveralls, Inc