Repository navigation
Svelte: Resolve existing Knip findings - #36768
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughSvelte package development dependencies and Knip workspace entries changed. Several Svelte types and helper functions are no longer exported, and an AST extraction test helper was deleted. ChangesSvelte package and API maintenance
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
|
@valentinpalkovic I'm not the right person to review this. |
Check the diff here: storybookjs/storybook@8af3851...50a8282 List of included PRs since previous version: - storybookjs/storybook#36301 (sharadvc/cursor/fix-mcp-connect-agents-link-6fef) - storybookjs/storybook#35863 (SnowingFox/fix/35862-server-channel-error-handler) - storybookjs/storybook#36688 (ghengeveld/vitest-36221-leftovers) - storybookjs/storybook#36746 (fix/bbc-local-story-manifest-snippets) - storybookjs/storybook#36588 (fix/nextjs-router-mock-bfcache) - storybookjs/storybook#36391 (agent/sto-492-eslint-cjs) - storybookjs/storybook#36751 (agent/sto-280-prerelease-version-alignment) - storybookjs/storybook#36768 (svelte-knip-cleanup) - storybookjs/storybook#35834 (FrancoKaddour/fix/docgen-typescript7-missing-compiler-api) - storybookjs/storybook#36770 (bryce-easygo/fix/svelte-csf-null-arg-snippet)
What I did
Resolve existing Knip findings in the Svelte renderer, Svelte Vite framework, and SvelteKit framework without changing package exports or runtime behavior.
Summary
The compiled Svelte fixture remains available to the tests that read it. It is excluded from source analysis. The Nx executor exception applies only to the root-owned tool. Public
StoryContext, preset hooks, and SvelteKit mock exports remain intact.Evidence
The baseline is
1921070f11c4a06c83b6a35c45d5e28dbca36b44. All 43 removed findings are in these three packages. There are no new findings anywhere. Repository-wide Knip still exits with the unrelated baseline findings.Affected package compilation, all three type checks, focused lint, package manifest lint, and formatting pass. The Svelte package suites pass 225 tests across 45 files. Nx Cloud returned an access warning; local builds and checks completed successfully.
Merge Danger
Two-way door. The cleanup can be reverted. The affected packages retain their supported entries and behavior.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Caution
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
yarn installandyarn nx run-many -t compile.yarn knip --workspace renderers/svelte --workspace frameworks/svelte-vite --workspace frameworks/sveltekit --reporter json. Expect{"issues":[]}and exit code 0. The same command on the baseline reports 43 findings.yarn knip --reporter jsonon baseline and head. Expect the existing repository findings to drop by exactly 43, with no additions outside the Svelte packages.yarn nx run-many -t check --projects=svelte,svelte-vite,sveltekit. Expect all three checks to pass.yarn test --project @storybook/svelte --project @storybook/svelte-vite --project @storybook/sveltekit. Expect all 225 tests to pass, including compiled Svelte CSF fixtures and portable stories.Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsDeclare whether manual QA will be needed for this PR during the next release, through
qa:neededorqa:skipMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary Release - 🚫 Not run
This PR does not have a canary release associated.
In-repo PRs: add the
ci:canarylabel. Later pushes republish while the label remains.Fork PRs: the label does nothing (a later push must not auto-publish). A maintainer publishes from this repository with Run workflow and the
prinput.branchandshaare optional; if more than one is set, they must be the same commit. The fork author does not need to do anything.