A dev-only dependency that bundles shared configuration for building Payload plugins: oxlint, oxfmt, TypeScript, tsdown and Vitest presets, plus an in-memory test database helper. It also provides reusable GitHub CI and release workflows and helpers for inserting fields and reporting anonymous telemetry. The build bundles its runtime modules into the plugin, so it is not a runtime dependency.
Shared lint, format, TypeScript, build and test config for the @maximseshuk Payload plugins
Installation
npm i @seshuk/payload-plugin-tooling0
Stars
0
Forks
3
Open Issues
Today
Last Updated
37
Weekly Downloads
v0.2.4
npm Version
34.7 KB
Unpacked Size
0
Dependencies
00 since Sep 27
| Date | Stars |
|---|---|
| Dec 5, 2026 | 0 |
| Dec 4, 2026 | 0 |
| Dec 3, 2026 | 0 |
| Dec 2, 2026 | 0 |
| Dec 1, 2026 | 0 |
| Nov 30, 2026 | 0 |
| Nov 29, 2026 | 0 |
| Nov 28, 2026 | 0 |
| Nov 27, 2026 | 0 |
| Nov 26, 2026 | 0 |
| Nov 25, 2026 | 0 |
| Nov 24, 2026 | 0 |
| Nov 23, 2026 | 0 |
| Nov 22, 2026 | 0 |
| Nov 21, 2026 | 0 |
| Nov 20, 2026 | 0 |
| Nov 19, 2026 | 0 |
| Nov 18, 2026 | 0 |
| Nov 17, 2026 | 0 |
| Nov 16, 2026 | 0 |
| Nov 15, 2026 | 0 |
| Nov 14, 2026 | 0 |
| Nov 13, 2026 | 0 |
| Nov 12, 2026 | 0 |
| Nov 11, 2026 | 0 |
| Nov 10, 2026 | 0 |
| Nov 9, 2026 | 0 |
| Nov 8, 2026 | 0 |
| Nov 7, 2026 | 0 |
| Nov 6, 2026 | 0 |
| Nov 5, 2026 | 0 |
| Nov 4, 2026 | 0 |
| Nov 3, 2026 | 0 |
| Nov 2, 2026 | 0 |
| Nov 1, 2026 | 0 |
| Oct 31, 2026 | 0 |
| Oct 30, 2026 | 0 |
| Oct 29, 2026 | 0 |
| Oct 28, 2026 | 0 |
| Oct 27, 2026 | 0 |
| Oct 26, 2026 | 0 |
| Oct 25, 2026 | 0 |
| Oct 24, 2026 | 0 |
| Oct 23, 2026 | 0 |
| Oct 22, 2026 | 0 |
| Oct 21, 2026 | 0 |
| Oct 20, 2026 | 0 |
| Oct 19, 2026 | 0 |
| Oct 18, 2026 | 0 |
| Oct 17, 2026 | 0 |
| Oct 16, 2026 | 0 |
| Oct 15, 2026 | 0 |
| Oct 14, 2026 | 0 |
| Oct 13, 2026 | 0 |
| Oct 12, 2026 | 0 |
| Oct 11, 2026 | 0 |
| Oct 10, 2026 | 0 |
| Oct 9, 2026 | 0 |
| Oct 8, 2026 | 0 |
| Oct 7, 2026 | 0 |
| Oct 6, 2026 | 0 |
| Oct 5, 2026 | 0 |
| Oct 4, 2026 | 0 |
| Oct 3, 2026 | 0 |
| Oct 2, 2026 | 0 |
| Oct 1, 2026 | 0 |
| Sep 30, 2026 | 0 |
| Sep 29, 2026 | 0 |
| Sep 28, 2026 | 0 |
| Sep 27, 2026 | 0 |
38−59 since Oct 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 38 |
| Dec 4, 2026 | 45 |
| Dec 3, 2026 | 42 |
| Dec 2, 2026 | 41 |
| Dec 1, 2026 | 37 |
| Nov 30, 2026 | 43 |
| Nov 29, 2026 | 40 |
| Nov 28, 2026 | 41 |
| Nov 27, 2026 | 37 |
| Nov 26, 2026 | 41 |
| Nov 25, 2026 | 37 |
| Nov 24, 2026 | 38 |
| Nov 23, 2026 | 30 |
| Nov 22, 2026 | 34 |
| Nov 21, 2026 | 29 |
| Nov 20, 2026 | 33 |
| Nov 19, 2026 | 31 |
| Nov 18, 2026 | 29 |
| Nov 17, 2026 | 30 |
| Nov 16, 2026 | 31 |
| Nov 15, 2026 | 30 |
| Nov 14, 2026 | 35 |
| Nov 13, 2026 | 32 |
| Nov 12, 2026 | 31 |
| Nov 11, 2026 | 33 |
| Nov 10, 2026 | 37 |
| Nov 9, 2026 | 42 |
| Nov 8, 2026 | 43 |
| Nov 7, 2026 | 42 |
| Nov 6, 2026 | 43 |
| Nov 5, 2026 | 69 |
| Nov 4, 2026 | 67 |
| Nov 3, 2026 | 63 |
| Nov 2, 2026 | 63 |
| Nov 1, 2026 | 59 |
| Oct 31, 2026 | 79 |
| Oct 30, 2026 | 80 |
| Oct 29, 2026 | 49 |
| Oct 28, 2026 | 48 |
| Oct 27, 2026 | 56 |
| Oct 26, 2026 | 54 |
| Oct 25, 2026 | 60 |
| Oct 24, 2026 | 50 |
| Oct 23, 2026 | 40 |
| Oct 22, 2026 | 53 |
| Oct 21, 2026 | 67 |
| Oct 20, 2026 | 84 |
| Oct 19, 2026 | 234 |
| Oct 18, 2026 | 255 |
| Oct 17, 2026 | 435 |
| Oct 16, 2026 | 465 |
| Oct 15, 2026 | 951 |
| Oct 14, 2026 | 951 |
| Oct 13, 2026 | 939 |
| Oct 12, 2026 | 881 |
| Oct 11, 2026 | 854 |
| Oct 10, 2026 | 659 |
| Oct 9, 2026 | 629 |
| Oct 8, 2026 | 130 |
| Oct 7, 2026 | 116 |
| Oct 6, 2026 | 97 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1403180109-root)<a href="https://payloaddirectory.dev/plugins/1403180109-root"><img src="https://payloaddirectory.dev/badge/1403180109-root.svg" alt="Payload Directory"></a>README
Shared dev config for the @seshuk Payload plugins: lint, format, TypeScript, build, test database, telemetry, field placement, changelog and GitHub workflows. Install it as a dev dependency only. Plugins never import it at runtime: the build bundles the telemetry and fields modules into the plugin.
pnpm add -D @seshuk/payload-plugin-tooling
// oxlint.config.ts
import { oxlintBase } from '@seshuk/payload-plugin-tooling/oxlint'
import { defineConfig } from 'oxlint'
export default defineConfig({
...oxlintBase,
overrides: [...oxlintBase.overrides /* plugin rules */],
})
// oxfmt.config.ts
import { oxfmtBase } from '@seshuk/payload-plugin-tooling/oxfmt'
import { defineConfig } from 'oxfmt'
export default defineConfig(oxfmtBase)
// tsconfig.json
{
"extends": "@seshuk/payload-plugin-tooling/tsconfig.json",
"compilerOptions": { "rootDir": "./", "paths": { "@/*": ["./src/*"] } },
"include": ["./src/**/*.ts", "./src/**/*.tsx", "./tests/**/*.ts"],
}
The build reads tsconfig.build.json, which extends tsconfig.json and sets rootDir: ./src, outDir: ./dist and jsx: react-jsx.
// tsdown.config.ts
import { pluginBuild } from '@seshuk/payload-plugin-tooling/tsdown'
import { defineConfig } from 'tsdown'
export default defineConfig(pluginBuild())
The build keeps the src file layout in dist, copies src/**/*.css and never bundles npm packages, except this package (see Telemetry and Fields). Pass copy for more files, for example pluginBuild({ copy: ['src/**/*.edge.js'] }).
// tests/vitest.config.ts
import { vitestBase } from '@seshuk/payload-plugin-tooling/vitest'
import { defineConfig } from 'vitest/config'
export default defineConfig({ ...vitestBase, test: { include: ['tests/**/*.spec.ts'] } })
vitestBase maps the @/ alias to src/, the same as paths in tsconfig.json. Run Vitest from the plugin root.
import { testDatabase } from '@seshuk/payload-plugin-tooling/test-database'
export default buildConfig({ db: await testDatabase() /* … */ })
TEST_DB picks an in-memory database: sqlite (default), postgres (PGlite) or mongodb (mongodb-memory-server). Install only the packages for the databases you test:
TEST_DB | Packages |
|---|---|
sqlite | @payloadcms/db-sqlite |
postgres | @payloadcms/db-postgres, @electric-sql/pglite, @electric-sql/pglite-socket |
mongodb | @payloadcms/db-mongodb, mongodb-memory-server |
Anonymous usage telemetry, shared by all plugins. Once a day per project, it sends the plugin, Payload and Node versions, the OS, a hashed project ID and the features the plugin passes. It never sends secrets, IPs, keys or names. On the first run, it logs a notice with the opt-outs.
Telemetry is off when any of these is set:
telemetry: false in the Payload config or in the plugin options;DO_NOT_TRACK=1 or the plugin's own variable, for example BUNNY_TELEMETRY_DISABLED=1;CI or NODE_ENV=test.Call reportTelemetry in onInit and do not wait for it. It never throws. Features are booleans only, never names or values:
import { reportTelemetry, type TelemetryOption } from '@seshuk/payload-plugin-tooling/telemetry'
export type MyPluginConfig = { telemetry?: TelemetryOption /* … */ }
config.onInit = async (payload) => {
await existingOnInit?.(payload)
void reportTelemetry({
disableEnv: 'BUNNY_TELEMETRY_DISABLED',
docsUrl: 'https://payload-storage-bunny.seshuk.im/v4/configuration/telemetry',
features: { signedUrls: Boolean(pluginConfig.signedUrls) },
option: pluginConfig.telemetry,
packageName: '@seshuk/payload-storage-bunny',
payload,
product: 'payload-storage-bunny',
})
}
pluginBuild() bundles this module into the plugin's dist/_tooling/, so it is never a runtime dependency. Any other npm package that ends up in the bundle fails the build. telemetry: { url } sends to another collector. The server accepts only known products: add a new product slug on the server first.
import { findFieldPaths, insertField, type InsertPosition } from '@seshuk/payload-plugin-tooling/fields'
collection.fields = insertField(collection.fields, { after: 'meta.title' }, myField)
const paths = findFieldPaths(collection.fields, (field) => Boolean(field.custom?.myPlugin))
insertField(fields, position, field) returns a new field list. position is an InsertPosition: 'first', 'last', 'sidebar' (appends the field with admin.position: 'sidebar'), { after: path } or { before: path }. A path names fields by dots through groups, arrays and named tabs; rows, collapsibles, unnamed groups and unnamed tabs add no segment. A path that does not match from the top is also looked up inside every group and tab, so { after: 'title' } finds meta.title. When that finds the name in more than one place, it throws Field path "<path>" is ambiguous, use the full path: a.x, b.x. An unknown path throws Field path "<path>" not found.
findFieldPaths(fields, predicate) returns the paths of the named fields that match, with the same naming rules, for example ['slug', 'meta.description', 'seo.image'].
Both only import types from payload and work with Payload 3 and 4. pluginBuild() bundles the module into the plugin's dist/_tooling/.
Both workflows run the scripts lint, format:check, typecheck, test:unit, test:int and build. Every plugin must define them. test:unit runs tests without a database or network; test:int runs the database tests.
# .github/workflows/ci.yml
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
uses: maximseshuk/payload-plugin-tooling/.github/workflows/[email protected]
with:
node-versions: '["24"]'
# .github/workflows/release.yml
name: Release
on:
push:
tags: ['v*.*.*']
permissions:
contents: read
jobs:
release:
uses: maximseshuk/payload-plugin-tooling/.github/workflows/[email protected]
permissions:
contents: write
id-token: write
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
The release workflow:
cliff.toml, or from the shared one in this package when the plugin has none, and takes the repository for links from GITHUB_REPO;.github/releases/vX.Y.Z.md under the version heading and above the commit list when the file exists;beta for X.Y.Z-beta.N, latest for the newest major, latest-N for an older major;NPM_TOKEN secret for the first release of a new package.To add text under the version heading and above the commit list, such as a short intro or breaking changes, commit .github/releases/vX.Y.Z.md with the release. Keep it to a few lines and link to the upgrade guide in the docs for the details.
<!-- .github/releases/v4.0.0.md -->
Payload 4 support. Upgrade guide: https://example.com/v4/upgrade-guide
## ⚠️ Breaking changes
- Node.js 24.15+ is required.
The file is optional, except for a new major (vX.0.0) and its first prerelease (vX.0.0-beta.1). Without it, those releases fail before anything is published.
npm can add a trusted publisher only to a package that already exists. For a new package:
NPM_TOKEN repository secret.release.yml (the caller, not the file in this repository).NPM_TOKEN secret and revoke the token. Later releases use OIDC..zed/settings.json and .vscode/ in this repository are the reference editor settings. Copy them to each plugin: editors cannot read settings from a package. They format with oxfmt on save, fix oxlint issues and use the TypeScript 7 language server.
Oxc and TypeScript Language Server..vscode/extensions.json..claude/settings.json is the reference project settings for Claude Code. Copy it to each plugin and add the plugin's own entries, such as MCP servers. It:
gh api call, also in auto mode;.env files;payload plugin and the payload-plugin plugin from this repository.payload-plugin pluginThis repository is also a Claude Code plugin marketplace (.claude-plugin/marketplace.json). The plugin in claude/ has:
oxlint --fix and oxfmt on every file Claude edits, and shows the remaining lint errors to Claude. It needs jq;/payload-plugin:release skill, which prepares a release: version, release notes, checks, release commit and tag. It never pushes.Plugins get changes to the hook and the skill without copying files.
MIT
payload plugin template
Starter template for building Payload v3 plugins with a dev app, tests and Docker support
197v3
payload integration test utils
Vitest helpers that give integration tests a ready Payload Local API instance backed by a containerized database
448/wk0v3
payload cli
Command-line access to Payload collections and globals through the Local API, built for AI agents and humans
588/wk13v3
payload plugin resolve alias
Shorthand helper to add webpack aliases that exclude server-only modules from the Payload admin bundle
491.2k/wk7v1
payload dry run
Test create operations with full validation and hooks, then roll back so nothing is persisted
439/wk0v3
payload pglite
Run Payload on an embedded PGlite Postgres for development, tests and CI without installing a database
350v3 v4