Repository navigation
test: fix main's Rsbuild hook-context and webpack project-root tests broken by concurrent merges - #991
Open
owjs3901 wants to merge 3 commits into
Open
test: fix main's Rsbuild hook-context and webpack project-root tests broken by concurrent merges#991owjs3901 wants to merge 3 commits into
owjs3901 wants to merge 3 commits into
Conversation
#928 makes the source transform register missing devup.json configs through addMissingDependency, while #957's hook test builds its transform contexts with addDependency only. Both merged, so two CSS revision tests throw "addMissingDependency is not a function" on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
Summary
Main's
bun teststill fails two Rsbuild tests after #990, so every PR that merges main goes red onpublish.devup.jsonconfigs it extends throughaddMissingDependency.hooks.test.tsbuilds its fake transform contexts withaddDependencyonly.CSS revisions > serves and writes the rule of a same-length editandbuilds once more only in the environment whose served sheet went stalethrowTypeError: addMissingDependency is not a function.addMissingDependencyto the test'sTransformContextand to every fake context. No plugin code changes.project root > resolves the relative options against webpack's context(fix(plugins): resolve relative options against the bundler project root #962) expectsloadDevupConfigSyncto get only the resolveddevup.json, but since fix(plugins): watch the configs devup.json extends in webpack and Rsbuild #928 it also gets the set of extended configs. The assertion now expectsexpect.any(Set)as the second argument, like the otherloadDevupConfigSyncassertions in that file.Test plan
bun test packages/rsbuild-plugin/src/__tests__/hooks.test.tson main: 2 fail before, 5 pass afterbun test packages/webpack-plugin/src/__tests__/plugin.test.tson current main: the project-root test fails before, the file passes after (3532 pass with the hooks test)요약
#990 이후에도 main의
bun test에서 Rsbuild 테스트 두 개가 실패합니다. 그래서 main을 병합한 PR은 모두publish가 빨갛게 됩니다.devup.json설정을addMissingDependency로 등록하게 합니다.hooks.test.ts는 가짜 transform context를addDependency만으로 만듭니다.CSS revisions > serves and writes the rule of a same-length edit와builds once more only in the environment whose served sheet went stale가TypeError: addMissingDependency is not a function을 던집니다.TransformContext와 모든 가짜 context에addMissingDependency를 추가합니다. 플러그인 코드는 바꾸지 않습니다.project root > resolves the relative options against webpack's context(fix(plugins): resolve relative options against the bundler project root #962)는loadDevupConfigSync가devup.json경로만 받는다고 기대하지만, fix(plugins): watch the configs devup.json extends in webpack and Rsbuild #928 이후로는 확장 설정을 모으는 Set도 함께 받습니다. 같은 파일의 다른loadDevupConfigSync검사처럼 두 번째 인자로expect.any(Set)을 기대하도록 고쳤습니다.테스트 계획
bun test packages/rsbuild-plugin/src/__tests__/hooks.test.ts: 수정 전 2개 실패, 수정 후 5개 통과bun test packages/webpack-plugin/src/__tests__/plugin.test.ts: 수정 전 project-root 테스트 실패, 수정 후 통과(hooks 테스트와 함께 3532개 통과)🤖 Generated with Claude Code