Skip to content

refactor: fork publishing setup (package.json rename, .gitignore, CLAUDE.md)#2

Merged
NeverMore93 merged 2 commits intomainfrom
fork-publishing-changes
Apr 22, 2026
Merged

refactor: fork publishing setup (package.json rename, .gitignore, CLAUDE.md)#2
NeverMore93 merged 2 commits intomainfrom
fork-publishing-changes

Conversation

@NeverMore93
Copy link
Copy Markdown
Owner

Summary

Prepare the fork for independent npm publishing by updating package metadata and project configuration.

Changes

  • package.json: Rename from @opencode-ai/plugin-worktree to opencode-worktree to avoid npm scope conflict
    • Added exports field for ESM best practice
    • Added author, homepage, repository pointing to fork
    • Moved runtime deps (jsonc-parser, zod) to top-level dependencies
    • Added opencode-plugin and multi-repo keywords
  • .gitignore: Expanded to production standard (node_modules, dist, env, IDE, OS, spec/agent state)
  • CLAUDE.md: Replaced repository-ownership guidelines with project-specific coding guidelines (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution)

Test Plan

  • npm run build — verify tsup builds successfully
  • npm run typecheck — verify TypeScript compiles without errors
  • npm publish --dry-run — verify package can be published (no scope conflict)

Root Cause

The original @opencode-ai/plugin-worktree name requires npm org membership to publish. Since this is a fork for independent publishing, we need a non-scoped or own-scope package name.

…lishing

- Expand .gitignore to production standard (node_modules, dist, env, IDE, OS)
- Replace repository-ownership CLAUDE.md with project-specific coding guidelines
- Change package name from @opencode-ai/plugin-worktree to opencode-worktree
- Add exports field, author, homepage, repository pointing to fork
- Move dependencies to top-level (jsonc-parser, zod are runtime deps)
- Add opencode-plugin and multi-repo keywords for discoverability
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@NeverMore93 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 5 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 5 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0f01dd83-2749-4254-aad7-095cdb2615f9

📥 Commits

Reviewing files that changed from the base of the PR and between ac1b7ab and 482bbc4.

⛔ Files ignored due to path filters (1)
  • .claude/scheduled_tasks.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .github/workflows/claude-code-review.yml
  • .github/workflows/claude.yml
  • .github/workflows/publish.yml
  • .gitignore
  • .npmignore
  • CLAUDE.md
  • package.json
  • pr-body.txt
  • tsconfig.json
  • tsup.config.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fork-publishing-changes

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 and usage tips.

@NeverMore93
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request initializes the project structure for the opencode-worktree plugin, including configuration for Git, NPM, TypeScript, and the tsup bundler, alongside behavioral guidelines in CLAUDE.md. The review identifies a mismatch between the build output path and the package.json entry point, suggests moving bundled dependencies to devDependencies, recommends explicitly declaring the Bun runtime requirement in the engines field, and notes a metadata artifact that should be removed from the documentation.

Comment thread tsup.config.ts Outdated
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["src/plugin/worktree.ts"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The current entry configuration ["src/plugin/worktree.ts"] will cause tsup to output the bundle to dist/worktree.js. However, package.json expects the file at dist/plugin/worktree.js (see main and exports fields). To maintain the desired directory structure in the output and avoid breaking the package for consumers, use an object-based entry configuration.

Suggested change
entry: ["src/plugin/worktree.ts"],
entry: { "plugin/worktree": "src/plugin/worktree.ts" },

Comment thread package.json
Comment on lines +33 to +36
"dependencies": {
"jsonc-parser": "^3.3.1",
"zod": "^3.24.0"
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since jsonc-parser and zod are bundled into the final output (via noExternal in tsup.config.ts), they do not need to be listed as runtime dependencies. Moving them to devDependencies will prevent unnecessary installations for users of the package.

  "dependencies": {},

Comment thread package.json
Comment on lines +41 to +48
"devDependencies": {
"@opencode-ai/plugin": "^1.14.18",
"@opencode-ai/sdk": "^1.0.0",
"@types/bun": "^1.2.0",
"bumpp": "^10.4.1",
"tsup": "^8.5.1",
"typescript": "^5.5.0"
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Add jsonc-parser and zod to devDependencies since they are bundled at build time and not required as runtime dependencies by the consumer.

  "devDependencies": {
    "@opencode-ai/plugin": "^1.14.18",
    "@opencode-ai/sdk": "^1.0.0",
    "@types/bun": "^1.2.0",
    "bumpp": "^10.4.1",
    "jsonc-parser": "^3.3.1",
    "tsup": "^8.5.1",
    "typescript": "^5.5.0",
    "zod": "^3.24.0"
  },

Comment thread package.json Outdated
"typescript": "^5.5.0"
},
"engines": {
"node": ">=20.3.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The plugin relies on Bun-specific APIs (e.g., bun:sqlite, Bun.spawn). The engines field should reflect this requirement to ensure users are aware of the necessary runtime environment, as it will not run in a standard Node.js environment.

    "node": ">=20.3.0",
    "bun": ">=1.0.0"

Comment thread CLAUDE.md Outdated

**These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.

(End of file - total 65 lines) No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This line appears to be a metadata artifact (likely from a tool output) and should be removed to keep the documentation clean.

… engines

- Use object-form entry in tsup.config.ts for explicit output path
- Remove metadata artifact from CLAUDE.md footer
- Add bun>=1.0.0 to engines field (plugin uses bun:sqlite API)
- Keep jsonc-parser and zod in dependencies (bundled but listed for safety)
@NeverMore93 NeverMore93 merged commit 667aafc into main Apr 22, 2026
2 checks passed
@NeverMore93 NeverMore93 deleted the fork-publishing-changes branch April 22, 2026 06:59
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