Skip to content

Commit 78a4800

Browse files
committed
feat: migrate discord-plays-pokemon to monorepo as packages/dpp
- 3 sub-packages: common, backend, frontend - Renamed from @discord-plays-pokemon/* to @shepherdjerred/dpp-* - Updated workspace references to workspace:* - common emits to dist/ with NodeNext module resolution - backend/frontend adapted tsconfigs extending monorepo base at depth 3 - Replaced standalone eslint plugins with @shepherdjerred/eslint-config - Frontend keeps react-hooks and react-refresh eslint plugins - Added nested workspace pattern to root package.json - Updated Dagger, pre-commit, compliance exemptions, lint-staged, knip Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0de0855 commit 78a4800

389 files changed

Lines changed: 27666 additions & 31 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dagger/src/index.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ function installWorkspaceDeps(source: Directory): Container {
9090
.withMountedFile("/workspace/packages/better-skill-capped/package.json", source.file("packages/better-skill-capped/package.json"))
9191
.withMountedFile("/workspace/packages/starlight-karma-bot/package.json", source.file("packages/starlight-karma-bot/package.json"))
9292
.withMountedFile("/workspace/packages/sjer.red/package.json", source.file("packages/sjer.red/package.json"))
93+
// Discord Plays Pokemon sub-packages
94+
.withExec(["mkdir", "-p", "/workspace/packages/dpp"])
95+
.withMountedFile("/workspace/packages/dpp/common/package.json", source.file("packages/dpp/common/package.json"))
96+
.withMountedFile("/workspace/packages/dpp/backend/package.json", source.file("packages/dpp/backend/package.json"))
97+
.withMountedFile("/workspace/packages/dpp/frontend/package.json", source.file("packages/dpp/frontend/package.json"))
9398
// Clauderon web packages (nested workspace with own lockfile)
9499
.withMountedFile("/workspace/packages/clauderon/web/package.json", source.file("packages/clauderon/web/package.json"))
95100
.withMountedFile("/workspace/packages/clauderon/web/bun.lock", source.file("packages/clauderon/web/bun.lock"))
@@ -116,6 +121,10 @@ function installWorkspaceDeps(source: Directory): Container {
116121
.withMountedDirectory("/workspace/packages/better-skill-capped", source.directory("packages/better-skill-capped"))
117122
.withMountedDirectory("/workspace/packages/starlight-karma-bot", source.directory("packages/starlight-karma-bot"))
118123
.withMountedDirectory("/workspace/packages/sjer.red", source.directory("packages/sjer.red"))
124+
// Discord Plays Pokemon sub-packages
125+
.withMountedDirectory("/workspace/packages/dpp/common", source.directory("packages/dpp/common"))
126+
.withMountedDirectory("/workspace/packages/dpp/backend", source.directory("packages/dpp/backend"))
127+
.withMountedDirectory("/workspace/packages/dpp/frontend", source.directory("packages/dpp/frontend"))
119128
// Clauderon web packages
120129
.withMountedDirectory("/workspace/packages/clauderon/web/shared", source.directory("packages/clauderon/web/shared"))
121130
.withMountedDirectory("/workspace/packages/clauderon/web/client", source.directory("packages/clauderon/web/client"))
@@ -399,7 +408,7 @@ for dir in /workspace/packages/*/; do
399408
PKG=$(basename "$dir")
400409
# Skip exempt packages
401410
case "$PKG" in
402-
resume|eslint-config|clauderon|claude-plugin|a2ui-poc|discord-claude|fonts|anki|castle-casters|macos-cross-compiler) continue ;;
411+
resume|eslint-config|clauderon|claude-plugin|a2ui-poc|discord-claude|fonts|anki|castle-casters|macos-cross-compiler|dpp) continue ;;
403412
esac
404413
405414
echo "Checking $PKG..."

.husky/pre-commit

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ if has_changes '^packages/sjer.red/.*\.(ts|tsx)$'; then
9393
run_check "sjer.red typecheck" bun run --filter='./packages/sjer.red' typecheck
9494
fi
9595

96+
if has_changes '^packages/dpp/.*\.(ts|tsx)$'; then
97+
run_check "dpp typecheck" sh -c 'for pkg in common backend frontend; do bun run --filter="./packages/dpp/$pkg" typecheck; done'
98+
fi
99+
96100
# --- Clauderon web packages ---
97101
if has_changes '^packages/clauderon/web/shared/.*\.(ts|tsx)$'; then
98102
run_check "web/shared typecheck" sh -c 'cd packages/clauderon/web/shared && bun run typecheck'
@@ -137,7 +141,7 @@ if has_changes '^packages/.*/package\.json$|^packages/.*/eslint\.config\.|^packa
137141
for dir in packages/*/; do
138142
PKG=$(basename "$dir")
139143
case "$PKG" in
140-
resume|eslint-config|clauderon|claude-plugin|a2ui-poc|discord-claude|fonts|anki|castle-casters|macos-cross-compiler) continue ;;
144+
resume|eslint-config|clauderon|claude-plugin|a2ui-poc|discord-claude|fonts|anki|castle-casters|macos-cross-compiler|dpp) continue ;;
141145
esac
142146
143147
# Check for eslint config

.lintstagedrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,30 @@ export default {
6969
const relativeFiles = filenames.map(f => path.relative(docsDir, f)).join(" ");
7070
return [`cd ${docsDir} && bunx eslint --fix ${relativeFiles}`];
7171
},
72+
// Discord Plays Pokemon sub-packages
73+
"packages/dpp/*/src/**/*.{ts,tsx,js,jsx}": (filenames) => {
74+
const packageMap = new Map();
75+
76+
for (const filename of filenames) {
77+
const match = filename.match(/^packages\/dpp\/([^/]+)\//);
78+
if (match) {
79+
const packageName = match[1];
80+
if (!packageMap.has(packageName)) {
81+
packageMap.set(packageName, []);
82+
}
83+
packageMap.get(packageName).push(filename);
84+
}
85+
}
86+
87+
const commands = [];
88+
for (const [packageName, files] of packageMap) {
89+
const packageDir = `packages/dpp/${packageName}`;
90+
const relativeFiles = files.map(f => path.relative(packageDir, f)).join(" ");
91+
commands.push(`cd ${packageDir} && bunx eslint --fix ${relativeFiles}`);
92+
}
93+
94+
return commands;
95+
},
7296
// .dagger CI pipeline
7397
".dagger/src/**/*.ts": (filenames) => {
7498
const daggerDir = ".dagger";

.quality-baseline.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"eslint-disable": 26,
2+
"eslint-disable": 33,
33
"ts-suppressions": 49,
44
"rust-allow": 52,
55
"prettier-ignore": 3,

0 commit comments

Comments
 (0)