npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nestplatform/transactional-typeorm

v1.1.2

Published

TypeORM transaction adapter for `@nestplatform/transactional`, providing seamless transaction management for TypeORM in NestJS.

Readme

@nestplatform/transactional-typeorm

TypeORM transaction adapter for @nestplatform/transactional, providing seamless transaction management for TypeORM in NestJS.

Features

  • 🔄 TypeORM Integration: Fully compatible with TypeORM's QueryRunner and DataSource.
  • 🧩 Propagation Support: Implements REQUIRED, REQUIRES_NEW, and NESTED (via savepoints).
  • 🧬 Proxy Support: Automatically intercepts repository calls and redirects them to the active transaction's manager.
  • 🛡️ Isolation Levels: Support for custom isolation levels (READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE).

Installation

npm install @nestplatform/transactional @nestplatform/transactional-typeorm

Usage

1. Register the adapter

import { TransactionalModule } from '@nestplatform/transactional';
import { TypeOrmTransactionAdapter } from '@nestplatform/transactional-typeorm';

@Module({
  imports: [
    TransactionalModule.registerAsync({
      inject: [DataSource],
      useFactory: (dataSource: DataSource) => ({
        adapters: new TypeOrmTransactionAdapter(dataSource),
        logging: true,
      }),
    }),
  ],
})
export class AppModule {}

2. Transaction Propagation

The adapter handles the complex logic of starting, committing, and rolling back transactions based on the propagation level specified in @Transactional().

REQUIRED (Default)

The adapter joins an existing transaction if one is present in the TransactionContext, or starts a new one otherwise.

REQUIRES_NEW

The adapter always starts a new transaction. If one already exists, it is suspended, and the new transaction runs independently.

NESTED

The adapter creates a SAVEPOINT within the current transaction. If the nested operation fails, only that SAVEPOINT is rolled back, leaving the parent transaction intact.

Under the Hood

The TypeOrmTransactionAdapter uses a Proxy Pattern on your service instances to intercept calls to TypeORM repositories. When a transaction is active, the adapter ensures that repositories use the QueryRunner.manager from the current transaction context instead of the global EntityManager.

Changelog

1.1.2

  • adjust to allow multi layers transactional (hexagonal, clean architecture)

1.1.0

  • Added support for transaction synchronization hooks (beforeCommit, afterCommit, afterRollback, afterCompletion).
  • Improved shouldRollback logic to support error names (strings) and single class instances.
  • Integrated invokeBeforeCommit before physical commit for all propagation levels.

1.0.1

  • Fixed TypeORM peer dependency support for NestJS 11.

1.0.0

  • Initial release with TypeOrmTransactionAdapter and basic propagation support.

License

MIT