Skip to content

Commit 5f3d3c0

Browse files
committed
test: name normalization
1 parent 62b6a22 commit 5f3d3c0

113 files changed

Lines changed: 487 additions & 1205 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
# Doctrine DBAL Parity Map (Best Effort)
2-
3-
This project keeps namespace/folder parity with Doctrine DBAL where possible, while still fitting TypeScript and Node driver constraints.
1+
# @devscast/datazen
42

53
## Rules
6-
74
- Keep one class/interface per file.
85
- Keep folder structure aligned with Doctrine namespaces whenever that namespace exists in this port.
96
- Use Node-specific names only where Doctrine has no equivalent (for example `driver/mysql2`, `driver/mssql`).
@@ -14,13 +11,9 @@ This project keeps namespace/folder parity with Doctrine DBAL where possible, wh
1411
- When a task is a refactoring, breaking changes are allowed, even full rewrites, refactorings, and reorgs.
1512
- Try to keep 1:1 parity with Doctrine's classes and interfaces as much as possible, but don't be afraid to deviate a bit when it makes sense for TypeScript or Node.
1613
- OCI8,PDO, MySQLI are native to PHP and have no direct equivalent in Node so ignore any references to those in Doctrine.
17-
- mysql2, mssql, pgsql, sqlite3 are node drivers that have some similarities to PDO drivers but are not direct ports, so treat them as their own unique implementations and only borrow concepts and patterns from Doctrine where it makes sense.
14+
- mysql2, mssql, pg, sqlite3 are node drivers that have some similarities to PDO drivers but are not direct ports, so treat them as their own unique implementations and only borrow concepts and patterns from Doctrine where it makes sense.
1815
- What is async by nature should be async and awaited - PHP is fully synchronous but Node is not, so embrace async/await where it makes sense and don't try to force sync patterns on async code.
1916

17+
## Validation
2018
- Run "bun run format", "bun run lint", "bun run typecheck" and "bun run test" before submitting any changes to ensure code quality and test coverage.
2119
- Once validated add a summary of your changes in CHANGELOG.md
22-
23-
## Intentional TS/Node Deviations
24-
25-
- `src/driver/mysql2/*` and `src/driver/mssql/*` are Node-driver adapters, not PDO driver ports.
26-
- Filenames are kebab-case for TypeScript consistency, but map 1:1 to Doctrine classes where implemented.

CHANGELOG.md

Lines changed: 38 additions & 319 deletions
Large diffs are not rendered by default.

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Exceptions
112112
Exceptions are normalized in `@devscast/datazen/exception`. Driver-specific errors are
113113
translated through per-driver exception converters:
114114

115-
- `MySQLExceptionConverter`, `SQLSrvExceptionConverter`, `PgSQLExceptionConverter`, and `SQLiteExceptionConverter` from `@devscast/datazen/driver`
115+
- `MySQLExceptionConverter`, `SQLServerExceptionConverter`, `PostgreSQLExceptionConverter`, and `SQLiteExceptionConverter` from `@devscast/datazen/driver`
116116

117117
Tools
118118
-----

package.json

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "@devscast/datazen",
3-
"version": "1.0.1",
3+
"version": "1.1.0",
44
"type": "module",
5-
"source": "./src/index.ts",
5+
"source": "./src/_index.ts",
66
"main": "./dist/index.cjs",
77
"types": "./dist/index.d.ts",
88
"module": "./dist/index.js",
@@ -13,15 +13,18 @@
1313
"require": "./dist/index.cjs",
1414
"default": "./dist/index.js"
1515
},
16+
"./connections": {
17+
"types": "./dist/connections.d.ts",
18+
"import": "./dist/connections.js",
19+
"require": "./dist/connections.cjs"
20+
},
1621
"./driver": {
1722
"types": "./dist/driver.d.ts",
1823
"import": "./dist/driver.js",
1924
"require": "./dist/driver.cjs"
2025
},
2126
"./exception": {
22-
"types": "./dist/exception.d.ts",
23-
"import": "./dist/exception.js",
24-
"require": "./dist/exception.cjs"
27+
"types": "./dist/exception.d.ts"
2528
},
2629
"./logging": {
2730
"types": "./dist/logging.d.ts",
@@ -43,16 +46,6 @@
4346
"import": "./dist/query.js",
4447
"require": "./dist/query.cjs"
4548
},
46-
"./schema": {
47-
"types": "./dist/schema.d.ts",
48-
"import": "./dist/schema.js",
49-
"require": "./dist/schema.cjs"
50-
},
51-
"./sql": {
52-
"types": "./dist/sql.d.ts",
53-
"import": "./dist/sql.js",
54-
"require": "./dist/sql.cjs"
55-
},
5649
"./tools": {
5750
"types": "./dist/tools.d.ts",
5851
"import": "./dist/tools.js",
@@ -104,8 +97,8 @@
10497
"dev": "tsup --watch",
10598
"test": "vitest run --config vitest.unit.config.ts",
10699
"test:all": "vitest run",
107-
"test:functional": "node scripts/run-functional-tests.mjs",
108-
"test:functional:local": "node scripts/run-functional-tests-local.mjs",
100+
"test:functional": "node scripts/test-functional.mjs",
101+
"test:functional:local": "node scripts/test-functional-local.mjs",
109102
"test:coverage": "vitest run --config vitest.unit.config.ts --coverage",
110103
"test:watch": "vitest",
111104
"============= HUSKY =============": "",

0 commit comments

Comments
 (0)