Skip to content

feat: shared dependencies scan options#45

Merged
artus9033 merged 5 commits intomainfrom
feat/shared-deps-scan-options
Jun 18, 2025
Merged

feat: shared dependencies scan options#45
artus9033 merged 5 commits intomainfrom
feat/shared-deps-scan-options

Conversation

@artus9033
Copy link
Copy Markdown
Collaborator

@artus9033 artus9033 commented Jun 16, 2025

This PR introduces a default argument scanOptionsFactory to @callstack/react-native-legal-shared's scanPackage & scanDependencies methods. The default value of this argument has been set up for backwards compatibility reasons and is as follows:

{
  includeTransitiveDependencies: true,
  includeDevDependencies: false,
}

The introduced behaviour allows for passing a factory that will return configuration for a given package.json, conditioning whether development & transitive dependencies should be included. This applies both to the root package and any scanned package. The devDependencies option also applies to transitive dependencies, i.e., if both flags are true, transitive devDependencies will also be included.

Since the list of dependencies for the demo apps will be longer from now on (due to transitive dependencies), it would often cause a timeout due to long scrolling to reach the react-native list item. Due to that reason, this PR also introduces a modification to Maestro scenarios to initially fast-scroll (without assertions) the list to approx. half on Android to start scrolling from a position much closer to the target item.

The changes are non-breaking w.r.t. the library users.


This PR depends on #44 to be merged. To see just a comparison of the changes in this PR for the time #44 is not merged yet, please see the diff of feat/extracted-logic-and-cli...feat/shared-deps-scan-options.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 16, 2025

🦋 Changeset detected

Latest commit: 06a09bd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@callstack/react-native-legal-shared Minor
license-kit Patch
react-native-legal Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@artus9033 artus9033 marked this pull request as ready for review June 17, 2025 11:36
@artus9033 artus9033 requested a review from mateusz1913 June 17, 2025 11:36
Comment thread packages/shared/src/types/ScanPackageOptions.ts Outdated
@artus9033 artus9033 force-pushed the feat/shared-deps-scan-options branch from aaf3963 to 06a09bd Compare June 18, 2025 10:16
@artus9033 artus9033 merged commit b644f22 into main Jun 18, 2025
5 checks passed
@artus9033 artus9033 deleted the feat/shared-deps-scan-options branch June 18, 2025 11:17
@github-actions github-actions Bot mentioned this pull request Jun 18, 2025
@artus9033 artus9033 mentioned this pull request Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants