asar7z: Update description & license, improve install/uninstall script logic#16918
Conversation
WalkthroughUpdated manifest for asar7z: expanded description, license converted to an object, architecture-aware Changes
Sequence Diagram(s)sequenceDiagram
participant Manifest
participant InstallerScript as "Installer\n(PowerShell)"
participant UninstallerScript as "Uninstaller\n(PowerShell)"
participant SevenZip as "7z.exe"
participant FS as "Filesystem (Formats dir)"
rect rgb(235,245,255)
Manifest->>InstallerScript: invoke installer.script
InstallerScript->>SevenZip: Get-Command 7z.exe
alt 7z.exe found
InstallerScript->>FS: ensure Formats directory exists
InstallerScript->>FS: copy package files (exclude .json, ReadMe.txt)
FS-->>InstallerScript: confirm copied
else not found
SevenZip-->>InstallerScript: error / abort
end
end
rect rgb(255,245,235)
Manifest->>UninstallerScript: invoke uninstaller.script
UninstallerScript->>SevenZip: Get-Command 7z.exe
alt 7z.exe found
UninstallerScript->>FS: remove archived formats for package
FS-->>UninstallerScript: confirm removed
else not found
SevenZip-->>UninstallerScript: error / abort
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All changes look good. Wait for review from human collaborators. asar7z
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
bucket/asar7z.json
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: haussmann
Repo: ScoopInstaller/Extras PR: 16863
File: bucket/browseros.json:15-17
Timestamp: 2025-12-21T13:49:44.001Z
Learning: In Scoop manifests, when a URL uses a fragment like `#/dl.7z`, Scoop automatically extracts the archive after download. For nested archives (like BrowserOS), the downloaded installer may contain another archive (e.g., `chrome.7z`) that requires explicit extraction via the installer script using `Expand-7zipArchive`. The installer script should reference the inner archive name, not the outer `dl.7z`.
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16378
File: bucket/compactgui.json:20-22
Timestamp: 2025-10-19T13:58:23.389Z
Learning: In the ScoopInstaller/Extras repository, the CompactGUI manifest removed hash verification from the autoupdate block because the hash verification mechanism (scraping SHA-256 from release page HTML) is no longer available in newer CompactGUI releases. GitHub asset digests exist in beta releases but not in v3.8.0, and Scoop doesn't have built-in support for extracting from GitHub API asset digests.
📚 Learning: 2025-10-19T13:58:23.389Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16378
File: bucket/compactgui.json:20-22
Timestamp: 2025-10-19T13:58:23.389Z
Learning: In the ScoopInstaller/Extras repository, the CompactGUI manifest removed hash verification from the autoupdate block because the hash verification mechanism (scraping SHA-256 from release page HTML) is no longer available in newer CompactGUI releases. GitHub asset digests exist in beta releases but not in v3.8.0, and Scoop doesn't have built-in support for extracting from GitHub API asset digests.
Applied to files:
bucket/asar7z.json
📚 Learning: 2025-12-21T13:49:44.001Z
Learnt from: haussmann
Repo: ScoopInstaller/Extras PR: 16863
File: bucket/browseros.json:15-17
Timestamp: 2025-12-21T13:49:44.001Z
Learning: In Scoop manifests, when a URL uses a fragment like `#/dl.7z`, Scoop automatically extracts the archive after download. For nested archives (like BrowserOS), the downloaded installer may contain another archive (e.g., `chrome.7z`) that requires explicit extraction via the installer script using `Expand-7zipArchive`. The installer script should reference the inner archive name, not the outer `dl.7z`.
Applied to files:
bucket/asar7z.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: WindowsPowerShell
🔇 Additional comments (5)
bucket/asar7z.json (5)
3-3: LGTM!The expanded description clearly conveys the plugin's purpose and the encrypted archive limitation.
5-8: LGTM!The structured license object with an explicit URL aligns with Scoop conventions and improves license traceability.
11-24: LGTM!The architecture-specific pre_install logic correctly removes unused binaries and normalizes DLL naming for the target platform.
25-33: LGTM!The installer script uses robust 7-Zip discovery via
Get-CommandPath, includes proper null-check error handling, and correctly copies only the plugin files to the Formats directory.
43-43: LGTM!The updated regex with
\s*is more resilient to whitespace variations in the version string on the source page.
|
/verify |
|
All changes look good. Wait for review from human collaborators. asar7z
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
bucket/asar7z.json (1)
3-3: Consider shortening the description to align with Scoop conventions.The description is quite verbose (200+ characters). Scoop manifests typically use concise descriptions that focus on the core functionality. The detail about encrypted archives, while informative, could be moved to notes or the homepage.
🔎 Suggested shorter description
- "description": "A plugin for 7-Zip that enables opening, modifying, and creating .asar archives used by Electron-based applications, while noting that encrypted .asar archives cannot be accessed without the specific encryption method defined by the developer.", + "description": "7-Zip plugin for opening and creating .asar archives used by Electron applications",
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
bucket/asar7z.json
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: haussmann
Repo: ScoopInstaller/Extras PR: 16863
File: bucket/browseros.json:15-17
Timestamp: 2025-12-21T13:49:44.001Z
Learning: In Scoop manifests, when a URL uses a fragment like `#/dl.7z`, Scoop automatically extracts the archive after download. For nested archives (like BrowserOS), the downloaded installer may contain another archive (e.g., `chrome.7z`) that requires explicit extraction via the installer script using `Expand-7zipArchive`. The installer script should reference the inner archive name, not the outer `dl.7z`.
📚 Learning: 2025-10-19T13:58:23.389Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16378
File: bucket/compactgui.json:20-22
Timestamp: 2025-10-19T13:58:23.389Z
Learning: In the ScoopInstaller/Extras repository, the CompactGUI manifest removed hash verification from the autoupdate block because the hash verification mechanism (scraping SHA-256 from release page HTML) is no longer available in newer CompactGUI releases. GitHub asset digests exist in beta releases but not in v3.8.0, and Scoop doesn't have built-in support for extracting from GitHub API asset digests.
Applied to files:
bucket/asar7z.json
📚 Learning: 2025-10-13T09:37:06.093Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16328
File: bucket/winutil.json:0-0
Timestamp: 2025-10-13T09:37:06.093Z
Learning: When reviewing code in Scoop manifests, always verify the actual file content if the diff appears incomplete or unusual, as diff context can be truncated or displayed incorrectly. The pattern `[string[]](...).ForEach{...}` is commonly used in post_uninstall scripts across the Extras repository.
Applied to files:
bucket/asar7z.json
📚 Learning: 2025-12-21T13:49:44.001Z
Learnt from: haussmann
Repo: ScoopInstaller/Extras PR: 16863
File: bucket/browseros.json:15-17
Timestamp: 2025-12-21T13:49:44.001Z
Learning: In Scoop manifests, when a URL uses a fragment like `#/dl.7z`, Scoop automatically extracts the archive after download. For nested archives (like BrowserOS), the downloaded installer may contain another archive (e.g., `chrome.7z`) that requires explicit extraction via the installer script using `Expand-7zipArchive`. The installer script should reference the inner archive name, not the outer `dl.7z`.
Applied to files:
bucket/asar7z.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: WindowsPowerShell
🔇 Additional comments (4)
bucket/asar7z.json (4)
5-8: LGTM! License structure follows Scoop conventions.Converting the license to a structured object with identifier and URL is the correct format and improves metadata quality.
25-33: LGTM! Installer script follows best practices.The installer script properly:
- Locates 7z.exe using
Get-CommandPath- Validates 7z.exe existence with an abort guard
- Ensures the Formats directory exists
- Copies plugin files while excluding manifest and documentation
34-44: LGTM! Uninstaller now includes proper null check.The uninstaller script correctly guards against a null
$7z_pathon line 37, addressing the concern from the previous review. The script will now gracefully skip plugin removal if 7z.exe is not found, preventing potential errors when 7-Zip is uninstalled before this plugin.
45-45: LGTM! Checkver pattern improvement.Adding
\s*to allow optional whitespace makes the version extraction more robust and handles potential formatting variations in the upstream source.
|
All changes look good. Wait for review from human collaborators. asar7z
|
Summary
Refactors the
asar7zmanifest to improve installation reliability, 7-Zip discovery, and architecture handling, while aligning description and licensing fields with current Scoop conventions.Related issues or pull requests
Changes
.asarusage and encrypted archive limitationlicensestring with structuredlicenseobject including URLpre_install/pre_uninstalllogic with explicitinstaller/uninstallerscriptsGet-CommandPath -Command '7z.exe'for robust 7-Zip path detection instead ofscoop which 7zNotes
persistdirfunction is only applicable when 7-Zip is installed via Scoop and cannot accommodate scenarios where users enableuse_external_7zip. Moreover, the installation location depends on the installation path of 7-Zip, meaning that the value of$globalmust be consistent at installation time.scoop which 7z, if7zcannot be found through thePathenvironment variable, it will unavoidably output:'7z' not found, not a scoop shim, or a broken shim.Get-CommandPath -Command '7z.exe'.https://github.com/ScoopInstaller/Main/blob/c368d7c1833e31404c42db2870c562ae9fefe018/bucket/modern7z.json#L17-L26
Testing
The test results are as follows:
<manifest-name[@version]|chore>: <general summary of the pull request>Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.