From 1d82bddfbe1cade5da2859e7b232266f58625722 Mon Sep 17 00:00:00 2001 From: Roman Kuznetsov Date: Fri, 15 May 2026 19:02:42 +0300 Subject: [PATCH] docs(selectivity): add 'reason' to 'mapDependencyRelativePath' function --- docs/reference/config/browsers.mdx | 6 ++++-- .../current/reference/config/browsers.mdx | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/reference/config/browsers.mdx b/docs/reference/config/browsers.mdx index 49dbc14..408e4c9 100644 --- a/docs/reference/config/browsers.mdx +++ b/docs/reference/config/browsers.mdx @@ -1075,10 +1075,12 @@ The section has the following parameters: `mapDependencyRelativePath` - `null | (dependency: { scope: "browser" | "testplane", relativePath: string }) => string | boolean | void` + `null | (dependency: { scope: "browser" | "testplane", reason: "browser-css-import" | "browser-js-coverage" | "testplane-js-import" | "testplane-assert-view-reference", relativePath: string }) => string | boolean | void` `null` - Callback, which accepts test dependency path in POSIX style and maps it to another path. + Callback, which accepts test dependency info and maps its path to another path. + The dependency object contains `scope` (`"browser"` or `"testplane"`), `relativePath` in POSIX style, and `reason` — + one of `"browser-css-import"`, `"browser-js-coverage"`, `"testplane-js-import"`, or `"testplane-assert-view-reference"`, indicating how the dependency was collected. Return a mapped `string` path to remap, `true` to keep the original path unchanged, or a falsy value (`false`, `undefined`, `void`) to filter the dependency out completely. diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/reference/config/browsers.mdx b/i18n/ru/docusaurus-plugin-content-docs/current/reference/config/browsers.mdx index 213e08e..a14d081 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/reference/config/browsers.mdx +++ b/i18n/ru/docusaurus-plugin-content-docs/current/reference/config/browsers.mdx @@ -1078,10 +1078,12 @@ export = { `mapDependencyRelativePath` - `null | (dependency: { scope: "browser" | "testplane", relativePath: string }) => string | boolean | void` + `null | (dependency: { scope: "browser" | "testplane", reason: "browser-css-import" | "browser-js-coverage" | "testplane-js-import" | "testplane-assert-view-reference", relativePath: string }) => string | boolean | void` `null` - Коллбэк, который принимает путь зависимости теста в стиле POSIX и преобразует его в другой путь. + Коллбэк, который принимает информацию о зависимости теста и преобразует её путь в другой. + Объект зависимости содержит `scope` (`"browser"` или `"testplane"`), `relativePath` в стиле POSIX и `reason` — + одно из значений: `"browser-css-import"`, `"browser-js-coverage"`, `"testplane-js-import"` или `"testplane-assert-view-reference"`, указывающее на способ сбора зависимости. Верните строку `string` для переназначения пути, `true` для сохранения исходного пути без изменений, или falsy-значение (`false`, `undefined`, `void`) для полного исключения зависимости.