Skip to content

Conversation

Copy link

Copilot AI commented Jan 7, 2026

npm's package page displays a TypeScript badge when it detects type definitions via the root-level types field. The package only had exports.types, which modern tooling uses but npm's badge detection does not.

Changes

  • Added "types": "./dist/index.d.ts" to package.json root level
  • Maintains existing exports.types for modern module resolution

This provides both npm badge visibility and backward compatibility with older TypeScript tooling that don't support export conditions.

{
  "types": "./dist/index.d.ts",
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "import": "./dist/index.js"
    }
  }
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.npmjs.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

on https://www.npmjs.com/package/react-mcu i cannot see the TS flag, why?


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: abernier <76580+abernier@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate missing TypeScript flag on react-mcu Add root-level types field for npm TypeScript badge detection Jan 7, 2026
Copilot AI requested a review from abernier January 7, 2026 14:23
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.

2 participants