File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313# Local tool distributions
1414.tooling /
15+
16+ # Node workspace artifacts
17+ node_modules /
18+ packages /* /node_modules /
19+ packages /* /dist /
Original file line number Diff line number Diff line change @@ -105,6 +105,15 @@ Requirements:
105105- Java 17+
106106- Gradle 8+
107107
108+ ## Node Adapter Status
109+
110+ Node.js adapter work is tracked in issue ` #106 ` and lives under ` packages/memory-server ` .
111+
112+ Current state:
113+ - package scaffold exists (` @jongodb/memory-server ` )
114+ - runtime process manager is in progress (` #108 ` )
115+ - Jest/Vitest helpers and compatibility smoke suites are planned (` #109 ` , ` #110 ` )
116+
108117## Transaction Contract (Current)
109118
110119Supported in current scope:
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " jongodb-workspace" ,
3+ "private" : true ,
4+ "description" : " Workspace scripts for jongodb Node adapter packages." ,
5+ "workspaces" : [
6+ " packages/*"
7+ ],
8+ "scripts" : {
9+ "node:build" : " npm run --workspace @jongodb/memory-server build" ,
10+ "node:test" : " npm run --workspace @jongodb/memory-server test" ,
11+ "node:typecheck" : " npm run --workspace @jongodb/memory-server typecheck"
12+ }
13+ }
Original file line number Diff line number Diff line change 1+ # @jongodb/memory-server
2+
3+ Node.js adapter package for starting a ` jongodb ` test server and obtaining a MongoDB URI.
4+
5+ Current status:
6+ - package scaffold is in place
7+ - runtime process manager is tracked in issue ` #108 `
8+
9+ ## Local Commands
10+
11+ From repository root:
12+
13+ ``` bash
14+ npm ci
15+ npm run node:build
16+ npm run node:typecheck
17+ npm run node:test
18+ ```
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @jongodb/memory-server" ,
3+ "version" : " 0.0.0-development" ,
4+ "description" : " Node.js launcher for jongodb in-memory server" ,
5+ "keywords" : [
6+ " mongodb" ,
7+ " mongodb-memory-server" ,
8+ " jongodb" ,
9+ " integration-test" ,
10+ " jest" ,
11+ " vitest"
12+ ],
13+ "license" : " Apache-2.0" ,
14+ "type" : " module" ,
15+ "main" : " ./dist/index.js" ,
16+ "types" : " ./dist/index.d.ts" ,
17+ "files" : [
18+ " dist"
19+ ],
20+ "engines" : {
21+ "node" : " >=20"
22+ },
23+ "scripts" : {
24+ "build" : " tsc -p tsconfig.json" ,
25+ "clean" : " rm -rf dist" ,
26+ "typecheck" : " tsc -p tsconfig.json --noEmit" ,
27+ "pretest" : " npm run build" ,
28+ "test" : " node --test dist/test/*.test.js"
29+ },
30+ "devDependencies" : {
31+ "@types/node" : " ^20.17.57" ,
32+ "typescript" : " ^5.9.2"
33+ }
34+ }
Original file line number Diff line number Diff line change 1+ export interface JongodbMemoryServerOptions {
2+ host ?: string ;
3+ port ?: number ;
4+ databaseName ?: string ;
5+ startupTimeoutMs ?: number ;
6+ logLevel ?: "silent" | "info" | "debug" ;
7+ }
8+
9+ export interface JongodbMemoryServer {
10+ readonly uri : string ;
11+ stop ( ) : Promise < void > ;
12+ }
13+
14+ function notImplementedError ( ) : Error {
15+ return new Error (
16+ "Runtime process manager is not implemented yet. Track progress in issue #108."
17+ ) ;
18+ }
19+
20+ /**
21+ * Starts a local jongodb-backed MongoDB-compatible endpoint for tests.
22+ * Runtime process lifecycle is implemented in issue #108.
23+ */
24+ export async function startJongodbMemoryServer (
25+ _options : JongodbMemoryServerOptions = { }
26+ ) : Promise < JongodbMemoryServer > {
27+ throw notImplementedError ( ) ;
28+ }
Original file line number Diff line number Diff line change 1+ import { test } from "node:test" ;
2+ import assert from "node:assert/strict" ;
3+
4+ import { startJongodbMemoryServer } from "../index.js" ;
5+
6+ test ( "startJongodbMemoryServer is scaffolded and explicitly not implemented" , async ( ) => {
7+ await assert . rejects ( async ( ) => {
8+ await startJongodbMemoryServer ( ) ;
9+ } , / n o t i m p l e m e n t e d / i) ;
10+ } ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "target" : " ES2022" ,
4+ "module" : " NodeNext" ,
5+ "moduleResolution" : " NodeNext" ,
6+ "declaration" : true ,
7+ "declarationMap" : true ,
8+ "strict" : true ,
9+ "rootDir" : " src" ,
10+ "outDir" : " dist" ,
11+ "types" : [
12+ " node"
13+ ],
14+ "skipLibCheck" : true
15+ },
16+ "include" : [
17+ " src/**/*.ts"
18+ ]
19+ }
You can’t perform that action at this time.
0 commit comments