Conversation
📝 WalkthroughWalkthroughThis PR narrows the public API by removing many exports, removes Builder references, adds knip config and CI test step, bumps Angular patch versions, updates package.json scripts/deps, adds test fixtures, adjusts browserslist migration flow, and tweaks some file imports and test paths. (50 words) Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 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 unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/error-handler.ts`:
- Line 96: The function extractErrors returns Array<ErrorLine> but the ErrorLine
interface is not exported; add an export modifier to the ErrorLine interface
declaration (i.e., change "interface ErrorLine" to "export interface ErrorLine")
so the type is public for declaration emit and other modules, and ensure any
imports/usages referencing ErrorLine remain valid.
🧹 Nitpick comments (1)
tests/error-handler.test.ts (1)
6-24: Centralize the fixture base path to reduce duplicationThe base path is repeated across tests (Lines 11, 21, 32, 39). A small constant makes future edits safer and clearer.
♻️ Suggested refactor
import { extractErrors } from '../src/error-handler'; +const FIXTURE_BASE = '/Users/theuser/Code/dust3/dust'; +const APP_DELEGATE_PATH = `${FIXTURE_BASE}/ios/App/App/AppDelegate.swift`; + test('extractErrors finds Swift errors in errors.txt', () => { const errorsFile = join(__dirname, 'errors.txt'); const content = readFileSync(errorsFile, 'utf8'); const lines = content.split('\n'); - const errors = extractErrors('', lines, '/Users/theuser/Code/dust3/dust'); + const errors = extractErrors('', lines, FIXTURE_BASE); @@ swiftErrors.forEach((err) => { - expect(err.uri).toBe('/Users/theuser/Code/dust3/dust/ios/App/App/AppDelegate.swift'); + expect(err.uri).toBe(APP_DELEGATE_PATH); expect(err.line).toBe(7); expect(err.error).toContain('eee'); }); }); @@ - const errors = extractErrors('', lines, '/Users/theuser/Code/dust3/dust'); + const errors = extractErrors('', lines, FIXTURE_BASE); @@ - expect(appDelegateError.uri).toBe('/Users/theuser/Code/dust3/dust/ios/App/App/AppDelegate.swift'); + expect(appDelegateError.uri).toBe(APP_DELEGATE_PATH);
This pull request includes several dependency updates, workflow improvements, and codebase cleanups. The most notable changes are the removal of Builder-related features and icons, the addition of the
knipunused files check, and the restriction of many internal utility functions to module scope. Additionally, Angular dependencies are updated to21.1.1, and a new test step is added to the GitHub Actions workflow.Feature and Dependency Removal:
TipType.Builderenum value, related icons, and documentation inREADME.mdandpackage.json. [1] [2] [3] [4]Dependency and Tooling Updates:
21.1.1in bothplugin-explorer/package.jsonandpreview/package.json. [1] [2]knipas a dev dependency and script inpackage.json, and introduced aknip.jsonconfiguration file for unused files checking. [1] [2] [3]Workflow Improvements:
Teststep (npm run test) to the GitHub Actions workflow in.github/workflows/build.ymlto ensure tests are run during CI.Codebase Cleanup and Restriction of Scope:
src/capacitor-config-file.ts,src/discovery.ts,src/features/fix-issue.ts,src/logging.ts,src/messages.ts,src/node-commands.ts,src/npm-info-data.ts,src/npm-info.ts,src/process-list.ts,src/process-packages.ts, andsrc/telemetry.ts. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Other Minor Improvements:
package.jsonto use caret (^) for more flexible upgrades.extractErrorsinsrc/error-handler.tsexported (now public).Summary by CodeRabbit
Tests
Documentation
Chores
Refactor
UI
✏️ Tip: You can customize this high-level summary in your review settings.