fix(core): pin unarray and os_info (#6212)

This commit is contained in:
Lucas Fernandes Nogueira 2023-02-07 15:47:31 -08:00 committed by GitHub
parent b72adc0a66
commit a8d640b3c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 271 additions and 59 deletions

5
.changes/pin-os-info.md Normal file
View File

@ -0,0 +1,5 @@
---
"tauri": patch
---
Pin `os_info` to `=3.5`.

View File

@ -720,19 +720,47 @@
},
"Theme": {
"description": "System theme.",
"type": "string",
"enum": [
"Light",
"Dark"
"oneOf": [
{
"description": "Light theme.",
"type": "string",
"enum": [
"Light"
]
},
{
"description": "Dark theme.",
"type": "string",
"enum": [
"Dark"
]
}
]
},
"TitleBarStyle": {
"description": "How the window title bar should be displayed on macOS.",
"type": "string",
"enum": [
"Visible",
"Transparent",
"Overlay"
"oneOf": [
{
"description": "A normal title bar.",
"type": "string",
"enum": [
"Visible"
]
},
{
"description": "Makes the title bar transparent, so the window background color is shown instead.\n\nUseful if you don't need to have actual HTML under the title bar. This lets you avoid the caveats of using `TitleBarStyle::Overlay`. Will be more useful when Tauri lets you set a custom window background color.",
"type": "string",
"enum": [
"Transparent"
]
},
{
"description": "Shows the title bar as a transparent overlay over the window's content.\n\nKeep in mind: - The height of the title bar is different on different OS versions, which can lead to window the controls and title not being where you don't expect. - You need to define a custom drag region to make your window draggable, however due to a limitation you can't drag the window when it's not in focus <https://github.com/tauri-apps/tauri/issues/4316>. - The color of the window title depends on the system theme.",
"type": "string",
"enum": [
"Overlay"
]
}
]
},
"CliConfig": {
@ -1155,15 +1183,56 @@
},
"BundleType": {
"description": "A bundle referenced by tauri-bundler.",
"type": "string",
"enum": [
"deb",
"appimage",
"msi",
"nsis",
"app",
"dmg",
"updater"
"oneOf": [
{
"description": "The debian bundle (.deb).",
"type": "string",
"enum": [
"deb"
]
},
{
"description": "The AppImage bundle (.appimage).",
"type": "string",
"enum": [
"appimage"
]
},
{
"description": "The Microsoft Installer bundle (.msi).",
"type": "string",
"enum": [
"msi"
]
},
{
"description": "The NSIS bundle (.exe).",
"type": "string",
"enum": [
"nsis"
]
},
{
"description": "The macOS application bundle (.app).",
"type": "string",
"enum": [
"app"
]
},
{
"description": "The Apple Disk Image bundle (.dmg).",
"type": "string",
"enum": [
"dmg"
]
},
{
"description": "The Tauri updater bundle.",
"type": "string",
"enum": [
"updater"
]
}
]
},
"AppImageConfig": {
@ -1647,11 +1716,28 @@
},
"NSISInstallerMode": {
"description": "Install Modes for the NSIS installer.",
"type": "string",
"enum": [
"currentUser",
"perMachine",
"both"
"oneOf": [
{
"description": "Default mode for the installer.\n\nInstall the app by default in a directory that doesn't require Administrator access.\n\nInstaller metadata will be saved under the `HKCU` registry path.",
"type": "string",
"enum": [
"currentUser"
]
},
{
"description": "Install the app by default in the `Program Files` folder directory requires Administrator access for the installation.\n\nInstaller metadata will be saved under the `HKLM` registry path.",
"type": "string",
"enum": [
"perMachine"
]
},
{
"description": "Combines both modes and allows the user to choose at install time whether to install for the current user or per machine. Note that this mode will require Administrator access even if the user wants to install it for the current user only.\n\nInstaller metadata will be saved under the `HKLM` or `HKCU` registry path based on the user's choice.",
"type": "string",
"enum": [
"both"
]
}
]
},
"AllowlistConfig": {
@ -2644,11 +2730,28 @@
},
"WindowsUpdateInstallMode": {
"description": "Install modes for the Windows update.",
"type": "string",
"enum": [
"basicUi",
"quiet",
"passive"
"oneOf": [
{
"description": "Specifies there's a basic UI during the installation process, including a final dialog box at the end.",
"type": "string",
"enum": [
"basicUi"
]
},
{
"description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does (WiX).",
"type": "string",
"enum": [
"quiet"
]
},
{
"description": "Specifies unattended mode, which means the installation only shows a progress bar.",
"type": "string",
"enum": [
"passive"
]
}
]
},
"SystemTrayConfig": {

View File

@ -76,7 +76,7 @@ os_pipe = { version = "1.0", optional = true }
raw-window-handle = "0.5"
minisign-verify = { version = "0.2", optional = true }
time = { version = "0.3", features = [ "parsing", "formatting" ], optional = true }
os_info = { version = "3.5.0", optional = true }
os_info = { version = "=3.5.0", optional = true }
regex = { version = "1.6.0", optional = true }
glob = "0.3"
data-url = { version = "0.2", optional = true }
@ -115,6 +115,7 @@ once_cell = "1"
[dev-dependencies]
mockito = "0.31"
proptest = "1.0.0"
unarray = "=0.1.3"
quickcheck = "1.0.3"
quickcheck_macros = "1.0.0"
serde = { version = "1.0", features = [ "derive" ] }

View File

@ -720,19 +720,47 @@
},
"Theme": {
"description": "System theme.",
"type": "string",
"enum": [
"Light",
"Dark"
"oneOf": [
{
"description": "Light theme.",
"type": "string",
"enum": [
"Light"
]
},
{
"description": "Dark theme.",
"type": "string",
"enum": [
"Dark"
]
}
]
},
"TitleBarStyle": {
"description": "How the window title bar should be displayed on macOS.",
"type": "string",
"enum": [
"Visible",
"Transparent",
"Overlay"
"oneOf": [
{
"description": "A normal title bar.",
"type": "string",
"enum": [
"Visible"
]
},
{
"description": "Makes the title bar transparent, so the window background color is shown instead.\n\nUseful if you don't need to have actual HTML under the title bar. This lets you avoid the caveats of using `TitleBarStyle::Overlay`. Will be more useful when Tauri lets you set a custom window background color.",
"type": "string",
"enum": [
"Transparent"
]
},
{
"description": "Shows the title bar as a transparent overlay over the window's content.\n\nKeep in mind: - The height of the title bar is different on different OS versions, which can lead to window the controls and title not being where you don't expect. - You need to define a custom drag region to make your window draggable, however due to a limitation you can't drag the window when it's not in focus <https://github.com/tauri-apps/tauri/issues/4316>. - The color of the window title depends on the system theme.",
"type": "string",
"enum": [
"Overlay"
]
}
]
},
"CliConfig": {
@ -1155,15 +1183,56 @@
},
"BundleType": {
"description": "A bundle referenced by tauri-bundler.",
"type": "string",
"enum": [
"deb",
"appimage",
"msi",
"nsis",
"app",
"dmg",
"updater"
"oneOf": [
{
"description": "The debian bundle (.deb).",
"type": "string",
"enum": [
"deb"
]
},
{
"description": "The AppImage bundle (.appimage).",
"type": "string",
"enum": [
"appimage"
]
},
{
"description": "The Microsoft Installer bundle (.msi).",
"type": "string",
"enum": [
"msi"
]
},
{
"description": "The NSIS bundle (.exe).",
"type": "string",
"enum": [
"nsis"
]
},
{
"description": "The macOS application bundle (.app).",
"type": "string",
"enum": [
"app"
]
},
{
"description": "The Apple Disk Image bundle (.dmg).",
"type": "string",
"enum": [
"dmg"
]
},
{
"description": "The Tauri updater bundle.",
"type": "string",
"enum": [
"updater"
]
}
]
},
"AppImageConfig": {
@ -1647,11 +1716,28 @@
},
"NSISInstallerMode": {
"description": "Install Modes for the NSIS installer.",
"type": "string",
"enum": [
"currentUser",
"perMachine",
"both"
"oneOf": [
{
"description": "Default mode for the installer.\n\nInstall the app by default in a directory that doesn't require Administrator access.\n\nInstaller metadata will be saved under the `HKCU` registry path.",
"type": "string",
"enum": [
"currentUser"
]
},
{
"description": "Install the app by default in the `Program Files` folder directory requires Administrator access for the installation.\n\nInstaller metadata will be saved under the `HKLM` registry path.",
"type": "string",
"enum": [
"perMachine"
]
},
{
"description": "Combines both modes and allows the user to choose at install time whether to install for the current user or per machine. Note that this mode will require Administrator access even if the user wants to install it for the current user only.\n\nInstaller metadata will be saved under the `HKLM` or `HKCU` registry path based on the user's choice.",
"type": "string",
"enum": [
"both"
]
}
]
},
"AllowlistConfig": {
@ -2644,11 +2730,28 @@
},
"WindowsUpdateInstallMode": {
"description": "Install modes for the Windows update.",
"type": "string",
"enum": [
"basicUi",
"quiet",
"passive"
"oneOf": [
{
"description": "Specifies there's a basic UI during the installation process, including a final dialog box at the end.",
"type": "string",
"enum": [
"basicUi"
]
},
{
"description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does (WiX).",
"type": "string",
"enum": [
"quiet"
]
},
{
"description": "Specifies unattended mode, which means the installation only shows a progress bar.",
"type": "string",
"enum": [
"passive"
]
}
]
},
"SystemTrayConfig": {

View File

@ -89,7 +89,7 @@ pub fn command(options: Options) -> Result<()> {
png_targets.extend(
[32, 128]
.into_iter()
.map(|size| PngTarget::new(size, format!("{}x{}.png", size, size)))
.map(|size| PngTarget::new(size, format!("{size}x{size}.png")))
.collect::<Vec<PngTarget>>(),
);
png(&source, &out_dir, png_targets).context("Failed to generate png icons")?;
@ -99,7 +99,7 @@ pub fn command(options: Options) -> Result<()> {
&out_dir,
png_icon_sizes
.into_iter()
.map(|size| PngTarget::new(size, format!("{}x{}.png", size, size)))
.map(|size| PngTarget::new(size, format!("{size}x{size}.png")))
.collect(),
)?;
}