Skip to content

Commit 64c19e3

Browse files
author
Madhu
authored
Merge pull request #1059 from blackducksoftware/idetect-4242
IDETECT-4242-Rename property --detect.yarn.monorepo.mode to --detect.yarn.ignore.all.workspaces
2 parents cd7c22e + ad9a1c7 commit 64c19e3

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

documentation/src/main/markdown/currentreleasenotes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Nuget Inspector now supports the exclusion of user-specified dependency types from the Bill of Materials (BOM) via the [solution_name] property --detect.nuget.dependency.types.excluded. See the [detect.nuget.dependency.types.excluded](properties/detectors/nuget.md#nuget-dependency-types-excluded) property for more information.
88
* A new detector for Python packages has been added. The PIP Requirements File Parse is a buildless detector that acts as a LOW accuracy fallback for the PIP Native Inspector. This detector is triggered for PIP projects that contain one or more requirements.txt files if [solution_name] does not have access to a PIP executable in the environment where the scan is run.
99
* See [PIP Requirements File Parse](packagemgrs/python.md).
10-
* To improve Yarn detector performance a new parameter is now available. The `--detect.yarn.monorepo.mode` parameter enables monorepo mode to build the dependency graph without analysis of workspaces. The default setting for this parameter is false and must be set to true to be enabled.
10+
* To improve Yarn detector performance a new parameter is now available. The `--detect.yarn.ignore.all.workspaces` parameter enables the Yarn detector to build the dependency graph without analysis of workspaces. The default setting for this parameter is false and must be set to true to be enabled.
1111
* See [Yarn support](packagemgrs/yarn.md).
1212
* Support for BitBake is now extended to 2.6 (Yocto 4.3.2).
1313
* Support for Yarn extended to include Yarn 3 and Yarn 4.

documentation/src/main/markdown/packagemgrs/yarn.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ referencing guidelines described above. You can also use
6464
filename globbing-style wildcards and specify multiple values separated
6565
by commas.
6666

67-
### Enable monorepo mode
67+
### Enable workspace ignore
6868

69-
To speed up scanning by building the dependency graph without analysis of workspaces, set the parameter`--detect.yarn.monorepo.mode=true` to enable monorepo mode.
69+
To speed up scanning by building the dependency graph without analysis of workspaces, set the parameter`--detect.yarn.ignore.all.workspaces=true`.
7070
The default setting for this parameter is false and must be set to true to enable.
7171

72-
<note type="note">The properties `detect.yarn.excluded.workspaces` and `detect.yarn.included.workspaces` do not apply if `detect.yarn.monorepo.mode=true`.</note>
72+
Dependencies in workspaces that are not in the Yarn lock file will not be included in the Bill of Materials.
73+
74+
<note type="note">The properties `detect.yarn.excluded.workspaces` and `detect.yarn.included.workspaces` do not apply if `detect.yarn.ignore.all.workspaces=true`.</note>
7375

7476
See [Yarn monorepo](https://yarnpkg.com/advanced/lexicon#monorepo) for further information about workspaces and monorepo configuration.

src/main/java/com/synopsys/integration/detect/configuration/DetectProperties.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1663,9 +1663,9 @@ private DetectProperties() {
16631663
.build();
16641664

16651665
public static final BooleanProperty DETECT_YARN_MONOREPO_MODE =
1666-
BooleanProperty.newBuilder("detect.yarn.monorepo.mode", false)
1667-
.setInfo("Yarn Monorepo Mode Enabled", DetectPropertyFromVersion.VERSION_9_4_0)
1668-
.setHelp("Enable monorepo mode of the Yarn detector for increased performance and precision to scan a massive codebase.")
1666+
BooleanProperty.newBuilder("detect.yarn.ignore.all.workspaces", false)
1667+
.setInfo("Ignore All Workspaces", DetectPropertyFromVersion.VERSION_9_4_0)
1668+
.setHelp("All workspaces are ignored by the Yarn detector for increased performance and precision to scan a massive codebase.")
16691669
.setGroups(DetectGroup.YARN, DetectGroup.SOURCE_SCAN)
16701670
.build();
16711671

src/test/java/com/synopsys/integration/detect/battery/detector/YarnBattery.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ void yarnMonorepo() {
174174
test.sourceFileFromResource("workspace-a/package.json");
175175
test.sourceFileFromResource("workspace-a/child-workspace/package.json");
176176
test.sourceFileFromResource("nondep-workspace/package.json");
177-
test.property("detect.yarn.monorepo.mode", "true");
177+
test.property("detect.yarn.ignore.all.workspaces", "true");
178178
test.expectBdioResources();
179179
test.run();
180180
}

0 commit comments

Comments
 (0)