From 14a37d1c5b12323faf29631888375be41d2908ca Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Tue, 17 Nov 2026 16:26:12 +0900 Subject: [PATCH 1/2] test(rsbuild-plugin): give the hook test contexts addMissingDependency #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 --- packages/rsbuild-plugin/src/__tests__/hooks.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/rsbuild-plugin/src/__tests__/hooks.test.ts b/packages/rsbuild-plugin/src/__tests__/hooks.test.ts index 13a099c99..9e9e3da0c 100644 --- a/packages/rsbuild-plugin/src/__tests__/hooks.test.ts +++ b/packages/rsbuild-plugin/src/__tests__/hooks.test.ts @@ -37,6 +37,7 @@ interface TransformContext { resourcePath: string environment: Environment addDependency: (path: string) => void + addMissingDependency: (path: string) => void } type Transform = (context: TransformContext) => unknown @@ -173,6 +174,7 @@ async function extract( resourcePath: join(root, 'src', 'App.tsx'), environment, addDependency: () => {}, + addMissingDependency: () => {}, }) } @@ -249,6 +251,7 @@ describe('CSS revisions', () => { resourcePath: path, environment: web, addDependency: () => {}, + addMissingDependency: () => {}, }), ) expect(serve()).toContain(`.${first}{color:red}`) @@ -282,12 +285,14 @@ describe('CSS revisions', () => { resourcePath: path, environment: web, addDependency: () => {}, + addMissingDependency: () => {}, }) hooks.css({ code: '', resourcePath: path, environment: node, addDependency: () => {}, + addMissingDependency: () => {}, }) // Only the web build has seen the sheet change since it served it await extract(hooks, app('tan')) @@ -296,6 +301,7 @@ describe('CSS revisions', () => { resourcePath: path, environment: node, addDependency: () => {}, + addMissingDependency: () => {}, }) const passes = builds.map((build) => { From 8ef976949ea27160e6c90ee637dc21f31fbec0cb Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Tue, 17 Nov 2026 16:37:17 +0900 Subject: [PATCH 2/2] test(webpack-plugin): expect the config inputs set in the project-root test #962 asserts loadDevupConfigSync is called with only the resolved devup.json, but since #928 the plugin also passes the set it collects extended configs into. Both merged, so the assertion fails on main. Co-Authored-By: Claude Opus 5.5 --- packages/webpack-plugin/src/__tests__/plugin.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/webpack-plugin/src/__tests__/plugin.test.ts b/packages/webpack-plugin/src/__tests__/plugin.test.ts index c51fbbe94..e3651b401 100644 --- a/packages/webpack-plugin/src/__tests__/plugin.test.ts +++ b/packages/webpack-plugin/src/__tests__/plugin.test.ts @@ -481,6 +481,7 @@ describe('devupUIWebpackPlugin', () => { }) expect(loadDevupConfigSyncSpy).toHaveBeenCalledWith( join(context, 'devup.json'), + expect.any(Set), ) })