Repository navigation
Conversation
The publish workflow (3887c74, PR wc-toolkit#79) moved the `pnpm build` step to after `changeset publish`, so npm packages were packed before their build output existed. Since `dist/` is gitignored and `changeset publish` doesn't run each package's build, wctools and language-server shipped from 0.0.17 / 0.0.7 onward with no `dist/` (and no `bin/`), leaving their `bin` entries pointing at missing files and the CLIs unusable. Add a `prepack` build hook to both published packages so build output is regenerated whenever the package is packed, independent of workflow step ordering. Also add an explicit `files: ["dist"]` allowlist to wctools (language-server already has one).
The root package.json still referenced the volarjs/starter template, and several packages (notably the published @wc-toolkit/wctools) had no repository/bugs/homepage fields at all, making it hard to find the repo from npm to file an issue. Set repository (with per-package `directory`), bugs, and homepage on the root and all workspace packages, matching the shape language-server already used. demos/npm left untouched (throwaway consumer demo).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hit this as a consumer: @wc-toolkit/wctools 0.0.17–0.0.19 ship
src/but nodist/, so thebin(dist/cli.js) is missing and the CLI won't install. 0.0.16 was the last good one. Figured I'd try my hand at it.The cause is in the publish workflow. The build step got moved to after
changeset publish(in #79). Sincedist/is gitignored andchangeset publishdoesn't build each package, the tarballs go out with /src, /test, etc but no dist.@wc-toolkit/language-server had the same issue.
Instead of relying on workflow ordering, I added a
prepackhook to both published packages sodist/(andbin/) is always built when the package is packed, plus an explicitfileslist for wctools. Verified withnpm pack --dry-runthatdist/cli.jsnow lands in the tarball.While I was here I also fixed the repo metadata. The root
package.jsonstill pointed at the volarjs/starter template, and wctools had norepositoryfield at all (which is why it took me a while to find where to file issue #163 😆). Added repository/bugs/homepage across the packages.Changesets included (patch bumps for wctools + language-server).
Any feedback appreciated.