-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Release #846
Release #846
Conversation
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.11. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 14.2.5 to 14.2.14. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/commits/v14.2.14/packages/eslint-config-next) --- updated-dependencies: - dependency-name: eslint-config-next dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [next-intl](https://github.com/amannn/next-intl) from 3.17.2 to 3.20.0. - [Release notes](https://github.com/amannn/next-intl/releases) - [Changelog](https://github.com/amannn/next-intl/blob/main/CHANGELOG.md) - [Commits](amannn/next-intl@v3.17.2...v3.20.0) --- updated-dependencies: - dependency-name: next-intl dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…next-intl-3.20.0 build(deps): bump next-intl from 3.17.2 to 3.20.0
…eslint-config-next-14.2.14 build(deps-dev): bump eslint-config-next from 14.2.5 to 14.2.14
…types/react-18.3.11 build(deps-dev): bump @types/react from 18.3.3 to 18.3.11
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.46.1 to 1.47.2. - [Release notes](https://github.com/microsoft/playwright/releases) - [Commits](microsoft/playwright@v1.46.1...v1.47.2) --- updated-dependencies: - dependency-name: "@playwright/test" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…playwright/test-1.47.2 build(deps-dev): bump @playwright/test from 1.46.1 to 1.47.2
Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 14.2.14 to 14.2.15. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/commits/v14.2.15/packages/eslint-config-next) --- updated-dependencies: - dependency-name: eslint-config-next dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.4 to 5.6.3. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](microsoft/TypeScript@v5.5.4...v5.6.3) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [next](https://github.com/vercel/next.js) from 14.2.14 to 14.2.15. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](vercel/next.js@v14.2.14...v14.2.15) --- updated-dependencies: - dependency-name: next dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…next-14.2.15 build(deps): bump next from 14.2.14 to 14.2.15
…typescript-5.6.3 build(deps): bump typescript from 5.5.4 to 5.6.3
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.47.2 to 1.48.0. - [Release notes](https://github.com/microsoft/playwright/releases) - [Commits](microsoft/playwright@v1.47.2...v1.48.0) --- updated-dependencies: - dependency-name: "@playwright/test" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…playwright/test-1.48.0 build(deps-dev): bump @playwright/test from 1.47.2 to 1.48.0
…eslint-config-next-14.2.15 build(deps-dev): bump eslint-config-next from 14.2.14 to 14.2.15
feat: Change Package manager to pnpm
fix: Remove package-lock.json
Bumps [next-intl](https://github.com/amannn/next-intl) from 3.20.0 to 3.21.1. - [Release notes](https://github.com/amannn/next-intl/releases) - [Changelog](https://github.com/amannn/next-intl/blob/main/CHANGELOG.md) - [Commits](amannn/next-intl@v3.20.0...v3.21.1) --- updated-dependencies: - dependency-name: next-intl dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 2 to 4. - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](pnpm/action-setup@v2...v4) --- updated-dependencies: - dependency-name: pnpm/action-setup dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
…s/pnpm/action-setup-4 build(deps): bump pnpm/action-setup from 2 to 4
…next-intl-3.21.1 build(deps): bump next-intl from 3.20.0 to 3.21.1
feat: Code Refactor & Upgrade to Next.js 15 / React 19-RC
Bumps [sass](https://github.com/sass/dart-sass) from 1.79.4 to 1.80.4. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](sass/dart-sass@1.79.4...1.80.4) --- updated-dependencies: - dependency-name: sass dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.5.4 to 22.8.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…types/node-22.8.1 build(deps): bump @types/node from 22.5.4 to 22.8.1
Bumps [@frontendnetwork/veganify](https://github.com/JokeNetwork/veganify-api-wrapper) from 1.2.5 to 1.2.9. - [Commits](https://github.com/JokeNetwork/veganify-api-wrapper/commits) --- updated-dependencies: - dependency-name: "@frontendnetwork/veganify" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…frontendnetwork/veganify-1.2.9 build(deps): bump @frontendnetwork/veganify from 1.2.5 to 1.2.9
…sass-1.80.4 build(deps): bump sass from 1.79.4 to 1.80.4
Run & review this pull request in StackBlitz Codeflow. |
Reviewer's Guide by SourceryThis pull request implements a major refactoring and modernization of the codebase, migrating to Next.js App Router, improving type safety, and enhancing code organization. The changes include better component structure, improved error handling, and the adoption of modern React patterns. Architecture diagram for CI/CD pipeline changesgraph TD;
A[Pull Request] -->|Trigger| B[Build and Lint PRs]
B --> C[Regular Build]
C -->|Success| D[Deploy to Staging]
C -->|Failure| E[Legacy Peer Deps Build]
E -->|Success| D
D --> F[E2E Tests]
F -->|Run on| G[Staging Environment]
Class diagram for ShareButton component refactorclassDiagram
class ShareButton {
+string productName
+string barcode
+boolean showButton
+useEffect()
+handleShareClick(shareUrl: string)
+shareOptions: ShareOption[]
}
class ShareOption {
+string id
+string text
+string icon
+string url
+handler(): Promise<void>
}
Class diagram for ModalWrapper component refactorclassDiagram
class ModalWrapper {
+string id
+"sup" | "span" | "div" buttonType
+string buttonClass
+string buttonText
+ReactNode children
+boolean isOpen
+boolean mounted
+useEffect()
+closeModal()
}
Class diagram for ProductSearch componentclassDiagram
class ProductSearch {
+ProductResult result
+Sources sources
+string barcode
+boolean showFound
+boolean showNotFound
+boolean showInvalid
+boolean showTimeout
+boolean showTimeoutFinal
+boolean loading
+useEffect()
+handleSubmit(barcode: string, event?: FormEvent)
}
class ProductResult {
+string productname
+boolean | "n/a" vegan
+boolean | "n/a" vegetarian
+boolean | "n/a" animaltestfree
+boolean | "n/a" palmoil
+string nutriscore
+string grade
}
class Sources {
+string api
+string baseuri
}
Class diagram for ViewportScanner componentclassDiagram
class ViewportScanner {
+string facingMode
+boolean isHidden
+boolean isMirrored
+initializeScanner(newFacingMode: string)
+handleCameraSwitch()
+handleClose()
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Quality Gate passedIssues Measures |
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.
Hey @philipbrembeck - I've reviewed your changes and found some issues that need to be addressed.
Blocking issues:
- Potential hard-coded PayPal donation link found. (link)
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🔴 Security: 1 blocking issue, 1 other issue
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
}, | ||
(err: Error | null) => { | ||
if (err) { | ||
console.error("Error initializing Quagga:", err); |
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.
suggestion: Add user-facing error handling for scanner initialization failures
Consider adding a proper error state and user feedback mechanism instead of just logging to console. This would improve the user experience when camera access fails or initialization errors occur.
setError(`Scanner initialization failed: ${err.message}`);
showErrorToast('Unable to start barcode scanner. Please check camera permissions.');
|
||
const data = await checkIngredients(ingredientsString); | ||
setResult(data); | ||
} catch (error) { |
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.
suggestion: Extract error handling logic into a separate function
Consider extracting the error handling logic into a separate function to reduce code duplication and improve maintainability.
} catch (error) {
handleFormError(error);
excludeLinksFromLockfile: false | ||
|
||
overrides: | ||
'@types/react': npm:[email protected] |
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.
suggestion (bug_risk): Consider using stable versions of React and its type definitions instead of pre-release versions
Pre-release versions can introduce breaking changes and instability. Unless you specifically need features from React 19, consider using the latest stable version (React 18) and its corresponding type definitions.
'@types/react': npm:[email protected]
'@typescript-eslint/eslint-plugin': ^8.11.0 | ||
'@typescript-eslint/parser': ^8.11.0 | ||
'@typescript-eslint/typescript-estree': ^8.11.0 | ||
uuid: 3.4.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.
🚨 suggestion (security): The uuid package version is significantly outdated
Version 3.4.0 is quite old - consider upgrading to the latest version (v9+) to get performance improvements and security updates.
uuid: 3.4.0 | |
uuid: 9.0.1 |
icon: "icon-paypal", | ||
vendor: "PayPal", | ||
text: "Donate with PayPal", | ||
link: "https://www.paypal.com/donate/?hosted_button_id=J7TEA8GBPN536", |
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.
🚨 issue (security): Potential hard-coded PayPal donation link found.
This line contains a hard-coded PayPal donation link. Ensure that this is intended and does not expose any sensitive information or credentials.
if (!score || score === "n/a") | ||
return { score: "unknown icon-help", className: "" }; |
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.
suggestion (code-quality): Use block braces for ifs, whiles, etc. (use-braces
)
if (!score || score === "n/a") | |
return { score: "unknown icon-help", className: "" }; | |
if (!score || score === "n/a") { | |
return { score: "unknown icon-help", className: "" }; | |
} | |
Explanation
It is recommended to always use braces and create explicit statement blocks.Using the allowed syntax to just write a single statement can lead to very confusing
situations, especially where subsequently a developer might add another statement
while forgetting to add the braces (meaning that this wouldn't be included in the condition).
@@ -0,0 +1,27 @@ | |||
export function preprocessIngredients(input: string): string[] { | |||
if (!input || typeof input !== "string") return []; |
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.
suggestion (code-quality): Use block braces for ifs, whiles, etc. (use-braces
)
if (!input || typeof input !== "string") return []; | |
if (!input || typeof input !== "string") { |
Explanation
It is recommended to always use braces and create explicit statement blocks.Using the allowed syntax to just write a single statement can lead to very confusing
situations, especially where subsequently a developer might add another statement
while forgetting to add the braces (meaning that this wouldn't be included in the condition).
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, []); | ||
|
||
if (isHidden) return null; |
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.
suggestion (code-quality): Use block braces for ifs, whiles, etc. (use-braces
)
if (isHidden) return null; | |
if (isHidden) { |
Explanation
It is recommended to always use braces and create explicit statement blocks.Using the allowed syntax to just write a single statement can lead to very confusing
situations, especially where subsequently a developer might add another statement
while forgetting to add the braces (meaning that this wouldn't be included in the condition).
|
||
useEffect(() => { | ||
if (!isOpen) return; |
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.
suggestion (code-quality): Use block braces for ifs, whiles, etc. (use-braces
)
if (!isOpen) return; | |
if (!isOpen) { |
Explanation
It is recommended to always use braces and create explicit statement blocks.Using the allowed syntax to just write a single statement can lead to very confusing
situations, especially where subsequently a developer might add another statement
while forgetting to add the braces (meaning that this wouldn't be included in the condition).
}, 500); | ||
} | ||
}; | ||
if (!mounted) return null; |
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.
suggestion (code-quality): Use block braces for ifs, whiles, etc. (use-braces
)
if (!mounted) return null; | |
if (!mounted) { |
Explanation
It is recommended to always use braces and create explicit statement blocks.Using the allowed syntax to just write a single statement can lead to very confusing
situations, especially where subsequently a developer might add another statement
while forgetting to add the braces (meaning that this wouldn't be included in the condition).
Summary by Sourcery
Implement new features for product search and ingredient checking, refactor components for better maintainability, and update the build and CI configurations to use pnpm. Enhance documentation with a detailed developer guide and introduce comprehensive testing with Jest and Playwright.
New Features:
Enhancements:
Build:
CI:
Documentation:
Tests:
Chores: