fix(build): align dist dependencies and add depcruise checks#10003
Open
ikeyan wants to merge 10 commits intovitest-dev:mainfrom
Open
fix(build): align dist dependencies and add depcruise checks#10003ikeyan wants to merge 10 commits intovitest-dev:mainfrom
ikeyan wants to merge 10 commits intovitest-dev:mainfrom
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
|
Thanks for finding peer dependency issues. I made to PRs to resolve them, since they are not supposed to be in the bundle: The |
sheremet-va
requested changes
Mar 28, 2026
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.
Description
This PR adds dependency-cruiser checks for built
distoutputs and aligns Rollup externals plus package metadata with what the generated files actually reference.Build helpers and Rollup externals
scripts/build-utils.jsrollup.config.js, use those helpers to:package.jsonmetadata instead of manually maintaining package-specific listsnode:-prefixed builtin modulesinputBase: 'src'for@vitest/browserdts generation so temporary declaration files stay under.typesPackage metadata changes in
@vitest/ws-client@vitest/ws-client: add optional peer dependency onvitestws: removed because it was completely unusedflatted: moved todevDependenciesbecause it is bundleddepcruise
.dependency-cruiser.cjs.dependency-cruiser-known-violations.jsonpnpm depcruiseto check builtdistdependencies while ignoring the current baselinepnpm depcruise:baselineto regenerate the current baselineThe depcruise rules currently check built
distfiles for:depcruise helps catch regressions like:
UI virtual module import
uno.csstovirtual:uno.cssuno.cssis a Vite virtual module and would otherwise be treated as an unknown dependencyBundled
wsoptional peersvitestbundle, define bothprocess.env.WS_NO_UTF_8_VALIDATEandprocess.env.WS_NO_BUFFER_UTILwscode to its optional native peersutf-8-validateandbufferutilDist changes
@vitest/browserpackage, the following temporary declaration files disappear:dist/shared/screenshotMatcher/types.d.tsdist/types.d.tsvitestdist no longer referencesutf-8-validateorbufferutiljs/d.tschanges are the expected result of the externals cleanup abovePlease don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.dependency-cruiserto the rootpackage.json, sopnpm-lock.yamlis changed.pnpm depcruisecan be seen as a new test.Tests
pnpm test:ci.mainafterpnpm build, for example:pnpm -C test/cli test test/list.test.ts -t 'browser.enabled'pnpm -C test/cli test test/mocking.test.ts -t 'playwright'Documentation
pnpm run docscommand.Changesets
feat:,fix:,perf:,docs:, orchore:.Notes