{"id":40601,"library":"aurora-orm","title":"Aurora ORM","description":"A near-zero runtime ORM and migration tool for PostgreSQL, targeting Node.js and TypeScript. Version 2.59.3, with a weekly release cadence. Unlike traditional ORMs like TypeORM or Sequelize, Aurora ORM avoids decorators and reflect-metadata, enabling compatibility with modern transpilers like SWC and ESbuild. It uses a Data Mapper pattern, provides type-safe column mappings, supports transactions, relations, indexes, and automated migrations. The library is authored primarily for personal use and is not intended as a fully open-source community project.","status":"active","version":"2.59.3","language":"javascript","source_language":"en","source_url":"https://github.com/fyapy/aurora-orm","tags":["javascript","typescript"],"install":[{"cmd":"npm install aurora-orm","lang":"bash","label":"npm"},{"cmd":"yarn add aurora-orm","lang":"bash","label":"yarn"},{"cmd":"pnpm add aurora-orm","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for running migration scripts with `tsx` commands","package":"tsx","optional":true}],"imports":[{"note":"ESM-only; require() will not work.","wrong":"const { connect } = require('aurora-orm')","symbol":"connect","correct":"import { connect } from 'aurora-orm'"},{"note":"Named export, not default.","wrong":"import Drivers from 'aurora-orm'","symbol":"Drivers","correct":"import { Drivers } from 'aurora-orm'"},{"note":"createModel is a top-level export, not a subpath.","wrong":"import { createModel } from 'aurora-orm/models'","symbol":"createModel","correct":"import { createModel } from 'aurora-orm'"},{"note":"Exported from the main package entry.","wrong":"import { runMigrationsAndExit } from 'aurora-orm/migrator'","symbol":"runMigrationsAndExit","correct":"import { runMigrationsAndExit } from 'aurora-orm'"}],"quickstart":{"code":"import { connect, createModel, Drivers } from 'aurora-orm';\n\ninterface User {\n  id: number;\n  name: string;\n  age: number | null;\n}\n\nconst UserModel = createModel<User>({\n  table: 'users',\n  mapping: {\n    id: 'id',\n    name: 'name',\n    age: 'age',\n  },\n});\n\nasync function main() {\n  await connect({\n    config: {\n      driver: Drivers.Postgres,\n      connectionString: process.env.DATABASE_URL ?? 'postgres://test:test@localhost:5432/test',\n    },\n  });\n\n  const user = await UserModel.create({ name: 'Alice', age: 30 });\n  console.log('Created user:', user);\n\n  const users = await UserModel.findAll();\n  console.log('All users:', users);\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Connects to PostgreSQL, defines a User model with type-safe mapping, creates a user, and retrieves all users."},"warnings":[{"fix":"Evaluate risks; consider using more established ORMs for production-critical applications.","message":"The library is authored for personal use and may not adhere to semver or provide extensive community support.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use try/catch around await connect(...) to handle connection errors.","message":"In version 2.x, `connect` no longer accepts a callback or returns a promise that resolves to a connection; it now returns void and throws on failure.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Replace `findOne(1)` with `findOne({ id: 1 })`.","message":"`findOne` with an ID as a number is deprecated; use object filter syntax instead.","severity":"deprecated","affected_versions":">=2.30.0"}],"env_vars":null,"search_vec":"'2.59.3':19 'aurora':1,32 'author':71 'autom':66 'avoid':34 'cadenc':24 'column':59 'communiti':86 'compat':41 'data':52 'decor':35 'enabl':40 'esbuild':48 'fulli':82 'index':64 'intend':79 'javascript':88 'librari':69 'like':28,45 'map':60 'mapper':53 'metadata':39 'migrat':10,67 'modern':43 'near':5 'near-zero':4 'node.js':15 'open':84 'open-sourc':83 'orm':2,8,27,33 'pattern':54 'person':74 'postgresql':13 'primarili':72 'project':87 'provid':55 'reflect':38 'reflect-metadata':37 'relat':63 'releas':23 'runtim':7 'safe':58 'sequel':31 'sourc':85 'support':61 'swc':46 'target':14 'tool':11 'tradit':26 'transact':62 'transpil':44 'type':57 'type-saf':56 'typeorm':29 'typescript':17,89 'unlik':25 'use':50,75 'version':18 'week':22 'zero':6","created_at":"2026-06-04T18:48:21.238552+00:00","updated_at":"2026-06-04T18:48:21.238552+00:00","problems":[{"fix":"Use `import` statements or set `\"type\": \"module\"` in package.json.","cause":"Using `require` to import an ESM-only package","error":"Error: Module not found: Default condition should be last one"},{"fix":"Use named import: `import { connect } from 'aurora-orm'`.","cause":"Importing `connect` as a default import","error":"TypeError: connect is not a function"},{"fix":"Install tsx: `npm install -D tsx`","cause":"Missing peer dependency for running migration scripts","error":"Error: Cannot find module 'tsx'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/fyapy/aurora-orm#readme","github":"https://github.com/fyapy/aurora-orm","docs":null,"changelog":null,"pypi":null,"npm":"aurora-orm","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}