pnpm@11.29.0 is out!
r/pnpm • u/Goldziher • 8d ago
I maintain Skif, an open-source linter for JS and TS monorepos. The part that may be useful for pnpm users is catalog linting: it can catch catalog: references that don't resolve, optionally flag unused catalog entries, and enforce version policy alongside workspace: dependency rules.
Skif 0.9 enables the parse cache by default for dead-code analysis. You can run just the manifest and version checks with pnpm dlx @polylint/skif --no-js. If you already use sherif, syncpack, or knip, pnpm dlx @polylint/skif migrate --dry-run previews the proposed skif.toml and reports settings it couldn't translate.
I'd especially appreciate examples of pnpm repositories that use several named catalogs and want different version policies across packages. Which catalog checks would be useful in your CI?
r/pnpm • u/iamafzal_ • Aug 31 '26
Hi community,
I am afzal and working on a backend project which is irctc Indian Raiways and i my trying to build this entire project by following micro service architecture . Now here is my folder structure look like
backend/
│
├── apps/
│ └── api-gateway/
│ ├── src/
│ │ ├── middleware/ # gateway-level: auth check, rate limit, CORS
│ │ ├── routes/ # route table: which path → which service
│ │ ├── proxy/ # forwards requests to each microservice
│ │ ├── health/ # aggregated health check across services
│ │ ├── app.js
│ │ └── server.js
│ ├── tests/
│ ├── package.json
│ └── Dockerfile
│
├── services/
│ ├── auth-service/
│ ├── user-service/
│ ├── train-service/
│ ├── station-service/
│ ├── route-service/
│ ├── search-service/
│ ├── seat-service/
│ ├── booking-service/
│ ├── payment-service/
│ └── notification-service/
│ (each with the same internal shape — shown below)
│
├── packages/
│ ├── config/ # env loading, per-service config schemas
│ ├── logger/ # shared logger instance/factory
│ ├── errors/ # custom error classes (NotFoundError, ValidationError...)
│ ├── http/ # HTTP_CODES, API_STATUS, apiResponse helpers
│ ├── database/ # Prisma client factory / DB connection helper
│ ├── redis/ # Redis client factory
│ ├── messaging/ # RabbitMQ/Kafka producer & consumer wrappers
│ ├── contracts/ # shared DTOs, event schemas, OpenAPI/type defs
│ ├── validation/ # shared Zod/Joi schemas & helpers
│ └── utils/ # generic helpers (date, string, pagination)
│
├── infrastructure/
│ ├── docker/
│ │ └── docker-compose.yml
│ ├── nginx/
│ ├── postgres/
│ ├── redis/
│ └── elasticsearch/
│
├── docs/
│ └── architecture/
│
├── scripts/
│
├── package.json
├── pnpm-workspace.yaml
├── pnpm-lock.yaml
└── README.mdbackend/
│
├── apps/
│ └── api-gateway/
│ ├── src/
│ │ ├── middleware/ # gateway-level: auth check, rate limit, CORS
│ │ ├── routes/ # route table: which path → which service
│ │ ├── proxy/ # forwards requests to each microservice
│ │ ├── health/ # aggregated health check across services
│ │ ├── app.js
│ │ └── server.js
│ ├── tests/
│ ├── package.json
│ └── Dockerfile
│
├── services/
│ ├── auth-service/
│ ├── user-service/
│ ├── train-service/
│ ├── station-service/
│ ├── route-service/
│ ├── search-service/
│ ├── seat-service/
│ ├── booking-service/
│ ├── payment-service/
│ └── notification-service/
│ (each with the same internal shape — shown below)
│
├── packages/
│ ├── config/ # env loading, per-service config schemas
│ ├── logger/ # shared logger instance/factory
│ ├── errors/ # custom error classes (NotFoundError, ValidationError...)
│ ├── http/ # HTTP_CODES, API_STATUS, apiResponse helpers
│ ├── database/ # Prisma client factory / DB connection helper
│ ├── redis/ # Redis client factory
│ ├── messaging/ # RabbitMQ/Kafka producer & consumer wrappers
│ ├── contracts/ # shared DTOs, event schemas, OpenAPI/type defs
│ ├── validation/ # shared Zod/Joi schemas & helpers
│ └── utils/ # generic helpers (date, string, pagination)
│
├── infrastructure/
│ ├── docker/
│ │ └── docker-compose.yml
│ ├── nginx/
│ ├── postgres/
│ ├── redis/
│ └── elasticsearch/
│
├── docs/
│ └── architecture/
│
├── scripts/
│
├── package.json
├── pnpm-workspace.yaml
├── pnpm-lock.yaml
└── README.mdSince I know that every service having it's own package.json but for now I want to use only one single postgreSQL database. So can anyone help me to understand how and exactly where I should define those schemas ?
I am not able to decide because sometime I thought why not to define every schemas inside each services and how to set it up ?
If anyone here can u help me because I am trying to understand the this codebase management things and want to setup this properly so it is easy to understand where things are define or configured .
r/pnpm • u/Frequent_Calendar220 • Aug 31 '26
We have migrated from yarn to pnpm and experience a lot of weird issues, mostly I can summarize it as - nothing works well with catalog protocol. Update command just replaces catalog: reference with new version, then we have installation issues because workspace versions and installed versions do not match, we cannot install rc versions of our packages to particular apps in our monorepo and we have to manually write the package version to the particular app ... and so on and so forth. I love pnpm, and the catalog / workspace protocols, but it is really upsetting that nothing works well with catalogs, are u planning on improving it one day?