
Research
/Security News
Laravel Lang Compromised with RCE Backdoor Across 700+ Versions
Laravel Lang packages were compromised with an RCE backdoor across hundreds of versions, exposing cloud, CI/CD, and developer secrets.
nestjs-better-sqlite3
Advanced tools
Minimal SQLite3 module for NestJS with type safety.
Motivation: ORM's are great at abstracting a lot of complexity but often introduce bugs and produce slow queries; In addition, I rarely find myself wanting to switch between different databases, so I figured I write a lightweight wrapper around better-sqlite3.
npm install nestjs-better-sqlite3
// Basic
@Module({
imports: [Sqlite3Module.forRoot({ dataSource: 'sqlite.db' })]
})
// With options
@Module({
imports: [Sqlite3Module.forRoot({
dataSource: 'app.db',
enableWal: true,
runMigrations: true,
migrationsDir: './migrations',
entities: [User, Post]
})]
})
Migrations are organized in folders with up.sql and down.sql files:
migrations/
├── 1732471234-create-users/
│ ├── up.sql
│ └── down.sql
└── 1732471456-create-posts/
├── up.sql
└── down.sql
Example migration files:
-- migrations/1732471234-create-users/up.sql
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT UNIQUE NOT NULL
);
-- migrations/1732471234-create-users/down.sql
DROP TABLE users;
# Generate new migration
npx sqlite3-migrate migration:generate create-users
# Run pending migrations
npx sqlite3-migrate migration:run
# Revert last migration
npx sqlite3-migrate migration:revert
# Custom paths
npx sqlite3-migrate migration:run --db app.db --migrations ./db/migrations
@Entity('users')
class User {
id: number
name: string
email: string
}
const repo = this.db.getRepository(User)
// CRUD operations
repo.create({ name: 'John', email: 'john@example.com' })
repo.findAll({ limit: 10, offset: 5, orderBy: { column: 'name', direction: 'ASC' } })
repo.findOne({ email: 'john@example.com' })
repo.update({ id: 1 }, { name: 'Jane' })
repo.delete({ id: 1 })
repo.count({ active: true })
// Type-safe raw queries
this.db.query<User>('SELECT * FROM users WHERE age > ?', [18])
this.db.queryOne<User>('SELECT * FROM users WHERE id = ?', [1])
this.db.execute('INSERT INTO users (name) VALUES (?)', ['Alice'])
this.db.transaction((db) => {
const stmt = db.prepare('INSERT INTO users (name) VALUES (?)')
stmt.run('User 1')
stmt.run('User 2')
})
npm run test
FAQs
NestJS module for Better SQLite3
The npm package nestjs-better-sqlite3 receives a total of 2 weekly downloads. As such, nestjs-better-sqlite3 popularity was classified as not popular.
We found that nestjs-better-sqlite3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Laravel Lang packages were compromised with an RCE backdoor across hundreds of versions, exposing cloud, CI/CD, and developer secrets.

Security News
Socket found a malicious postinstall hook across 700+ GitHub repos, including PHP packages on Packagist and Node.js project repositories.

Security News
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain