Skip to content

feat: update dependencies, add tests to ci#85

Merged
damiant merged 7 commits intomainfrom
cleanup
Jan 30, 2026
Merged

feat: update dependencies, add tests to ci#85
damiant merged 7 commits intomainfrom
cleanup

Conversation

@damiant
Copy link
Owner

@damiant damiant commented Jan 29, 2026

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 knip unused files check, and the restriction of many internal utility functions to module scope. Additionally, Angular dependencies are updated to 21.1.1, and a new test step is added to the GitHub Actions workflow.

Feature and Dependency Removal:

  • Removed all references to Builder features and icons from the codebase, including the TipType.Builder enum value, related icons, and documentation in README.md and package.json. [1] [2] [3] [4]

Dependency and Tooling Updates:

  • Updated Angular dependencies and devDependencies to version 21.1.1 in both plugin-explorer/package.json and preview/package.json. [1] [2]
  • Added knip as a dev dependency and script in package.json, and introduced a knip.json configuration file for unused files checking. [1] [2] [3]

Workflow Improvements:

  • Added a Test step (npm run test) to the GitHub Actions workflow in .github/workflows/build.yml to ensure tests are run during CI.

Codebase Cleanup and Restriction of Scope:

  • Changed many utility functions from exported to module-scoped (non-exported) to reduce the public API surface, including functions in files such as 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, and src/telemetry.ts. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Other Minor Improvements:

  • Updated version ranges for some dependencies in package.json to use caret (^) for more flexible upgrades.
  • Made extractErrors in src/error-handler.ts exported (now public).

Summary by CodeRabbit

  • Tests

    • CI now runs tests during build; added test fixture and updated test paths.
  • Documentation

    • Removed Builder integration from README; added changelog entry and a note to AGENTS.md.
  • Chores

    • Project version bump, test script updated, new tooling/config and script added; Angular patch dependency updates; .gitignore adjusted.
  • Refactor

    • Narrowed public API surface by making several helpers internal.
  • UI

    • Removed Builder-specific tip/icon mapping.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
CI/CD
\.github/workflows/build.yml
Added a Test step running npm run test between Lint and Build.
Docs & Changelog
README.md, AGENTS.md, CHANGELOG.md
Removed "Builder Features" section from README; added AGENTS.md instruction; added v2.1.6 changelog entry.
Tooling & manifest
knip.json, package.json, tests/errors.txt, \.gitignore
Added knip.json; bumped root version to 2.1.6; added knip script and knip devDependency; changed test script to npx vitest run; added tests/errors.txt; removed tests/errors.txt from .gitignore.
Angular version bumps
plugin-explorer/package.json, preview/package.json, starter/package.json
Patch bumps for many @angular/* and @angular-devkit/* from ^21.1.0^21.1.1.
Public API surface — many exports removed
src/... (see list)
src/capacitor-config-file.ts, src/discovery.ts, src/features/fix-issue.ts, src/logging.ts, src/messages.ts, src/npm-info.ts, src/process-list.ts, src/telemetry.ts, src/utilities-strings.ts, src/webview-debug.ts, src/whats-new-content.ts, src/utilities.ts
Removed export from multiple utility/helper functions and features, reducing module exports without internal logic changes — review callers/imports for breakage.
Public API surface — types/enums updated
src/npm-info-data.ts, src/node-commands.ts, src/process-packages.ts, src/utilities.ts, src/web-debug.ts, src/workspace-state.ts, src/tip.ts, src/project.ts
Downgraded several interfaces/enums from exported to internal; added hasHooks: boolean to PluginInformation; removed TipType.Builder and its icon handling; removed two WorkspaceSetting members and made setExtSetting internal. Check external type consumers.
Error handler & tests
src/error-handler.ts, tests/error-handler.test.ts, tests/errors.txt
Made extractErrors exported; updated example/test hard-coded paths; added tests/errors.txt fixture. Ensure path changes align with CI/test environment.
Rules: browserslist flow
src/rules-browserslist.ts
Removed moveFile migration and rmSync usage; changed flow to only ensure browserslist in package.json when file is missing; updated setBrowsersList signature (adds title/message parameters). Review action queue usage and callers.
Plist import change
src/xcode.ts
Switched to namespace import for @webnativellc/simple-plist (accessing readFileSync/writeFileSync via namespace). Verify runtime import shape.
Tests & paths
tests/error-handler.test.ts
Updated hard-coded paths from /Users/damiantarnawsky/... to /Users/theuser/....

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hopped through exports, one by one,
Tucked Builder out of sight, then spun,
A knip and test to guard the gate,
Versions nudged and errors set as fate,
Tiny hops — the repo’s neat and done! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 24.32% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: update dependencies, add tests to ci' directly relates to major changes in this PR including dependency updates (Angular, @types/node, typescript, knip) and adding a Test step to the GitHub Actions CI workflow.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cleanup

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 duplication

The 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);

@damiant damiant merged commit a1ab978 into main Jan 30, 2026
2 checks passed
@damiant damiant deleted the cleanup branch January 30, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant