Skip to content

chore: Detect mismatch between package.json entrypoints and what our build step generates #2418

@iwoplaza

Description

@iwoplaza

I think we can use publint for this, but using the integration built into tsdown has a problem. Our current workflow is as follows:

  • Build using tsdown
  • Copy a slightly transformed package.json into dist/
  • Publish the package

With the publint integration, it looks as follows:

  • Build using tsdown
    • Running publint (❌ ERROR: package.json not found in dist/)
  • Copy a slightly transformed package.json into dist/
  • Publish the package

To make this work, we could move our package.json copying and transform as a step after tsdown finished building, and before publint runs. The version of tsdown we currently use doesn't expose this hook, but to update to another version of tsdown, it would be great if we were able to verify that the builds are correct. Therefore, this issue is blocked by #2420, which in turn is blocked by having better tests on built packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions