Consolidate migration scripts into pnpm-monorepo#1898
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
- Create new migrations app in pnpm-monorepo/apps/migrations - Migrate all scripts from app/scripts/migrations - Update imports to use @sam-monorepo/database - Convert JavaScript files to TypeScript - Use tsx for running migrations (better ESM support) - Add README with usage instructions - Configure package.json with necessary dependencies Co-authored-by: simonknittel <8451099+simonknittel@users.noreply.github.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Co-authored-by: simonknittel <8451099+simonknittel@users.noreply.github.com>
- Remove unnecessary @ts-check directives from TypeScript files - Remove unnecessary @ts-expect-error directives - Update all usage comments to use 'npx tsx' consistently - Fix typo in README (permssion -> permission) Co-authored-by: simonknittel <8451099+simonknittel@users.noreply.github.com>
- Update 005-populate-citizen-caches.ts usage comment - Update 006-populate-citizen-roles-cache.ts usage comment - Remove remaining @ts-check directive from 002 script Co-authored-by: simonknittel <8451099+simonknittel@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR consolidates scattered database migration scripts from app/scripts/migrations into a new dedicated monorepo app at pnpm-monorepo/apps/scripts. The changes modernize the tooling by converting CommonJS JavaScript files to ESM TypeScript and standardizing imports to use the @sam-monorepo/database workspace package.
Changes:
- Created new
pnpm-monorepo/apps/scriptsapp with proper package configuration and TypeScript setup - Migrated 11 migration scripts (001a through 011) and Algolia indexing script to use workspace package imports
- Removed legacy
app/scriptsdirectory and helper files
Reviewed changes
Copilot reviewed 25 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-monorepo/package.json | Added build:scripts command to build dependencies for migration scripts |
| pnpm-monorepo/apps/scripts/package.json | New package configuration with dependencies and ESM setup |
| pnpm-monorepo/apps/scripts/tsconfig.json | TypeScript configuration for the scripts app |
| pnpm-monorepo/apps/scripts/README.md | Documentation for running migration scripts |
| pnpm-monorepo/apps/scripts/src/migrations/*.ts | Migrated scripts with updated imports from workspace package |
| pnpm-monorepo/apps/scripts/src/algolia/*.ts | Algolia indexing script with updated imports |
| pnpm-monorepo/apps/playwright/tsconfig.json | Formatting fix for lib array |
| pnpm-monorepo/apps/playwright/playwright.config.ts | Formatting fix for extraHTTPHeaders |
| pnpm-monorepo/apps/lambda/src/common/parameters.ts | Formatting fix for map entries |
| pnpm-monorepo/.vscode/settings.json | Added "algoliasearch" to spell check dictionary |
| .vscode/extensions.json | Added Prisma VS Code extension recommendation |
| app/scripts/prisma.ts | Removed old helper file |
| app/scripts/migrations/*.js | Removed old migration scripts |
Files not reviewed (1)
- pnpm-monorepo/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pnpm-monorepo/apps/scripts/src/migrations/002-permssion-value-to-string.ts
Show resolved
Hide resolved
|

Migration scripts were scattered in
app/scripts/migrations, outside the monorepo structure. This consolidates them into a dedicatedpnpm-monorepo/apps/migrationsapp.Changes
pnpm-monorepo/apps/migrationswith proper package configuration../prismato@sam-monorepo/databaseworkspace packagets-nodewithtsxfor better ESM supportapp/scripts/migrationsdirectory and unusedprisma.tshelperMigration structure
All 11 migration scripts (001a through 011) now live alongside other monorepo apps (lambda, playwright) with consistent tooling and imports.
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:
checkpoint.prisma.io/usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/sam/sam/pnpm-monorepo/node_modules/.pnpm/prisma@6.17.1_typescript@5.9.3/node_modules/prisma/build/child {"product":"prisma","version":"6.17.1","cli_install_type":"local","information":"","local_timestamp":"2026-02-01T13:16:11Z","project_hash":"525e1e0a","cli_path":"/home/REDACTED/work/sam/sam/pnpm-monorepo/packages/database/node_modules/prisma/build/index.js"(dns block)/usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/sam/sam/pnpm-monorepo/node_modules/.pnpm/prisma@6.17.1_typescript@5.9.3/node_modules/prisma/build/child {"product":"prisma","version":"6.17.1","cli_install_type":"local","information":"","local_timestamp":"2026-02-01T13:16:31Z","project_hash":"525e1e0a","cli_path":"/home/REDACTED/work/sam/sam/pnpm-monorepo/packages/database/node_modules/prisma/build/index.js"(dns block)/usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/sam/sam/pnpm-monorepo/node_modules/.pnpm/prisma@6.17.1_typescript@5.9.3/node_modules/prisma/build/child {"product":"prisma","version":"6.17.1","cli_install_type":"local","information":"","local_timestamp":"2026-02-01T13:17:37Z","project_hash":"525e1e0a","cli_path":"/home/REDACTED/work/sam/sam/pnpm-monorepo/packages/database/node_modules/prisma/build/index.js"(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.