software-mansion / software-mansion/TypeGPU

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

Open
#2,418 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.2k
Forks
122
Avg merge
3d 5h
Merged PRs (30d)
34

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the build workflow described in the issue and the built-package tests requested by #2420. Then trace how tsdown, the transformed package.json copy, and publint are invoked. Done means the generated package entrypoints can be checked successfully after the package metadata is present in dist/.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.