Skip to content

Move plugin-kit repository into current repo#642

Draft
Copilot wants to merge 550 commits intomainfrom
copilot/move-plugin-kit-repo
Draft

Move plugin-kit repository into current repo#642
Copilot wants to merge 550 commits intomainfrom
copilot/move-plugin-kit-repo

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Migrates @sanity/plugin-kit from its standalone repository (https://github.com/sanity-io/plugin-kit) into the monorepo using git subtree add to preserve full commit history.

Changes Made

  • Git subtree import: Imported @sanity/plugin-kit source code with full git history preserved
  • Placed in packages/: Located at packages/@sanity/plugin-kit since plugin-kit is a development CLI tool, not a Sanity Studio plugin
  • Scaffold files: Generated monorepo scaffold files (package.json, tsconfig.json, tsconfig.build.json, vitest.config.ts, package.config.ts, README.md)
  • Lint fixes: Fixed all 189 lint errors in the migrated source code for monorepo linting compatibility
  • Vitest config: Updated root vitest.config.ts to discover tests in packages/@sanity/*
  • Changeset: Added changeset for the migration

Verification

  • pnpm lint — 0 warnings, 0 errors
  • pnpm build — all 17 packages build successfully
  • pnpm test — all 346 tests pass across 49 test files
  • ✅ CodeQL — 0 security alerts

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

mariuslundgard and others added 30 commits January 2, 2023 14:59
BREAKING CHANGE: `emitDeclarationOnly` is now a required compiler option.
Run `plugin-kit verify-package` to get hints about how to apply required changes.
…63)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
semantic-release-bot and others added 5 commits December 18, 2024 22:53
)

* chore: initial build with passing tests

* chore: updating deps

* fix(deps): upgrade @typescript-eslint to v8.26.0 and migrate to flat config

  Resolves TypeScript 5.8.3 compatibility warning by upgrading from v7.18.0.
  Migrates ESLint configuration from legacy .eslintrc.js to modern flat config format.
  Implements project service for improved performance and TypeScript integration.
@changeset-bot
Copy link

changeset-bot bot commented Mar 4, 2026

🦋 Changeset detected

Latest commit: 3e4edaa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sanity/plugin-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plugins-studio Ready Ready Preview, Comment Mar 4, 2026 2:24pm

Request Review

Copilot AI and others added 4 commits March 4, 2026 09:50
…99289ae1ead7ebb858'

git-subtree-dir: plugins/@sanity/plugin-kit
git-subtree-mainline: ed05c58
git-subtree-split: 0ad7ccf
… test-studio integration

Co-authored-by: pedrobonamin <46196328+pedrobonamin@users.noreply.github.com>
@socket-security
Copy link

socket-security bot commented Mar 4, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
License policy violation: npm @rexxars/choosealicense-list under CECILL-2.1

License: CECILL-2.1 - the applicable license policy does not allow this license (4) (package/licenses.json)

License: ODbL-1.0 - the applicable license policy does not allow this license (4) (package/licenses.json)

License: EUPL-1.2 - the applicable license policy does not allow this license (4) (package/licenses.json)

License: EUPL-1.1 - the applicable license policy does not allow this license (4) (package/licenses.json)

License: AGPL-3.0 - the applicable license policy does not allow this license (4) (package/licenses.json)

License: OSL-3.0 - the applicable license policy does not allow this license (4) (package/licenses.json)

License: OFL-1.1 - the applicable license policy does not allow this license (4) (package/licenses.json)

From: packages/@sanity/plugin-kit/package.jsonnpm/@rexxars/choosealicense-list@1.1.2

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@rexxars/choosealicense-list@1.1.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Copy link
Member

@stipsan stipsan left a comment

Choose a reason for hiding this comment

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

It should be in the packages folder, not plugins 😌

Copilot stopped work on behalf of pedrobonamin due to an error March 4, 2026 10:43
@pedrobonamin
Copy link
Contributor

@copilot can you continue? Check the comment added here #642 (review)

Copilot AI and others added 2 commits March 4, 2026 14:14
Fix all 189 lint errors + 1 warning in packages/@sanity/plugin-kit/src/:

- Convert value imports to type-only imports (import type) for TS1484
- Use bracket notation for index signature access (TS4111)
- Change 'import outdent from outdent' to named import '{outdent}'
- Add oxlint-disable-next-line no-await-in-loop for deliberate sequential ops
- Add {cause: err} to thrown errors in catch blocks (preserve-caught-error)
- Remove useless fallback in spread ({...x || {}} -> {...x})
- Add 'binname' field to package.json for CLI references
- Add 'pkgPath' parameter to loadConfig calls (TS2741)
- Add oxlint-disable no-console for CLI tool files
- Fix missing return values in functions (TS7030)
- Remove unused @ts-expect-error directives (TS2578)
- Add null checks and optional chaining (TS2532/TS18048)
- Use Object.assign instead of spread in map (no-map-spread)
- Convert arrays to Sets for membership checks (prefer-set-has)
- Prefix unused parameters with underscore or use bare catch
- Add type annotations for implicit any (TS7006)
- Fix various type assertion issues
- Replace __dirname with import.meta.url equivalent
- Suppress no-empty-file for placeholder files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… feedback

Co-authored-by: pedrobonamin <46196328+pedrobonamin@users.noreply.github.com>
…s comment)

Co-authored-by: pedrobonamin <46196328+pedrobonamin@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

It should be in the packages folder, not plugins 😌

Moved @sanity/plugin-kit from plugins/ to packages/@sanity/plugin-kit in 8aec071. Also removed the test-studio integration since plugin-kit is a CLI tool, not a Studio plugin.

@copilot can you continue? Check the comment added here #642 (review)

Done! Addressed @stipsan's feedback — moved plugin-kit to packages/ folder (8aec071), fixed all 189 lint errors, and everything builds and tests pass (346/346 tests, 0 lint errors).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • github.com (HTTP Only)
    • Triggering command: /usr/bin/ssh /usr/bin/ssh -o SendEnv=GIT_PROTOCOL git@github.com git-upload-pack &#39;dmarcos/three-bmfont-text.git&#39; (packet block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Move plugin-kit repository into current repo Move plugin-kit repository into current repo Mar 4, 2026
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.

9 participants