This repository has been archived by the owner on Mar 18, 2024. It is now read-only.
fix(packagediff): fix packages being built when the path to package start with same structure #1423
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.
paths are matched with includes rather than checking the directory properly. This can result in
packages being built if the directory structure is similar
fixes #1396
Summary generated by Reviewpad on 13 Oct 23 11:41 UTC
This pull request fixes an issue where packages are built incorrectly when the path to the package starts with the same structure. Instead of properly checking the directory, paths were matched using includes, which could result in packages being built even if the directory structure was only similar. The patch modifies the PackageDiffImpl.ts file to properly check the directory structure before building packages. Additionally, a new test case is added in the PackageDiffImpl.test.ts file to verify the fix.
Checklist
All items have to be completed before a PR is merged