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

Roll chrome to 132 #2871

Merged
merged 3 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lib/PuppeteerSharp/BrowserData/Chrome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static class Chrome
/// <summary>
/// Default chrome build.
/// </summary>
public static string DefaultBuildId => "130.0.6723.69";
public static string DefaultBuildId => "132.0.6834.83";

internal static async Task<string> ResolveBuildIdAsync(ChromeReleaseChannel channel)
=> (await GetLastKnownGoodReleaseForChannel(channel).ConfigureAwait(false)).Version;
Expand Down
9 changes: 8 additions & 1 deletion lib/PuppeteerSharp/BrowserData/Firefox.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text.Json;
Expand Down Expand Up @@ -181,12 +182,18 @@ private static string GetFirefoxPlatform(Platform platform)
private static string GetArchiveNightly(Platform platform, string buildId)
=> platform switch
{
Platform.Linux => $"firefox-{buildId}.en-US.{GetFirefoxPlatform(platform)}-x86_64.tar.bz2",
Platform.Linux => $"firefox-{buildId}.en-US.{GetFirefoxPlatform(platform)}-x86_64.tar.{GetFormat(buildId)}",
Platform.MacOS or Platform.MacOSArm64 => $"firefox-{buildId}.en-US.mac.dmg",
Platform.Win32 or Platform.Win64 => $"firefox-{buildId}.en-US.{GetFirefoxPlatform(platform)}.zip",
_ => throw new PuppeteerException($"Unknown platform: {platform}"),
};

private static string GetFormat(string buildId)
{
var majorVersion = int.Parse(buildId.Split('.')[0], CultureInfo.CurrentCulture);
return majorVersion >= 135 ? "xz" : "bz2";
}

private static string GetArchive(Platform platform, string buildId)
=> platform switch
{
Expand Down
5 changes: 3 additions & 2 deletions lib/PuppeteerSharp/BrowserFetcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@

if (!assemblyDirectory.Exists || !File.Exists(Path.Combine(assemblyDirectory.FullName, assemblyName)))
{
var assemblyLocation = assembly.Location;

Check warning on line 177 in lib/PuppeteerSharp/BrowserFetcher.cs

View workflow job for this annotation

GitHub Actions / Demo Project (windows-2022)

PuppeteerSharp.BrowserFetcher.GetBrowsersLocation(): 'System.Reflection.Assembly.Location.get' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'.

if (string.IsNullOrEmpty(assemblyLocation))
{
Expand Down Expand Up @@ -209,10 +209,11 @@

private static void ExtractTar(string zipPath, string folderPath)
{
var compression = zipPath.EndsWith("xz", StringComparison.InvariantCulture) ? "J" : "j";
new DirectoryInfo(folderPath).Create();
using var process = new Process();
process.StartInfo.FileName = "tar";
process.StartInfo.Arguments = $"-xvjf \"{zipPath}\" -C \"{folderPath}\"";
process.StartInfo.Arguments = $"-xv{compression}f \"{zipPath}\" -C \"{folderPath}\"";
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
process.Start();
Expand Down Expand Up @@ -433,7 +434,7 @@
{
ExecuteSetup(archivePath, outputPath);
}
else if (archivePath.EndsWith(".tar.bz2", StringComparison.OrdinalIgnoreCase))
else if (archivePath.Contains(".tar."))
{
ExtractTar(archivePath, outputPath);
}
Expand Down
8 changes: 4 additions & 4 deletions lib/PuppeteerSharp/PuppeteerSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<Description>Headless Browser .NET API</Description>
<PackageId>PuppeteerSharp</PackageId>
<PackageReleaseNotes></PackageReleaseNotes>
<PackageVersion>20.0.5</PackageVersion>
<ReleaseVersion>20.0.5</ReleaseVersion>
<AssemblyVersion>20.0.5</AssemblyVersion>
<FileVersion>20.0.5</FileVersion>
<PackageVersion>20.1.0</PackageVersion>
<ReleaseVersion>20.1.0</ReleaseVersion>
<AssemblyVersion>20.1.0</AssemblyVersion>
<FileVersion>20.1.0</FileVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
<StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>
<DebugType>embedded</DebugType>
Expand Down
Loading