Conversation
Reverts "chore: bump main to 9.0.0-dev.0 (ionic-team#8320)" and “chore: update latest workflow to only allow pointing at 8.x” This reverts commit c5476c8 and 0412d46
…8338) Co-authored-by: Mark Anderson <mark.anderson@outsystems.com>
Co-authored-by: Mark Anderson <mark.anderson@outsystems.com> Co-authored-by: Mark Anderson <emer@emer.net>
Co-authored-by: Stein Jakob Nordbø <steinjak@gmail.com> Co-authored-by: Pedro Bilro <pedro.gustavo.bilro@outsystems.com>
…onic-team#7528) Co-authored-by: Pedro Bilro <pedro.gustavo.bilro@outsystems.com> Co-authored-by: jcesarmobile <jcesarmobile@gmail.com>
Co-authored-by: Pedro Bilro <pedro.gustavo.bilro@outsystems.com>
Closes ionic-team#8367 Fixes regression introduced by ionic-team#8357
…onic-team#8391) Co-authored-by: Pedro Bilro <pedro.gustavo.bilro@outsystems.com>
…eam#8377) Co-authored-by: jcesarmobile <jcesarmobile@gmail.com>
…ic-team#8351) Co-authored-by: OS-pedrogustavobilro <pedro.gustavo.bilro@outsystems.com>
Co-authored-by: OS-ruimoreiramendes <rui.moreira.mendes@outsystems.com>
Co-authored-by: OS-ruimoreiramendes <rui.moreira.mendes@outsystems.com> Co-authored-by: Pedro Bilro <pedro.gustavo.bilro@outsystems.com>
📝 WalkthroughWalkthroughThis diff merges upstream Capacitor changes (v8.3.1) into a fork, introducing unresolved Git conflict markers across changelogs and package metadata. Changes include new GitHub workflows, CLI package manager abstraction, Android/iOS fetch URL proxying support, SystemBars CSS variable injection refactoring, and dependency version updates. Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI Tool
participant Config as Config Resolver
participant iOS as iOS Checks
participant SPM as SPM Validation
participant CocoPods as CocoaPods Check
participant Bundler as Bundler Check
CLI->>Config: Load config
Config->>Config: Determine package manager<br/>(CocoaPods/bundler/SPM)
Config-->>CLI: Return IOSConfig with<br/>packageManager Promise
CLI->>iOS: getCommonChecks(config)
alt packageManager = 'SPM'
iOS->>SPM: checkSwiftToolsVersion(config)
SPM-->>iOS: Validation result
iOS->>SPM: checkPackageTraitsRequirements(config)
SPM-->>iOS: Validation result
else packageManager = 'bundler'
iOS->>Bundler: checkBundler(config)
Bundler-->>iOS: Check result
else packageManager = 'Cocoapods'
iOS->>CocoPods: checkCocoaPods(config)
CocoPods-->>iOS: Check result
end
iOS-->>CLI: Return CheckFunction[]
CLI->>CLI: Execute all checks
sequenceDiagram
participant Client as App/Browser
participant JsProxy as Fetch Proxy (JS)
participant Android as Android Bridge
participant iOS as iOS Bridge
Client->>JsProxy: fetch(URL object, ...)
alt Resource is URL
JsProxy->>JsProxy: Convert to string
JsProxy->>JsProxy: Create proxy URL
JsProxy->>JsProxy: Construct new URL
else Resource is string
JsProxy->>JsProxy: Create proxy URL directly
else Resource is Request
JsProxy->>JsProxy: Extract and proxy URL
end
JsProxy->>Android: CapacitorWebFetch<br/>(proxied URL)
JsProxy->>iOS: CapacitorWebFetch<br/>(proxied URL)
Android-->>Client: Response
iOS-->>Client: Response
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53928b1e95
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "@ionic/eslint-config": "^0.4.0", | ||
| "@ionic/prettier-config": "^4.0.0", | ||
| "@ionic/swiftlint-config": "^2.0.0", | ||
| <<<<<<< HEAD |
There was a problem hiding this comment.
Resolve merge markers in root package manifest
The root package.json still contains conflict markers (<<<<<<<, =======, >>>>>>>), which makes the file invalid JSON and prevents package-manager commands from running at all (for example, parsing fails immediately before install/build scripts can execute). This blocks CI and local development until the conflict is fully resolved.
Useful? React with 👍 / 👎.
| @@ -1,9 +1,17 @@ | |||
| { | |||
| <<<<<<< HEAD | |||
There was a problem hiding this comment.
Clean conflict markers from workspace package manifests
Workspace package manifests also include unresolved merge markers, so they are invalid JSON as committed. Even after fixing the root manifest, commands that read package metadata for publishing/packing these workspaces will still fail until the conflicts are removed (the same pattern appears in android/package.json, cli/package.json, core/package.json, and ios/package.json).
Useful? React with 👍 / 👎.
|
|
||
| export async function generatePackageText(config: Config, plugins: Plugin[]): Promise<string> { | ||
| const iosPlatformVersion = await getCapacitorPackageVersion(config, config.ios.name); | ||
| <<<<<<< HEAD |
There was a problem hiding this comment.
Remove unresolved conflict markers from SPM utility
cli/src/util/spm.ts includes raw merge markers in executable TypeScript, which makes the source syntactically invalid and breaks transpilation/runtime import of the CLI module. Any build or command path touching this file will fail until the conflict is resolved.
Useful? React with 👍 / 👎.
| "tagVersionPrefix": "" | ||
| } | ||
| }, | ||
| <<<<<<< HEAD |
There was a problem hiding this comment.
Remove conflict markers from lerna configuration
lerna.json also contains unresolved conflict markers, so it is no longer valid JSON. This breaks Lerna-based versioning/publish workflows that parse this file, which is especially risky for release automation even if other build paths are fixed.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 15
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (8)
android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java (1)
345-370:⚠️ Potential issue | 🟠 MajorServe the requested byte range, not the full stream.
Line 346 still returns the original stream from byte
0. This branch sets206/Content-Range, but it never skips tofromRangeor limits the response length, so resume/seek clients can receive an invalid partial response.Possible fix
- InputStream responseStream = new LollipopLazyInputStream(handler, request); + InputStream responseStream = new LollipopLazyInputStream(handler, request); String mimeType = getMimeType(path, responseStream); Map<String, String> tempResponseHeaders = handler.buildDefaultResponseHeaders(); int statusCode = 206; try { - int totalRange = responseStream.available(); + int totalRange = responseStream.available(); String[] parts = rangeString.split("="); String[] streamParts = parts[1].split("-"); - String fromRange = streamParts[0]; - int range = totalRange - 1; + long fromRange = Long.parseLong(streamParts[0]); + long range = totalRange - 1L; if (streamParts.length > 1) { - range = Integer.parseInt(streamParts[1]); + range = Long.parseLong(streamParts[1]); } + responseStream.skipNBytes(fromRange); + responseStream = new BoundedInputStream(responseStream, range - fromRange + 1); tempResponseHeaders.put("Accept-Ranges", "bytes"); tempResponseHeaders.put("Content-Range", "bytes " + fromRange + "-" + range + "/" + totalRange); + tempResponseHeaders.put("Content-Length", String.valueOf(range - fromRange + 1)); } catch (IOException e) { statusCode = 404; }A small
FilterInputStreamhelper can enforce the byte limit if you do not already have one.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java` around lines 345 - 370, The range-branch in WebViewLocalServer is constructing a 206/Content-Range response but still returns the original LollipopLazyInputStream from byte 0; update the logic to skip to fromRange and limit reads to the requested length before returning: compute fromRange and length = (range - fromRange + 1), call responseStream.skip(fromRange) (handling skip loop/exceptions), and wrap responseStream with a bounded FilterInputStream that prevents reading past length (or create a helper like a LimitedInputStream) so the returned stream only serves the requested byte range; keep the existing header construction using totalRange, fromRange, and range and return the wrapped/limited responseStream.ios/Capacitor/Capacitor/Plugins/CapacitorUrlRequest.swift (1)
69-73:⚠️ Potential issue | 🟠 MajorMake boundary parsing resilient before using it in multipart assembly.
Line 69 and Line 134 only try extraction when
contains("boundary=")matches exactly, andextractBoundary(from:)can return untrimmed/empty values. That can produce malformed multipart bodies for validContent-Typevariants (spacing/casing/empty value).💡 Suggested fix
- if contentType.contains("boundary="), let contentBoundary = extractBoundary(from: contentType) { + if let contentBoundary = extractBoundary(from: contentType) { boundary = contentBoundary } else { overrideContentType(boundary) } @@ - if contentType.contains("boundary="), let contentBoundary = extractBoundary(from: contentType) { + if let contentBoundary = extractBoundary(from: contentType) { boundary = contentBoundary } else { overrideContentType(boundary) } @@ - private func extractBoundary(from contentType: String) -> String? { - if let boundaryRange = contentType.range(of: "boundary=") { - var boundary = contentType[boundaryRange.upperBound...] - if let endRange = boundary.range(of: ";") { - boundary = boundary[..<endRange.lowerBound] - } - - if boundary.hasPrefix("\"") && boundary.hasSuffix("\"") { - return String(boundary.dropFirst().dropLast()) - } else { - return String(boundary) - } - } - - return nil - } + private func extractBoundary(from contentType: String) -> String? { + for parameter in contentType.split(separator: ";") { + let parts = parameter.split(separator: "=", maxSplits: 1, omittingEmptySubsequences: false) + guard parts.count == 2 else { continue } + let name = parts[0].trimmingCharacters(in: .whitespacesAndNewlines).lowercased() + guard name == "boundary" else { continue } + + var value = parts[1].trimmingCharacters(in: .whitespacesAndNewlines) + if value.hasPrefix("\""), value.hasSuffix("\""), value.count >= 2 { + value = String(value.dropFirst().dropLast()) + } + + return value.isEmpty ? nil : String(value) + } + return nil + }Also applies to: 94-109, 134-138
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ios/Capacitor/Capacitor/Plugins/CapacitorUrlRequest.swift` around lines 69 - 73, The boundary extraction currently relies on a strict contains("boundary=") check and uses extractBoundary(from:) without validating/normalizing its result, which can yield empty/untrimmed boundaries and break multipart assembly; update the logic in CapacitorUrlRequest.swift (locations around the boundary variable usage, extractBoundary(from:) calls, and overrideContentType(boundary) invocation) to robustly parse the Content-Type header by performing a case-insensitive search for "boundary=", trimming whitespace and surrounding quotes from the extracted value, validating it's non-empty before assigning to boundary, and only calling overrideContentType(boundary) when the normalized boundary is valid; ensure the same validation is applied in the other occurrences (lines handling multipart assembly) to prevent malformed multipart bodies.cli/src/ios/open.ts (1)
7-11:⚠️ Potential issue | 🟡 MinorUse strict equality operator (
===) instead of loose equality (==).Line 7 should use
===for comparison with a string literal to follow best practices.Proposed fix
- if ((await config.ios.packageManager) == 'SPM') { + if ((await config.ios.packageManager) === 'SPM') {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cli/src/ios/open.ts` around lines 7 - 11, Change the loose equality in the package manager check to a strict comparison: in the conditional that reads use of config.ios.packageManager (inside the function using open), replace the `== 'SPM'` comparison with `=== 'SPM'` so the branch that calls open(config.ios.nativeXcodeProjDirAbs, { wait: false }) vs open(config.ios.nativeXcodeWorkspaceDirAbs, { wait: false }) uses strict equality; update the conditional expression accordingly where config.ios.packageManager is awaited.android/CHANGELOG.md (1)
6-260:⚠️ Potential issue | 🔴 CriticalUnresolved merge conflict markers must be removed.
Line 6 (
<<<<<<< HEAD) through Line 260 (>>>>>>> upstream/main) indicates the changelog is still conflicted. Resolve to one final version before merging.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@android/CHANGELOG.md` around lines 6 - 260, The changelog contains unresolved Git conflict markers (<<<<<<< HEAD, =======, >>>>>>> upstream/main) spanning the merged sections; remove these markers and resolve the two conflicting blocks into one coherent changelog entry (choose the intended content/version from either the HEAD block or the upstream/main block), ensuring only the final chosen content remains and the file has no conflict markers left (verify by searching for the strings "<<<<<<<", "=======", ">>>>>>>").ios/CHANGELOG.md (1)
6-231:⚠️ Potential issue | 🔴 CriticalResolve leftover merge conflict markers before merge.
Line 6 introduces
<<<<<<< HEADand Line 231 ends with>>>>>>> upstream/main; this file is still in a conflicted state and should be resolved to a single changelog history.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ios/CHANGELOG.md` around lines 6 - 231, The changelog contains leftover git conflict markers (<<<<<<< HEAD, =======, >>>>>>> upstream/main) around two competing histories (e.g., sections starting with "## [8.0.8]" and "## [8.3.1]"); remove the conflict markers and produce a single resolved changelog by choosing and/or merging the intended release entries (keep the desired version headings and combined entries in chronological order), delete the <<<<<<</=======/>>>>>> lines, ensure no duplicate sections remain (inspect "## [8.0.8]" and "## [8.3.1]" blocks), save the file and stage the resolved CHANGELOG.CHANGELOG.md (1)
6-532:⚠️ Potential issue | 🔴 CriticalResolve conflict markers and remove manual changelog merge content before merge.
Line 6, Line 457, and Line 532 still contain Git conflict markers, so the file is in an invalid conflicted state. This is a blocker and should be resolved by completing the merge and letting changelog automation regenerate content.
As per coding guidelines, "CHANGELOG.md: Do not manually edit
CHANGELOG.md; it is managed automatically by CI/CD".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@CHANGELOG.md` around lines 6 - 532, CHANGELOG.md contains unresolved Git conflict markers (<<<<<<<, =======, >>>>>>>) from a manual merge; remove all conflict markers and the duplicated manual merge blocks, restore the file to the automated format (keep only the single, CI-generated changelog content), and do not manually edit entries—undo manual edits if necessary and re-run the changelog generation workflow or revert to the branch version produced by the changelog automation; look for the conflict markers in CHANGELOG.md and resolve using the automated changelog output instead of keeping the merged sections.cli/CHANGELOG.md (1)
6-286:⚠️ Potential issue | 🔴 CriticalUnresolved merge conflict markers must be resolved.
Similar to
core/CHANGELOG.md, this file contains Git conflict markers (<<<<<<< HEAD,=======,>>>>>>> upstream/main) between the@capacitor-plus/clichangelog (lines 7-233) and upstream@capacitor/clichangelog (lines 235-285).Resolve by merging both changelog histories appropriately.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cli/CHANGELOG.md` around lines 6 - 286, The file contains unresolved Git conflict markers (<<<<< HEAD, =======, >>>>>>> upstream/main) mixing the `@capacitor-plus/cli` changelog and the upstream `@capacitor/cli` changelog; remove the conflict markers and produce a single coherent changelog by merging both histories (preserving release headings, dates, bullet entries and commit/PR references) so entries from both sections are kept in chronological order and duplicate or overlapping entries are de-duplicated.core/CHANGELOG.md (1)
6-163:⚠️ Potential issue | 🔴 CriticalUnresolved merge conflict markers must be resolved.
The file contains Git conflict markers (
<<<<<<< HEAD,=======,>>>>>>> upstream/main) that need to be manually resolved. The conflict is between the@capacitor-plus/corechangelog history (HEAD) and the upstream@capacitor/corechangelog history.You'll need to decide how to merge these changelog entries - typically both histories should be preserved with the fork-specific entries at the top.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@core/CHANGELOG.md` around lines 6 - 163, The file contains unresolved Git conflict markers (<<<<<<< HEAD, =======, >>>>>>> upstream/main); remove these markers and merge the two changelog sections into a single coherent CHANGELOG.md entry by preserving both histories (keep your fork-specific `@capacitor-plus/core` entries at the top followed by the upstream `@capacitor/core` entries), ensuring headings, dates, and commits are not duplicated and the final file contains no conflict markers.
🧹 Nitpick comments (9)
.github/ISSUE_TEMPLATE/config.yml (1)
3-3: Consider adding an emoji prefix for consistency.The other contact link entries use emoji prefixes (e.g., "⚙️ Request a new plugin"), but this entry doesn't. For visual consistency, consider adding an emoji like "✨ Feature Request" or "💡 Feature Request".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/ISSUE_TEMPLATE/config.yml at line 3, Update the "name: Feature Request" entry to include an emoji prefix for visual consistency with other contact link entries (e.g., change the value for the name field from "Feature Request" to "✨ Feature Request" or "💡 Feature Request"); locate the "name: Feature Request" YAML key in the config and modify its string value to include the chosen emoji.ios/Capacitor/Capacitor/CapacitorBridge.swift (1)
96-99: Finish removing the obsolete tmp-window path.
tmpWindow/tmpVCAppearedare marked obsolete here, butios/Capacitor/Capacitor/CapacitorBridge.swiftLines 226-228 still register the observer andios/Capacitor/Capacitor/TmpViewController.swift:1-7still posts the notification. SincepresentVC/dismissVCno longer use that flow, this is now just dead lifecycle plumbing to clean up.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ios/Capacitor/Capacitor/CapacitorBridge.swift` around lines 96 - 99, Remove the leftover tmp-window notification flow: delete the deprecated tmpWindow and tmpVCAppeared symbols and remove any observer registration/handling for Notification.Name("tmpViewControllerAppeared") inside CapacitorBridge (the code that registers/unregisters and reacts to that notification around presentVC/dismissVC); also remove the posting of that notification from TmpViewController (or delete TmpViewController entirely if it is no longer referenced). After removal, search for any remaining references to tmpWindow, tmpVCAppeared, TmpViewController, or the "tmpViewControllerAppeared" notification and clean them up so presentVC/dismissVC are the only VC presentation path.cli/src/tasks/migrate-spm.ts (1)
16-16: Use strict equality===for consistency.Line 16 uses
==while other similar comparisons in the codebase (e.g.,cli/src/ios/update.ts:54) use===. For consistency and to avoid potential type coercion issues, use strict equality.♻️ Proposed fix
- if ((await config.ios.packageManager) == 'SPM') { + if ((await config.ios.packageManager) === 'SPM') {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cli/src/tasks/migrate-spm.ts` at line 16, The conditional in migrate-spm.ts uses loose equality; update the expression that checks (await config.ios.packageManager) == 'SPM' to use strict equality (===) to match the codebase style and avoid coercion—locate the check in the migrate-spm task (the if statement referencing config.ios.packageManager) and replace == with ===.cli/src/ios/update.ts (1)
133-145: Minor:podPathis resolved but conditionally unused.Line 133 resolves
podPathbut it's only used whenuseBundleris false ANDpodis installed. IfuseBundleris true, thepodPathresolution is unnecessary work. Consider moving thepodPathresolution inside the else branch.♻️ Proposed refactor
- const podPath = await config.ios.podPath; const useBundler = (await config.ios.packageManager) === 'bundler'; if (useBundler) { await runCommand('bundle', ['exec', 'pod', 'install', ...(deployment ? ['--deployment'] : [])], { cwd: config.ios.nativeProjectDirAbs, }); } else if (await isInstalled('pod')) { + const podPath = await config.ios.podPath; await runCommand(podPath, ['install', ...(deployment ? ['--deployment'] : [])], { cwd: config.ios.nativeProjectDirAbs, }); } else {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cli/src/ios/update.ts` around lines 133 - 145, Move the eager resolution of podPath out of the top-level and only resolve it when needed: keep computing useBundler via (await config.ios.packageManager) === 'bundler', then if useBundler run bundle exec pod install, else before calling runCommand with podPath call await config.ios.podPath to get podPath and check isInstalled('pod') as currently done; update the branches around useBundler, podPath, isInstalled, runCommand, and logger.warn so podPath is only awaited inside the non-bundler branch..github/workflows/publish-ios.yml (2)
21-24: Hardcodedref: 'main'may not reflect intended behavior.The checkout step hardcodes
ref: 'main', which means this workflow will always publish from themainbranch regardless of where it's triggered from. If this is intentional (only publish releases from main), consider adding a comment explaining this. Ifworkflow_dispatchshould allow publishing from the current branch, remove therefparameter.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/publish-ios.yml around lines 21 - 24, The checkout step currently pins actions/checkout@v5 with a hardcoded ref: 'main', forcing the workflow to always use main; either remove the ref: 'main' line so the action checks out the triggering branch (for workflow_dispatch or PR runs) or, if publishing must only occur from main, leave the ref but add a clear inline comment above the checkout step explaining that behavior and intent; update the workflow YAML accordingly around the actions/checkout@v5 usage to reflect the chosen approach.
3-8: Consider requiringCOCOAPODS_TRUNK_TOKENforworkflow_dispatchas well.Currently,
COCOAPODS_TRUNK_TOKENis only required forworkflow_call. Manualworkflow_dispatchtriggers will fail at the publish step if the secret is not available. Consider documenting this requirement or making the secret consistently required.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/publish-ios.yml around lines 3 - 8, The workflow currently marks COCOAPODS_TRUNK_TOKEN as required only for workflow_call, causing manual workflow_dispatch runs to fail when that secret isn't set; update .github/workflows/publish-ios.yml to require COCOAPODS_TRUNK_TOKEN for workflow_dispatch as well (or add a clear README comment/documentation near the workflow header) so manual triggers have the same secret requirement; look for the workflow_call and workflow_dispatch sections and add COCOAPODS_TRUNK_TOKEN to the secrets required by workflow_dispatch (or add a short note describing the required secret).android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java (2)
178-179: Consider caching WebView version to avoid repeated lookups.
getWebViewMajorVersion()is called on every insets listener callback (lines 179 and indirectly viagetBottomInsetat line 201). If the listener fires frequently, caching the version in a field duringload()would avoid repeatedWebViewCompat.getCurrentWebViewPackage()calls.♻️ Suggested caching approach
+ private int cachedWebViewMajorVersion = -1; + `@Override` public void load() { getBridge().getWebView().addJavascriptInterface(this, "CapacitorSystemBarsAndroidInterface"); super.load(); + cachedWebViewMajorVersion = fetchWebViewMajorVersion(); initSystemBars(); } - private Integer getWebViewMajorVersion() { + private int fetchWebViewMajorVersion() { PackageInfo info = WebViewCompat.getCurrentWebViewPackage(getContext()); // ... existing logic } + + private int getWebViewMajorVersion() { + return cachedWebViewMajorVersion; + }Also applies to: 331-343
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java` around lines 178 - 179, The insets listener repeatedly calls getWebViewMajorVersion() (and getBottomInset uses it), causing repeated WebViewCompat.getCurrentWebViewPackage() lookups; add a private int field (e.g., cachedWebViewMajorVersion) on SystemBars, set it once during load() by calling getWebViewMajorVersion() (or directly using WebViewCompat.getCurrentWebViewPackage() logic) and then replace calls to getWebViewMajorVersion() inside the ViewCompat.setOnApplyWindowInsetsListener lambda and in getBottomInset() to use cachedWebViewMajorVersion (ensure sensible default if unknown and update cache if load() can be called again).
232-237: Variable names are misleading: values are in dp, not px.The variables
topPx,rightPx,bottomPx, andleftPxare named as pixels but actually contain density-independent pixel (dp) values after dividing by density. Consider renaming for clarity.♻️ Suggested naming fix
// Convert pixels to density-independent pixels float density = getActivity().getResources().getDisplayMetrics().density; - float topPx = top / density; - float rightPx = right / density; - float bottomPx = bottom / density; - float leftPx = left / density; + float topDp = top / density; + float rightDp = right / density; + float bottomDp = bottom / density; + float leftDp = left / density;And update the format arguments accordingly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java` around lines 232 - 237, The variable names in SystemBars (inside the method computing insets) are misleading: after dividing by display density the values are dp, not px; rename topPx/rightPx/bottomPx/leftPx to topDp/rightDp/bottomDp/leftDp (and update any uses/format arguments that reference those variables, e.g., the string/Log/printf formatting or JSON keys) so naming accurately reflects density-independent pixels and avoid confusion in methods like the inset calculation and any callers in SystemBars.cli/src/util/spm.ts (1)
206-221: Consider making validation functions synchronous.Both
checkSwiftToolsVersionandcheckPackageTraitsRequirementsare markedasyncbut perform no asynchronous operations. If there's no plan to add async logic, they could be simplified to synchronous functions.♻️ Suggested refactor
-export async function checkSwiftToolsVersion(config: Config, version: string | undefined): Promise<string | null> { +export function checkSwiftToolsVersion(config: Config, version: string | undefined): string | null {-export async function checkPackageTraitsRequirements(config: Config): Promise<string | null> { +export function checkPackageTraitsRequirements(config: Config): string | null {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cli/src/util/spm.ts` around lines 206 - 221, The functions checkSwiftToolsVersion and checkPackageTraitsRequirements are declared async but contain no await/async work; change their signatures to synchronous (remove async and Promise<> return types so they return string | null directly), update their implementations accordingly, and search for any callers of checkSwiftToolsVersion and checkPackageTraitsRequirements to remove unnecessary await usage or handle the synchronous return value instead so call sites compile and behavior remains the same.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/needs-reply.yml:
- Line 12: The workflow currently references the action with a mutable tag
"uses: imhoffd/needs-reply@v2"; update this to a pinned immutable commit SHA
(e.g., "uses: imhoffd/needs-reply@<full-commit-sha>") so CI won't silently pick
up upstream changes. Locate the uses: imhoffd/needs-reply@v2 line in the
needs-reply.yml workflow and replace the tag with the full commit digest from
the action's repository (obtain the commit SHA from the action repo's commits or
release tag on GitHub) and commit the change.
In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`:
- Around line 321-329: The getWebViewMajorVersion method can throw
NumberFormatException when parsing info.versionName; update
getWebViewMajorVersion to mirror Bridge.java's extractWebViewMajorVersion by
wrapping the split-and-Integer.valueOf(...) logic in a try-catch that catches
NumberFormatException (and any potential NullPointerException) and returns 0 on
error; locate the method using the symbol getWebViewMajorVersion and the call to
WebViewCompat.getCurrentWebViewPackage/getContext(), perform the parsing inside
the try block, and ensure the catch returns 0 (optionally log the failure) so
malformed versionName values are safely handled.
In
`@android/capacitor/src/main/java/com/getcapacitor/plugin/util/CapacitorHttpUrlConnection.java`:
- Around line 228-235: The code currently trusts extractBoundaryFromContentType
result even when it is empty or loosely formatted; update the logic around the
boundary handling so that after calling extractBoundaryFromContentType you
validate the returned string (non-null, non-empty, and matches a sane token
pattern) and if it fails regenerate a UUID boundary and reset the Content-Type
via connection.setRequestProperty("Content-Type", "multipart/form-data;
boundary=" + boundary); apply the same validation/regeneration to the other
multipart handling site that uses extractBoundaryFromContentType so
invalid/blank boundary params never propagate into multipart writes.
In `@android/package.json`:
- Around line 2-14: The package.json contains unresolved git merge conflict
markers (<<<<<<<, =======, >>>>>>>) around package fields (name, version,
description, homepage, author) which breaks JSON parsing; open the file, remove
the conflict markers and choose the correct values for the keys "name",
"version", "description", "homepage", and "author" (or merge fields
appropriately) so the file becomes valid JSON, and repeat the same resolution
for the other conflict region referenced (lines with the same keys around
34-39).
In `@cli/package.json`:
- Around line 2-14: Remove the leftover merge conflict markers and produce a
valid package.json: delete the <<<<<<<, =======, and >>>>>>> lines and merge the
fields so the final JSON is syntactically valid and uses the CLI package name
"@capacitor-plus/cli" (to match the import path emitted by cli/src/config.ts);
ensure the version, description, homepage, and author fields are the intended
values from your branch, and run a JSON linter/parse to confirm no trailing
commas or syntax errors remain.
In `@cli/src/declarations.ts`:
- Around line 533-536: In the comment block that begins with "Warning: Capacitor
does not officially support Swift 6 yet." (the SPM warning text in
declarations.ts), correct the typo by replacing "throughrouly" with "thoroughly"
so the sentence reads "make sure to thoroughly test your iOS app."; no code
changes beyond fixing that word in the comment.
In `@cli/src/index.ts`:
- Around line 30-38: getPackageManager currently maps any non-'cocoapods' value
to 'SPM', forcing SPM when the CLI flag is omitted; change
getPackageManager(packageManager) to first check for null/undefined/empty (treat
as "no flag") and return undefined so the caller can auto-detect, keep the
existing cocoapods branch (including the bundler check), and normalize
comparisons (e.g., toLowerCase()) for robustness; update the function
signature/return type to Promise<PackageManager | undefined> and adjust callers
(the add ios flow) to treat undefined as "auto-detect" rather than forcing SPM.
In `@cli/src/tasks/run.ts`:
- Line 114: Update the user-facing template string that currently reads "App
running with live reload listing for: ..." to use the correct word "listening"
instead of "listing"; locate the template literal that constructs the message
using options.https, options.host and options.port in run.ts (the `App running
with live reload ...` string) and change "listing for" → "listening for".
In `@cli/src/util/spm.ts`:
- Around line 100-106: Resolve the Git conflict markers in cli/src/util/spm.ts
by removing the <<<<<<<, =======, and >>>>>>> lines and using the upstream
variant: replace the call to getMajorMinoriOSVersion with getMajoriOSVersion and
add the new variables packageTraits and swiftToolsVersion (from
config.app.extConfig.experimental?.ios?.spm) as shown in the upstream snippet;
also update the top import to import getMajoriOSVersion instead of
getMajorMinoriOSVersion so the identifier is available; ensure no conflict
markers remain and formatting passes lint.
In `@core/package.json`:
- Around line 2-14: Resolve the merge conflict in core/package.json by removing
the conflict markers (<<<<<<<, =======, >>>>>>>) and merging fields so the fork
identity remains but the upstream version is adopted: set "name" to
"@capacitor-plus/core", set "version" to "8.3.1", keep the fork-specific
"description" ("Capacitor+: Enhanced Capacitor with automated upstream sync -
Cross-platform apps with JavaScript and the web"), keep the fork "homepage" and
"author" entries for Capgo branding, and ensure the resulting JSON is valid (no
leftover conflict markers or syntax errors).
In `@ios/Capacitor/Capacitor/CapacitorBridge.swift`:
- Around line 750-755: The presentVC, dismissVC and showAlertWith helpers call
UIKit directly and must be dispatched to the main thread; update presentVC(_
viewControllerToPresent:animated:completion:), dismissVC(animated:completion:)
and showAlertWith(...) to wrap their present/dismiss/alert invocations inside
DispatchQueue.main.async { ... }, safely unwrapping self.viewController? and
forwarding the animated flag and completion closure so UI calls always run on
the main queue.
In `@ios/Capacitor/Capacitor/CAPBridgedJSTypes.m`:
- Around line 32-38: The method implementation for getArray:defaultValue: in
CAPBridgedJSTypes.m has a stray semicolon before the opening brace causing a
build error; remove the semicolon so the method signature reads as a normal
implementation (i.e., change "- (NSArray * _Nullable)getArray:(NSString *
_Nonnull)key defaultValue:(NSArray * _Nullable)defaultValue; {" to "- (NSArray *
_Nullable)getArray:(NSString * _Nonnull)key defaultValue:(NSArray *
_Nullable)defaultValue {"), leaving the body (using dictionaryRepresentation and
the NSArray type check) unchanged.
In `@ios/package.json`:
- Around line 2-14: The package.json contains leftover Git merge conflict
markers (<<<<<<<, =======, >>>>>>>) causing invalid JSON; remove the conflict
markers and pick the intended package metadata values (e.g., the "name",
"version", "description", "homepage", "author" fields currently conflicting
between `@capacitor-plus/ios` and `@capacitor/ios`) so the file is valid JSON—ensure
you keep one consistent block for those keys and delete the other block and all
conflict markers (also fix the same pattern at the other conflict region
mentioned for lines 36-41).
In `@lerna.json`:
- Around line 16-20: Remove the Git conflict markers (<<<<<<<, =======, >>>>>>>)
and resolve the version field in lerna.json by choosing the upstream value;
replace the conflicting block so the JSON contains a single "version": "8.3.1"
entry (no markers) to restore valid JSON and ensure lerna/CI can parse the file.
In `@package.json`:
- Around line 35-55: Remove the Git conflict markers and produce a valid
package.json by reconciling the dependency versions: choose the final versions
you want (e.g., keep "@types/node": "^24.10.1", "eslint": "^8.57.1", drop
"@types/tar" if you upgrade to "tar": "^7.5.3", keep "prettier-pretty-check" if
desired) and ensure only one entry per package remains; if you accept the major
bump to tar (^7.x) update any code importing tar to use the new named exports
(extract/create) instead of the old default import and remove/adjust `@types/tar`
as it may be incompatible, then validate JSON (no <<<<<<< markers), run npm
install to confirm EJSONPARSE is resolved and run tests/lint to verify no import
breakages.
---
Outside diff comments:
In `@android/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.java`:
- Around line 345-370: The range-branch in WebViewLocalServer is constructing a
206/Content-Range response but still returns the original
LollipopLazyInputStream from byte 0; update the logic to skip to fromRange and
limit reads to the requested length before returning: compute fromRange and
length = (range - fromRange + 1), call responseStream.skip(fromRange) (handling
skip loop/exceptions), and wrap responseStream with a bounded FilterInputStream
that prevents reading past length (or create a helper like a LimitedInputStream)
so the returned stream only serves the requested byte range; keep the existing
header construction using totalRange, fromRange, and range and return the
wrapped/limited responseStream.
In `@android/CHANGELOG.md`:
- Around line 6-260: The changelog contains unresolved Git conflict markers
(<<<<<<< HEAD, =======, >>>>>>> upstream/main) spanning the merged sections;
remove these markers and resolve the two conflicting blocks into one coherent
changelog entry (choose the intended content/version from either the HEAD block
or the upstream/main block), ensuring only the final chosen content remains and
the file has no conflict markers left (verify by searching for the strings
"<<<<<<<", "=======", ">>>>>>>").
In `@CHANGELOG.md`:
- Around line 6-532: CHANGELOG.md contains unresolved Git conflict markers
(<<<<<<<, =======, >>>>>>>) from a manual merge; remove all conflict markers and
the duplicated manual merge blocks, restore the file to the automated format
(keep only the single, CI-generated changelog content), and do not manually edit
entries—undo manual edits if necessary and re-run the changelog generation
workflow or revert to the branch version produced by the changelog automation;
look for the conflict markers in CHANGELOG.md and resolve using the automated
changelog output instead of keeping the merged sections.
In `@cli/CHANGELOG.md`:
- Around line 6-286: The file contains unresolved Git conflict markers (<<<<<
HEAD, =======, >>>>>>> upstream/main) mixing the `@capacitor-plus/cli` changelog
and the upstream `@capacitor/cli` changelog; remove the conflict markers and
produce a single coherent changelog by merging both histories (preserving
release headings, dates, bullet entries and commit/PR references) so entries
from both sections are kept in chronological order and duplicate or overlapping
entries are de-duplicated.
In `@cli/src/ios/open.ts`:
- Around line 7-11: Change the loose equality in the package manager check to a
strict comparison: in the conditional that reads use of
config.ios.packageManager (inside the function using open), replace the `==
'SPM'` comparison with `=== 'SPM'` so the branch that calls
open(config.ios.nativeXcodeProjDirAbs, { wait: false }) vs
open(config.ios.nativeXcodeWorkspaceDirAbs, { wait: false }) uses strict
equality; update the conditional expression accordingly where
config.ios.packageManager is awaited.
In `@core/CHANGELOG.md`:
- Around line 6-163: The file contains unresolved Git conflict markers (<<<<<<<
HEAD, =======, >>>>>>> upstream/main); remove these markers and merge the two
changelog sections into a single coherent CHANGELOG.md entry by preserving both
histories (keep your fork-specific `@capacitor-plus/core` entries at the top
followed by the upstream `@capacitor/core` entries), ensuring headings, dates, and
commits are not duplicated and the final file contains no conflict markers.
In `@ios/Capacitor/Capacitor/Plugins/CapacitorUrlRequest.swift`:
- Around line 69-73: The boundary extraction currently relies on a strict
contains("boundary=") check and uses extractBoundary(from:) without
validating/normalizing its result, which can yield empty/untrimmed boundaries
and break multipart assembly; update the logic in CapacitorUrlRequest.swift
(locations around the boundary variable usage, extractBoundary(from:) calls, and
overrideContentType(boundary) invocation) to robustly parse the Content-Type
header by performing a case-insensitive search for "boundary=", trimming
whitespace and surrounding quotes from the extracted value, validating it's
non-empty before assigning to boundary, and only calling
overrideContentType(boundary) when the normalized boundary is valid; ensure the
same validation is applied in the other occurrences (lines handling multipart
assembly) to prevent malformed multipart bodies.
In `@ios/CHANGELOG.md`:
- Around line 6-231: The changelog contains leftover git conflict markers
(<<<<<<< HEAD, =======, >>>>>>> upstream/main) around two competing histories
(e.g., sections starting with "## [8.0.8]" and "## [8.3.1]"); remove the
conflict markers and produce a single resolved changelog by choosing and/or
merging the intended release entries (keep the desired version headings and
combined entries in chronological order), delete the <<<<<<</=======/>>>>>>
lines, ensure no duplicate sections remain (inspect "## [8.0.8]" and "##
[8.3.1]" blocks), save the file and stage the resolved CHANGELOG.
---
Nitpick comments:
In @.github/ISSUE_TEMPLATE/config.yml:
- Line 3: Update the "name: Feature Request" entry to include an emoji prefix
for visual consistency with other contact link entries (e.g., change the value
for the name field from "Feature Request" to "✨ Feature Request" or "💡 Feature
Request"); locate the "name: Feature Request" YAML key in the config and modify
its string value to include the chosen emoji.
In @.github/workflows/publish-ios.yml:
- Around line 21-24: The checkout step currently pins actions/checkout@v5 with a
hardcoded ref: 'main', forcing the workflow to always use main; either remove
the ref: 'main' line so the action checks out the triggering branch (for
workflow_dispatch or PR runs) or, if publishing must only occur from main, leave
the ref but add a clear inline comment above the checkout step explaining that
behavior and intent; update the workflow YAML accordingly around the
actions/checkout@v5 usage to reflect the chosen approach.
- Around line 3-8: The workflow currently marks COCOAPODS_TRUNK_TOKEN as
required only for workflow_call, causing manual workflow_dispatch runs to fail
when that secret isn't set; update .github/workflows/publish-ios.yml to require
COCOAPODS_TRUNK_TOKEN for workflow_dispatch as well (or add a clear README
comment/documentation near the workflow header) so manual triggers have the same
secret requirement; look for the workflow_call and workflow_dispatch sections
and add COCOAPODS_TRUNK_TOKEN to the secrets required by workflow_dispatch (or
add a short note describing the required secret).
In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`:
- Around line 178-179: The insets listener repeatedly calls
getWebViewMajorVersion() (and getBottomInset uses it), causing repeated
WebViewCompat.getCurrentWebViewPackage() lookups; add a private int field (e.g.,
cachedWebViewMajorVersion) on SystemBars, set it once during load() by calling
getWebViewMajorVersion() (or directly using
WebViewCompat.getCurrentWebViewPackage() logic) and then replace calls to
getWebViewMajorVersion() inside the ViewCompat.setOnApplyWindowInsetsListener
lambda and in getBottomInset() to use cachedWebViewMajorVersion (ensure sensible
default if unknown and update cache if load() can be called again).
- Around line 232-237: The variable names in SystemBars (inside the method
computing insets) are misleading: after dividing by display density the values
are dp, not px; rename topPx/rightPx/bottomPx/leftPx to
topDp/rightDp/bottomDp/leftDp (and update any uses/format arguments that
reference those variables, e.g., the string/Log/printf formatting or JSON keys)
so naming accurately reflects density-independent pixels and avoid confusion in
methods like the inset calculation and any callers in SystemBars.
In `@cli/src/ios/update.ts`:
- Around line 133-145: Move the eager resolution of podPath out of the top-level
and only resolve it when needed: keep computing useBundler via (await
config.ios.packageManager) === 'bundler', then if useBundler run bundle exec pod
install, else before calling runCommand with podPath call await
config.ios.podPath to get podPath and check isInstalled('pod') as currently
done; update the branches around useBundler, podPath, isInstalled, runCommand,
and logger.warn so podPath is only awaited inside the non-bundler branch.
In `@cli/src/tasks/migrate-spm.ts`:
- Line 16: The conditional in migrate-spm.ts uses loose equality; update the
expression that checks (await config.ios.packageManager) == 'SPM' to use strict
equality (===) to match the codebase style and avoid coercion—locate the check
in the migrate-spm task (the if statement referencing config.ios.packageManager)
and replace == with ===.
In `@cli/src/util/spm.ts`:
- Around line 206-221: The functions checkSwiftToolsVersion and
checkPackageTraitsRequirements are declared async but contain no await/async
work; change their signatures to synchronous (remove async and Promise<> return
types so they return string | null directly), update their implementations
accordingly, and search for any callers of checkSwiftToolsVersion and
checkPackageTraitsRequirements to remove unnecessary await usage or handle the
synchronous return value instead so call sites compile and behavior remains the
same.
In `@ios/Capacitor/Capacitor/CapacitorBridge.swift`:
- Around line 96-99: Remove the leftover tmp-window notification flow: delete
the deprecated tmpWindow and tmpVCAppeared symbols and remove any observer
registration/handling for Notification.Name("tmpViewControllerAppeared") inside
CapacitorBridge (the code that registers/unregisters and reacts to that
notification around presentVC/dismissVC); also remove the posting of that
notification from TmpViewController (or delete TmpViewController entirely if it
is no longer referenced). After removal, search for any remaining references to
tmpWindow, tmpVCAppeared, TmpViewController, or the "tmpViewControllerAppeared"
notification and clean them up so presentVC/dismissVC are the only VC
presentation path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0c90cd66-6f96-4860-89f3-3027a3b31a2e
📒 Files selected for processing (54)
.github/ISSUE_TEMPLATE/config.yml.github/ISSUE_TEMPLATE/feature-request.yml.github/ionic-issue-bot.yml.github/workflows/needs-reply.yml.github/workflows/publish-ios.yml.github/workflows/test.ymlCHANGELOG.mdandroid/CHANGELOG.mdandroid/capacitor/src/main/assets/native-bridge.jsandroid/capacitor/src/main/java/com/getcapacitor/Bridge.javaandroid/capacitor/src/main/java/com/getcapacitor/BridgeActivity.javaandroid/capacitor/src/main/java/com/getcapacitor/WebViewLocalServer.javaandroid/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.javaandroid/capacitor/src/main/java/com/getcapacitor/plugin/util/CapacitorHttpUrlConnection.javaandroid/package.jsoncli/CHANGELOG.mdcli/package.jsoncli/src/config.tscli/src/declarations.tscli/src/definitions.tscli/src/index.tscli/src/ios/build.tscli/src/ios/common.tscli/src/ios/doctor.tscli/src/ios/open.tscli/src/ios/run.tscli/src/ios/update.tscli/src/tasks/add.tscli/src/tasks/migrate-spm.tscli/src/tasks/migrate.tscli/src/tasks/run.tscli/src/tasks/sourcemaps.tscli/src/tasks/sync.tscli/src/tasks/update.tscli/src/util/livereload.tscli/src/util/spm.tscli/src/util/template.tscore/CHANGELOG.mdcore/native-bridge.tscore/package.jsoncore/src/core-plugins.tscore/system-bars.mdios-spm-template/App/CapApp-SPM/README.mdios/CHANGELOG.mdios/Capacitor/Capacitor/CAPBridgeProtocol.swiftios/Capacitor/Capacitor/CAPBridgedJSTypes.hios/Capacitor/Capacitor/CAPBridgedJSTypes.mios/Capacitor/Capacitor/CapacitorBridge.swiftios/Capacitor/Capacitor/Plugins/CapacitorUrlRequest.swiftios/Capacitor/Capacitor/assets/native-bridge.jsios/package.jsonlerna.jsonpackage.jsonscripts/pack-cli-assets.mjs
💤 Files with no reviewable changes (1)
- .github/ISSUE_TEMPLATE/feature-request.yml
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Close old issues that need reply | ||
| uses: imhoffd/needs-reply@v2 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Resolve the v2 ref object (could be a commit or an annotated tag).
ref_json="$(gh api repos/imhoffd/needs-reply/git/ref/tags/v2)"
type="$(jq -r '.object.type' <<<"$ref_json")"
sha="$(jq -r '.object.sha' <<<"$ref_json")"
if [ "$type" = "commit" ]; then
echo "Pin this SHA: $sha"
else
# annotated tag -> resolve to underlying commit
commit_sha="$(gh api repos/imhoffd/needs-reply/git/tags/$sha --jq '.object.sha')"
echo "Pin this SHA: $commit_sha"
fiRepository: Cap-go/capacitor-plus
Length of output: 119
Pin GitHub Action to a full commit SHA (not a mutable tag).
Using @v2 allows silent upstream changes. Pin to the immutable commit digest for safer CI execution.
🔧 Suggested change
- uses: imhoffd/needs-reply@v2
+ uses: imhoffd/needs-reply@71e8d5144caa0d4a1e292348bfafa3866d08c855🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/needs-reply.yml at line 12, The workflow currently
references the action with a mutable tag "uses: imhoffd/needs-reply@v2"; update
this to a pinned immutable commit SHA (e.g., "uses:
imhoffd/needs-reply@<full-commit-sha>") so CI won't silently pick up upstream
changes. Locate the uses: imhoffd/needs-reply@v2 line in the needs-reply.yml
workflow and replace the tag with the full commit digest from the action's
repository (obtain the commit SHA from the action repo's commits or release tag
on GitHub) and commit the change.
| private Integer getWebViewMajorVersion() { | ||
| PackageInfo info = WebViewCompat.getCurrentWebViewPackage(getContext()); | ||
| if (info != null && info.versionName != null) { | ||
| String[] versionSegments = info.versionName.split("\\."); | ||
| return Integer.valueOf(versionSegments[0]); | ||
| } | ||
|
|
||
| return 0; | ||
| } |
There was a problem hiding this comment.
Missing exception handling for version parsing.
Unlike the similar extractWebViewMajorVersion pattern in Bridge.java which wraps parsing in a try-catch, this method could throw NumberFormatException if versionName contains a non-numeric first segment.
🛡️ Proposed fix to add exception handling
private Integer getWebViewMajorVersion() {
PackageInfo info = WebViewCompat.getCurrentWebViewPackage(getContext());
if (info != null && info.versionName != null) {
- String[] versionSegments = info.versionName.split("\\.");
- return Integer.valueOf(versionSegments[0]);
+ try {
+ String[] versionSegments = info.versionName.split("\\.");
+ return Integer.parseInt(versionSegments[0]);
+ } catch (NumberFormatException e) {
+ return 0;
+ }
}
return 0;
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| private Integer getWebViewMajorVersion() { | |
| PackageInfo info = WebViewCompat.getCurrentWebViewPackage(getContext()); | |
| if (info != null && info.versionName != null) { | |
| String[] versionSegments = info.versionName.split("\\."); | |
| return Integer.valueOf(versionSegments[0]); | |
| } | |
| return 0; | |
| } | |
| private Integer getWebViewMajorVersion() { | |
| PackageInfo info = WebViewCompat.getCurrentWebViewPackage(getContext()); | |
| if (info != null && info.versionName != null) { | |
| try { | |
| String[] versionSegments = info.versionName.split("\\."); | |
| return Integer.parseInt(versionSegments[0]); | |
| } catch (NumberFormatException e) { | |
| return 0; | |
| } | |
| } | |
| return 0; | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`
around lines 321 - 329, The getWebViewMajorVersion method can throw
NumberFormatException when parsing info.versionName; update
getWebViewMajorVersion to mirror Bridge.java's extractWebViewMajorVersion by
wrapping the split-and-Integer.valueOf(...) logic in a try-catch that catches
NumberFormatException (and any potential NullPointerException) and returns 0 on
error; locate the method using the symbol getWebViewMajorVersion and the call to
WebViewCompat.getCurrentWebViewPackage/getContext(), perform the parsing inside
the try block, and ensure the catch returns 0 (optionally log the failure) so
malformed versionName values are safely handled.
| String boundary = extractBoundaryFromContentType(contentType); | ||
| if (boundary == null) { | ||
| // If no boundary is provided, generate a random one and set the Content-Type header accordingly | ||
| // or otherwise servers will not be able to parse the request body. Browsers do this automatically | ||
| // but here we need to do this manually in order to comply with browser api behavior. | ||
| boundary = UUID.randomUUID().toString(); | ||
| connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary); | ||
| } |
There was a problem hiding this comment.
Treat blank/loosely-formatted boundary params as missing and regenerate boundary.
Current parsing only handles exact boundary= and accepts empty boundary values. In Line 228-235 this can propagate an invalid boundary into multipart writes instead of falling back.
💡 Suggested fix
- String boundary = extractBoundaryFromContentType(contentType);
- if (boundary == null) {
+ String boundary = extractBoundaryFromContentType(contentType);
+ if (TextUtils.isEmpty(boundary)) {
// If no boundary is provided, generate a random one and set the Content-Type header accordingly
// or otherwise servers will not be able to parse the request body. Browsers do this automatically
// but here we need to do this manually in order to comply with browser api behavior.
boundary = UUID.randomUUID().toString();
connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
}
@@
public static String extractBoundaryFromContentType(String contentType) {
- String boundaryPrefix = "boundary=";
- int boundaryIndex = contentType.indexOf(boundaryPrefix);
- if (boundaryIndex == -1) {
- return null;
- }
-
- // Extract the substring starting right after "boundary="
- String boundary = contentType.substring(boundaryIndex + boundaryPrefix.length());
-
- // Find the end of the boundary value by looking for the next ";"
- int endIndex = boundary.indexOf(";");
- if (endIndex != -1) {
- boundary = boundary.substring(0, endIndex);
- }
-
- // Remove surrounding double quotes if present
- boundary = boundary.trim();
- if (boundary.startsWith("\"") && boundary.endsWith("\"")) {
- boundary = boundary.substring(1, boundary.length() - 1);
- }
-
- return boundary;
+ if (TextUtils.isEmpty(contentType)) {
+ return null;
+ }
+
+ for (String part : contentType.split(";")) {
+ String token = part.trim();
+ int eq = token.indexOf('=');
+ if (eq <= 0) {
+ continue;
+ }
+
+ String name = token.substring(0, eq).trim();
+ if (!"boundary".equalsIgnoreCase(name)) {
+ continue;
+ }
+
+ String boundary = token.substring(eq + 1).trim();
+ if (boundary.startsWith("\"") && boundary.endsWith("\"") && boundary.length() >= 2) {
+ boundary = boundary.substring(1, boundary.length() - 1);
+ }
+ return boundary.isEmpty() ? null : boundary;
+ }
+
+ return null;
}Also applies to: 323-346
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@android/capacitor/src/main/java/com/getcapacitor/plugin/util/CapacitorHttpUrlConnection.java`
around lines 228 - 235, The code currently trusts extractBoundaryFromContentType
result even when it is empty or loosely formatted; update the logic around the
boundary handling so that after calling extractBoundaryFromContentType you
validate the returned string (non-null, non-empty, and matches a sane token
pattern) and if it fails regenerate a UUID boundary and reset the Content-Type
via connection.setRequestProperty("Content-Type", "multipart/form-data;
boundary=" + boundary); apply the same validation/regeneration to the other
multipart handling site that uses extractBoundaryFromContentType so
invalid/blank boundary params never propagate into multipart writes.
| <<<<<<< HEAD | ||
| "name": "@capacitor-plus/android", | ||
| "version": "8.0.8", | ||
| "description": "Capacitor+: Enhanced Capacitor with automated upstream sync - Cross-platform apps with JavaScript and the web", | ||
| "homepage": "https://capgo.app/docs/plugins/capacitor-plus/", | ||
| "author": "Capgo Team <support@capgo.app> (https://capgo.app)", | ||
| ======= | ||
| "name": "@capacitor/android", | ||
| "version": "8.3.1", | ||
| "description": "Capacitor: Cross-platform apps with JavaScript and the web", | ||
| "homepage": "https://capacitorjs.com", | ||
| "author": "Ionic Team <hi@ionic.io> (https://ionic.io)", | ||
| >>>>>>> upstream/main |
There was a problem hiding this comment.
Resolve the leftover merge conflict markers.
This file is currently invalid JSON, so the package install step fails before the Android build can even start.
Also applies to: 34-39
🧰 Tools
🪛 Biome (2.4.11)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: String values must be double quoted.
(parse)
[error] 3-3: End of file expected
(parse)
[error] 3-3: End of file expected
(parse)
[error] 3-3: End of file expected
(parse)
[error] 3-3: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 7-7: End of file expected
(parse)
[error] 7-7: End of file expected
(parse)
[error] 7-7: End of file expected
(parse)
[error] 7-8: End of file expected
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 9-9: End of file expected
(parse)
[error] 9-9: End of file expected
(parse)
[error] 9-9: End of file expected
(parse)
[error] 9-9: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 13-13: End of file expected
(parse)
[error] 13-13: End of file expected
(parse)
[error] 13-13: End of file expected
(parse)
[error] 13-14: End of file expected
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character /
(parse)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@android/package.json` around lines 2 - 14, The package.json contains
unresolved git merge conflict markers (<<<<<<<, =======, >>>>>>>) around package
fields (name, version, description, homepage, author) which breaks JSON parsing;
open the file, remove the conflict markers and choose the correct values for the
keys "name", "version", "description", "homepage", and "author" (or merge fields
appropriately) so the file becomes valid JSON, and repeat the same resolution
for the other conflict region referenced (lines with the same keys around
34-39).
| <<<<<<< HEAD | ||
| "name": "@capacitor-plus/cli", | ||
| "version": "8.0.8", | ||
| "description": "Capacitor+: Enhanced Capacitor with automated upstream sync - Cross-platform apps with JavaScript and the web", | ||
| "homepage": "https://capgo.app/docs/plugins/capacitor-plus/", | ||
| "author": "Capgo Team <support@capgo.app> (https://capgo.app)", | ||
| ======= | ||
| "name": "@capacitor/cli", | ||
| "version": "8.3.1", | ||
| "description": "Capacitor: Cross-platform apps with JavaScript and the web", | ||
| "homepage": "https://capacitorjs.com", | ||
| "author": "Ionic Team <hi@ionic.io> (https://ionic.io)", | ||
| >>>>>>> upstream/main |
There was a problem hiding this comment.
Resolve the leftover merge conflict markers.
This manifest is invalid JSON, which is why CI is failing with EJSONPARSE. When you resolve it, keep the final package name aligned with the CLI import path still emitted by cli/src/config.ts (@capacitor-plus/cli), otherwise generated configs will drift from the published package surface.
🧰 Tools
🪛 Biome (2.4.11)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: String values must be double quoted.
(parse)
[error] 3-3: End of file expected
(parse)
[error] 3-3: End of file expected
(parse)
[error] 3-3: End of file expected
(parse)
[error] 3-3: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 7-7: End of file expected
(parse)
[error] 7-7: End of file expected
(parse)
[error] 7-7: End of file expected
(parse)
[error] 7-8: End of file expected
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 9-9: End of file expected
(parse)
[error] 9-9: End of file expected
(parse)
[error] 9-9: End of file expected
(parse)
[error] 9-9: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 13-13: End of file expected
(parse)
[error] 13-13: End of file expected
(parse)
[error] 13-13: End of file expected
(parse)
[error] 13-14: End of file expected
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character /
(parse)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@cli/package.json` around lines 2 - 14, Remove the leftover merge conflict
markers and produce a valid package.json: delete the <<<<<<<, =======, and
>>>>>>> lines and merge the fields so the final JSON is syntactically valid and
uses the CLI package name "@capacitor-plus/cli" (to match the import path
emitted by cli/src/config.ts); ensure the version, description, homepage, and
author fields are the intended values from your branch, and run a JSON
linter/parse to confirm no trailing commas or syntax errors remain.
| @objc open func presentVC(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)? = nil) { | ||
| if viewControllerToPresent.modalPresentationStyle == .popover { | ||
| self.viewController?.present(viewControllerToPresent, animated: flag, completion: completion) | ||
| } else { | ||
| self.tmpWindow = UIWindow.init(frame: UIScreen.main.bounds) | ||
| self.tmpWindow?.rootViewController = TmpViewController.init() | ||
| self.tmpWindow?.makeKeyAndVisible() | ||
| self.tmpWindow?.rootViewController?.present(viewControllerToPresent, animated: flag, completion: completion) | ||
| } | ||
| self.viewController?.present(viewControllerToPresent, animated: flag, completion: completion) | ||
| } | ||
|
|
||
| @objc open func dismissVC(animated flag: Bool, completion: (() -> Void)? = nil) { | ||
| if self.tmpWindow == nil { | ||
| self.viewController?.dismiss(animated: flag, completion: completion) | ||
| } else { | ||
| self.tmpWindow?.rootViewController?.dismiss(animated: flag, completion: completion) | ||
| self.tmpWindow = nil | ||
| } | ||
| self.viewController?.dismiss(animated: flag, completion: completion) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
sed -n '507,540p' ios/Capacitor/Capacitor/CapacitorBridge.swift
printf '\n---\n'
sed -n '742,756p' ios/Capacitor/Capacitor/CapacitorBridge.swift
printf '\n---\n'
rg -n -C2 '\b(presentVC\s*\(|dismissVC\s*\()' ios/Capacitor/CapacitorRepository: Cap-go/capacitor-plus
Length of output: 4933
🏁 Script executed:
# Search for all usages of presentVC and dismissVC in the codebase
rg -n 'presentVC|dismissVC' --type swift ios/ | head -50Repository: Cap-go/capacitor-plus
Length of output: 662
🏁 Script executed:
# Check if there are any other view presentation methods that might have the same issue
rg -n 'present|dismiss' ios/Capacitor/Capacitor/CapacitorBridge.swift | grep -E '(func|open)' | head -30Repository: Cap-go/capacitor-plus
Length of output: 289
🏁 Script executed:
# Check the full context around lines 507-540 to understand the dispatch queue usage better
sed -n '495,545p' ios/Capacitor/Capacitor/CapacitorBridge.swiftRepository: Cap-go/capacitor-plus
Length of output: 3289
🏁 Script executed:
# Search for actual calls to bridge.presentVC or bridge.dismissVC in plugins
rg -i 'bridge.*present|bridge.*dismiss' --type swiftRepository: Cap-go/capacitor-plus
Length of output: 426
🏁 Script executed:
# Check if showAlertWith also has the same threading issue
sed -n '745,756p' ios/Capacitor/Capacitor/CapacitorBridge.swiftRepository: Cap-go/capacitor-plus
Length of output: 783
🏁 Script executed:
# Look for plugin examples or tests that might call these methods
fd -e swift -e kt | xargs rg -l 'presentVC|dismissVC' 2>/dev/null | head -20Repository: Cap-go/capacitor-plus
Length of output: 158
🏁 Script executed:
# Check deprecation status of showAlertWith
rg -B2 'func showAlertWith' ios/Capacitor/Capacitor/CAPBridgeProtocol.swiftRepository: Cap-go/capacitor-plus
Length of output: 174
🏁 Script executed:
# Get full context around showAlertWith to see if it's also deprecated
sed -n '80,89p' ios/Capacitor/Capacitor/CAPBridgeProtocol.swiftRepository: Cap-go/capacitor-plus
Length of output: 585
Dispatch presentation calls to the main queue to prevent UIKit threading violations.
Plugin methods execute on dispatchQueue (lines 507-540), so external plugins calling these deprecated bridge helpers may do so off-main. UIKit's present and dismiss require main thread execution; calling them directly risks threading violations and flaky UI.
Additionally, showAlertWith (line 745) has the same threading issue and is not deprecated, so it should also dispatch to the main queue.
Suggested fix
`@objc` open func presentVC(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)? = nil) {
- self.viewController?.present(viewControllerToPresent, animated: flag, completion: completion)
+ DispatchQueue.main.async { [weak self] in
+ self?.viewController?.present(viewControllerToPresent, animated: flag, completion: completion)
+ }
}
`@objc` open func dismissVC(animated flag: Bool, completion: (() -> Void)? = nil) {
- self.viewController?.dismiss(animated: flag, completion: completion)
+ DispatchQueue.main.async { [weak self] in
+ self?.viewController?.dismiss(animated: flag, completion: completion)
+ }
}
`@objc` open func showAlertWith(title: String, message: String, buttonTitle: String) {
let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertController.Style.alert)
alert.addAction(UIAlertAction(title: buttonTitle, style: UIAlertAction.Style.default, handler: nil))
- self.viewController?.present(alert, animated: true, completion: nil)
+ DispatchQueue.main.async { [weak self] in
+ self?.viewController?.present(alert, animated: true, completion: nil)
+ }
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ios/Capacitor/Capacitor/CapacitorBridge.swift` around lines 750 - 755, The
presentVC, dismissVC and showAlertWith helpers call UIKit directly and must be
dispatched to the main thread; update presentVC(_
viewControllerToPresent:animated:completion:), dismissVC(animated:completion:)
and showAlertWith(...) to wrap their present/dismiss/alert invocations inside
DispatchQueue.main.async { ... }, safely unwrapping self.viewController? and
forwarding the animated flag and completion closure so UI calls always run on
the main queue.
| - (NSArray * _Nullable)getArray:(NSString * _Nonnull)key defaultValue:(NSArray * _Nullable)defaultValue; { | ||
| id value = [[self dictionaryRepresentation] objectForKey:key]; | ||
| if (value != nil && [value isKindOfClass:[NSArray class]]) { | ||
| return value; | ||
| } | ||
| return defaultValue; | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify there are no Objective-C method implementations with `; {` pattern.
rg -nP '^\s*[-+]\s*\([^)]*\)\s*[A-Za-z_]\w*(?::[^;{]+)+;\s*\{' --type objcRepository: Cap-go/capacitor-plus
Length of output: 218
Remove stray semicolon before method implementation body (build blocker).
Line 32 contains an invalid Objective-C method implementation syntax. Objective-C method implementations must not include a semicolon before the opening brace—only method declarations in headers use semicolons. This will cause a compilation error.
Proposed fix
-- (NSArray * _Nullable)getArray:(NSString * _Nonnull)key defaultValue:(NSArray * _Nullable)defaultValue; {
+- (NSArray * _Nullable)getArray:(NSString * _Nonnull)key defaultValue:(NSArray * _Nullable)defaultValue {📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - (NSArray * _Nullable)getArray:(NSString * _Nonnull)key defaultValue:(NSArray * _Nullable)defaultValue; { | |
| id value = [[self dictionaryRepresentation] objectForKey:key]; | |
| if (value != nil && [value isKindOfClass:[NSArray class]]) { | |
| return value; | |
| } | |
| return defaultValue; | |
| } | |
| - (NSArray * _Nullable)getArray:(NSString * _Nonnull)key defaultValue:(NSArray * _Nullable)defaultValue { | |
| id value = [[self dictionaryRepresentation] objectForKey:key]; | |
| if (value != nil && [value isKindOfClass:[NSArray class]]) { | |
| return value; | |
| } | |
| return defaultValue; | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ios/Capacitor/Capacitor/CAPBridgedJSTypes.m` around lines 32 - 38, The method
implementation for getArray:defaultValue: in CAPBridgedJSTypes.m has a stray
semicolon before the opening brace causing a build error; remove the semicolon
so the method signature reads as a normal implementation (i.e., change "-
(NSArray * _Nullable)getArray:(NSString * _Nonnull)key defaultValue:(NSArray *
_Nullable)defaultValue; {" to "- (NSArray * _Nullable)getArray:(NSString *
_Nonnull)key defaultValue:(NSArray * _Nullable)defaultValue {"), leaving the
body (using dictionaryRepresentation and the NSArray type check) unchanged.
| <<<<<<< HEAD | ||
| "name": "@capacitor-plus/ios", | ||
| "version": "8.0.8", | ||
| "description": "Capacitor+: Enhanced Capacitor with automated upstream sync - Cross-platform apps with JavaScript and the web", | ||
| "homepage": "https://capgo.app/docs/plugins/capacitor-plus/", | ||
| "author": "Capgo Team <support@capgo.app> (https://capgo.app)", | ||
| ======= | ||
| "name": "@capacitor/ios", | ||
| "version": "8.3.1", | ||
| "description": "Capacitor: Cross-platform apps with JavaScript and the web", | ||
| "homepage": "https://capacitorjs.com", | ||
| "author": "Ionic Team <hi@ionic.io> (https://ionic.io)", | ||
| >>>>>>> upstream/main |
There was a problem hiding this comment.
Resolve the leftover merge conflict markers.
This manifest is not valid JSON, which matches the EJSONPARSE failure in CI. npm install/publish cannot proceed until one side is chosen and the conflict markers are removed.
Also applies to: 36-41
🧰 Tools
🪛 Biome (2.4.11)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: unexpected character <
(parse)
[error] 2-2: String values must be double quoted.
(parse)
[error] 3-3: End of file expected
(parse)
[error] 3-3: End of file expected
(parse)
[error] 3-3: End of file expected
(parse)
[error] 3-3: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 4-4: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 5-5: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 6-6: End of file expected
(parse)
[error] 7-7: End of file expected
(parse)
[error] 7-7: End of file expected
(parse)
[error] 7-7: End of file expected
(parse)
[error] 7-8: End of file expected
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 8-8: unexpected character =
(parse)
[error] 9-9: End of file expected
(parse)
[error] 9-9: End of file expected
(parse)
[error] 9-9: End of file expected
(parse)
[error] 9-9: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 10-10: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 11-11: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 12-12: End of file expected
(parse)
[error] 13-13: End of file expected
(parse)
[error] 13-13: End of file expected
(parse)
[error] 13-13: End of file expected
(parse)
[error] 13-14: End of file expected
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character >
(parse)
[error] 14-14: unexpected character /
(parse)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ios/package.json` around lines 2 - 14, The package.json contains leftover Git
merge conflict markers (<<<<<<<, =======, >>>>>>>) causing invalid JSON; remove
the conflict markers and pick the intended package metadata values (e.g., the
"name", "version", "description", "homepage", "author" fields currently
conflicting between `@capacitor-plus/ios` and `@capacitor/ios`) so the file is valid
JSON—ensure you keep one consistent block for those keys and delete the other
block and all conflict markers (also fix the same pattern at the other conflict
region mentioned for lines 36-41).
| <<<<<<< HEAD | ||
| "version": "8.0.8", | ||
| ======= | ||
| "version": "8.3.1", | ||
| >>>>>>> upstream/main |
There was a problem hiding this comment.
Unresolved merge conflict markers must be resolved.
The file contains Git conflict markers (<<<<<<< HEAD, =======, >>>>>>> upstream/main) which make this invalid JSON. This will break lerna commands and CI pipelines.
Based on the PR objective (syncing with upstream), the resolution should likely use the upstream version 8.3.1.
🔧 Proposed fix
-<<<<<<< HEAD
- "version": "8.0.8",
-=======
"version": "8.3.1",
->>>>>>> upstream/main📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <<<<<<< HEAD | |
| "version": "8.0.8", | |
| ======= | |
| "version": "8.3.1", | |
| >>>>>>> upstream/main | |
| "version": "8.3.1", |
🧰 Tools
🪛 Biome (2.4.11)
[error] 16-16: unexpected character <
(parse)
[error] 16-16: unexpected character <
(parse)
[error] 16-16: unexpected character <
(parse)
[error] 16-16: unexpected character <
(parse)
[error] 16-16: unexpected character <
(parse)
[error] 16-16: unexpected character <
(parse)
[error] 16-16: unexpected character <
(parse)
[error] 16-16: String values must be double quoted.
(parse)
[error] 17-17: End of file expected
(parse)
[error] 17-17: End of file expected
(parse)
[error] 17-17: End of file expected
(parse)
[error] 17-18: End of file expected
(parse)
[error] 18-18: unexpected character =
(parse)
[error] 18-18: unexpected character =
(parse)
[error] 18-18: unexpected character =
(parse)
[error] 18-18: unexpected character =
(parse)
[error] 18-18: unexpected character =
(parse)
[error] 18-18: unexpected character =
(parse)
[error] 18-18: unexpected character =
(parse)
[error] 19-19: End of file expected
(parse)
[error] 19-19: End of file expected
(parse)
[error] 19-19: End of file expected
(parse)
[error] 19-20: End of file expected
(parse)
[error] 20-20: unexpected character >
(parse)
[error] 20-20: unexpected character >
(parse)
[error] 20-20: unexpected character >
(parse)
[error] 20-20: unexpected character >
(parse)
[error] 20-20: unexpected character >
(parse)
[error] 20-20: unexpected character >
(parse)
[error] 20-20: unexpected character >
(parse)
[error] 20-20: unexpected character /
(parse)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@lerna.json` around lines 16 - 20, Remove the Git conflict markers (<<<<<<<,
=======, >>>>>>>) and resolve the version field in lerna.json by choosing the
upstream value; replace the conflicting block so the JSON contains a single
"version": "8.3.1" entry (no markers) to restore valid JSON and ensure lerna/CI
can parse the file.
| <<<<<<< HEAD | ||
| "@types/node": "^24.10.1", | ||
| "@types/tar": "^6.1.2", | ||
| "eslint": "^8.57.1", | ||
| "eslint-plugin-import": "^2.31.0", | ||
| ======= | ||
| "@types/node": "18.18.6", | ||
| "eslint": "^8.57.0", | ||
| >>>>>>> upstream/main | ||
| "lerna": "^7.1.3", | ||
| "prettier": "^3.6.2", | ||
| "prettier-plugin-java": "^2.7.7", | ||
| "rimraf": "^6.1.0", | ||
| "semver": "^7.3.7", | ||
| "swiftlint": "^2.0.0", | ||
| <<<<<<< HEAD | ||
| "tar": "^6.1.11", | ||
| "prettier-pretty-check": "^0.2.0" | ||
| ======= | ||
| "tar": "^7.5.3" | ||
| >>>>>>> upstream/main |
There was a problem hiding this comment.
Critical: Unresolved merge conflicts break npm install.
The package.json file contains unresolved Git conflict markers that make the JSON invalid. The pipeline failure confirms: npm install failed (EJSONPARSE).
The conflicts involve:
@types/node:^24.10.1(HEAD) vs18.18.6(upstream)eslint:^8.57.1(HEAD) vs^8.57.0(upstream)@types/tar:^6.1.2(HEAD only)tar:^6.1.11(HEAD) vs^7.5.3(upstream)prettier-pretty-check:^0.2.0(HEAD only)
Resolve the conflicts by choosing appropriate versions. Note that tar version change from ^6.x to ^7.x is a major version bump that may require import changes (the AI summary mentions switching from default import to named extract/create exports).
🧰 Tools
🪛 Biome (2.4.11)
[error] 35-35: unexpected character <
(parse)
[error] 35-35: unexpected character <
(parse)
[error] 35-35: unexpected character <
(parse)
[error] 35-35: unexpected character <
(parse)
[error] 35-35: unexpected character <
(parse)
[error] 35-35: unexpected character <
(parse)
[error] 35-35: unexpected character <
(parse)
[error] 35-35: String values must be double quoted.
(parse)
[error] 36-36: End of file expected
(parse)
[error] 36-36: End of file expected
(parse)
[error] 36-36: End of file expected
(parse)
[error] 36-36: End of file expected
(parse)
[error] 37-37: End of file expected
(parse)
[error] 37-37: End of file expected
(parse)
[error] 37-37: End of file expected
(parse)
[error] 37-37: End of file expected
(parse)
[error] 38-38: End of file expected
(parse)
[error] 38-38: End of file expected
(parse)
[error] 38-38: End of file expected
(parse)
[error] 38-38: End of file expected
(parse)
[error] 39-39: End of file expected
(parse)
[error] 39-39: End of file expected
(parse)
[error] 39-39: End of file expected
(parse)
[error] 39-40: End of file expected
(parse)
[error] 40-40: unexpected character =
(parse)
[error] 40-40: unexpected character =
(parse)
[error] 40-40: unexpected character =
(parse)
[error] 40-40: unexpected character =
(parse)
[error] 40-40: unexpected character =
(parse)
[error] 40-40: unexpected character =
(parse)
[error] 40-40: unexpected character =
(parse)
[error] 41-41: End of file expected
(parse)
[error] 41-41: End of file expected
(parse)
[error] 41-41: End of file expected
(parse)
[error] 41-41: End of file expected
(parse)
[error] 42-42: End of file expected
(parse)
[error] 42-42: End of file expected
(parse)
[error] 42-42: End of file expected
(parse)
[error] 42-43: End of file expected
(parse)
[error] 43-43: unexpected character >
(parse)
[error] 43-43: unexpected character >
(parse)
[error] 43-43: unexpected character >
(parse)
[error] 43-43: unexpected character >
(parse)
[error] 43-43: unexpected character >
(parse)
[error] 43-43: unexpected character >
(parse)
[error] 43-43: unexpected character >
(parse)
[error] 43-43: unexpected character /
(parse)
[error] 44-44: End of file expected
(parse)
[error] 44-44: End of file expected
(parse)
[error] 44-44: End of file expected
(parse)
[error] 44-44: End of file expected
(parse)
[error] 45-45: End of file expected
(parse)
[error] 45-45: End of file expected
(parse)
[error] 45-45: End of file expected
(parse)
[error] 45-45: End of file expected
(parse)
[error] 46-46: End of file expected
(parse)
[error] 46-46: End of file expected
(parse)
[error] 46-46: End of file expected
(parse)
[error] 46-46: End of file expected
(parse)
[error] 47-47: End of file expected
(parse)
[error] 47-47: End of file expected
(parse)
[error] 47-47: End of file expected
(parse)
[error] 47-47: End of file expected
(parse)
[error] 48-48: End of file expected
(parse)
[error] 48-48: End of file expected
(parse)
[error] 48-48: End of file expected
(parse)
[error] 48-48: End of file expected
(parse)
[error] 49-49: End of file expected
(parse)
[error] 49-49: End of file expected
(parse)
[error] 49-49: End of file expected
(parse)
[error] 49-50: End of file expected
(parse)
[error] 50-50: unexpected character <
(parse)
[error] 50-50: unexpected character <
(parse)
[error] 50-50: unexpected character <
(parse)
[error] 50-50: unexpected character <
(parse)
[error] 50-50: unexpected character <
(parse)
[error] 50-50: unexpected character <
(parse)
[error] 50-50: unexpected character <
(parse)
[error] 51-51: End of file expected
(parse)
[error] 51-51: End of file expected
(parse)
[error] 51-51: End of file expected
(parse)
[error] 51-51: End of file expected
(parse)
[error] 52-52: End of file expected
(parse)
[error] 52-52: End of file expected
(parse)
[error] 52-52: End of file expected
(parse)
[error] 53-53: unexpected character =
(parse)
[error] 53-53: unexpected character =
(parse)
[error] 53-53: unexpected character =
(parse)
[error] 53-53: unexpected character =
(parse)
[error] 53-53: unexpected character =
(parse)
[error] 53-53: unexpected character =
(parse)
[error] 53-53: unexpected character =
(parse)
[error] 54-54: End of file expected
(parse)
[error] 54-54: End of file expected
(parse)
[error] 54-54: End of file expected
(parse)
[error] 55-55: unexpected character >
(parse)
[error] 55-55: unexpected character >
(parse)
[error] 55-55: unexpected character >
(parse)
[error] 55-55: unexpected character >
(parse)
[error] 55-55: unexpected character >
(parse)
[error] 55-55: unexpected character >
(parse)
[error] 55-55: unexpected character >
(parse)
[error] 55-55: String values must be double quoted.
(parse)
[error] 55-55: unexpected character /
(parse)
[error] 55-55: String values must be double quoted.
(parse)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@package.json` around lines 35 - 55, Remove the Git conflict markers and
produce a valid package.json by reconciling the dependency versions: choose the
final versions you want (e.g., keep "@types/node": "^24.10.1", "eslint":
"^8.57.1", drop "@types/tar" if you upgrade to "tar": "^7.5.3", keep
"prettier-pretty-check" if desired) and ensure only one entry per package
remains; if you accept the major bump to tar (^7.x) update any code importing
tar to use the new named exports (extract/create) instead of the old default
import and remove/adjust `@types/tar` as it may be incompatible, then validate
JSON (no <<<<<<< markers), run npm install to confirm EJSONPARSE is resolved and
run tests/lint to verify no import breakages.
Merge Conflict Resolution Required
The automatic sync of the
plusbranch with upstream main encountered merge conflicts.What happened
Action needed: Review the branch and resolve any remaining concerns before merging.
This PR was created automatically by the Capacitor+ sync workflow
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Improvements