software-mansion / software-mansion/TypeGPU
chore: Detect mismatch between `package.json` entrypoints and what our build step generates
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/)
- Running
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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