-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add eurobuch-search extension #24307
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
base: main
Are you sure you want to change the base?
Conversation
- Prettier - Change Icon Name - Icon Change - Category "Web" added - docs: improve README formatting and structure - feat: initial release of Eurobuch Search extension - Initial commit
|
Congratulations on your new Raycast extension! 🚀 Due to our current reduced availability, the initial review may take up to 10-15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
wdeu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for your help. I hope it works now.
- final check - Merge branch \'contributions/merge-1768067507801\' - Pull contributions - flat icon - pre-publish-check - fix: add null checks for match variable and void for showToast - fix: typescript errors and invalid icon references - Icon Update € - feat: update extension icon to simpler design - Typescript Fix - docs: add properly sized screenshots - docs: add screenshots
Greptile OverviewGreptile SummaryThis PR introduces a new Raycast extension for searching and comparing book prices on Eurobuch, a European book marketplace aggregator. The extension provides a polished user experience with smart ISBN detection, automatic format conversion, and comprehensive price comparison features. Key Features
Critical Issues Found1. Manual Preferences Interface Definition
|
| Filename | Score | Overview |
|---|---|---|
| extensions/eurobuch-search/src/eurobuch-search.tsx | 3/5 | Main extension file with manual Preferences interface definition (violates rule) and ISBN regex pattern inconsistency on lines 181/193 vs 125 |
| extensions/eurobuch-search/package.json | 3/5 | Contains repository/bugs/homepage fields not used in other Raycast extensions, version is 2.0.0 instead of 1.0.0 for initial release |
| extensions/eurobuch-search/CHANGELOG.md | 4/5 | Contains placeholder text {PR_MERGE_DATE} that should be replaced with actual version info |
| extensions/eurobuch-search/src/tests/eurobuch-search.test.ts | 4/5 | Comprehensive tests but duplicates parseEurobuchXML code instead of importing from source file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, 6 comments
| interface Preferences { | ||
| platform: string; | ||
| password: string; | ||
| resultLimit: string; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Preferences interface should not be manually defined. Raycast auto-generates this type in raycast-env.d.ts when the extension runs. Manual definitions can become out of sync with your actual configuration in package.json.
Remove this interface and import the type from the auto-generated file instead:
| interface Preferences { | |
| platform: string; | |
| password: string; | |
| resultLimit: string; | |
| } | |
| // Remove this interface - it's auto-generated in raycast-env.d.ts |
This follows the repository rule: "Don't manually define Preferences for getPreferenceValues(); they're auto-generated in raycast-env.d.ts"
| const cleaned = selected.trim(); | ||
|
|
||
| // Check if it looks like an ISBN (10 or 13 digits, possibly with X) | ||
| if (/^\d{10}[\dXx]?$|^\d{13}$/.test(cleaned.replace(/[-\s]/g, ""))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ISBN-10 regex pattern is incorrect. The pattern /^\d{10}[\dXx]?$|^\d{13}$/ will match:
- 10 digits (valid ISBN-10 without X)
- 11 characters (10 digits + X) - INCORRECT!
- 13 digits (valid ISBN-13)
ISBN-10 format is exactly 10 characters: 9 digits + 1 check digit (0-9 or X). The correct pattern should be /^\d{9}[\dXx]$|^\d{13}$/ to match exactly 10 or 13 characters, which is consistent with line 125.
| if (/^\d{10}[\dXx]?$|^\d{13}$/.test(cleaned.replace(/[-\s]/g, ""))) { | |
| if (/^\d{9}[\dXx]$|^\d{13}$/.test(cleaned.replace(/[-\s]/g, ""))) { |
| const cleaned = clipboardText.trim(); | ||
|
|
||
| // Check if clipboard contains an ISBN | ||
| if (/^\d{10}[\dXx]?$|^\d{13}$/.test(cleaned.replace(/[-\s]/g, ""))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same ISBN-10 regex pattern issue as line 181. The pattern /^\d{10}[\dXx]?$|^\d{13}$/ incorrectly matches 11-character strings (10 digits + X).
| if (/^\d{10}[\dXx]?$|^\d{13}$/.test(cleaned.replace(/[-\s]/g, ""))) { | |
| if (/^\d{9}[\dXx]$|^\d{13}$/.test(cleaned.replace(/[-\s]/g, ""))) { |
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/wdeu/eurobuch-search.git" | ||
| }, | ||
| "bugs": { | ||
| "url": "https://github.com/wdeu/eurobuch-search/issues" | ||
| }, | ||
| "homepage": "https://github.com/wdeu/eurobuch-search#readme", | ||
| "$schema": "https://www.raycast.com/schemas/extension.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repository, bugs, and homepage fields should not be included in Raycast extension package.json files. These fields are not used in other extensions in this repository (checked extensions/1bookmark and extensions/0x0 as examples).
| "repository": { | |
| "type": "git", | |
| "url": "https://github.com/wdeu/eurobuch-search.git" | |
| }, | |
| "bugs": { | |
| "url": "https://github.com/wdeu/eurobuch-search/issues" | |
| }, | |
| "homepage": "https://github.com/wdeu/eurobuch-search#readme", | |
| "$schema": "https://www.raycast.com/schemas/extension.json" | |
| "$schema": "https://www.raycast.com/schemas/extension.json" | |
| } |
Remove these fields as they're specific to standalone npm packages, not Raycast extensions.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| { | ||
| "name": "eurobuch-search", | ||
| "title": "Eurobuch Search", | ||
| "version": "2.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version should be 1.0.0 for an initial release, not 2.0.0. Semantic versioning starts at 1.0.0 for the first stable release.
| "version": "2.0.0", | |
| "version": "1.0.0", |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| @@ -0,0 +1,3 @@ | |||
| # Eurobuch Search Changelog | |||
|
|
|||
| ## [Initial Version] - {PR_MERGE_DATE} No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CHANGELOG contains a placeholder {PR_MERGE_DATE} that should be replaced with actual version information and changes. For an initial release, this should describe what features are included.
| ## [Initial Version] - {PR_MERGE_DATE} | |
| ## [1.0.0] - 2025-01-XX | |
| - Initial release | |
| - Search books by ISBN, title, or author | |
| - Compare prices across European book platforms | |
| - Auto-detect ISBN from clipboard or selection | |
| - Automatic ISBN-10 to ISBN-13 conversion | |
| - Sort results by total price (book + shipping) |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Removed the 'owner' field from package.json.
Removed redundant comments and checks from the pre-publish script to streamline the process. Local only.
Description
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder