Allow tokenless installs and align Storybook on 10.x - #5
Merged
Conversation
Adds `prepare` so the package can be consumed straight from this public
repository as a git dependency, with no GitHub Packages token:
"@codebar-ag/storybook": "github:codebar-ag/storybook.codebar.ch#v1.5.0"
`files` is `["dist"]` and `dist` is gitignored, so a git install previously
resolved to a package with no entry point at all. `prepare` runs on git
installs and builds it, which is also why `npm publish` now always ships a
freshly built `dist` rather than whatever was last in the working tree.
`publishConfig.access` becomes `public`. Note this only affects future
publishes — the existing package's visibility is a setting on the package
itself, and GitHub's npm registry requires a token for every read regardless,
public or not. The git dependency above is what actually removes the token.
Fixes a dependency tree that could not be installed at all. `npm ci` failed on
main — and with it release, pages and test — because `@storybook/vue3-vite` was
`^10.5.3` while `storybook` stayed `^9.0.0` and both addons `^9.1.20`, so its
peer requirement of `storybook@^10` was unsatisfiable. That half-finished bump
was reaching for a real fix, so this completes it rather than reverting it:
aligning the family on `^10.5.5` clears all five advisories, including the
PostCSS source-map path traversal, by pulling vue-component-meta and
@vue/language-core to versions whose minimatch/brace-expansion are patched.
`npm audit` reports 0 vulnerabilities.
Annotates two implicit-any handler parameters in Pagination.vue. Pre-existing
and unrelated to the upgrade, but `typecheck` could not run while the tree was
uninstallable, so nothing had reported them.
Verified: npm ci, build, lint, typecheck, build-storybook and 184 Playwright
tests all pass, and Storybook 10 needed no config migration.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Why
Two independent problems, one of which makes the repo uninstallable.
npm cifails onmain.@storybook/vue3-viteis^10.5.3whilestorybookis^9.0.0and both addons are^9.1.20.vue3-vite@10requires peerstorybook@^10, so the tree cannot resolve — andrelease,pagesandtestall start withnpm ci. The lockfile still holds9.1.20for both, so that bump was never completed.Consuming the package needs a GitHub token even though the repo is public.
filesis["dist"]anddistis gitignored, so a git dependency resolves to a package with no entry point. That left GitHub Packages as the only route — and its npm registry requires a token for every read, public packages included.What this changes
prepare: npm run build— makes the public repo directly consumable, no token:It also means
npm publishalways ships a freshly builtdistrather than whatever was last in the working tree.publishConfig.access→public. Worth being precise: this only affects future publishes. The existing package's visibility is a setting on the package itself, and GitHub's npm registry needs a token regardless of visibility. The git dependency above is what actually removes the token requirement.Storybook family →
^10.5.5. The abandoned^10.5.3bump was reaching for a real security fix, so this completes it rather than reverting to 9.x. It clears all five advisories — including the PostCSS source-map path traversal (#5) — by pullingvue-component-metaand@vue/language-coreto versions whoseminimatch/brace-expansionare patched. Reverting to 9.x would have restorednpm cibut left every advisory in place.npm audit: 0 vulnerabilities (was 5 high).Two implicit-any annotations in
Pagination.vue. Pre-existing and unrelated, buttypecheckcould not run while the tree was uninstallable, so nothing had reported them.Verified locally
npm ci— now succeedsnpm audit— 0 vulnerabilitiesnpm run build,lint,typecheck— cleannpm run build-storybook— succeeds, no config migration needed for Storybook 10npm run test:ci— 184 Playwright tests passNote for reviewers
The Storybook 9 → 10 major is the substantive change here. It is load-bearing for the security fix, not incidental, and the full docs build plus the whole smoke suite pass on it unchanged.
🤖 Generated with Claude Code