Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/check-siblings: Update to work with yarn patch. #771

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/check-siblings.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function ValidateSentryPackageParameters(packages) {
if (installedVersion.split('@').length === 2) {
errorMessages.push("You must specify the version to the package " + installedVersion + ". ( " + installedVersion + "@" + siblingVersion + ")");
}
else if (!installedVersion.endsWith(siblingVersion)) {
else if (!installedVersion.endsWith(siblingVersion) && !installedVersion.includes('%3A' + siblingVersion + '#')) {
Copy link
Contributor Author

@Shayan-To Shayan-To Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is correct. I'm using yarn 4.3.1, and it's not setting npm_config_argv environment variable, and I don't know the exact syntax of it.

errorMessages.push("You tried to install " + installedVersion + ", but the current version of @sentry/capacitor is only compatible with version " + siblingVersion + ". Please install the dependency with the correct version.");
}
}
Expand Down Expand Up @@ -137,7 +137,7 @@ function CheckSiblings() {

for (const lineData of packageJson) {
let sentryRef = lineData.match(jsonFilter);
if (sentryRef && sentryRef[2] !== siblingVersion) {
if (sentryRef && sentryRef[2] !== siblingVersion && !sentryRef[2].includes('%3A' + siblingVersion + '#')) {
incompatiblePackages.push(['@sentry/' + sentryRef[1], sentryRef[2]]);
}
}
Expand Down
Loading