Skip to content

Update to version 2.1.0, adding the Expo Mobile App plugin and enhancing plugin management. Introduce self-distributing flag for plugins, update variant configuration, and improve plugin installation logic. Update CHANGELOG and package.json accordingly. - #10

Open
Gbuomprisco wants to merge 1 commit into
mainfrom
2.1.0

Conversation

@Gbuomprisco

@Gbuomprisco Gbuomprisco commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added support for Expo Mobile App plugins with mobile-specific installation paths.
    • Added support for plugins that distribute themselves and span multiple directories.
    • Improved detection of installed plugins across all required directories.
  • Bug Fixes

    • Self-distributing plugins are now excluded from registry-based update and outdated checks.
    • Updates for unsupported, untrackable plugins now fail with a clear explanation.
  • Documentation

    • Added release notes for version 2.1.0.

…ing plugin management. Introduce self-distributing flag for plugins, update variant configuration, and improve plugin installation logic. Update CHANGELOG and package.json accordingly.
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The plugin model now supports self-distributing Expo plugins and multi-directory installations. Add operations run self-distributing codemods without registry files. Update and outdated checks exclude plugins that are not registry-trackable. Tests cover the new behavior.

Changes

Plugin distribution workflow

Layer / File(s) Summary
Plugin model and installation validation
src/plugins-model.ts, src/plugins-model.test.ts
VariantConfig supports multiple paths. PluginDefinition supports self-distribution. The Expo plugin, path resolution, trackability checks, and installation validation were added with filesystem coverage.
Self-distributing plugin installation
src/utils/add-plugin.ts, src/utils/test-helpers.ts, src/utils/add-plugin.test.ts
Self-distributing plugins skip registry downloads and base-version persistence. Their codemods run without a registry version.
Registry update and outdated checks
src/utils/apply-plugin-update.ts, src/utils/check-plugin-update.ts, src/utils/outdated-plugins.ts, src/utils/*test.ts, CHANGELOG.md, package.json
Update and outdated checks reject or exclude untrackable plugins. Tests cover these paths. The package version and changelog now describe release 2.1.0.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant PluginCommand
  participant Registry
  participant Codemod
  CLI->>PluginCommand: process plugin operation
  PluginCommand->>PluginCommand: check isTrackable
  alt self-distributing plugin
    PluginCommand->>Codemod: run without registry version
    Codemod-->>CLI: complete installation
  else registry-tracked plugin
    PluginCommand->>Registry: fetch plugin files
    Registry-->>PluginCommand: return registry data
    PluginCommand-->>CLI: continue update or installation
  end
Loading

Poem

I’m a rabbit with paths in a row,
Expo files hop where codemods go.
Registry doors stay closed when needed,
Trackable checks keep flows proceeding.
Multi-directory burrows now bloom.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the version release, Expo plugin, self-distributing plugins, variant configuration, and installation logic changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2.1.0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/plugins-model.test.ts (1)

106-111: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a test for the missing-name branch.

This test covers only the !pkg.exports half of if (!pkg.name || !pkg.exports) in isInstalled. No test exercises a package.json with exports but no name. Add a companion case to cover that branch.

✅ Suggested additional test
   it('is false when the package.json has no exports', async () => {
     mockDisk(['packages/plugins/feedback/package.json']);
     vi.mocked(fs.readJson).mockResolvedValue({ name: 'feedback' });

     await expect(isInstalled(SINGLE_PATH, 'next-supabase')).resolves.toBe(false);
   });
+
+  it('is false when the package.json has no name', async () => {
+    mockDisk(['packages/plugins/feedback/package.json']);
+    vi.mocked(fs.readJson).mockResolvedValue({ exports: { '.': './src/index.ts' } });
+
+    await expect(isInstalled(SINGLE_PATH, 'next-supabase')).resolves.toBe(false);
+  });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/plugins-model.test.ts` around lines 106 - 111, Add a companion test
alongside the existing no-exports case that mocks a package.json containing
exports but no name, then assert isInstalled(SINGLE_PATH, 'next-supabase')
resolves to false. Keep the setup and assertion pattern consistent with the
existing test.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/utils/apply-plugin-update.ts`:
- Around line 57-62: Check isTrackable(plugin) before resolving or caching the
GitHub username in apply-plugin-update.ts and check-plugin-update.ts, leaving
self-distributing plugins independent of registry access; add no-username
regression cases for those flows. In outdated-plugins.ts, filter installed
plugins to trackable entries before requiring a username and return an empty
outdated list when none remain.

---

Nitpick comments:
In `@src/plugins-model.test.ts`:
- Around line 106-111: Add a companion test alongside the existing no-exports
case that mocks a package.json containing exports but no name, then assert
isInstalled(SINGLE_PATH, 'next-supabase') resolves to false. Keep the setup and
assertion pattern consistent with the existing test.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bc704ba6-7881-4ccc-ba67-ea41a7d2a4e5

📥 Commits

Reviewing files that changed from the base of the PR and between 43701ce and 6ece00b.

📒 Files selected for processing (12)
  • CHANGELOG.md
  • package.json
  • src/plugins-model.test.ts
  • src/plugins-model.ts
  • src/utils/add-plugin.test.ts
  • src/utils/add-plugin.ts
  • src/utils/apply-plugin-update.test.ts
  • src/utils/apply-plugin-update.ts
  • src/utils/check-plugin-update.test.ts
  • src/utils/check-plugin-update.ts
  • src/utils/outdated-plugins.ts
  • src/utils/test-helpers.ts

Comment on lines +57 to +62
if (!isTrackable(plugin)) {
return {
success: false,
reason: `Plugin "${plugin.name}" ships its own files and is not tracked by the registry, so there is nothing to apply. Re-run its codemod to pull a newer version.`,
};
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Check registry trackability before requiring or caching a GitHub username.

A self-distributing plugin does not need registry access. If no username is cached, these flows return the username failure before they can reject or exclude the plugin. They can also cache a supplied username for an operation that does not use it.

  • src/utils/apply-plugin-update.ts#L57-L62: Move username resolution and cacheUsername() after the isTrackable(plugin) check.
  • src/utils/check-plugin-update.ts#L61-L66: Move username resolution and cacheUsername() after the isTrackable(plugin) check.
  • src/utils/outdated-plugins.ts#L85-L87: Filter installed trackable plugins before requiring a username. Return an empty outdated list when no trackable installed plugins remain.
  • Add no-username regression cases for self-distributing plugins.
📍 Affects 3 files
  • src/utils/apply-plugin-update.ts#L57-L62 (this comment)
  • src/utils/check-plugin-update.ts#L61-L66
  • src/utils/outdated-plugins.ts#L85-L87
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/apply-plugin-update.ts` around lines 57 - 62, Check
isTrackable(plugin) before resolving or caching the GitHub username in
apply-plugin-update.ts and check-plugin-update.ts, leaving self-distributing
plugins independent of registry access; add no-username regression cases for
those flows. In outdated-plugins.ts, filter installed plugins to trackable
entries before requiring a username and return an empty outdated list when none
remain.

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