Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ayushatstack
Copy link
Contributor

@ayushatstack ayushatstack commented Aug 21, 2025

@ayushatstack ayushatstack requested a review from a team as a code owner August 21, 2025 13:24
@bhokaremoin bhokaremoin requested a review from Copilot August 21, 2025 13:26
Copilot

This comment was marked as outdated.

@ayushatstack ayushatstack requested a review from Copilot August 21, 2025 14:33
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds SDK version checking functionality to the Percy core package. The feature checks if a newer version of the SDK is available by comparing the current version against the latest GitHub release.

  • Adds a utility function to check SDK versions against GitHub releases
  • Integrates version checking into the Percy snapshot workflow
  • Maps package names to their corresponding GitHub repositories

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/core/src/utils.js Adds package-to-repo mapping and checkSDKVersion function
packages/core/src/percy.js Integrates SDK version checking into the snapshot process

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ayushatstack ayushatstack requested a review from prklm10 August 25, 2025 12:19
Comment on lines +590 to +607
'@percy/selenium-webdriver': 'percy-selenium-js',
'@percy/playwright': 'percy-playwright',
'@percy/appium-app': 'percy-appium-js',
'@percy/storybook': 'percy-storybook',
'@percy/ember': 'percy-ember',
'@percy/cypress': 'percy-cypress',
'@percy/puppeteer': 'percy-puppeteer',
'@percy/testcafe': 'percy-testcafe',
'@percy/nightwatch': 'percy-nightwatch',
'percy-java-selenium': 'percy-selenium-java',
'percy-playwright-java': 'percy-playwright-java',
'percy-appium-dotnet': 'percy-appium-dotnet',
'percy-selenium-dotnet': 'percy-selenium-dotnet',
'percy-playwright-dotnet': 'percy-playwright-dotnet',
'percy-playwright-python': 'percy-playwright-python',
'percy-selenium-python': 'percy-selenium-python',
'percy-selenium-ruby': 'percy-selenium-ruby',
'percy-capybara': 'percy-capybara'
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't think this is all appium java, appium ruby etc are missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the most used ones over the last 7 days. For the rest the user agent string is ambiguous for example
we get percy-appium-app for java appium, python appium and ruby appium except those I have added the most used ones.

// Get GitHub repo name from mapping
const repoName = PACKAGE_TO_REPO[packageName];
if (!repoName) {
log.debug(`No repo mapping found for package: ${packageName}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this log required? When we add newer sdk's it will have issues

Copy link
Contributor Author

@ayushatstack ayushatstack Aug 25, 2025

Choose a reason for hiding this comment

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

@prklm10 I kept it for debugging purpose sometimes the user-agent can come as something unexpected or there might be a new newer sdk as you mentioned. Will it be a issue if it is shown only in debug mode logs? Normally the customer won't see it

@ayushatstack ayushatstack requested a review from prklm10 August 26, 2025 11:11
@ayushatstack ayushatstack merged commit 8bed30b into master Aug 28, 2025
41 checks passed
@ayushatstack ayushatstack deleted the PPLT_4314 branch August 28, 2025 12:25
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