Skip to content

pkg-types incorrectly declared as dev dependency #667

@askoufis

Description

@askoufis

Reproduction link or steps

Create a tsdown config containing the following:

import { defineConfig } from 'tsdown';

export default defineConfig({
  entry: ['src/index.ts'],
  format: ['esm'],
  copy: (resolvedConfig) => {
    console.log(resolvedConfig.pkg?.name);
    return [];
  },
});

What is expected?

No type errors.

What is actually happening?

resolvedConfig.pkg?.name has an any type. pkg is of type PackageJsonWithPath. This type comes from from pkg-types, but this is declared as a dev dep so is not installed by consumers.

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions